darkfire514 commited on
Commit
2df0cbd
·
verified ·
1 Parent(s): 399b80c

Update openspace/skill_engine/store.py

Browse files
Files changed (1) hide show
  1. openspace/skill_engine/store.py +9 -1
openspace/skill_engine/store.py CHANGED
@@ -226,7 +226,15 @@ class SkillStore:
226
  if read_only:
227
  conn.execute("PRAGMA query_only=ON")
228
 
229
- conn.row_factory = sqlite3.Row
 
 
 
 
 
 
 
 
230
  return conn
231
 
232
  @contextmanager
 
226
  if read_only:
227
  conn.execute("PRAGMA query_only=ON")
228
 
229
+ # libsql-experimental doesn't have a Row factory built-in like sqlite3
230
+ # conn.row_factory = sqlite3.Row
231
+
232
+ # We need a custom row factory to return dict-like objects
233
+ def dict_factory(cursor, row):
234
+ fields = [column[0] for column in cursor.description]
235
+ return {key: value for key, value in zip(fields, row)}
236
+
237
+ conn.row_factory = dict_factory
238
  return conn
239
 
240
  @contextmanager