The Pedigree Project  0.1
sqlite3ext.h
1 /*
2  * Copyright (c) 2008-2014, Pedigree Developers
3  *
4  * Please see the CONTRIB file in the root of the source tree for a full
5  * list of contributors.
6  *
7  * Permission to use, copy, modify, and distribute this software for any
8  * purpose with or without fee is hereby granted, provided that the above
9  * copyright notice and this permission notice appear in all copies.
10  *
11  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18  */
19 
20 /*
21 ** 2006 June 7
22 **
23 ** The author disclaims copyright to this source code. In place of
24 ** a legal notice, here is a blessing:
25 **
26 ** May you do good and not evil.
27 ** May you find forgiveness for yourself and forgive others.
28 ** May you share freely, never taking more than you give.
29 **
30 *************************************************************************
31 ** This header file defines the SQLite interface for use by
32 ** shared libraries that want to be imported as extensions into
33 ** an SQLite instance. Shared libraries that intend to be loaded
34 ** as extensions by SQLite should #include this file instead of
35 ** sqlite3.h.
36 */
37 #ifndef SQLITE3EXT_H
38 #define SQLITE3EXT_H
39 #include "sqlite3.h"
40 
41 /*
42 ** The following structure holds pointers to all of the SQLite API
43 ** routines.
44 **
45 ** WARNING: In order to maintain backwards compatibility, add new
46 ** interfaces to the end of this structure only. If you insert new
47 ** interfaces in the middle of this structure, then older different
48 ** versions of SQLite will not be able to load each other's shared
49 ** libraries!
50 */
51 struct sqlite3_api_routines {
52  void * (*aggregate_context)(sqlite3_context*,int nBytes);
53  int (*aggregate_count)(sqlite3_context*);
54  int (*bind_blob)(sqlite3_stmt*,int,const void*,int n,void(*)(void*));
55  int (*bind_double)(sqlite3_stmt*,int,double);
56  int (*bind_int)(sqlite3_stmt*,int,int);
57  int (*bind_int64)(sqlite3_stmt*,int,sqlite_int64);
58  int (*bind_null)(sqlite3_stmt*,int);
59  int (*bind_parameter_count)(sqlite3_stmt*);
60  int (*bind_parameter_index)(sqlite3_stmt*,const char*zName);
61  const char * (*bind_parameter_name)(sqlite3_stmt*,int);
62  int (*bind_text)(sqlite3_stmt*,int,const char*,int n,void(*)(void*));
63  int (*bind_text16)(sqlite3_stmt*,int,const void*,int,void(*)(void*));
64  int (*bind_value)(sqlite3_stmt*,int,const sqlite3_value*);
65  int (*busy_handler)(sqlite3*,int(*)(void*,int),void*);
66  int (*busy_timeout)(sqlite3*,int ms);
67  int (*changes)(sqlite3*);
68  int (*close)(sqlite3*);
69  int (*collation_needed)(sqlite3*,void*,void(*)(void*,sqlite3*,
70  int eTextRep,const char*));
71  int (*collation_needed16)(sqlite3*,void*,void(*)(void*,sqlite3*,
72  int eTextRep,const void*));
73  const void * (*column_blob)(sqlite3_stmt*,int iCol);
74  int (*column_bytes)(sqlite3_stmt*,int iCol);
75  int (*column_bytes16)(sqlite3_stmt*,int iCol);
76  int (*column_count)(sqlite3_stmt*pStmt);
77  const char * (*column_database_name)(sqlite3_stmt*,int);
78  const void * (*column_database_name16)(sqlite3_stmt*,int);
79  const char * (*column_decltype)(sqlite3_stmt*,int i);
80  const void * (*column_decltype16)(sqlite3_stmt*,int);
81  double (*column_double)(sqlite3_stmt*,int iCol);
82  int (*column_int)(sqlite3_stmt*,int iCol);
83  sqlite_int64 (*column_int64)(sqlite3_stmt*,int iCol);
84  const char * (*column_name)(sqlite3_stmt*,int);
85  const void * (*column_name16)(sqlite3_stmt*,int);
86  const char * (*column_origin_name)(sqlite3_stmt*,int);
87  const void * (*column_origin_name16)(sqlite3_stmt*,int);
88  const char * (*column_table_name)(sqlite3_stmt*,int);
89  const void * (*column_table_name16)(sqlite3_stmt*,int);
90  const unsigned char * (*column_text)(sqlite3_stmt*,int iCol);
91  const void * (*column_text16)(sqlite3_stmt*,int iCol);
92  int (*column_type)(sqlite3_stmt*,int iCol);
93  sqlite3_value* (*column_value)(sqlite3_stmt*,int iCol);
94  void * (*commit_hook)(sqlite3*,int(*)(void*),void*);
95  int (*complete)(const char*sql);
96  int (*complete16)(const void*sql);
97  int (*create_collation)(sqlite3*,const char*,int,void*,
98  int(*)(void*,int,const void*,int,const void*));
99  int (*create_collation16)(sqlite3*,const void*,int,void*,
100  int(*)(void*,int,const void*,int,const void*));
101  int (*create_function)(sqlite3*,const char*,int,int,void*,
102  void (*xFunc)(sqlite3_context*,int,sqlite3_value**),
103  void (*xStep)(sqlite3_context*,int,sqlite3_value**),
104  void (*xFinal)(sqlite3_context*));
105  int (*create_function16)(sqlite3*,const void*,int,int,void*,
106  void (*xFunc)(sqlite3_context*,int,sqlite3_value**),
107  void (*xStep)(sqlite3_context*,int,sqlite3_value**),
108  void (*xFinal)(sqlite3_context*));
109  int (*create_module)(sqlite3*,const char*,const sqlite3_module*,void*);
110  int (*data_count)(sqlite3_stmt*pStmt);
111  sqlite3 * (*db_handle)(sqlite3_stmt*);
112  int (*declare_vtab)(sqlite3*,const char*);
113  int (*enable_shared_cache)(int);
114  int (*errcode)(sqlite3*db);
115  const char * (*errmsg)(sqlite3*);
116  const void * (*errmsg16)(sqlite3*);
117  int (*exec)(sqlite3*,const char*,sqlite3_callback,void*,char**);
118  int (*expired)(sqlite3_stmt*);
119  int (*finalize)(sqlite3_stmt*pStmt);
120  void (*free)(void*);
121  void (*free_table)(char**result);
122  int (*get_autocommit)(sqlite3*);
123  void * (*get_auxdata)(sqlite3_context*,int);
124  int (*get_table)(sqlite3*,const char*,char***,int*,int*,char**);
125  int (*global_recover)(void);
126  void (*interruptx)(sqlite3*);
127  sqlite_int64 (*last_insert_rowid)(sqlite3*);
128  const char * (*libversion)(void);
129  int (*libversion_number)(void);
130  void *(*malloc)(int);
131  char * (*mprintf)(const char*,...);
132  int (*open)(const char*,sqlite3**);
133  int (*open16)(const void*,sqlite3**);
134  int (*prepare)(sqlite3*,const char*,int,sqlite3_stmt**,const char**);
135  int (*prepare16)(sqlite3*,const void*,int,sqlite3_stmt**,const void**);
136  void * (*profile)(sqlite3*,void(*)(void*,const char*,sqlite_uint64),void*);
137  void (*progress_handler)(sqlite3*,int,int(*)(void*),void*);
138  void *(*realloc)(void*,int);
139  int (*reset)(sqlite3_stmt*pStmt);
140  void (*result_blob)(sqlite3_context*,const void*,int,void(*)(void*));
141  void (*result_double)(sqlite3_context*,double);
142  void (*result_error)(sqlite3_context*,const char*,int);
143  void (*result_error16)(sqlite3_context*,const void*,int);
144  void (*result_int)(sqlite3_context*,int);
145  void (*result_int64)(sqlite3_context*,sqlite_int64);
146  void (*result_null)(sqlite3_context*);
147  void (*result_text)(sqlite3_context*,const char*,int,void(*)(void*));
148  void (*result_text16)(sqlite3_context*,const void*,int,void(*)(void*));
149  void (*result_text16be)(sqlite3_context*,const void*,int,void(*)(void*));
150  void (*result_text16le)(sqlite3_context*,const void*,int,void(*)(void*));
151  void (*result_value)(sqlite3_context*,sqlite3_value*);
152  void * (*rollback_hook)(sqlite3*,void(*)(void*),void*);
153  int (*set_authorizer)(sqlite3*,int(*)(void*,int,const char*,const char*,
154  const char*,const char*),void*);
155  void (*set_auxdata)(sqlite3_context*,int,void*,void (*)(void*));
156  char * (*snprintf)(int,char*,const char*,...);
157  int (*step)(sqlite3_stmt*);
158  int (*table_column_metadata)(sqlite3*,const char*,const char*,const char*,
159  char const**,char const**,int*,int*,int*);
160  void (*thread_cleanup)(void);
161  int (*total_changes)(sqlite3*);
162  void * (*trace)(sqlite3*,void(*xTrace)(void*,const char*),void*);
163  int (*transfer_bindings)(sqlite3_stmt*,sqlite3_stmt*);
164  void * (*update_hook)(sqlite3*,void(*)(void*,int ,char const*,char const*,
165  sqlite_int64),void*);
166  void * (*user_data)(sqlite3_context*);
167  const void * (*value_blob)(sqlite3_value*);
168  int (*value_bytes)(sqlite3_value*);
169  int (*value_bytes16)(sqlite3_value*);
170  double (*value_double)(sqlite3_value*);
171  int (*value_int)(sqlite3_value*);
172  sqlite_int64 (*value_int64)(sqlite3_value*);
173  int (*value_numeric_type)(sqlite3_value*);
174  const unsigned char * (*value_text)(sqlite3_value*);
175  const void * (*value_text16)(sqlite3_value*);
176  const void * (*value_text16be)(sqlite3_value*);
177  const void * (*value_text16le)(sqlite3_value*);
178  int (*value_type)(sqlite3_value*);
179  char *(*vmprintf)(const char*,va_list);
180  /* Added ??? */
181  int (*overload_function)(sqlite3*, const char *zFuncName, int nArg);
182  /* Added by 3.3.13 */
183  int (*prepare_v2)(sqlite3*,const char*,int,sqlite3_stmt**,const char**);
184  int (*prepare16_v2)(sqlite3*,const void*,int,sqlite3_stmt**,const void**);
185  int (*clear_bindings)(sqlite3_stmt*);
186  /* Added by 3.4.1 */
187  int (*create_module_v2)(sqlite3*,const char*,const sqlite3_module*,void*,
188  void (*xDestroy)(void *));
189  /* Added by 3.5.0 */
190  int (*bind_zeroblob)(sqlite3_stmt*,int,int);
191  int (*blob_bytes)(sqlite3_blob*);
192  int (*blob_close)(sqlite3_blob*);
193  int (*blob_open)(sqlite3*,const char*,const char*,const char*,sqlite3_int64,
194  int,sqlite3_blob**);
195  int (*blob_read)(sqlite3_blob*,void*,int,int);
196  int (*blob_write)(sqlite3_blob*,const void*,int,int);
197  int (*create_collation_v2)(sqlite3*,const char*,int,void*,
198  int(*)(void*,int,const void*,int,const void*),
199  void(*)(void*));
200  int (*file_control)(sqlite3*,const char*,int,void*);
201  sqlite3_int64 (*memory_highwater)(int);
202  sqlite3_int64 (*memory_used)(void);
203  sqlite3_mutex *(*mutex_alloc)(int);
204  void (*mutex_enter)(sqlite3_mutex*);
205  void (*mutex_free)(sqlite3_mutex*);
206  void (*mutex_leave)(sqlite3_mutex*);
207  int (*mutex_try)(sqlite3_mutex*);
208  int (*open_v2)(const char*,sqlite3**,int,const char*);
209  int (*release_memory)(int);
210  void (*result_error_nomem)(sqlite3_context*);
211  void (*result_error_toobig)(sqlite3_context*);
212  int (*sleep)(int);
213  void (*soft_heap_limit)(int);
214  sqlite3_vfs *(*vfs_find)(const char*);
215  int (*vfs_register)(sqlite3_vfs*,int);
216  int (*vfs_unregister)(sqlite3_vfs*);
217  int (*xthreadsafe)(void);
218  void (*result_zeroblob)(sqlite3_context*,int);
219  void (*result_error_code)(sqlite3_context*,int);
220  int (*test_control)(int, ...);
221  void (*randomness)(int,void*);
222  sqlite3 *(*context_db_handle)(sqlite3_context*);
223  int (*extended_result_codes)(sqlite3*,int);
224  int (*limit)(sqlite3*,int,int);
225  sqlite3_stmt *(*next_stmt)(sqlite3*,sqlite3_stmt*);
226  const char *(*sql)(sqlite3_stmt*);
227  int (*status)(int,int*,int*,int);
228  int (*backup_finish)(sqlite3_backup*);
229  sqlite3_backup *(*backup_init)(sqlite3*,const char*,sqlite3*,const char*);
230  int (*backup_pagecount)(sqlite3_backup*);
231  int (*backup_remaining)(sqlite3_backup*);
232  int (*backup_step)(sqlite3_backup*,int);
233  const char *(*compileoption_get)(int);
234  int (*compileoption_used)(const char*);
235  int (*create_function_v2)(sqlite3*,const char*,int,int,void*,
236  void (*xFunc)(sqlite3_context*,int,sqlite3_value**),
237  void (*xStep)(sqlite3_context*,int,sqlite3_value**),
238  void (*xFinal)(sqlite3_context*),
239  void(*xDestroy)(void*));
240  int (*db_config)(sqlite3*,int,...);
241  sqlite3_mutex *(*db_mutex)(sqlite3*);
242  int (*db_status)(sqlite3*,int,int*,int*,int);
243  int (*extended_errcode)(sqlite3*);
244  void (*log)(int,const char*,...);
245  sqlite3_int64 (*soft_heap_limit64)(sqlite3_int64);
246  const char *(*sourceid)(void);
247  int (*stmt_status)(sqlite3_stmt*,int,int);
248  int (*strnicmp)(const char*,const char*,int);
249  int (*unlock_notify)(sqlite3*,void(*)(void**,int),void*);
250  int (*wal_autocheckpoint)(sqlite3*,int);
251  int (*wal_checkpoint)(sqlite3*,const char*);
252  void *(*wal_hook)(sqlite3*,int(*)(void*,sqlite3*,const char*,int),void*);
253  int (*blob_reopen)(sqlite3_blob*,sqlite3_int64);
254  int (*vtab_config)(sqlite3*,int op,...);
255  int (*vtab_on_conflict)(sqlite3*);
256  /* Version 3.7.16 and later */
257  int (*close_v2)(sqlite3*);
258  const char *(*db_filename)(sqlite3*,const char*);
259  int (*db_readonly)(sqlite3*,const char*);
260  int (*db_release_memory)(sqlite3*);
261  const char *(*errstr)(int);
262  int (*stmt_busy)(sqlite3_stmt*);
263  int (*stmt_readonly)(sqlite3_stmt*);
264  int (*stricmp)(const char*,const char*);
265  int (*uri_boolean)(const char*,const char*,int);
266  sqlite3_int64 (*uri_int64)(const char*,const char*,sqlite3_int64);
267  const char *(*uri_parameter)(const char*,const char*);
268  char *(*vsnprintf)(int,char*,const char*,va_list);
269  int (*wal_checkpoint_v2)(sqlite3*,const char*,int,int*,int*);
270  /* Version 3.8.7 and later */
271  int (*auto_extension)(void(*)(void));
272  int (*bind_blob64)(sqlite3_stmt*,int,const void*,sqlite3_uint64,
273  void(*)(void*));
274  int (*bind_text64)(sqlite3_stmt*,int,const char*,sqlite3_uint64,
275  void(*)(void*),unsigned char);
276  int (*cancel_auto_extension)(void(*)(void));
277  int (*load_extension)(sqlite3*,const char*,const char*,char**);
278  void *(*malloc64)(sqlite3_uint64);
279  sqlite3_uint64 (*msize)(void*);
280  void *(*realloc64)(void*,sqlite3_uint64);
281  void (*reset_auto_extension)(void);
282  void (*result_blob64)(sqlite3_context*,const void*,sqlite3_uint64,
283  void(*)(void*));
284  void (*result_text64)(sqlite3_context*,const char*,sqlite3_uint64,
285  void(*)(void*), unsigned char);
286  int (*strglob)(const char*,const char*);
287  /* Version 3.8.11 and later */
288  sqlite3_value *(*value_dup)(const sqlite3_value*);
289  void (*value_free)(sqlite3_value*);
290  int (*result_zeroblob64)(sqlite3_context*,sqlite3_uint64);
291  int (*bind_zeroblob64)(sqlite3_stmt*, int, sqlite3_uint64);
292  /* Version 3.9.0 and later */
293  unsigned int (*value_subtype)(sqlite3_value*);
294  void (*result_subtype)(sqlite3_context*,unsigned int);
295  /* Version 3.10.0 and later */
296  int (*status64)(int,sqlite3_int64*,sqlite3_int64*,int);
297  int (*strlike)(const char*,const char*,unsigned int);
298  int (*db_cacheflush)(sqlite3*);
299  /* Version 3.12.0 and later */
300  int (*system_errno)(sqlite3*);
301  /* Version 3.14.0 and later */
302  int (*trace_v2)(sqlite3*,unsigned,int(*)(unsigned,void*,void*,void*),void*);
303  char *(*expanded_sql)(sqlite3_stmt*);
304 };
305 
306 /*
307 ** This is the function signature used for all extension entry points. It
308 ** is also defined in the file "loadext.c".
309 */
310 typedef int (*sqlite3_loadext_entry)(
311  sqlite3 *db, /* Handle to the database. */
312  char **pzErrMsg, /* Used to set error string on failure. */
313  const sqlite3_api_routines *pThunk /* Extension API function pointers. */
314 );
315 
316 /*
317 ** The following macros redefine the API routines so that they are
318 ** redirected through the global sqlite3_api structure.
319 **
320 ** This header file is also used by the loadext.c source file
321 ** (part of the main SQLite library - not an extension) so that
322 ** it can get access to the sqlite3_api_routines structure
323 ** definition. But the main library does not want to redefine
324 ** the API. So the redefinition macros are only valid if the
325 ** SQLITE_CORE macros is undefined.
326 */
327 #if !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION)
328 #define sqlite3_aggregate_context sqlite3_api->aggregate_context
329 #ifndef SQLITE_OMIT_DEPRECATED
330 #define sqlite3_aggregate_count sqlite3_api->aggregate_count
331 #endif
332 #define sqlite3_bind_blob sqlite3_api->bind_blob
333 #define sqlite3_bind_double sqlite3_api->bind_double
334 #define sqlite3_bind_int sqlite3_api->bind_int
335 #define sqlite3_bind_int64 sqlite3_api->bind_int64
336 #define sqlite3_bind_null sqlite3_api->bind_null
337 #define sqlite3_bind_parameter_count sqlite3_api->bind_parameter_count
338 #define sqlite3_bind_parameter_index sqlite3_api->bind_parameter_index
339 #define sqlite3_bind_parameter_name sqlite3_api->bind_parameter_name
340 #define sqlite3_bind_text sqlite3_api->bind_text
341 #define sqlite3_bind_text16 sqlite3_api->bind_text16
342 #define sqlite3_bind_value sqlite3_api->bind_value
343 #define sqlite3_busy_handler sqlite3_api->busy_handler
344 #define sqlite3_busy_timeout sqlite3_api->busy_timeout
345 #define sqlite3_changes sqlite3_api->changes
346 #define sqlite3_close sqlite3_api->close
347 #define sqlite3_collation_needed sqlite3_api->collation_needed
348 #define sqlite3_collation_needed16 sqlite3_api->collation_needed16
349 #define sqlite3_column_blob sqlite3_api->column_blob
350 #define sqlite3_column_bytes sqlite3_api->column_bytes
351 #define sqlite3_column_bytes16 sqlite3_api->column_bytes16
352 #define sqlite3_column_count sqlite3_api->column_count
353 #define sqlite3_column_database_name sqlite3_api->column_database_name
354 #define sqlite3_column_database_name16 sqlite3_api->column_database_name16
355 #define sqlite3_column_decltype sqlite3_api->column_decltype
356 #define sqlite3_column_decltype16 sqlite3_api->column_decltype16
357 #define sqlite3_column_double sqlite3_api->column_double
358 #define sqlite3_column_int sqlite3_api->column_int
359 #define sqlite3_column_int64 sqlite3_api->column_int64
360 #define sqlite3_column_name sqlite3_api->column_name
361 #define sqlite3_column_name16 sqlite3_api->column_name16
362 #define sqlite3_column_origin_name sqlite3_api->column_origin_name
363 #define sqlite3_column_origin_name16 sqlite3_api->column_origin_name16
364 #define sqlite3_column_table_name sqlite3_api->column_table_name
365 #define sqlite3_column_table_name16 sqlite3_api->column_table_name16
366 #define sqlite3_column_text sqlite3_api->column_text
367 #define sqlite3_column_text16 sqlite3_api->column_text16
368 #define sqlite3_column_type sqlite3_api->column_type
369 #define sqlite3_column_value sqlite3_api->column_value
370 #define sqlite3_commit_hook sqlite3_api->commit_hook
371 #define sqlite3_complete sqlite3_api->complete
372 #define sqlite3_complete16 sqlite3_api->complete16
373 #define sqlite3_create_collation sqlite3_api->create_collation
374 #define sqlite3_create_collation16 sqlite3_api->create_collation16
375 #define sqlite3_create_function sqlite3_api->create_function
376 #define sqlite3_create_function16 sqlite3_api->create_function16
377 #define sqlite3_create_module sqlite3_api->create_module
378 #define sqlite3_create_module_v2 sqlite3_api->create_module_v2
379 #define sqlite3_data_count sqlite3_api->data_count
380 #define sqlite3_db_handle sqlite3_api->db_handle
381 #define sqlite3_declare_vtab sqlite3_api->declare_vtab
382 #define sqlite3_enable_shared_cache sqlite3_api->enable_shared_cache
383 #define sqlite3_errcode sqlite3_api->errcode
384 #define sqlite3_errmsg sqlite3_api->errmsg
385 #define sqlite3_errmsg16 sqlite3_api->errmsg16
386 #define sqlite3_exec sqlite3_api->exec
387 #ifndef SQLITE_OMIT_DEPRECATED
388 #define sqlite3_expired sqlite3_api->expired
389 #endif
390 #define sqlite3_finalize sqlite3_api->finalize
391 #define sqlite3_free sqlite3_api->free
392 #define sqlite3_free_table sqlite3_api->free_table
393 #define sqlite3_get_autocommit sqlite3_api->get_autocommit
394 #define sqlite3_get_auxdata sqlite3_api->get_auxdata
395 #define sqlite3_get_table sqlite3_api->get_table
396 #ifndef SQLITE_OMIT_DEPRECATED
397 #define sqlite3_global_recover sqlite3_api->global_recover
398 #endif
399 #define sqlite3_interrupt sqlite3_api->interruptx
400 #define sqlite3_last_insert_rowid sqlite3_api->last_insert_rowid
401 #define sqlite3_libversion sqlite3_api->libversion
402 #define sqlite3_libversion_number sqlite3_api->libversion_number
403 #define sqlite3_malloc sqlite3_api->malloc
404 #define sqlite3_mprintf sqlite3_api->mprintf
405 #define sqlite3_open sqlite3_api->open
406 #define sqlite3_open16 sqlite3_api->open16
407 #define sqlite3_prepare sqlite3_api->prepare
408 #define sqlite3_prepare16 sqlite3_api->prepare16
409 #define sqlite3_prepare_v2 sqlite3_api->prepare_v2
410 #define sqlite3_prepare16_v2 sqlite3_api->prepare16_v2
411 #define sqlite3_profile sqlite3_api->profile
412 #define sqlite3_progress_handler sqlite3_api->progress_handler
413 #define sqlite3_realloc sqlite3_api->realloc
414 #define sqlite3_reset sqlite3_api->reset
415 #define sqlite3_result_blob sqlite3_api->result_blob
416 #define sqlite3_result_double sqlite3_api->result_double
417 #define sqlite3_result_error sqlite3_api->result_error
418 #define sqlite3_result_error16 sqlite3_api->result_error16
419 #define sqlite3_result_int sqlite3_api->result_int
420 #define sqlite3_result_int64 sqlite3_api->result_int64
421 #define sqlite3_result_null sqlite3_api->result_null
422 #define sqlite3_result_text sqlite3_api->result_text
423 #define sqlite3_result_text16 sqlite3_api->result_text16
424 #define sqlite3_result_text16be sqlite3_api->result_text16be
425 #define sqlite3_result_text16le sqlite3_api->result_text16le
426 #define sqlite3_result_value sqlite3_api->result_value
427 #define sqlite3_rollback_hook sqlite3_api->rollback_hook
428 #define sqlite3_set_authorizer sqlite3_api->set_authorizer
429 #define sqlite3_set_auxdata sqlite3_api->set_auxdata
430 #define sqlite3_snprintf sqlite3_api->snprintf
431 #define sqlite3_step sqlite3_api->step
432 #define sqlite3_table_column_metadata sqlite3_api->table_column_metadata
433 #define sqlite3_thread_cleanup sqlite3_api->thread_cleanup
434 #define sqlite3_total_changes sqlite3_api->total_changes
435 #define sqlite3_trace sqlite3_api->trace
436 #ifndef SQLITE_OMIT_DEPRECATED
437 #define sqlite3_transfer_bindings sqlite3_api->transfer_bindings
438 #endif
439 #define sqlite3_update_hook sqlite3_api->update_hook
440 #define sqlite3_user_data sqlite3_api->user_data
441 #define sqlite3_value_blob sqlite3_api->value_blob
442 #define sqlite3_value_bytes sqlite3_api->value_bytes
443 #define sqlite3_value_bytes16 sqlite3_api->value_bytes16
444 #define sqlite3_value_double sqlite3_api->value_double
445 #define sqlite3_value_int sqlite3_api->value_int
446 #define sqlite3_value_int64 sqlite3_api->value_int64
447 #define sqlite3_value_numeric_type sqlite3_api->value_numeric_type
448 #define sqlite3_value_text sqlite3_api->value_text
449 #define sqlite3_value_text16 sqlite3_api->value_text16
450 #define sqlite3_value_text16be sqlite3_api->value_text16be
451 #define sqlite3_value_text16le sqlite3_api->value_text16le
452 #define sqlite3_value_type sqlite3_api->value_type
453 #define sqlite3_vmprintf sqlite3_api->vmprintf
454 #define sqlite3_vsnprintf sqlite3_api->vsnprintf
455 #define sqlite3_overload_function sqlite3_api->overload_function
456 #define sqlite3_prepare_v2 sqlite3_api->prepare_v2
457 #define sqlite3_prepare16_v2 sqlite3_api->prepare16_v2
458 #define sqlite3_clear_bindings sqlite3_api->clear_bindings
459 #define sqlite3_bind_zeroblob sqlite3_api->bind_zeroblob
460 #define sqlite3_blob_bytes sqlite3_api->blob_bytes
461 #define sqlite3_blob_close sqlite3_api->blob_close
462 #define sqlite3_blob_open sqlite3_api->blob_open
463 #define sqlite3_blob_read sqlite3_api->blob_read
464 #define sqlite3_blob_write sqlite3_api->blob_write
465 #define sqlite3_create_collation_v2 sqlite3_api->create_collation_v2
466 #define sqlite3_file_control sqlite3_api->file_control
467 #define sqlite3_memory_highwater sqlite3_api->memory_highwater
468 #define sqlite3_memory_used sqlite3_api->memory_used
469 #define sqlite3_mutex_alloc sqlite3_api->mutex_alloc
470 #define sqlite3_mutex_enter sqlite3_api->mutex_enter
471 #define sqlite3_mutex_free sqlite3_api->mutex_free
472 #define sqlite3_mutex_leave sqlite3_api->mutex_leave
473 #define sqlite3_mutex_try sqlite3_api->mutex_try
474 #define sqlite3_open_v2 sqlite3_api->open_v2
475 #define sqlite3_release_memory sqlite3_api->release_memory
476 #define sqlite3_result_error_nomem sqlite3_api->result_error_nomem
477 #define sqlite3_result_error_toobig sqlite3_api->result_error_toobig
478 #define sqlite3_sleep sqlite3_api->sleep
479 #define sqlite3_soft_heap_limit sqlite3_api->soft_heap_limit
480 #define sqlite3_vfs_find sqlite3_api->vfs_find
481 #define sqlite3_vfs_register sqlite3_api->vfs_register
482 #define sqlite3_vfs_unregister sqlite3_api->vfs_unregister
483 #define sqlite3_threadsafe sqlite3_api->xthreadsafe
484 #define sqlite3_result_zeroblob sqlite3_api->result_zeroblob
485 #define sqlite3_result_error_code sqlite3_api->result_error_code
486 #define sqlite3_test_control sqlite3_api->test_control
487 #define sqlite3_randomness sqlite3_api->randomness
488 #define sqlite3_context_db_handle sqlite3_api->context_db_handle
489 #define sqlite3_extended_result_codes sqlite3_api->extended_result_codes
490 #define sqlite3_limit sqlite3_api->limit
491 #define sqlite3_next_stmt sqlite3_api->next_stmt
492 #define sqlite3_sql sqlite3_api->sql
493 #define sqlite3_status sqlite3_api->status
494 #define sqlite3_backup_finish sqlite3_api->backup_finish
495 #define sqlite3_backup_init sqlite3_api->backup_init
496 #define sqlite3_backup_pagecount sqlite3_api->backup_pagecount
497 #define sqlite3_backup_remaining sqlite3_api->backup_remaining
498 #define sqlite3_backup_step sqlite3_api->backup_step
499 #define sqlite3_compileoption_get sqlite3_api->compileoption_get
500 #define sqlite3_compileoption_used sqlite3_api->compileoption_used
501 #define sqlite3_create_function_v2 sqlite3_api->create_function_v2
502 #define sqlite3_db_config sqlite3_api->db_config
503 #define sqlite3_db_mutex sqlite3_api->db_mutex
504 #define sqlite3_db_status sqlite3_api->db_status
505 #define sqlite3_extended_errcode sqlite3_api->extended_errcode
506 #define sqlite3_log sqlite3_api->log
507 #define sqlite3_soft_heap_limit64 sqlite3_api->soft_heap_limit64
508 #define sqlite3_sourceid sqlite3_api->sourceid
509 #define sqlite3_stmt_status sqlite3_api->stmt_status
510 #define sqlite3_strnicmp sqlite3_api->strnicmp
511 #define sqlite3_unlock_notify sqlite3_api->unlock_notify
512 #define sqlite3_wal_autocheckpoint sqlite3_api->wal_autocheckpoint
513 #define sqlite3_wal_checkpoint sqlite3_api->wal_checkpoint
514 #define sqlite3_wal_hook sqlite3_api->wal_hook
515 #define sqlite3_blob_reopen sqlite3_api->blob_reopen
516 #define sqlite3_vtab_config sqlite3_api->vtab_config
517 #define sqlite3_vtab_on_conflict sqlite3_api->vtab_on_conflict
518 /* Version 3.7.16 and later */
519 #define sqlite3_close_v2 sqlite3_api->close_v2
520 #define sqlite3_db_filename sqlite3_api->db_filename
521 #define sqlite3_db_readonly sqlite3_api->db_readonly
522 #define sqlite3_db_release_memory sqlite3_api->db_release_memory
523 #define sqlite3_errstr sqlite3_api->errstr
524 #define sqlite3_stmt_busy sqlite3_api->stmt_busy
525 #define sqlite3_stmt_readonly sqlite3_api->stmt_readonly
526 #define sqlite3_stricmp sqlite3_api->stricmp
527 #define sqlite3_uri_boolean sqlite3_api->uri_boolean
528 #define sqlite3_uri_int64 sqlite3_api->uri_int64
529 #define sqlite3_uri_parameter sqlite3_api->uri_parameter
530 #define sqlite3_uri_vsnprintf sqlite3_api->vsnprintf
531 #define sqlite3_wal_checkpoint_v2 sqlite3_api->wal_checkpoint_v2
532 /* Version 3.8.7 and later */
533 #define sqlite3_auto_extension sqlite3_api->auto_extension
534 #define sqlite3_bind_blob64 sqlite3_api->bind_blob64
535 #define sqlite3_bind_text64 sqlite3_api->bind_text64
536 #define sqlite3_cancel_auto_extension sqlite3_api->cancel_auto_extension
537 #define sqlite3_load_extension sqlite3_api->load_extension
538 #define sqlite3_malloc64 sqlite3_api->malloc64
539 #define sqlite3_msize sqlite3_api->msize
540 #define sqlite3_realloc64 sqlite3_api->realloc64
541 #define sqlite3_reset_auto_extension sqlite3_api->reset_auto_extension
542 #define sqlite3_result_blob64 sqlite3_api->result_blob64
543 #define sqlite3_result_text64 sqlite3_api->result_text64
544 #define sqlite3_strglob sqlite3_api->strglob
545 /* Version 3.8.11 and later */
546 #define sqlite3_value_dup sqlite3_api->value_dup
547 #define sqlite3_value_free sqlite3_api->value_free
548 #define sqlite3_result_zeroblob64 sqlite3_api->result_zeroblob64
549 #define sqlite3_bind_zeroblob64 sqlite3_api->bind_zeroblob64
550 /* Version 3.9.0 and later */
551 #define sqlite3_value_subtype sqlite3_api->value_subtype
552 #define sqlite3_result_subtype sqlite3_api->result_subtype
553 /* Version 3.10.0 and later */
554 #define sqlite3_status64 sqlite3_api->status64
555 #define sqlite3_strlike sqlite3_api->strlike
556 #define sqlite3_db_cacheflush sqlite3_api->db_cacheflush
557 /* Version 3.12.0 and later */
558 #define sqlite3_system_errno sqlite3_api->system_errno
559 /* Version 3.14.0 and later */
560 #define sqlite3_trace_v2 sqlite3_api->trace_v2
561 #define sqlite3_expanded_sql sqlite3_api->expanded_sql
562 #endif /* !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION) */
563 
564 #if !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION)
565  /* This case when the file really is being compiled as a loadable
566  ** extension */
567 # define SQLITE_EXTENSION_INIT1 const sqlite3_api_routines *sqlite3_api=0;
568 # define SQLITE_EXTENSION_INIT2(v) sqlite3_api=v;
569 # define SQLITE_EXTENSION_INIT3 \
570  extern const sqlite3_api_routines *sqlite3_api;
571 #else
572  /* This case when the file is being statically linked into the
573  ** application */
574 # define SQLITE_EXTENSION_INIT1 /*no-op*/
575 # define SQLITE_EXTENSION_INIT2(v) (void)v; /* unused parameter */
576 # define SQLITE_EXTENSION_INIT3 /*no-op*/
577 #endif
578 
579 #endif /* SQLITE3EXT_H */
Definition: sqlite3.c:17890