pre-commit changes
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user