sql row factory
This commit is contained in:
0
helpers/__init__.py
Normal file
0
helpers/__init__.py
Normal file
5
helpers/databaseHelper.py
Normal file
5
helpers/databaseHelper.py
Normal file
@@ -0,0 +1,5 @@
|
||||
def dict_factory(cursor, row):
|
||||
d = {}
|
||||
for idx, col in enumerate(cursor.description):
|
||||
d[col[0]] = row[idx]
|
||||
return d
|
||||
Reference in New Issue
Block a user