int sqlite3_create_module( sqlite3* db, const char* name, const sqlite3_module* mod_struct, void* udp ); int sqlite3_create_module_v2( sqlite3* db, const char* name, const sqlite3_module* mod_struct, void* udp, dest_func ); void dest_func( void* udp );
db
A database connection.
name
The name of the module (the virtual table type), in UTF-8.
mod_struct
A module structure, which includes function pointers to all of the application-defined functions required to implement a virtual table module.
udp
An application-defined user-data pointer. This value is made available to some of the virtual table functions, as well as the destructor function.
dest_func
An optional function pointer to the module destroy function. This may be NULL.
sqlite3_create_module[_v2]()
)An SQLite result code.
These functions register a virtual table module. The only
difference between the standard and _v2
version is the addition of the destroy
function, which can be used to free any memory allocations
associated with the user-data pointer.
For more information on writing a virtual table module, see Chapter 10.