Small. Fast. Reliable.
Choose any three.

SQLite C Interface

Configure database connections

int sqlite3_db_config(sqlite3*, int op, ...);

Important: This interface is experimental and is subject to change without notice.

The sqlite3_db_config() interface is used to make configuration changes to a database connection. The interface is similar to sqlite3_config() except that the changes apply to a single database connection (specified in the first argument). The sqlite3_db_config() interface can only be used immediately after the database connection is created using sqlite3_open(), sqlite3_open16(), or sqlite3_open_v2().

The second argument to sqlite3_db_config(D,V,...) is the configuration verb - an integer code that indicates what aspect of the database connection is being configured. The only choice for this value is SQLITE_DBCONFIG_LOOKASIDE. New verbs are likely to be added in future releases of SQLite. Additional arguments depend on the verb.

Invariants:

H14203 A call to sqlite3_db_config(D,V,...) shall return SQLITE_OK if and only if the call is successful.
H14206 If one or more slots of the lookaside memory allocator for database connection D are in use, then a call to sqlite3_db_config(D,SQLITE_DBCONFIG_LOOKASIDE,...) shall fail with an SQLITE_BUSY return code.
H14209 A successful call to sqlite3_db_config(D,SQLITE_DBCONFIG_LOOKASIDE,B,Z,N) where D is an open database connection and Z and N are positive integers and B is an aligned buffer at least Z*N bytes in size shall cause the lookaside memory allocator for D to use buffer B with N slots of Z bytes each.
H14212 A successful call to sqlite3_db_config(D,SQLITE_DBCONFIG_LOOKASIDE,B,Z,N) where D is an open database connection and Z and N are positive integers and B is NULL pointer shall cause the lookaside memory allocator for D to a obtain Z*N byte buffer from the primary memory allocator and use that buffer with N lookaside slots of Z bytes each.
H14215 A successful call to sqlite3_db_config(D,SQLITE_DBCONFIG_LOOKASIDE,B,Z,N) where D is an open database connection and Z and N are zero shall disable the lookaside memory allocator for D.

See also lists of Objects, Constants, and Functions.


This page last modified 2008/12/09 18:44:04 UTC