Initial commit
This commit is contained in:
13
App/Queries/category_list.py
Normal file
13
App/Queries/category_list.py
Normal file
@@ -0,0 +1,13 @@
|
||||
import db.DBconnect
|
||||
|
||||
sql_provider = 1
|
||||
""" def select_list(db_config, sql):
|
||||
with DBContextManager(db_config) as cursor:
|
||||
if cursor is None:
|
||||
raise ValueError("Cursor not created")
|
||||
else:
|
||||
cursor.execute(sql)
|
||||
result = cursor.fetchall()
|
||||
schema = [item[0] for item in cursor.description]
|
||||
lst = [dict(zip(schema, row)) for row in result]
|
||||
return schema, lst """
|
||||
Reference in New Issue
Block a user