database.createSession([options])


  • options <Object> 会话的配置选项。
    • table <string> 用于跟踪更改的特定表。默认情况下,所有表的更改都会被跟踪。
    • db <string> 要跟踪的数据库名称。当使用 ATTACH DATABASE 添加了多个数据库时,这非常有用。默认'main'
  • 返回:Session 会话句柄。

创建并将会话附加到数据库。此方法是 sqlite3session_create()sqlite3session_attach() 的封装。

🌐 Creates and attaches a session to the database. This method is a wrapper around sqlite3session_create() and sqlite3session_attach().