From c392b5de47e2ef8d069d273da1cbdd8b2dab4995 Mon Sep 17 00:00:00 2001 From: Andras Sore Date: Wed, 28 Jun 2023 13:45:36 +0200 Subject: [PATCH] Fix get_table_comment return value Signed-off-by: Andras Sore --- ibm_db_sa/reflection.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ibm_db_sa/reflection.py b/ibm_db_sa/reflection.py index 304c573..f90f835 100644 --- a/ibm_db_sa/reflection.py +++ b/ibm_db_sa/reflection.py @@ -238,8 +238,7 @@ def get_table_comment(self, connection, table_name, schema=None, **kw): where(systbl.c.type == 'T').\ where(systbl.c.tabschema == current_schema).\ where(systbl.c.tabname == table_name) - c = connection.execute(query) - return {'text': c.first()} + return {'text': connection.execute(query).scalar()} @reflection.cache def get_view_names(self, connection, schema=None, **kw):