Small. Fast. Reliable.
Choose any three.

About Sitemap Documentation Download License News Developers Support

## SQLite C Interface

## Virtual Table Instance Object

>     struct sqlite3_vtab {
>       const sqlite3_module *pModule;  /* The module for this virtual table */
>       int nRef;                       /* Used internally */
>       char *zErrMsg;                  /* Error message from sqlite3_mprintf() */
>       /* Virtual table implementations will typically add additional fields */
>     };

Every module implementation uses a subclass of the following structure to describe a particular instance of the module. Each subclass will be tailored to the specific needs of the module implementation. The purpose of this superclass is to define certain fields that are common to all module implementations.

Virtual tables methods can set an error message by assigning a string obtained from sqlite3_mprintf() to zErrMsg. The method should take care that any prior string is freed by a call to sqlite3_free() prior to assigning a new string to zErrMsg. After the error message is delivered up to the client application, the string will be automatically freed by sqlite3_free() and the zErrMsg field will be zeroed. Note that sqlite3_mprintf() and sqlite3_free() are used on the zErrMsg field since virtual tables are commonly implemented in loadable extensions which do not have access to sqlite3MPrintf() or sqlite3Free().

See also lists of Objects, Constants, and Functions.

This page last modified 2008/05/12 13:08:44 UTC