statement.close()
完成已准备好的语句。如果语句已经被完成,会抛出异常。如果这个语句正在执行,则会抛出 ERR_INVALID_STATE 错误,这种情况发生在从语句自身触发的回调中调用该方法时,比如用户自定义函数、聚合函数或 'sqlite.db.query' 订阅者。从这样的回调中,可以完成同一连接上的空闲语句。这个方法是 sqlite3_finalize() 的一个封装。
🌐 Finalizes the prepared statement. An exception is thrown if the statement is
already finalized. An ERR_INVALID_STATE error is thrown if this statement
is currently executing, which happens when the method is called from a callback
that the statement itself triggered, such as a user-defined function, an
aggregate function, or a 'sqlite.db.query' subscriber. Idle statements
on the same connection can be finalized from such a callback. This method is a
wrapper around sqlite3_finalize().