Create A New Session Object

Create A New Session Object

int sqlite3session_create(
  sqlite3 *db,                    /* Database handle */
  const char *zDb,                /* Name of db (e.g. "main") */
  sqlite3_session **ppSession     /* OUT: New session object */
);

Create a new session object attached to database handle db. If successful, a pointer to the new object is written to *ppSession and SQLITE_OK is returned. If an error occurs, *ppSession is set to NULL and an SQLite error code (e.g. SQLITE_NOMEM) is returned.

It is possible to create multiple session objects attached to a single database handle.

Session objects created using this function should be deleted using the sqlite3session_delete() function before the database handle that they are attached to is itself closed. If the database handle is closed before the session object is deleted, then the results of calling any session module functi