Skip to content
Permalink
Browse files

Another fix try

  • Loading branch information
Ailurupoda committed Feb 7, 2019
1 parent 832eb40 commit 8ed7971626297918b8dd64233ad5520136b2e99c
@@ -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 ''

@@ -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 ''

@@ -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
@@ -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 ''

@@ -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 ''

@@ -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()
@@ -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
@@ -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

0 comments on commit 8ed7971

Please sign in to comment.
You can’t perform that action at this time.