pre-commit changes

This commit is contained in:
2024-12-08 12:17:19 +03:00
parent 2852ce1f96
commit 87e9029b09
15 changed files with 400 additions and 293 deletions

View File

@@ -1,5 +1,6 @@
from .DBconnect import DBContextManager
def select_list(db_config, sql) -> list:
with DBContextManager(db_config) as cursor:
if cursor is None:
@@ -11,6 +12,7 @@ def select_list(db_config, sql) -> list:
lst = [dict(zip(schema, row)) for row in result]
return lst
def procedure(db_config, name, args: tuple) -> list:
with DBContextManager(db_config) as cursor:
if cursor is None:
@@ -22,6 +24,7 @@ def procedure(db_config, name, args: tuple) -> list:
lst = dict(zip(schema, result))
return lst
def transaction(cursor, sql):
cursor.execute(sql)
return True
return True