Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Another fix try
  • Loading branch information
Ailurupoda committed Feb 7, 2019
1 parent 832eb40 commit 8ed7971
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion python/plugins/db_manager/db_plugins/gpkg/connector.py
Expand Up @@ -620,7 +620,7 @@ def runVacuum(self):
""" run vacuum on the db """
self._execute_and_commit("VACUUM")

def commentTable(self, schema, tablename, comment=None, db):
def commentTable(self, schema, tablename, db, comment=None):
"""Comment the table"""
return ''

Expand Down
2 changes: 1 addition & 1 deletion python/plugins/db_manager/db_plugins/oracle/connector.py
Expand Up @@ -1307,7 +1307,7 @@ def renameSchema(self, schema, new_schema):
# Unsupported in Oracle
pass

def commentTable(self, schema, tablename, comment=None, db):
def commentTable(self, schema, tablename, db, comment=None):
"""Comment the table"""
return ''

Expand Down
1 change: 0 additions & 1 deletion python/plugins/db_manager/db_plugins/postgis/connector.py
Expand Up @@ -748,7 +748,6 @@ def commentTable(self, schema, tablename, comment=None, db):
else:
db.connector._execute(None, 'COMMENT ON TABLE "{0}"."{1}" IS E\'{2}\';'.format(schema, tablename, comment))


def getComment(self, tablename, field, db):
"""Returns the comment for a field"""
# SQL Query checking if a comment exists for the field
Expand Down
Expand Up @@ -571,7 +571,7 @@ def runVacuum(self):
c.execute('VACUUM')
self.connection.isolation_level = '' # reset to default isolation

def commentTable(self, schema, tablename, comment=None, db):
def commentTable(self, schema, tablename, db, comment=None):
"""Comment the table"""
return ''

Expand Down
2 changes: 1 addition & 1 deletion python/plugins/db_manager/db_plugins/vlayers/connector.py
Expand Up @@ -342,7 +342,7 @@ def runVacuum(self):
print("**unimplemented** runVacuum")
return False

def commentTable(self, schema, tablename, comment=None, db):
def commentTable(self, schema, tablename, db, comment=None):
"""Comment the table"""
return ''

Expand Down
2 changes: 1 addition & 1 deletion python/plugins/db_manager/dlg_import_vector.py
Expand Up @@ -376,7 +376,7 @@ def accept(self):
supportCom = self.db.supportsComment()
if self.chkCom.isEnabled() and self.chkCom.isChecked() and supportCom == True:
# using connector executing COMMENT ON TABLE query (with editCome.text() value)
self.db.connector.commentTable(schema, table, self.editCom.text(), self.db)
self.db.connector.commentTable(schema, table, self.db, self.editCom.text())

self.db.connection().reconnect()
self.db.refresh()
Expand Down
4 changes: 2 additions & 2 deletions python/plugins/db_manager/dlg_table_properties.py
Expand Up @@ -341,7 +341,7 @@ def createComment(self):
schem = self.table.schema().name
tab = self.table.name
com = self.viewComment.text()
self.db.connector.commentTable(schem, tab, com, self.db)
self.db.connector.commentTable(schem, tab, self.db, com)
except DbError as e:
DlgDbError.showError(e, self)
return
Expand All @@ -354,7 +354,7 @@ def deleteComment(self):
try:
schem = self.table.schema().name
tab = self.table.name
self.db.connector.unCommentTable(schem, tab, self.db)
self.db.connector.commentTable(schem, tab, self.db)
except DbError as e:
DlgDbError.showError(e, self)
return
Expand Down

0 comments on commit 8ed7971

Please sign in to comment.