kennethreitz / records

SQL for Humans™
https://pypi.python.org/pypi/records/
ISC License
7.14k stars 570 forks source link

db.query('SELECT * FROM persons) can't execute #213

Open schlsj opened 3 years ago

schlsj commented 3 years ago

when execute examples/randomuser-sqlite.py, python report 'Cannot operate on a closed database'.

when rows = db.query(...) is executed, maybe the internal connection is disposed. but the result(rows) is a generator, not data. when use result(rows) to do something, it use internal connection to read data, then error occur.