This repository has been archived on 2025-10-24. You can view files and clone it, but cannot push or open issues or pull requests.
Files
RIS/App/Queries/category_list.py
Anton Kamalov 19a5869d30 Initial commit
2024-10-21 22:42:14 +03:00

13 lines
443 B
Python

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 """