sqlite3ext.h 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381
  1. /*
  2. ** 2006 June 7
  3. **
  4. ** The author disclaims copyright to this source code. In place of
  5. ** a legal notice, here is a blessing:
  6. **
  7. ** May you do good and not evil.
  8. ** May you find forgiveness for yourself and forgive others.
  9. ** May you share freely, never taking more than you give.
  10. **
  11. *************************************************************************
  12. ** This header file defines the SQLite interface for use by
  13. ** shared libraries that want to be imported as extensions into
  14. ** an SQLite instance. Shared libraries that intend to be loaded
  15. ** as extensions by SQLite should #include this file instead of
  16. ** sqlite3.h.
  17. **
  18. ** @(#) $Id: sqlite3ext.h 1135 2012-04-10 09:55:16Z fujihiro $
  19. */
  20. #ifndef _SQLITE3EXT_H_
  21. #define _SQLITE3EXT_H_
  22. #include "sqlite3.h"
  23. typedef struct sqlite3_api_routines sqlite3_api_routines;
  24. /*
  25. ** The following structure holds pointers to all of the SQLite API
  26. ** routines.
  27. **
  28. ** WARNING: In order to maintain backwards compatibility, add new
  29. ** interfaces to the end of this structure only. If you insert new
  30. ** interfaces in the middle of this structure, then older different
  31. ** versions of SQLite will not be able to load each others' shared
  32. ** libraries!
  33. */
  34. struct sqlite3_api_routines {
  35. void * (*aggregate_context)(sqlite3_context*,int nBytes);
  36. int (*aggregate_count)(sqlite3_context*);
  37. int (*bind_blob)(sqlite3_stmt*,int,const void*,int n,void(*)(void*));
  38. int (*bind_double)(sqlite3_stmt*,int,double);
  39. int (*bind_int)(sqlite3_stmt*,int,int);
  40. int (*bind_int64)(sqlite3_stmt*,int,sqlite_int64);
  41. int (*bind_null)(sqlite3_stmt*,int);
  42. int (*bind_parameter_count)(sqlite3_stmt*);
  43. int (*bind_parameter_index)(sqlite3_stmt*,const char*zName);
  44. const char * (*bind_parameter_name)(sqlite3_stmt*,int);
  45. int (*bind_text)(sqlite3_stmt*,int,const char*,int n,void(*)(void*));
  46. int (*bind_text16)(sqlite3_stmt*,int,const void*,int,void(*)(void*));
  47. int (*bind_value)(sqlite3_stmt*,int,const sqlite3_value*);
  48. int (*busy_handler)(sqlite3*,int(*)(void*,int),void*);
  49. int (*busy_timeout)(sqlite3*,int ms);
  50. int (*changes)(sqlite3*);
  51. int (*close)(sqlite3*);
  52. int (*collation_needed)(sqlite3*,void*,void(*)(void*,sqlite3*,int eTextRep,const char*));
  53. int (*collation_needed16)(sqlite3*,void*,void(*)(void*,sqlite3*,int eTextRep,const void*));
  54. const void * (*column_blob)(sqlite3_stmt*,int iCol);
  55. int (*column_bytes)(sqlite3_stmt*,int iCol);
  56. int (*column_bytes16)(sqlite3_stmt*,int iCol);
  57. int (*column_count)(sqlite3_stmt*pStmt);
  58. const char * (*column_database_name)(sqlite3_stmt*,int);
  59. const void * (*column_database_name16)(sqlite3_stmt*,int);
  60. const char * (*column_decltype)(sqlite3_stmt*,int i);
  61. const void * (*column_decltype16)(sqlite3_stmt*,int);
  62. double (*column_double)(sqlite3_stmt*,int iCol);
  63. int (*column_int)(sqlite3_stmt*,int iCol);
  64. sqlite_int64 (*column_int64)(sqlite3_stmt*,int iCol);
  65. const char * (*column_name)(sqlite3_stmt*,int);
  66. const void * (*column_name16)(sqlite3_stmt*,int);
  67. const char * (*column_origin_name)(sqlite3_stmt*,int);
  68. const void * (*column_origin_name16)(sqlite3_stmt*,int);
  69. const char * (*column_table_name)(sqlite3_stmt*,int);
  70. const void * (*column_table_name16)(sqlite3_stmt*,int);
  71. const unsigned char * (*column_text)(sqlite3_stmt*,int iCol);
  72. const void * (*column_text16)(sqlite3_stmt*,int iCol);
  73. int (*column_type)(sqlite3_stmt*,int iCol);
  74. sqlite3_value* (*column_value)(sqlite3_stmt*,int iCol);
  75. void * (*commit_hook)(sqlite3*,int(*)(void*),void*);
  76. int (*complete)(const char*sql);
  77. int (*complete16)(const void*sql);
  78. int (*create_collation)(sqlite3*,const char*,int,void*,int(*)(void*,int,const void*,int,const void*));
  79. int (*create_collation16)(sqlite3*,const void*,int,void*,int(*)(void*,int,const void*,int,const void*));
  80. int (*create_function)(sqlite3*,const char*,int,int,void*,void (*xFunc)(sqlite3_context*,int,sqlite3_value**),void (*xStep)(sqlite3_context*,int,sqlite3_value**),void (*xFinal)(sqlite3_context*));
  81. int (*create_function16)(sqlite3*,const void*,int,int,void*,void (*xFunc)(sqlite3_context*,int,sqlite3_value**),void (*xStep)(sqlite3_context*,int,sqlite3_value**),void (*xFinal)(sqlite3_context*));
  82. int (*create_module)(sqlite3*,const char*,const sqlite3_module*,void*);
  83. int (*data_count)(sqlite3_stmt*pStmt);
  84. sqlite3 * (*db_handle)(sqlite3_stmt*);
  85. int (*declare_vtab)(sqlite3*,const char*);
  86. int (*enable_shared_cache)(int);
  87. int (*errcode)(sqlite3*db);
  88. const char * (*errmsg)(sqlite3*);
  89. const void * (*errmsg16)(sqlite3*);
  90. int (*exec)(sqlite3*,const char*,sqlite3_callback,void*,char**);
  91. int (*expired)(sqlite3_stmt*);
  92. int (*finalize)(sqlite3_stmt*pStmt);
  93. void (*free)(void*);
  94. void (*free_table)(char**result);
  95. int (*get_autocommit)(sqlite3*);
  96. void * (*get_auxdata)(sqlite3_context*,int);
  97. int (*get_table)(sqlite3*,const char*,char***,int*,int*,char**);
  98. int (*global_recover)(void);
  99. void (*interruptx)(sqlite3*);
  100. sqlite_int64 (*last_insert_rowid)(sqlite3*);
  101. const char * (*libversion)(void);
  102. int (*libversion_number)(void);
  103. void *(*malloc)(int);
  104. char * (*mprintf)(const char*,...);
  105. int (*open)(const char*,sqlite3**);
  106. int (*open16)(const void*,sqlite3**);
  107. int (*prepare)(sqlite3*,const char*,int,sqlite3_stmt**,const char**);
  108. int (*prepare16)(sqlite3*,const void*,int,sqlite3_stmt**,const void**);
  109. void * (*profile)(sqlite3*,void(*)(void*,const char*,sqlite_uint64),void*);
  110. void (*progress_handler)(sqlite3*,int,int(*)(void*),void*);
  111. void *(*realloc)(void*,int);
  112. int (*reset)(sqlite3_stmt*pStmt);
  113. void (*result_blob)(sqlite3_context*,const void*,int,void(*)(void*));
  114. void (*result_double)(sqlite3_context*,double);
  115. void (*result_error)(sqlite3_context*,const char*,int);
  116. void (*result_error16)(sqlite3_context*,const void*,int);
  117. void (*result_int)(sqlite3_context*,int);
  118. void (*result_int64)(sqlite3_context*,sqlite_int64);
  119. void (*result_null)(sqlite3_context*);
  120. void (*result_text)(sqlite3_context*,const char*,int,void(*)(void*));
  121. void (*result_text16)(sqlite3_context*,const void*,int,void(*)(void*));
  122. void (*result_text16be)(sqlite3_context*,const void*,int,void(*)(void*));
  123. void (*result_text16le)(sqlite3_context*,const void*,int,void(*)(void*));
  124. void (*result_value)(sqlite3_context*,sqlite3_value*);
  125. void * (*rollback_hook)(sqlite3*,void(*)(void*),void*);
  126. int (*set_authorizer)(sqlite3*,int(*)(void*,int,const char*,const char*,const char*,const char*),void*);
  127. void (*set_auxdata)(sqlite3_context*,int,void*,void (*)(void*));
  128. char * (*snprintf)(int,char*,const char*,...);
  129. int (*step)(sqlite3_stmt*);
  130. int (*table_column_metadata)(sqlite3*,const char*,const char*,const char*,char const**,char const**,int*,int*,int*);
  131. void (*thread_cleanup)(void);
  132. int (*total_changes)(sqlite3*);
  133. void * (*trace)(sqlite3*,void(*xTrace)(void*,const char*),void*);
  134. int (*transfer_bindings)(sqlite3_stmt*,sqlite3_stmt*);
  135. void * (*update_hook)(sqlite3*,void(*)(void*,int ,char const*,char const*,sqlite_int64),void*);
  136. void * (*user_data)(sqlite3_context*);
  137. const void * (*value_blob)(sqlite3_value*);
  138. int (*value_bytes)(sqlite3_value*);
  139. int (*value_bytes16)(sqlite3_value*);
  140. double (*value_double)(sqlite3_value*);
  141. int (*value_int)(sqlite3_value*);
  142. sqlite_int64 (*value_int64)(sqlite3_value*);
  143. int (*value_numeric_type)(sqlite3_value*);
  144. const unsigned char * (*value_text)(sqlite3_value*);
  145. const void * (*value_text16)(sqlite3_value*);
  146. const void * (*value_text16be)(sqlite3_value*);
  147. const void * (*value_text16le)(sqlite3_value*);
  148. int (*value_type)(sqlite3_value*);
  149. char *(*vmprintf)(const char*,va_list);
  150. /* Added ??? */
  151. int (*overload_function)(sqlite3*, const char *zFuncName, int nArg);
  152. /* Added by 3.3.13 */
  153. int (*prepare_v2)(sqlite3*,const char*,int,sqlite3_stmt**,const char**);
  154. int (*prepare16_v2)(sqlite3*,const void*,int,sqlite3_stmt**,const void**);
  155. int (*clear_bindings)(sqlite3_stmt*);
  156. /* Added by 3.4.1 */
  157. int (*create_module_v2)(sqlite3*,const char*,const sqlite3_module*,void*,void (*xDestroy)(void *));
  158. /* Added by 3.5.0 */
  159. int (*bind_zeroblob)(sqlite3_stmt*,int,int);
  160. int (*blob_bytes)(sqlite3_blob*);
  161. int (*blob_close)(sqlite3_blob*);
  162. int (*blob_open)(sqlite3*,const char*,const char*,const char*,sqlite3_int64,int,sqlite3_blob**);
  163. int (*blob_read)(sqlite3_blob*,void*,int,int);
  164. int (*blob_write)(sqlite3_blob*,const void*,int,int);
  165. int (*create_collation_v2)(sqlite3*,const char*,int,void*,int(*)(void*,int,const void*,int,const void*),void(*)(void*));
  166. int (*file_control)(sqlite3*,const char*,int,void*);
  167. sqlite3_int64 (*memory_highwater)(int);
  168. sqlite3_int64 (*memory_used)(void);
  169. sqlite3_mutex *(*mutex_alloc)(int);
  170. void (*mutex_enter)(sqlite3_mutex*);
  171. void (*mutex_free)(sqlite3_mutex*);
  172. void (*mutex_leave)(sqlite3_mutex*);
  173. int (*mutex_try)(sqlite3_mutex*);
  174. int (*open_v2)(const char*,sqlite3**,int,const char*);
  175. int (*release_memory)(int);
  176. void (*result_error_nomem)(sqlite3_context*);
  177. void (*result_error_toobig)(sqlite3_context*);
  178. int (*sleep)(int);
  179. void (*soft_heap_limit)(int);
  180. sqlite3_vfs *(*vfs_find)(const char*);
  181. int (*vfs_register)(sqlite3_vfs*,int);
  182. int (*vfs_unregister)(sqlite3_vfs*);
  183. int (*xthreadsafe)(void);
  184. void (*result_zeroblob)(sqlite3_context*,int);
  185. void (*result_error_code)(sqlite3_context*,int);
  186. int (*test_control)(int, ...);
  187. void (*randomness)(int,void*);
  188. sqlite3 *(*context_db_handle)(sqlite3_context*);
  189. int (*extended_result_codes)(sqlite3*,int);
  190. int (*limit)(sqlite3*,int,int);
  191. sqlite3_stmt *(*next_stmt)(sqlite3*,sqlite3_stmt*);
  192. const char *(*sql)(sqlite3_stmt*);
  193. int (*status)(int,int*,int*,int);
  194. };
  195. /*
  196. ** The following macros redefine the API routines so that they are
  197. ** redirected throught the global sqlite3_api structure.
  198. **
  199. ** This header file is also used by the loadext.c source file
  200. ** (part of the main SQLite library - not an extension) so that
  201. ** it can get access to the sqlite3_api_routines structure
  202. ** definition. But the main library does not want to redefine
  203. ** the API. So the redefinition macros are only valid if the
  204. ** SQLITE_CORE macros is undefined.
  205. */
  206. #ifndef SQLITE_CORE
  207. #define sqlite3_aggregate_context sqlite3_api->aggregate_context
  208. #ifndef SQLITE_OMIT_DEPRECATED
  209. #define sqlite3_aggregate_count sqlite3_api->aggregate_count
  210. #endif
  211. #define sqlite3_bind_blob sqlite3_api->bind_blob
  212. #define sqlite3_bind_double sqlite3_api->bind_double
  213. #define sqlite3_bind_int sqlite3_api->bind_int
  214. #define sqlite3_bind_int64 sqlite3_api->bind_int64
  215. #define sqlite3_bind_null sqlite3_api->bind_null
  216. #define sqlite3_bind_parameter_count sqlite3_api->bind_parameter_count
  217. #define sqlite3_bind_parameter_index sqlite3_api->bind_parameter_index
  218. #define sqlite3_bind_parameter_name sqlite3_api->bind_parameter_name
  219. #define sqlite3_bind_text sqlite3_api->bind_text
  220. #define sqlite3_bind_text16 sqlite3_api->bind_text16
  221. #define sqlite3_bind_value sqlite3_api->bind_value
  222. #define sqlite3_busy_handler sqlite3_api->busy_handler
  223. #define sqlite3_busy_timeout sqlite3_api->busy_timeout
  224. #define sqlite3_changes sqlite3_api->changes
  225. #define sqlite3_close sqlite3_api->close
  226. #define sqlite3_collation_needed sqlite3_api->collation_needed
  227. #define sqlite3_collation_needed16 sqlite3_api->collation_needed16
  228. #define sqlite3_column_blob sqlite3_api->column_blob
  229. #define sqlite3_column_bytes sqlite3_api->column_bytes
  230. #define sqlite3_column_bytes16 sqlite3_api->column_bytes16
  231. #define sqlite3_column_count sqlite3_api->column_count
  232. #define sqlite3_column_database_name sqlite3_api->column_database_name
  233. #define sqlite3_column_database_name16 sqlite3_api->column_database_name16
  234. #define sqlite3_column_decltype sqlite3_api->column_decltype
  235. #define sqlite3_column_decltype16 sqlite3_api->column_decltype16
  236. #define sqlite3_column_double sqlite3_api->column_double
  237. #define sqlite3_column_int sqlite3_api->column_int
  238. #define sqlite3_column_int64 sqlite3_api->column_int64
  239. #define sqlite3_column_name sqlite3_api->column_name
  240. #define sqlite3_column_name16 sqlite3_api->column_name16
  241. #define sqlite3_column_origin_name sqlite3_api->column_origin_name
  242. #define sqlite3_column_origin_name16 sqlite3_api->column_origin_name16
  243. #define sqlite3_column_table_name sqlite3_api->column_table_name
  244. #define sqlite3_column_table_name16 sqlite3_api->column_table_name16
  245. #define sqlite3_column_text sqlite3_api->column_text
  246. #define sqlite3_column_text16 sqlite3_api->column_text16
  247. #define sqlite3_column_type sqlite3_api->column_type
  248. #define sqlite3_column_value sqlite3_api->column_value
  249. #define sqlite3_commit_hook sqlite3_api->commit_hook
  250. #define sqlite3_complete sqlite3_api->complete
  251. #define sqlite3_complete16 sqlite3_api->complete16
  252. #define sqlite3_create_collation sqlite3_api->create_collation
  253. #define sqlite3_create_collation16 sqlite3_api->create_collation16
  254. #define sqlite3_create_function sqlite3_api->create_function
  255. #define sqlite3_create_function16 sqlite3_api->create_function16
  256. #define sqlite3_create_module sqlite3_api->create_module
  257. #define sqlite3_create_module_v2 sqlite3_api->create_module_v2
  258. #define sqlite3_data_count sqlite3_api->data_count
  259. #define sqlite3_db_handle sqlite3_api->db_handle
  260. #define sqlite3_declare_vtab sqlite3_api->declare_vtab
  261. #define sqlite3_enable_shared_cache sqlite3_api->enable_shared_cache
  262. #define sqlite3_errcode sqlite3_api->errcode
  263. #define sqlite3_errmsg sqlite3_api->errmsg
  264. #define sqlite3_errmsg16 sqlite3_api->errmsg16
  265. #define sqlite3_exec sqlite3_api->exec
  266. #ifndef SQLITE_OMIT_DEPRECATED
  267. #define sqlite3_expired sqlite3_api->expired
  268. #endif
  269. #define sqlite3_finalize sqlite3_api->finalize
  270. #define sqlite3_free sqlite3_api->free
  271. #define sqlite3_free_table sqlite3_api->free_table
  272. #define sqlite3_get_autocommit sqlite3_api->get_autocommit
  273. #define sqlite3_get_auxdata sqlite3_api->get_auxdata
  274. #define sqlite3_get_table sqlite3_api->get_table
  275. #ifndef SQLITE_OMIT_DEPRECATED
  276. #define sqlite3_global_recover sqlite3_api->global_recover
  277. #endif
  278. #define sqlite3_interrupt sqlite3_api->interruptx
  279. #define sqlite3_last_insert_rowid sqlite3_api->last_insert_rowid
  280. #define sqlite3_libversion sqlite3_api->libversion
  281. #define sqlite3_libversion_number sqlite3_api->libversion_number
  282. #define sqlite3_malloc sqlite3_api->malloc
  283. #define sqlite3_mprintf sqlite3_api->mprintf
  284. #define sqlite3_open sqlite3_api->open
  285. #define sqlite3_open16 sqlite3_api->open16
  286. #define sqlite3_prepare sqlite3_api->prepare
  287. #define sqlite3_prepare16 sqlite3_api->prepare16
  288. #define sqlite3_prepare_v2 sqlite3_api->prepare_v2
  289. #define sqlite3_prepare16_v2 sqlite3_api->prepare16_v2
  290. #define sqlite3_profile sqlite3_api->profile
  291. #define sqlite3_progress_handler sqlite3_api->progress_handler
  292. #define sqlite3_realloc sqlite3_api->realloc
  293. #define sqlite3_reset sqlite3_api->reset
  294. #define sqlite3_result_blob sqlite3_api->result_blob
  295. #define sqlite3_result_double sqlite3_api->result_double
  296. #define sqlite3_result_error sqlite3_api->result_error
  297. #define sqlite3_result_error16 sqlite3_api->result_error16
  298. #define sqlite3_result_int sqlite3_api->result_int
  299. #define sqlite3_result_int64 sqlite3_api->result_int64
  300. #define sqlite3_result_null sqlite3_api->result_null
  301. #define sqlite3_result_text sqlite3_api->result_text
  302. #define sqlite3_result_text16 sqlite3_api->result_text16
  303. #define sqlite3_result_text16be sqlite3_api->result_text16be
  304. #define sqlite3_result_text16le sqlite3_api->result_text16le
  305. #define sqlite3_result_value sqlite3_api->result_value
  306. #define sqlite3_rollback_hook sqlite3_api->rollback_hook
  307. #define sqlite3_set_authorizer sqlite3_api->set_authorizer
  308. #define sqlite3_set_auxdata sqlite3_api->set_auxdata
  309. #define sqlite3_snprintf sqlite3_api->snprintf
  310. #define sqlite3_step sqlite3_api->step
  311. #define sqlite3_table_column_metadata sqlite3_api->table_column_metadata
  312. #define sqlite3_thread_cleanup sqlite3_api->thread_cleanup
  313. #define sqlite3_total_changes sqlite3_api->total_changes
  314. #define sqlite3_trace sqlite3_api->trace
  315. #ifndef SQLITE_OMIT_DEPRECATED
  316. #define sqlite3_transfer_bindings sqlite3_api->transfer_bindings
  317. #endif
  318. #define sqlite3_update_hook sqlite3_api->update_hook
  319. #define sqlite3_user_data sqlite3_api->user_data
  320. #define sqlite3_value_blob sqlite3_api->value_blob
  321. #define sqlite3_value_bytes sqlite3_api->value_bytes
  322. #define sqlite3_value_bytes16 sqlite3_api->value_bytes16
  323. #define sqlite3_value_double sqlite3_api->value_double
  324. #define sqlite3_value_int sqlite3_api->value_int
  325. #define sqlite3_value_int64 sqlite3_api->value_int64
  326. #define sqlite3_value_numeric_type sqlite3_api->value_numeric_type
  327. #define sqlite3_value_text sqlite3_api->value_text
  328. #define sqlite3_value_text16 sqlite3_api->value_text16
  329. #define sqlite3_value_text16be sqlite3_api->value_text16be
  330. #define sqlite3_value_text16le sqlite3_api->value_text16le
  331. #define sqlite3_value_type sqlite3_api->value_type
  332. #define sqlite3_vmprintf sqlite3_api->vmprintf
  333. #define sqlite3_overload_function sqlite3_api->overload_function
  334. #define sqlite3_prepare_v2 sqlite3_api->prepare_v2
  335. #define sqlite3_prepare16_v2 sqlite3_api->prepare16_v2
  336. #define sqlite3_clear_bindings sqlite3_api->clear_bindings
  337. #define sqlite3_bind_zeroblob sqlite3_api->bind_zeroblob
  338. #define sqlite3_blob_bytes sqlite3_api->blob_bytes
  339. #define sqlite3_blob_close sqlite3_api->blob_close
  340. #define sqlite3_blob_open sqlite3_api->blob_open
  341. #define sqlite3_blob_read sqlite3_api->blob_read
  342. #define sqlite3_blob_write sqlite3_api->blob_write
  343. #define sqlite3_create_collation_v2 sqlite3_api->create_collation_v2
  344. #define sqlite3_file_control sqlite3_api->file_control
  345. #define sqlite3_memory_highwater sqlite3_api->memory_highwater
  346. #define sqlite3_memory_used sqlite3_api->memory_used
  347. #define sqlite3_mutex_alloc sqlite3_api->mutex_alloc
  348. #define sqlite3_mutex_enter sqlite3_api->mutex_enter
  349. #define sqlite3_mutex_free sqlite3_api->mutex_free
  350. #define sqlite3_mutex_leave sqlite3_api->mutex_leave
  351. #define sqlite3_mutex_try sqlite3_api->mutex_try
  352. #define sqlite3_open_v2 sqlite3_api->open_v2
  353. #define sqlite3_release_memory sqlite3_api->release_memory
  354. #define sqlite3_result_error_nomem sqlite3_api->result_error_nomem
  355. #define sqlite3_result_error_toobig sqlite3_api->result_error_toobig
  356. #define sqlite3_sleep sqlite3_api->sleep
  357. #define sqlite3_soft_heap_limit sqlite3_api->soft_heap_limit
  358. #define sqlite3_vfs_find sqlite3_api->vfs_find
  359. #define sqlite3_vfs_register sqlite3_api->vfs_register
  360. #define sqlite3_vfs_unregister sqlite3_api->vfs_unregister
  361. #define sqlite3_threadsafe sqlite3_api->xthreadsafe
  362. #define sqlite3_result_zeroblob sqlite3_api->result_zeroblob
  363. #define sqlite3_result_error_code sqlite3_api->result_error_code
  364. #define sqlite3_test_control sqlite3_api->test_control
  365. #define sqlite3_randomness sqlite3_api->randomness
  366. #define sqlite3_context_db_handle sqlite3_api->context_db_handle
  367. #define sqlite3_extended_result_codes sqlite3_api->extended_result_codes
  368. #define sqlite3_limit sqlite3_api->limit
  369. #define sqlite3_next_stmt sqlite3_api->next_stmt
  370. #define sqlite3_sql sqlite3_api->sql
  371. #define sqlite3_status sqlite3_api->status
  372. #endif /* SQLITE_CORE */
  373. #define SQLITE_EXTENSION_INIT1 const sqlite3_api_routines *sqlite3_api = 0;
  374. #define SQLITE_EXTENSION_INIT2(v) sqlite3_api = v;
  375. #endif /* _SQLITE3EXT_H_ */