session.close()


关闭会话。如果数据库或会话未打开,或者会话当前正在生成更改集或补丁集,将会抛出异常。如果这个方法是在 SQLite 调用的回调中调用的,比如授权回调、自定义函数或者订阅者,将会抛出 ERR_INVALID_STATE 错误,因为 SQLite 可能仍在使用会话。这个方法是 sqlite3session_delete() 的一个封装。

🌐 Closes the session. An exception is thrown if the database or the session is not open, or if the session is currently generating a changeset or patchset. An ERR_INVALID_STATE error is thrown if the method is called from a callback that SQLite invoked, such as an authorizer callback, a user-defined function, or a 'sqlite.db.query' subscriber, because SQLite may still be using the session. This method is a wrapper around sqlite3session_delete().