Fixed the get_primary_keys() method so it returns column names instead of table names...sheesh.
This commit is contained in:
parent
bf7822ca90
commit
810b27abe3
1 changed files with 2 additions and 2 deletions
|
@ -72,8 +72,8 @@ class SQLBase7Dialect(default.DefaultDialect):
|
|||
|
||||
def get_primary_keys(self, connection, table_name, schema=None, **kw):
|
||||
cursor = connection.connection.cursor()
|
||||
primary_keys = [row.NAME for row in cursor.execute(
|
||||
"SELECT NAME FROM SYSADM.SYSPKCONSTRAINTS WHERE NAME = '%s' ORDER BY PKCOLSEQNUM" % table_name
|
||||
primary_keys = [row.COLNAME for row in cursor.execute(
|
||||
"SELECT COLNAME FROM SYSADM.SYSPKCONSTRAINTS WHERE NAME = '%s' ORDER BY PKCOLSEQNUM" % table_name
|
||||
)]
|
||||
cursor.close()
|
||||
return primary_keys
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue