Merge branch 'Auth'
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
from .DBconnect import DBContextManager
|
||||
|
||||
def select_list(db_config, sql):
|
||||
def select_list(db_config, sql) -> list:
|
||||
with DBContextManager(db_config) as cursor:
|
||||
if cursor is None:
|
||||
raise ValueError("Cursor not created")
|
||||
@@ -9,4 +9,4 @@ def select_list(db_config, sql):
|
||||
result = cursor.fetchall()
|
||||
schema = [item[0] for item in cursor.description]
|
||||
lst = [dict(zip(schema, row)) for row in result]
|
||||
return schema, lst
|
||||
return lst
|
||||
Reference in New Issue
Block a user