|
typedef struct sqlite3 sqlite3;
每次打开一个SQLite数据库都会使用一个名为“sqlite3”的不透明结构体实例的指针来表示。这里最好将sqlite3指针当做一个对象来看待。sqlite3_open()、sqlite3_open16()和sqlite3_open_v2()是它的构造函数,sqlite3_close()和sqlite3_close_v2()是析构函数。有许多接口(例如:sqlite3_prepare_v2()、sqlite3_create_function()和sqlite3_busy_timeout())都是这个sqlite3对象上的方法。
Each open SQLite database is represented by a pointer to an instance of
the opaque structure named "sqlite3". It is useful to think of an sqlite3
pointer as an object. The sqlite3_open(), sqlite3_open16(), and
sqlite3_open_v2() interfaces are its constructors, and sqlite3_close()
and sqlite3_close_v2() are its destructors. There are many other
interfaces (such as
sqlite3_prepare_v2(), sqlite3_create_function(), and
sqlite3_busy_timeout() to name but three) that are methods on an
sqlite3 object.
另行参见Objects、Constants和Functions的列表。
See also lists of
Objects,
Constants, and
Functions.