Another fix try

This commit is contained in:
Ailurupoda 2019-02-07 17:29:25 +01:00
parent 832eb40166
commit 8ed7971626
7 changed files with 7 additions and 8 deletions

View File

@ -620,7 +620,7 @@ class GPKGDBConnector(DBConnector):
""" 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 ''

View File

@ -1307,7 +1307,7 @@ class OracleDBConnector(DBConnector):
# Unsupported in Oracle
pass
def commentTable(self, schema, tablename, comment=None, db):
def commentTable(self, schema, tablename, db, comment=None):
"""Comment the table"""
return ''

View File

@ -748,7 +748,6 @@ class PostGisDBConnector(DBConnector):
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

View File

@ -571,7 +571,7 @@ class SpatiaLiteDBConnector(DBConnector):
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 ''

View File

@ -342,7 +342,7 @@ class VLayerConnector(DBConnector):
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 ''

View File

@ -376,7 +376,7 @@ class DlgImportVector(QDialog, Ui_Dialog):
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()

View File

@ -341,7 +341,7 @@ class DlgTableProperties(QDialog, Ui_Dialog):
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
@ -354,7 +354,7 @@ class DlgTableProperties(QDialog, Ui_Dialog):
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