Skip to content

Commit

Permalink
Read out SQLite result before releasing lock
Browse files Browse the repository at this point in the history
  • Loading branch information
thp committed Apr 24, 2024
1 parent c16a109 commit 433ae34
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion minidb.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ def _decode(row, columns):
type_ = attr_to_type.get(name, None)
yield (self.deserialize(value, type_) if type_ is not None else value)

return (RowProxy(tuple(_decode(row, columns)), columns) for row in result)
return (RowProxy(tuple(_decode(row, columns)), columns) for row in list(result))

def load(self, class_, *args, **kwargs):
with self.lock:
Expand Down

0 comments on commit 433ae34

Please sign in to comment.