Attach A Table To A Session Object
Attach A Table To A Session Object
int sqlite3session_attach( sqlite3_session *pSession, /* Session object */ const char *zTab /* Table name */ );
If argument zTab is not NULL, then it is the name of a table to attach to the session object passed as the first argument. All subsequent changes made to the table while the session object is enabled will be recorded. See documentation for sqlite3session_changeset() for further details.
Or, if argument zTab is NULL, then changes are recorded for all tables in the database. If additional tables are added to the database (by executing "CREATE TABLE" statements) after this call is made, changes for the new tables are also recorded.
Changes can only be recorded for tables that have a PRIMARY KEY explicitly defined as part of their CREATE TABLE statement. It does not matter if the PRIMARY KEY is an "INTEGER PRIM