Sqlite参考手册
C界面 | C Interface
Register A Virtual Table Implementation
int sqlite3_create_module(
sqlite3 *db, /* SQLite connection to register module with */
const char *zName, /* Name of the module */
const sqlite3_module *p, /* Methods for the module */
void *pClientData /* Client data for xCreate/xConnect */
);
int sqlite3_create_module_v2(
sqlite3 *db, /* SQLite connection to register module with */
const char *zName, /* Name of the module */
const sqlite3_module *p, /* Methods for the module */
void *pClientData, /* Client data for xCreate/xConnect */
void(*xDestroy)(void*) /* Module destructor function */
);
这些例程用于注册新的虚拟表模块名称。在使用模块创建新的虚拟表之前以及在为模块使用预先存在的虚拟表之前,必须注册模块名称。
模块名称在第一个参数指定的数据库连接上注册。模块的名称由第二个参数给出。第三个参数是一个指向虚拟表模块实现的指针。第四个参数是在创建或重新初始化新虚拟表时,传递到虚拟表模块的xCreate和xConnect方法的任意客户端数据指针。
sqlite3_create_module_v2()接口具有第五个参数,该参数是指向pClientData的析构函数的指针。当SQLite不再需要pClientData指针时,SQLite将调用析构函数(如果它不是NULL)。如果调用sqlite3_create_module_v2()失败,析构函数也会被调用。sqlite3_create_module()接口与具有NULL析构函数的sqlite3_create_module_v2()等效。
C界面 | C Interface相关
SQLite,是一款轻型的数据库,是遵守ACID的关系型数据库管理系统,它包含在一个相对小的C库中。它是D.RichardHipp建立的公有领域项目。它的设计目标是嵌入式的,而且目前已经在很多嵌入式产品中使用了它,它占用资源非常的低,在嵌入式设备中,可能只需要几百K的内存就够了。它能够支持Windows/Linux/Unix等等主流的操作系统,同时能够跟很多程序语言相结合,比如 Tcl、C#、PHP、Java等,还有ODBC接口,同样比起Mysql、PostgreSQL这两款开源的世界著名数据库管理系统来
主页 | https://sqlite.org/ |
源码 | https://www.sqlite.org/src/ |
发布版本 | 3.21.0 |