#213·records

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

Author: schlsjCreated Jul 8, 2021Updated Jul 8, 2021

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.