mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-13 00:03:09 -04:00
Another fix try
This commit is contained in:
parent
832eb40166
commit
8ed7971626
@ -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 ''
|
||||
|
||||
|
@ -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 ''
|
||||
|
||||
|
@ -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
|
||||
|
@ -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 ''
|
||||
|
||||
|
@ -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 ''
|
||||
|
||||
|
@ -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()
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user