From ed857e28ca74545e522c4c485752eb01c143bb2f Mon Sep 17 00:00:00 2001 From: Michael Habiger Date: Thu, 15 Feb 2024 15:48:16 -0600 Subject: [PATCH 1/2] Fix get_primary_keys return type #22 --- lib/sqlalchemy_ingres/_version.py | 2 +- lib/sqlalchemy_ingres/base.py | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/sqlalchemy_ingres/_version.py b/lib/sqlalchemy_ingres/_version.py index 302c266..267e442 100644 --- a/lib/sqlalchemy_ingres/_version.py +++ b/lib/sqlalchemy_ingres/_version.py @@ -1,2 +1,2 @@ -version_tuple = __version_info__ = (0, 0, 5, 'dev1') +version_tuple = __version_info__ = (0, 0, 6) version = version_string = __version__ = '.'.join(map(str, __version_info__)) diff --git a/lib/sqlalchemy_ingres/base.py b/lib/sqlalchemy_ingres/base.py index bd72b78..5d566aa 100644 --- a/lib/sqlalchemy_ingres/base.py +++ b/lib/sqlalchemy_ingres/base.py @@ -376,8 +376,10 @@ def get_primary_keys(self, connection, table_name, schema=None, **kw): try: rs = connection.exec_driver_sql(sqltext, params) - - return [row[0].rstrip() for row in rs.fetchall()] + + cols = [row[0].rstrip() for row in rs.fetchall()] + return {"constrained_columns": [] if cols is None else cols, "name": None} + finally: if rs: rs.close() From 62c75e3311bfd2618c26bf324c2a5100fa2f251c Mon Sep 17 00:00:00 2001 From: Michael Habiger Date: Mon, 19 Feb 2024 10:17:12 -0600 Subject: [PATCH 2/2] Reset version back to original --- lib/sqlalchemy_ingres/_version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/sqlalchemy_ingres/_version.py b/lib/sqlalchemy_ingres/_version.py index 267e442..302c266 100644 --- a/lib/sqlalchemy_ingres/_version.py +++ b/lib/sqlalchemy_ingres/_version.py @@ -1,2 +1,2 @@ -version_tuple = __version_info__ = (0, 0, 6) +version_tuple = __version_info__ = (0, 0, 5, 'dev1') version = version_string = __version__ = '.'.join(map(str, __version_info__))