mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 09:36:05 -08:00
api layer v0.1
This commit is contained in:
@@ -204,3 +204,11 @@ def get_array_from_sql_rows(rows):
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
def get_temp_db_connection():
|
||||
"""
|
||||
Returns a new SQLite connection with Row factory.
|
||||
Should be used per-thread/request to avoid cross-thread issues.
|
||||
"""
|
||||
conn = sqlite3.connect(fullDbPath)
|
||||
conn.row_factory = sqlite3.Row
|
||||
return conn
|
||||
|
||||
Reference in New Issue
Block a user