49 # define SQLITE_EXTERN extern
70 #define SQLITE_DEPRECATED
71 #define SQLITE_EXPERIMENTAL
77 # undef SQLITE_VERSION
79 #ifdef SQLITE_VERSION_NUMBER
80 # undef SQLITE_VERSION_NUMBER
110 #define SQLITE_VERSION "3.8.7"
111 #define SQLITE_VERSION_NUMBER 3008007
112 #define SQLITE_SOURCE_ID "2014-10-17 11:24:17 e4ab094f8afce0817f4074e823fabe59fc29ebb4"
144 SQLITE_API SQLITE_EXTERN
const char sqlite3_version[];
145 SQLITE_API
const char *sqlite3_libversion(
void);
146 SQLITE_API
const char *sqlite3_sourceid(
void);
147 SQLITE_API
int sqlite3_libversion_number(
void);
171 #ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS
172 SQLITE_API
int sqlite3_compileoption_used(
const char *zOptName);
173 SQLITE_API
const char *sqlite3_compileoption_get(
int N);
212 SQLITE_API
int sqlite3_threadsafe(
void);
228 typedef struct sqlite3 sqlite3;
246 #ifdef SQLITE_INT64_TYPE
247 typedef SQLITE_INT64_TYPE sqlite_int64;
248 typedef unsigned SQLITE_INT64_TYPE sqlite_uint64;
249 #elif defined(_MSC_VER) || defined(__BORLANDC__)
250 typedef __int64 sqlite_int64;
251 typedef unsigned __int64 sqlite_uint64;
253 typedef long long int sqlite_int64;
254 typedef unsigned long long int sqlite_uint64;
256 typedef sqlite_int64 sqlite3_int64;
257 typedef sqlite_uint64 sqlite3_uint64;
263 #ifdef SQLITE_OMIT_FLOATING_POINT
264 # define double sqlite3_int64
308 SQLITE_API
int sqlite3_close(sqlite3*);
309 SQLITE_API
int sqlite3_close_v2(sqlite3*);
316 typedef int (*sqlite3_callback)(
void*,int,
char**,
char**);
379 SQLITE_API
int sqlite3_exec(
382 int (*callback)(
void*,
int,
char**,
char**),
400 #define SQLITE_ERROR 1
401 #define SQLITE_INTERNAL 2
402 #define SQLITE_PERM 3
403 #define SQLITE_ABORT 4
404 #define SQLITE_BUSY 5
405 #define SQLITE_LOCKED 6
406 #define SQLITE_NOMEM 7
407 #define SQLITE_READONLY 8
408 #define SQLITE_INTERRUPT 9
409 #define SQLITE_IOERR 10
410 #define SQLITE_CORRUPT 11
411 #define SQLITE_NOTFOUND 12
412 #define SQLITE_FULL 13
413 #define SQLITE_CANTOPEN 14
414 #define SQLITE_PROTOCOL 15
415 #define SQLITE_EMPTY 16
416 #define SQLITE_SCHEMA 17
417 #define SQLITE_TOOBIG 18
418 #define SQLITE_CONSTRAINT 19
419 #define SQLITE_MISMATCH 20
420 #define SQLITE_MISUSE 21
421 #define SQLITE_NOLFS 22
422 #define SQLITE_AUTH 23
423 #define SQLITE_FORMAT 24
424 #define SQLITE_RANGE 25
425 #define SQLITE_NOTADB 26
426 #define SQLITE_NOTICE 27
427 #define SQLITE_WARNING 28
428 #define SQLITE_ROW 100
429 #define SQLITE_DONE 101
448 #define SQLITE_IOERR_READ (SQLITE_IOERR | (1<<8))
449 #define SQLITE_IOERR_SHORT_READ (SQLITE_IOERR | (2<<8))
450 #define SQLITE_IOERR_WRITE (SQLITE_IOERR | (3<<8))
451 #define SQLITE_IOERR_FSYNC (SQLITE_IOERR | (4<<8))
452 #define SQLITE_IOERR_DIR_FSYNC (SQLITE_IOERR | (5<<8))
453 #define SQLITE_IOERR_TRUNCATE (SQLITE_IOERR | (6<<8))
454 #define SQLITE_IOERR_FSTAT (SQLITE_IOERR | (7<<8))
455 #define SQLITE_IOERR_UNLOCK (SQLITE_IOERR | (8<<8))
456 #define SQLITE_IOERR_RDLOCK (SQLITE_IOERR | (9<<8))
457 #define SQLITE_IOERR_DELETE (SQLITE_IOERR | (10<<8))
458 #define SQLITE_IOERR_BLOCKED (SQLITE_IOERR | (11<<8))
459 #define SQLITE_IOERR_NOMEM (SQLITE_IOERR | (12<<8))
460 #define SQLITE_IOERR_ACCESS (SQLITE_IOERR | (13<<8))
461 #define SQLITE_IOERR_CHECKRESERVEDLOCK (SQLITE_IOERR | (14<<8))
462 #define SQLITE_IOERR_LOCK (SQLITE_IOERR | (15<<8))
463 #define SQLITE_IOERR_CLOSE (SQLITE_IOERR | (16<<8))
464 #define SQLITE_IOERR_DIR_CLOSE (SQLITE_IOERR | (17<<8))
465 #define SQLITE_IOERR_SHMOPEN (SQLITE_IOERR | (18<<8))
466 #define SQLITE_IOERR_SHMSIZE (SQLITE_IOERR | (19<<8))
467 #define SQLITE_IOERR_SHMLOCK (SQLITE_IOERR | (20<<8))
468 #define SQLITE_IOERR_SHMMAP (SQLITE_IOERR | (21<<8))
469 #define SQLITE_IOERR_SEEK (SQLITE_IOERR | (22<<8))
470 #define SQLITE_IOERR_DELETE_NOENT (SQLITE_IOERR | (23<<8))
471 #define SQLITE_IOERR_MMAP (SQLITE_IOERR | (24<<8))
472 #define SQLITE_IOERR_GETTEMPPATH (SQLITE_IOERR | (25<<8))
473 #define SQLITE_IOERR_CONVPATH (SQLITE_IOERR | (26<<8))
474 #define SQLITE_LOCKED_SHAREDCACHE (SQLITE_LOCKED | (1<<8))
475 #define SQLITE_BUSY_RECOVERY (SQLITE_BUSY | (1<<8))
476 #define SQLITE_BUSY_SNAPSHOT (SQLITE_BUSY | (2<<8))
477 #define SQLITE_CANTOPEN_NOTEMPDIR (SQLITE_CANTOPEN | (1<<8))
478 #define SQLITE_CANTOPEN_ISDIR (SQLITE_CANTOPEN | (2<<8))
479 #define SQLITE_CANTOPEN_FULLPATH (SQLITE_CANTOPEN | (3<<8))
480 #define SQLITE_CANTOPEN_CONVPATH (SQLITE_CANTOPEN | (4<<8))
481 #define SQLITE_CORRUPT_VTAB (SQLITE_CORRUPT | (1<<8))
482 #define SQLITE_READONLY_RECOVERY (SQLITE_READONLY | (1<<8))
483 #define SQLITE_READONLY_CANTLOCK (SQLITE_READONLY | (2<<8))
484 #define SQLITE_READONLY_ROLLBACK (SQLITE_READONLY | (3<<8))
485 #define SQLITE_READONLY_DBMOVED (SQLITE_READONLY | (4<<8))
486 #define SQLITE_ABORT_ROLLBACK (SQLITE_ABORT | (2<<8))
487 #define SQLITE_CONSTRAINT_CHECK (SQLITE_CONSTRAINT | (1<<8))
488 #define SQLITE_CONSTRAINT_COMMITHOOK (SQLITE_CONSTRAINT | (2<<8))
489 #define SQLITE_CONSTRAINT_FOREIGNKEY (SQLITE_CONSTRAINT | (3<<8))
490 #define SQLITE_CONSTRAINT_FUNCTION (SQLITE_CONSTRAINT | (4<<8))
491 #define SQLITE_CONSTRAINT_NOTNULL (SQLITE_CONSTRAINT | (5<<8))
492 #define SQLITE_CONSTRAINT_PRIMARYKEY (SQLITE_CONSTRAINT | (6<<8))
493 #define SQLITE_CONSTRAINT_TRIGGER (SQLITE_CONSTRAINT | (7<<8))
494 #define SQLITE_CONSTRAINT_UNIQUE (SQLITE_CONSTRAINT | (8<<8))
495 #define SQLITE_CONSTRAINT_VTAB (SQLITE_CONSTRAINT | (9<<8))
496 #define SQLITE_CONSTRAINT_ROWID (SQLITE_CONSTRAINT |(10<<8))
497 #define SQLITE_NOTICE_RECOVER_WAL (SQLITE_NOTICE | (1<<8))
498 #define SQLITE_NOTICE_RECOVER_ROLLBACK (SQLITE_NOTICE | (2<<8))
499 #define SQLITE_WARNING_AUTOINDEX (SQLITE_WARNING | (1<<8))
500 #define SQLITE_AUTH_USER (SQLITE_AUTH | (1<<8))
509 #define SQLITE_OPEN_READONLY 0x00000001
510 #define SQLITE_OPEN_READWRITE 0x00000002
511 #define SQLITE_OPEN_CREATE 0x00000004
512 #define SQLITE_OPEN_DELETEONCLOSE 0x00000008
513 #define SQLITE_OPEN_EXCLUSIVE 0x00000010
514 #define SQLITE_OPEN_AUTOPROXY 0x00000020
515 #define SQLITE_OPEN_URI 0x00000040
516 #define SQLITE_OPEN_MEMORY 0x00000080
517 #define SQLITE_OPEN_MAIN_DB 0x00000100
518 #define SQLITE_OPEN_TEMP_DB 0x00000200
519 #define SQLITE_OPEN_TRANSIENT_DB 0x00000400
520 #define SQLITE_OPEN_MAIN_JOURNAL 0x00000800
521 #define SQLITE_OPEN_TEMP_JOURNAL 0x00001000
522 #define SQLITE_OPEN_SUBJOURNAL 0x00002000
523 #define SQLITE_OPEN_MASTER_JOURNAL 0x00004000
524 #define SQLITE_OPEN_NOMUTEX 0x00008000
525 #define SQLITE_OPEN_FULLMUTEX 0x00010000
526 #define SQLITE_OPEN_SHAREDCACHE 0x00020000
527 #define SQLITE_OPEN_PRIVATECACHE 0x00040000
528 #define SQLITE_OPEN_WAL 0x00080000
560 #define SQLITE_IOCAP_ATOMIC 0x00000001
561 #define SQLITE_IOCAP_ATOMIC512 0x00000002
562 #define SQLITE_IOCAP_ATOMIC1K 0x00000004
563 #define SQLITE_IOCAP_ATOMIC2K 0x00000008
564 #define SQLITE_IOCAP_ATOMIC4K 0x00000010
565 #define SQLITE_IOCAP_ATOMIC8K 0x00000020
566 #define SQLITE_IOCAP_ATOMIC16K 0x00000040
567 #define SQLITE_IOCAP_ATOMIC32K 0x00000080
568 #define SQLITE_IOCAP_ATOMIC64K 0x00000100
569 #define SQLITE_IOCAP_SAFE_APPEND 0x00000200
570 #define SQLITE_IOCAP_SEQUENTIAL 0x00000400
571 #define SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN 0x00000800
572 #define SQLITE_IOCAP_POWERSAFE_OVERWRITE 0x00001000
573 #define SQLITE_IOCAP_IMMUTABLE 0x00002000
582 #define SQLITE_LOCK_NONE 0
583 #define SQLITE_LOCK_SHARED 1
584 #define SQLITE_LOCK_RESERVED 2
585 #define SQLITE_LOCK_PENDING 3
586 #define SQLITE_LOCK_EXCLUSIVE 4
614 #define SQLITE_SYNC_NORMAL 0x00002
615 #define SQLITE_SYNC_FULL 0x00003
616 #define SQLITE_SYNC_DATAONLY 0x00010
629 typedef struct sqlite3_file sqlite3_file;
630 struct sqlite3_file {
631 const struct sqlite3_io_methods *pMethods;
724 typedef struct sqlite3_io_methods sqlite3_io_methods;
725 struct sqlite3_io_methods {
727 int (*xClose)(sqlite3_file*);
728 int (*xRead)(sqlite3_file*,
void*,
int iAmt, sqlite3_int64 iOfst);
729 int (*xWrite)(sqlite3_file*,
const void*,
int iAmt, sqlite3_int64 iOfst);
730 int (*xTruncate)(sqlite3_file*, sqlite3_int64 size);
731 int (*xSync)(sqlite3_file*,
int flags);
732 int (*xFileSize)(sqlite3_file*, sqlite3_int64 *pSize);
733 int (*xLock)(sqlite3_file*, int);
734 int (*xUnlock)(sqlite3_file*, int);
735 int (*xCheckReservedLock)(sqlite3_file*,
int *pResOut);
736 int (*xFileControl)(sqlite3_file*,
int op,
void *pArg);
737 int (*xSectorSize)(sqlite3_file*);
738 int (*xDeviceCharacteristics)(sqlite3_file*);
740 int (*xShmMap)(sqlite3_file*,
int iPg,
int pgsz, int,
void volatile**);
741 int (*xShmLock)(sqlite3_file*,
int offset,
int n,
int flags);
742 void (*xShmBarrier)(sqlite3_file*);
743 int (*xShmUnmap)(sqlite3_file*,
int deleteFlag);
745 int (*xFetch)(sqlite3_file*, sqlite3_int64 iOfst,
int iAmt,
void **pp);
746 int (*xUnfetch)(sqlite3_file*, sqlite3_int64 iOfst,
void *p);
951 #define SQLITE_FCNTL_LOCKSTATE 1
952 #define SQLITE_GET_LOCKPROXYFILE 2
953 #define SQLITE_SET_LOCKPROXYFILE 3
954 #define SQLITE_LAST_ERRNO 4
955 #define SQLITE_FCNTL_SIZE_HINT 5
956 #define SQLITE_FCNTL_CHUNK_SIZE 6
957 #define SQLITE_FCNTL_FILE_POINTER 7
958 #define SQLITE_FCNTL_SYNC_OMITTED 8
959 #define SQLITE_FCNTL_WIN32_AV_RETRY 9
960 #define SQLITE_FCNTL_PERSIST_WAL 10
961 #define SQLITE_FCNTL_OVERWRITE 11
962 #define SQLITE_FCNTL_VFSNAME 12
963 #define SQLITE_FCNTL_POWERSAFE_OVERWRITE 13
964 #define SQLITE_FCNTL_PRAGMA 14
965 #define SQLITE_FCNTL_BUSYHANDLER 15
966 #define SQLITE_FCNTL_TEMPFILENAME 16
967 #define SQLITE_FCNTL_MMAP_SIZE 18
968 #define SQLITE_FCNTL_TRACE 19
969 #define SQLITE_FCNTL_HAS_MOVED 20
970 #define SQLITE_FCNTL_SYNC 21
971 #define SQLITE_FCNTL_COMMIT_PHASETWO 22
972 #define SQLITE_FCNTL_WIN32_SET_HANDLE 23
984 typedef struct sqlite3_mutex sqlite3_mutex;
1143 typedef struct sqlite3_vfs sqlite3_vfs;
1144 typedef void (*sqlite3_syscall_ptr)(void);
1145 struct sqlite3_vfs {
1152 int (*xOpen)(sqlite3_vfs*,
const char *zName, sqlite3_file*,
1153 int flags,
int *pOutFlags);
1154 int (*xDelete)(sqlite3_vfs*,
const char *zName,
int syncDir);
1155 int (*xAccess)(sqlite3_vfs*,
const char *zName,
int flags,
int *pResOut);
1156 int (*xFullPathname)(sqlite3_vfs*,
const char *zName,
int nOut,
char *zOut);
1157 void *(*xDlOpen)(sqlite3_vfs*,
const char *zFilename);
1158 void (*xDlError)(sqlite3_vfs*,
int nByte,
char *zErrMsg);
1159 void (*(*xDlSym)(sqlite3_vfs*,
void*,
const char *zSymbol))(void);
1160 void (*xDlClose)(sqlite3_vfs*,
void*);
1161 int (*xRandomness)(sqlite3_vfs*,
int nByte,
char *zOut);
1162 int (*xSleep)(sqlite3_vfs*,
int microseconds);
1163 int (*xCurrentTime)(sqlite3_vfs*,
double*);
1164 int (*xGetLastError)(sqlite3_vfs*, int,
char *);
1169 int (*xCurrentTimeInt64)(sqlite3_vfs*, sqlite3_int64*);
1174 int (*xSetSystemCall)(sqlite3_vfs*,
const char *zName, sqlite3_syscall_ptr);
1175 sqlite3_syscall_ptr (*xGetSystemCall)(sqlite3_vfs*,
const char *zName);
1176 const char *(*xNextSystemCall)(sqlite3_vfs*,
const char *zName);
1204 #define SQLITE_ACCESS_EXISTS 0
1205 #define SQLITE_ACCESS_READWRITE 1
1206 #define SQLITE_ACCESS_READ 2
1230 #define SQLITE_SHM_UNLOCK 1
1231 #define SQLITE_SHM_LOCK 2
1232 #define SQLITE_SHM_SHARED 4
1233 #define SQLITE_SHM_EXCLUSIVE 8
1243 #define SQLITE_SHM_NLOCK 8
1321 SQLITE_API
int sqlite3_initialize(
void);
1322 SQLITE_API
int sqlite3_shutdown(
void);
1323 SQLITE_API
int sqlite3_os_init(
void);
1324 SQLITE_API
int sqlite3_os_end(
void);
1355 SQLITE_API
int sqlite3_config(
int, ...);
1373 SQLITE_API
int sqlite3_db_config(sqlite3*,
int op, ...);
1438 typedef struct sqlite3_mem_methods sqlite3_mem_methods;
1439 struct sqlite3_mem_methods {
1440 void *(*xMalloc)(int);
1441 void (*xFree)(
void*);
1442 void *(*xRealloc)(
void*,int);
1443 int (*xSize)(
void*);
1444 int (*xRoundup)(int);
1445 int (*xInit)(
void*);
1446 void (*xShutdown)(
void*);
1728 #define SQLITE_CONFIG_SINGLETHREAD 1
1729 #define SQLITE_CONFIG_MULTITHREAD 2
1730 #define SQLITE_CONFIG_SERIALIZED 3
1731 #define SQLITE_CONFIG_MALLOC 4
1732 #define SQLITE_CONFIG_GETMALLOC 5
1733 #define SQLITE_CONFIG_SCRATCH 6
1734 #define SQLITE_CONFIG_PAGECACHE 7
1735 #define SQLITE_CONFIG_HEAP 8
1736 #define SQLITE_CONFIG_MEMSTATUS 9
1737 #define SQLITE_CONFIG_MUTEX 10
1738 #define SQLITE_CONFIG_GETMUTEX 11
1740 #define SQLITE_CONFIG_LOOKASIDE 13
1741 #define SQLITE_CONFIG_PCACHE 14
1742 #define SQLITE_CONFIG_GETPCACHE 15
1743 #define SQLITE_CONFIG_LOG 16
1744 #define SQLITE_CONFIG_URI 17
1745 #define SQLITE_CONFIG_PCACHE2 18
1746 #define SQLITE_CONFIG_GETPCACHE2 19
1747 #define SQLITE_CONFIG_COVERING_INDEX_SCAN 20
1748 #define SQLITE_CONFIG_SQLLOG 21
1749 #define SQLITE_CONFIG_MMAP_SIZE 22
1750 #define SQLITE_CONFIG_WIN32_HEAPSIZE 23
1810 #define SQLITE_DBCONFIG_LOOKASIDE 1001
1811 #define SQLITE_DBCONFIG_ENABLE_FKEY 1002
1812 #define SQLITE_DBCONFIG_ENABLE_TRIGGER 1003
1822 SQLITE_API
int sqlite3_extended_result_codes(sqlite3*,
int onoff);
1873 SQLITE_API sqlite3_int64 sqlite3_last_insert_rowid(sqlite3*);
1927 SQLITE_API
int sqlite3_changes(sqlite3*);
1953 SQLITE_API
int sqlite3_total_changes(sqlite3*);
1992 SQLITE_API
void sqlite3_interrupt(sqlite3*);
2027 SQLITE_API
int sqlite3_complete(
const char *sql);
2028 SQLITE_API
int sqlite3_complete16(
const void *sql);
2087 SQLITE_API
int sqlite3_busy_handler(sqlite3*,
int(*)(
void*,
int),
void*);
2109 SQLITE_API
int sqlite3_busy_timeout(sqlite3*,
int ms);
2183 SQLITE_API
int sqlite3_get_table(
2191 SQLITE_API
void sqlite3_free_table(
char **result);
2287 SQLITE_API
char *sqlite3_mprintf(
const char*,...);
2288 SQLITE_API
char *sqlite3_vmprintf(
const char*, va_list);
2289 SQLITE_API
char *sqlite3_snprintf(
int,
char*,
const char*, ...);
2290 SQLITE_API
char *sqlite3_vsnprintf(
int,
char*,
const char*, va_list);
2380 SQLITE_API
void *sqlite3_malloc(
int);
2381 SQLITE_API
void *sqlite3_malloc64(sqlite3_uint64);
2382 SQLITE_API
void *sqlite3_realloc(
void*,
int);
2383 SQLITE_API
void *sqlite3_realloc64(
void*, sqlite3_uint64);
2384 SQLITE_API
void sqlite3_free(
void*);
2385 SQLITE_API sqlite3_uint64 sqlite3_msize(
void*);
2410 SQLITE_API sqlite3_int64 sqlite3_memory_used(
void);
2411 SQLITE_API sqlite3_int64 sqlite3_memory_highwater(
int resetFlag);
2433 SQLITE_API
void sqlite3_randomness(
int N,
void *P);
2515 SQLITE_API
int sqlite3_set_authorizer(
2517 int (*xAuth)(
void*,
int,
const char*,
const char*,
const char*,
const char*),
2533 #define SQLITE_DENY 1
2534 #define SQLITE_IGNORE 2
2556 #define SQLITE_CREATE_INDEX 1
2557 #define SQLITE_CREATE_TABLE 2
2558 #define SQLITE_CREATE_TEMP_INDEX 3
2559 #define SQLITE_CREATE_TEMP_TABLE 4
2560 #define SQLITE_CREATE_TEMP_TRIGGER 5
2561 #define SQLITE_CREATE_TEMP_VIEW 6
2562 #define SQLITE_CREATE_TRIGGER 7
2563 #define SQLITE_CREATE_VIEW 8
2564 #define SQLITE_DELETE 9
2565 #define SQLITE_DROP_INDEX 10
2566 #define SQLITE_DROP_TABLE 11
2567 #define SQLITE_DROP_TEMP_INDEX 12
2568 #define SQLITE_DROP_TEMP_TABLE 13
2569 #define SQLITE_DROP_TEMP_TRIGGER 14
2570 #define SQLITE_DROP_TEMP_VIEW 15
2571 #define SQLITE_DROP_TRIGGER 16
2572 #define SQLITE_DROP_VIEW 17
2573 #define SQLITE_INSERT 18
2574 #define SQLITE_PRAGMA 19
2575 #define SQLITE_READ 20
2576 #define SQLITE_SELECT 21
2577 #define SQLITE_TRANSACTION 22
2578 #define SQLITE_UPDATE 23
2579 #define SQLITE_ATTACH 24
2580 #define SQLITE_DETACH 25
2581 #define SQLITE_ALTER_TABLE 26
2582 #define SQLITE_REINDEX 27
2583 #define SQLITE_ANALYZE 28
2584 #define SQLITE_CREATE_VTABLE 29
2585 #define SQLITE_DROP_VTABLE 30
2586 #define SQLITE_FUNCTION 31
2587 #define SQLITE_SAVEPOINT 32
2588 #define SQLITE_COPY 0
2589 #define SQLITE_RECURSIVE 33
2619 SQLITE_API
void *sqlite3_trace(sqlite3*,
void(*xTrace)(
void*,
const char*),
void*);
2620 SQLITE_API SQLITE_EXPERIMENTAL
void *sqlite3_profile(sqlite3*,
2621 void(*xProfile)(
void*,
const char*,sqlite3_uint64),
void*);
2654 SQLITE_API
void sqlite3_progress_handler(sqlite3*,
int,
int(*)(
void*),
void*);
2882 SQLITE_API
int sqlite3_open(
2883 const char *filename,
2886 SQLITE_API
int sqlite3_open16(
2887 const void *filename,
2890 SQLITE_API
int sqlite3_open_v2(
2891 const char *filename,
2936 SQLITE_API
const char *sqlite3_uri_parameter(
const char *zFilename,
const char *zParam);
2937 SQLITE_API
int sqlite3_uri_boolean(
const char *zFile,
const char *zParam,
int bDefault);
2938 SQLITE_API sqlite3_int64 sqlite3_uri_int64(
const char*,
const char*, sqlite3_int64);
2979 SQLITE_API
int sqlite3_errcode(sqlite3 *db);
2980 SQLITE_API
int sqlite3_extended_errcode(sqlite3 *db);
2981 SQLITE_API
const char *sqlite3_errmsg(sqlite3*);
2982 SQLITE_API
const void *sqlite3_errmsg16(sqlite3*);
2983 SQLITE_API
const char *sqlite3_errstr(
int);
3009 typedef struct sqlite3_stmt sqlite3_stmt;
3050 SQLITE_API
int sqlite3_limit(sqlite3*,
int id,
int newVal);
3108 #define SQLITE_LIMIT_LENGTH 0
3109 #define SQLITE_LIMIT_SQL_LENGTH 1
3110 #define SQLITE_LIMIT_COLUMN 2
3111 #define SQLITE_LIMIT_EXPR_DEPTH 3
3112 #define SQLITE_LIMIT_COMPOUND_SELECT 4
3113 #define SQLITE_LIMIT_VDBE_OP 5
3114 #define SQLITE_LIMIT_FUNCTION_ARG 6
3115 #define SQLITE_LIMIT_ATTACHED 7
3116 #define SQLITE_LIMIT_LIKE_PATTERN_LENGTH 8
3117 #define SQLITE_LIMIT_VARIABLE_NUMBER 9
3118 #define SQLITE_LIMIT_TRIGGER_DEPTH 10
3119 #define SQLITE_LIMIT_WORKER_THREADS 11
3202 SQLITE_API
int sqlite3_prepare(
3206 sqlite3_stmt **ppStmt,
3209 SQLITE_API
int sqlite3_prepare_v2(
3213 sqlite3_stmt **ppStmt,
3216 SQLITE_API
int sqlite3_prepare16(
3220 sqlite3_stmt **ppStmt,
3223 SQLITE_API
int sqlite3_prepare16_v2(
3227 sqlite3_stmt **ppStmt,
3238 SQLITE_API
const char *sqlite3_sql(sqlite3_stmt *pStmt);
3269 SQLITE_API
int sqlite3_stmt_readonly(sqlite3_stmt *pStmt);
3288 SQLITE_API
int sqlite3_stmt_busy(sqlite3_stmt*);
3327 typedef struct Mem sqlite3_value;
3341 typedef struct sqlite3_context sqlite3_context;
3449 SQLITE_API
int sqlite3_bind_blob(sqlite3_stmt*,
int,
const void*,
int n,
void(*)(
void*));
3450 SQLITE_API
int sqlite3_bind_blob64(sqlite3_stmt*,
int,
const void*, sqlite3_uint64,
3452 SQLITE_API
int sqlite3_bind_double(sqlite3_stmt*,
int,
double);
3453 SQLITE_API
int sqlite3_bind_int(sqlite3_stmt*,
int,
int);
3454 SQLITE_API
int sqlite3_bind_int64(sqlite3_stmt*,
int, sqlite3_int64);
3455 SQLITE_API
int sqlite3_bind_null(sqlite3_stmt*,
int);
3456 SQLITE_API
int sqlite3_bind_text(sqlite3_stmt*,
int,
const char*,
int,
void(*)(
void*));
3457 SQLITE_API
int sqlite3_bind_text16(sqlite3_stmt*,
int,
const void*,
int,
void(*)(
void*));
3458 SQLITE_API
int sqlite3_bind_text64(sqlite3_stmt*,
int,
const char*, sqlite3_uint64,
3459 void(*)(
void*),
unsigned char encoding);
3460 SQLITE_API
int sqlite3_bind_value(sqlite3_stmt*,
int,
const sqlite3_value*);
3461 SQLITE_API
int sqlite3_bind_zeroblob(sqlite3_stmt*,
int,
int n);
3481 SQLITE_API
int sqlite3_bind_parameter_count(sqlite3_stmt*);
3508 SQLITE_API
const char *sqlite3_bind_parameter_name(sqlite3_stmt*,
int);
3524 SQLITE_API
int sqlite3_bind_parameter_index(sqlite3_stmt*,
const char *zName);
3533 SQLITE_API
int sqlite3_clear_bindings(sqlite3_stmt*);
3544 SQLITE_API
int sqlite3_column_count(sqlite3_stmt *pStmt);
3572 SQLITE_API
const char *sqlite3_column_name(sqlite3_stmt*,
int N);
3573 SQLITE_API
const void *sqlite3_column_name16(sqlite3_stmt*,
int N);
3620 SQLITE_API
const char *sqlite3_column_database_name(sqlite3_stmt*,
int);
3621 SQLITE_API
const void *sqlite3_column_database_name16(sqlite3_stmt*,
int);
3622 SQLITE_API
const char *sqlite3_column_table_name(sqlite3_stmt*,
int);
3623 SQLITE_API
const void *sqlite3_column_table_name16(sqlite3_stmt*,
int);
3624 SQLITE_API
const char *sqlite3_column_origin_name(sqlite3_stmt*,
int);
3625 SQLITE_API
const void *sqlite3_column_origin_name16(sqlite3_stmt*,
int);
3656 SQLITE_API
const char *sqlite3_column_decltype(sqlite3_stmt*,
int);
3657 SQLITE_API
const void *sqlite3_column_decltype16(sqlite3_stmt*,
int);
3736 SQLITE_API
int sqlite3_step(sqlite3_stmt*);
3756 SQLITE_API
int sqlite3_data_count(sqlite3_stmt *pStmt);
3779 #define SQLITE_INTEGER 1
3780 #define SQLITE_FLOAT 2
3781 #define SQLITE_BLOB 4
3782 #define SQLITE_NULL 5
3786 # define SQLITE_TEXT 3
3788 #define SQLITE3_TEXT 3
3952 SQLITE_API
const void *sqlite3_column_blob(sqlite3_stmt*,
int iCol);
3953 SQLITE_API
int sqlite3_column_bytes(sqlite3_stmt*,
int iCol);
3954 SQLITE_API
int sqlite3_column_bytes16(sqlite3_stmt*,
int iCol);
3955 SQLITE_API
double sqlite3_column_double(sqlite3_stmt*,
int iCol);
3956 SQLITE_API
int sqlite3_column_int(sqlite3_stmt*,
int iCol);
3957 SQLITE_API sqlite3_int64 sqlite3_column_int64(sqlite3_stmt*,
int iCol);
3958 SQLITE_API
const unsigned char *sqlite3_column_text(sqlite3_stmt*,
int iCol);
3959 SQLITE_API
const void *sqlite3_column_text16(sqlite3_stmt*,
int iCol);
3960 SQLITE_API
int sqlite3_column_type(sqlite3_stmt*,
int iCol);
3961 SQLITE_API sqlite3_value *sqlite3_column_value(sqlite3_stmt*,
int iCol);
3988 SQLITE_API
int sqlite3_finalize(sqlite3_stmt *pStmt);
4014 SQLITE_API
int sqlite3_reset(sqlite3_stmt *pStmt);
4113 SQLITE_API
int sqlite3_create_function(
4115 const char *zFunctionName,
4119 void (*xFunc)(sqlite3_context*,
int,sqlite3_value**),
4120 void (*xStep)(sqlite3_context*,
int,sqlite3_value**),
4121 void (*xFinal)(sqlite3_context*)
4123 SQLITE_API
int sqlite3_create_function16(
4125 const void *zFunctionName,
4129 void (*xFunc)(sqlite3_context*,
int,sqlite3_value**),
4130 void (*xStep)(sqlite3_context*,
int,sqlite3_value**),
4131 void (*xFinal)(sqlite3_context*)
4133 SQLITE_API
int sqlite3_create_function_v2(
4135 const char *zFunctionName,
4139 void (*xFunc)(sqlite3_context*,
int,sqlite3_value**),
4140 void (*xStep)(sqlite3_context*,
int,sqlite3_value**),
4141 void (*xFinal)(sqlite3_context*),
4142 void(*xDestroy)(
void*)
4151 #define SQLITE_UTF8 1
4152 #define SQLITE_UTF16LE 2
4153 #define SQLITE_UTF16BE 3
4154 #define SQLITE_UTF16 4
4155 #define SQLITE_ANY 5
4156 #define SQLITE_UTF16_ALIGNED 8
4166 #define SQLITE_DETERMINISTIC 0x800
4178 #ifndef SQLITE_OMIT_DEPRECATED
4179 SQLITE_API SQLITE_DEPRECATED
int sqlite3_aggregate_count(sqlite3_context*);
4180 SQLITE_API SQLITE_DEPRECATED
int sqlite3_expired(sqlite3_stmt*);
4181 SQLITE_API SQLITE_DEPRECATED
int sqlite3_transfer_bindings(sqlite3_stmt*, sqlite3_stmt*);
4182 SQLITE_API SQLITE_DEPRECATED
int sqlite3_global_recover(
void);
4183 SQLITE_API SQLITE_DEPRECATED
void sqlite3_thread_cleanup(
void);
4184 SQLITE_API SQLITE_DEPRECATED
int sqlite3_memory_alarm(
void(*)(
void*,sqlite3_int64,
int),
4185 void*,sqlite3_int64);
4233 SQLITE_API
const void *sqlite3_value_blob(sqlite3_value*);
4234 SQLITE_API
int sqlite3_value_bytes(sqlite3_value*);
4235 SQLITE_API
int sqlite3_value_bytes16(sqlite3_value*);
4236 SQLITE_API
double sqlite3_value_double(sqlite3_value*);
4237 SQLITE_API
int sqlite3_value_int(sqlite3_value*);
4238 SQLITE_API sqlite3_int64 sqlite3_value_int64(sqlite3_value*);
4239 SQLITE_API
const unsigned char *sqlite3_value_text(sqlite3_value*);
4240 SQLITE_API
const void *sqlite3_value_text16(sqlite3_value*);
4241 SQLITE_API
const void *sqlite3_value_text16le(sqlite3_value*);
4242 SQLITE_API
const void *sqlite3_value_text16be(sqlite3_value*);
4243 SQLITE_API
int sqlite3_value_type(sqlite3_value*);
4244 SQLITE_API
int sqlite3_value_numeric_type(sqlite3_value*);
4288 SQLITE_API
void *sqlite3_aggregate_context(sqlite3_context*,
int nBytes);
4302 SQLITE_API
void *sqlite3_user_data(sqlite3_context*);
4313 SQLITE_API sqlite3 *sqlite3_context_db_handle(sqlite3_context*);
4365 SQLITE_API
void *sqlite3_get_auxdata(sqlite3_context*,
int N);
4366 SQLITE_API
void sqlite3_set_auxdata(sqlite3_context*,
int N,
void*,
void (*)(
void*));
4383 typedef void (*sqlite3_destructor_type)(
void*);
4384 #define SQLITE_STATIC ((sqlite3_destructor_type)0)
4385 #define SQLITE_TRANSIENT ((sqlite3_destructor_type)-1)
4501 SQLITE_API
void sqlite3_result_blob(sqlite3_context*,
const void*,
int,
void(*)(
void*));
4502 SQLITE_API
void sqlite3_result_blob64(sqlite3_context*,
const void*,sqlite3_uint64,
void(*)(
void*));
4503 SQLITE_API
void sqlite3_result_double(sqlite3_context*,
double);
4504 SQLITE_API
void sqlite3_result_error(sqlite3_context*,
const char*,
int);
4505 SQLITE_API
void sqlite3_result_error16(sqlite3_context*,
const void*,
int);
4506 SQLITE_API
void sqlite3_result_error_toobig(sqlite3_context*);
4507 SQLITE_API
void sqlite3_result_error_nomem(sqlite3_context*);
4508 SQLITE_API
void sqlite3_result_error_code(sqlite3_context*,
int);
4509 SQLITE_API
void sqlite3_result_int(sqlite3_context*,
int);
4510 SQLITE_API
void sqlite3_result_int64(sqlite3_context*, sqlite3_int64);
4511 SQLITE_API
void sqlite3_result_null(sqlite3_context*);
4512 SQLITE_API
void sqlite3_result_text(sqlite3_context*,
const char*,
int,
void(*)(
void*));
4513 SQLITE_API
void sqlite3_result_text64(sqlite3_context*,
const char*,sqlite3_uint64,
4514 void(*)(
void*),
unsigned char encoding);
4515 SQLITE_API
void sqlite3_result_text16(sqlite3_context*,
const void*,
int,
void(*)(
void*));
4516 SQLITE_API
void sqlite3_result_text16le(sqlite3_context*,
const void*,
int,
void(*)(
void*));
4517 SQLITE_API
void sqlite3_result_text16be(sqlite3_context*,
const void*,
int,
void(*)(
void*));
4518 SQLITE_API
void sqlite3_result_value(sqlite3_context*, sqlite3_value*);
4519 SQLITE_API
void sqlite3_result_zeroblob(sqlite3_context*,
int n);
4600 SQLITE_API
int sqlite3_create_collation(
4605 int(*xCompare)(
void*,
int,
const void*,
int,
const void*)
4607 SQLITE_API
int sqlite3_create_collation_v2(
4612 int(*xCompare)(
void*,
int,
const void*,
int,
const void*),
4613 void(*xDestroy)(
void*)
4615 SQLITE_API
int sqlite3_create_collation16(
4620 int(*xCompare)(
void*,
int,
const void*,
int,
const void*)
4649 SQLITE_API
int sqlite3_collation_needed(
4652 void(*)(
void*,sqlite3*,
int eTextRep,
const char*)
4654 SQLITE_API
int sqlite3_collation_needed16(
4657 void(*)(
void*,sqlite3*,
int eTextRep,
const void*)
4660 #ifdef SQLITE_HAS_CODEC
4668 SQLITE_API
int sqlite3_key(
4670 const void *pKey,
int nKey
4672 SQLITE_API
int sqlite3_key_v2(
4674 const char *zDbName,
4675 const void *pKey,
int nKey
4686 SQLITE_API
int sqlite3_rekey(
4688 const void *pKey,
int nKey
4690 SQLITE_API
int sqlite3_rekey_v2(
4692 const char *zDbName,
4693 const void *pKey,
int nKey
4700 SQLITE_API
void sqlite3_activate_see(
4701 const char *zPassPhrase
4705 #ifdef SQLITE_ENABLE_CEROD
4710 SQLITE_API
void sqlite3_activate_cerod(
4711 const char *zPassPhrase
4732 SQLITE_API
int sqlite3_sleep(
int);
4790 SQLITE_API SQLITE_EXTERN
char *sqlite3_temp_directory;
4827 SQLITE_API SQLITE_EXTERN
char *sqlite3_data_directory;
4850 SQLITE_API
int sqlite3_get_autocommit(sqlite3*);
4862 SQLITE_API sqlite3 *sqlite3_db_handle(sqlite3_stmt*);
4878 SQLITE_API
const char *sqlite3_db_filename(sqlite3 *db,
const char *zDbName);
4887 SQLITE_API
int sqlite3_db_readonly(sqlite3 *db,
const char *zDbName);
4902 SQLITE_API sqlite3_stmt *sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt);
4950 SQLITE_API
void *sqlite3_commit_hook(sqlite3*,
int(*)(
void*),
void*);
4951 SQLITE_API
void *sqlite3_rollback_hook(sqlite3*,
void(*)(
void *),
void*);
5001 SQLITE_API
void *sqlite3_update_hook(
5003 void(*)(
void *,
int ,
char const *,
char const *,sqlite3_int64),
5036 SQLITE_API
int sqlite3_enable_shared_cache(
int);
5052 SQLITE_API
int sqlite3_release_memory(
int);
5065 SQLITE_API
int sqlite3_db_release_memory(sqlite3*);
5117 SQLITE_API sqlite3_int64 sqlite3_soft_heap_limit64(sqlite3_int64 N);
5128 SQLITE_API SQLITE_DEPRECATED
void sqlite3_soft_heap_limit(
int N);
5193 SQLITE_API
int sqlite3_table_column_metadata(
5195 const char *zDbName,
5196 const char *zTableName,
5197 const char *zColumnName,
5198 char const **pzDataType,
5199 char const **pzCollSeq,
5239 SQLITE_API
int sqlite3_load_extension(
5259 SQLITE_API
int sqlite3_enable_load_extension(sqlite3 *db,
int onoff);
5297 SQLITE_API
int sqlite3_auto_extension(
void (*xEntryPoint)(
void));
5309 SQLITE_API
int sqlite3_cancel_auto_extension(
void (*xEntryPoint)(
void));
5317 SQLITE_API
void sqlite3_reset_auto_extension(
void);
5331 typedef struct sqlite3_vtab sqlite3_vtab;
5332 typedef struct sqlite3_index_info sqlite3_index_info;
5333 typedef struct sqlite3_vtab_cursor sqlite3_vtab_cursor;
5334 typedef struct sqlite3_module sqlite3_module;
5352 struct sqlite3_module {
5354 int (*xCreate)(sqlite3*,
void *pAux,
5355 int argc,
const char *
const*argv,
5356 sqlite3_vtab **ppVTab,
char**);
5357 int (*xConnect)(sqlite3*,
void *pAux,
5358 int argc,
const char *
const*argv,
5359 sqlite3_vtab **ppVTab,
char**);
5360 int (*xBestIndex)(sqlite3_vtab *pVTab, sqlite3_index_info*);
5361 int (*xDisconnect)(sqlite3_vtab *pVTab);
5362 int (*xDestroy)(sqlite3_vtab *pVTab);
5363 int (*xOpen)(sqlite3_vtab *pVTab, sqlite3_vtab_cursor **ppCursor);
5364 int (*xClose)(sqlite3_vtab_cursor*);
5365 int (*xFilter)(sqlite3_vtab_cursor*,
int idxNum,
const char *idxStr,
5366 int argc, sqlite3_value **argv);
5367 int (*xNext)(sqlite3_vtab_cursor*);
5368 int (*xEof)(sqlite3_vtab_cursor*);
5369 int (*xColumn)(sqlite3_vtab_cursor*, sqlite3_context*, int);
5370 int (*xRowid)(sqlite3_vtab_cursor*, sqlite3_int64 *pRowid);
5371 int (*xUpdate)(sqlite3_vtab *, int, sqlite3_value **, sqlite3_int64 *);
5372 int (*xBegin)(sqlite3_vtab *pVTab);
5373 int (*xSync)(sqlite3_vtab *pVTab);
5374 int (*xCommit)(sqlite3_vtab *pVTab);
5375 int (*xRollback)(sqlite3_vtab *pVTab);
5376 int (*xFindFunction)(sqlite3_vtab *pVtab,
int nArg,
const char *zName,
5377 void (**pxFunc)(sqlite3_context*,int,sqlite3_value**),
5379 int (*xRename)(sqlite3_vtab *pVtab,
const char *zNew);
5382 int (*xSavepoint)(sqlite3_vtab *pVTab, int);
5383 int (*xRelease)(sqlite3_vtab *pVTab, int);
5384 int (*xRollbackTo)(sqlite3_vtab *pVTab, int);
5452 struct sqlite3_index_info {
5455 struct sqlite3_index_constraint {
5458 unsigned char usable;
5462 struct sqlite3_index_orderby {
5467 struct sqlite3_index_constraint_usage {
5470 } *aConstraintUsage;
5473 int needToFreeIdxStr;
5474 int orderByConsumed;
5475 double estimatedCost;
5477 sqlite3_int64 estimatedRows;
5488 #define SQLITE_INDEX_CONSTRAINT_EQ 2
5489 #define SQLITE_INDEX_CONSTRAINT_GT 4
5490 #define SQLITE_INDEX_CONSTRAINT_LE 8
5491 #define SQLITE_INDEX_CONSTRAINT_LT 16
5492 #define SQLITE_INDEX_CONSTRAINT_GE 32
5493 #define SQLITE_INDEX_CONSTRAINT_MATCH 64
5520 SQLITE_API
int sqlite3_create_module(
5523 const sqlite3_module *p,
5526 SQLITE_API
int sqlite3_create_module_v2(
5529 const sqlite3_module *p,
5531 void(*xDestroy)(
void*)
5552 struct sqlite3_vtab {
5553 const sqlite3_module *pModule;
5576 struct sqlite3_vtab_cursor {
5577 sqlite3_vtab *pVtab;
5589 SQLITE_API
int sqlite3_declare_vtab(sqlite3*,
const char *zSQL);
5607 SQLITE_API
int sqlite3_overload_function(sqlite3*,
const char *zFuncName,
int nArg);
5631 typedef struct sqlite3_blob sqlite3_blob;
5692 SQLITE_API
int sqlite3_blob_open(
5696 const char *zColumn,
5699 sqlite3_blob **ppBlob
5724 SQLITE_API SQLITE_EXPERIMENTAL
int sqlite3_blob_reopen(sqlite3_blob *, sqlite3_int64);
5748 SQLITE_API
int sqlite3_blob_close(sqlite3_blob *);
5763 SQLITE_API
int sqlite3_blob_bytes(sqlite3_blob *);
5791 SQLITE_API
int sqlite3_blob_read(sqlite3_blob *,
void *Z,
int N,
int iOffset);
5829 SQLITE_API
int sqlite3_blob_write(sqlite3_blob *,
const void *z,
int n,
int iOffset);
5860 SQLITE_API sqlite3_vfs *sqlite3_vfs_find(
const char *zVfsName);
5861 SQLITE_API
int sqlite3_vfs_register(sqlite3_vfs*,
int makeDflt);
5862 SQLITE_API
int sqlite3_vfs_unregister(sqlite3_vfs*);
5979 SQLITE_API sqlite3_mutex *sqlite3_mutex_alloc(
int);
5980 SQLITE_API
void sqlite3_mutex_free(sqlite3_mutex*);
5981 SQLITE_API
void sqlite3_mutex_enter(sqlite3_mutex*);
5982 SQLITE_API
int sqlite3_mutex_try(sqlite3_mutex*);
5983 SQLITE_API
void sqlite3_mutex_leave(sqlite3_mutex*);
6050 typedef struct sqlite3_mutex_methods sqlite3_mutex_methods;
6051 struct sqlite3_mutex_methods {
6052 int (*xMutexInit)(void);
6053 int (*xMutexEnd)(void);
6054 sqlite3_mutex *(*xMutexAlloc)(int);
6055 void (*xMutexFree)(sqlite3_mutex *);
6056 void (*xMutexEnter)(sqlite3_mutex *);
6057 int (*xMutexTry)(sqlite3_mutex *);
6058 void (*xMutexLeave)(sqlite3_mutex *);
6059 int (*xMutexHeld)(sqlite3_mutex *);
6060 int (*xMutexNotheld)(sqlite3_mutex *);
6093 SQLITE_API
int sqlite3_mutex_held(sqlite3_mutex*);
6094 SQLITE_API
int sqlite3_mutex_notheld(sqlite3_mutex*);
6107 #define SQLITE_MUTEX_FAST 0
6108 #define SQLITE_MUTEX_RECURSIVE 1
6109 #define SQLITE_MUTEX_STATIC_MASTER 2
6110 #define SQLITE_MUTEX_STATIC_MEM 3
6111 #define SQLITE_MUTEX_STATIC_MEM2 4
6112 #define SQLITE_MUTEX_STATIC_OPEN 4
6113 #define SQLITE_MUTEX_STATIC_PRNG 5
6114 #define SQLITE_MUTEX_STATIC_LRU 6
6115 #define SQLITE_MUTEX_STATIC_LRU2 7
6116 #define SQLITE_MUTEX_STATIC_PMEM 7
6117 #define SQLITE_MUTEX_STATIC_APP1 8
6118 #define SQLITE_MUTEX_STATIC_APP2 9
6119 #define SQLITE_MUTEX_STATIC_APP3 10
6130 SQLITE_API sqlite3_mutex *sqlite3_db_mutex(sqlite3*);
6164 SQLITE_API
int sqlite3_file_control(sqlite3*,
const char *zDbName,
int op,
void*);
6183 SQLITE_API
int sqlite3_test_control(
int op, ...);
6196 #define SQLITE_TESTCTRL_FIRST 5
6197 #define SQLITE_TESTCTRL_PRNG_SAVE 5
6198 #define SQLITE_TESTCTRL_PRNG_RESTORE 6
6199 #define SQLITE_TESTCTRL_PRNG_RESET 7
6200 #define SQLITE_TESTCTRL_BITVEC_TEST 8
6201 #define SQLITE_TESTCTRL_FAULT_INSTALL 9
6202 #define SQLITE_TESTCTRL_BENIGN_MALLOC_HOOKS 10
6203 #define SQLITE_TESTCTRL_PENDING_BYTE 11
6204 #define SQLITE_TESTCTRL_ASSERT 12
6205 #define SQLITE_TESTCTRL_ALWAYS 13
6206 #define SQLITE_TESTCTRL_RESERVE 14
6207 #define SQLITE_TESTCTRL_OPTIMIZATIONS 15
6208 #define SQLITE_TESTCTRL_ISKEYWORD 16
6209 #define SQLITE_TESTCTRL_SCRATCHMALLOC 17
6210 #define SQLITE_TESTCTRL_LOCALTIME_FAULT 18
6211 #define SQLITE_TESTCTRL_EXPLAIN_STMT 19
6212 #define SQLITE_TESTCTRL_NEVER_CORRUPT 20
6213 #define SQLITE_TESTCTRL_VDBE_COVERAGE 21
6214 #define SQLITE_TESTCTRL_BYTEORDER 22
6215 #define SQLITE_TESTCTRL_ISINIT 23
6216 #define SQLITE_TESTCTRL_SORTER_MMAP 24
6217 #define SQLITE_TESTCTRL_LAST 24
6248 SQLITE_API
int sqlite3_status(
int op,
int *pCurrent,
int *pHighwater,
int resetFlag);
6333 #define SQLITE_STATUS_MEMORY_USED 0
6334 #define SQLITE_STATUS_PAGECACHE_USED 1
6335 #define SQLITE_STATUS_PAGECACHE_OVERFLOW 2
6336 #define SQLITE_STATUS_SCRATCH_USED 3
6337 #define SQLITE_STATUS_SCRATCH_OVERFLOW 4
6338 #define SQLITE_STATUS_MALLOC_SIZE 5
6339 #define SQLITE_STATUS_PARSER_STACK 6
6340 #define SQLITE_STATUS_PAGECACHE_SIZE 7
6341 #define SQLITE_STATUS_SCRATCH_SIZE 8
6342 #define SQLITE_STATUS_MALLOC_COUNT 9
6366 SQLITE_API
int sqlite3_db_status(sqlite3*,
int op,
int *pCur,
int *pHiwtr,
int resetFlg);
6458 #define SQLITE_DBSTATUS_LOOKASIDE_USED 0
6459 #define SQLITE_DBSTATUS_CACHE_USED 1
6460 #define SQLITE_DBSTATUS_SCHEMA_USED 2
6461 #define SQLITE_DBSTATUS_STMT_USED 3
6462 #define SQLITE_DBSTATUS_LOOKASIDE_HIT 4
6463 #define SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE 5
6464 #define SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL 6
6465 #define SQLITE_DBSTATUS_CACHE_HIT 7
6466 #define SQLITE_DBSTATUS_CACHE_MISS 8
6467 #define SQLITE_DBSTATUS_CACHE_WRITE 9
6468 #define SQLITE_DBSTATUS_DEFERRED_FKS 10
6469 #define SQLITE_DBSTATUS_MAX 10
6495 SQLITE_API
int sqlite3_stmt_status(sqlite3_stmt*,
int op,
int resetFlg);
6534 #define SQLITE_STMTSTATUS_FULLSCAN_STEP 1
6535 #define SQLITE_STMTSTATUS_SORT 2
6536 #define SQLITE_STMTSTATUS_AUTOINDEX 3
6537 #define SQLITE_STMTSTATUS_VM_STEP 4
6550 typedef struct sqlite3_pcache sqlite3_pcache;
6562 typedef struct sqlite3_pcache_page sqlite3_pcache_page;
6563 struct sqlite3_pcache_page {
6727 typedef struct sqlite3_pcache_methods2 sqlite3_pcache_methods2;
6728 struct sqlite3_pcache_methods2 {
6731 int (*xInit)(
void*);
6732 void (*xShutdown)(
void*);
6733 sqlite3_pcache *(*xCreate)(
int szPage,
int szExtra,
int bPurgeable);
6734 void (*xCachesize)(sqlite3_pcache*,
int nCachesize);
6735 int (*xPagecount)(sqlite3_pcache*);
6736 sqlite3_pcache_page *(*xFetch)(sqlite3_pcache*,
unsigned key,
int createFlag);
6737 void (*xUnpin)(sqlite3_pcache*, sqlite3_pcache_page*,
int discard);
6738 void (*xRekey)(sqlite3_pcache*, sqlite3_pcache_page*,
6739 unsigned oldKey,
unsigned newKey);
6740 void (*xTruncate)(sqlite3_pcache*,
unsigned iLimit);
6741 void (*xDestroy)(sqlite3_pcache*);
6742 void (*xShrink)(sqlite3_pcache*);
6750 typedef struct sqlite3_pcache_methods sqlite3_pcache_methods;
6751 struct sqlite3_pcache_methods {
6753 int (*xInit)(
void*);
6754 void (*xShutdown)(
void*);
6755 sqlite3_pcache *(*xCreate)(
int szPage,
int bPurgeable);
6756 void (*xCachesize)(sqlite3_pcache*,
int nCachesize);
6757 int (*xPagecount)(sqlite3_pcache*);
6758 void *(*xFetch)(sqlite3_pcache*,
unsigned key,
int createFlag);
6759 void (*xUnpin)(sqlite3_pcache*,
void*,
int discard);
6760 void (*xRekey)(sqlite3_pcache*,
void*,
unsigned oldKey,
unsigned newKey);
6761 void (*xTruncate)(sqlite3_pcache*,
unsigned iLimit);
6762 void (*xDestroy)(sqlite3_pcache*);
6776 typedef struct sqlite3_backup sqlite3_backup;
6960 SQLITE_API sqlite3_backup *sqlite3_backup_init(
6962 const char *zDestName,
6964 const char *zSourceName
6966 SQLITE_API
int sqlite3_backup_step(sqlite3_backup *p,
int nPage);
6967 SQLITE_API
int sqlite3_backup_finish(sqlite3_backup *p);
6968 SQLITE_API
int sqlite3_backup_remaining(sqlite3_backup *p);
6969 SQLITE_API
int sqlite3_backup_pagecount(sqlite3_backup *p);
7085 SQLITE_API
int sqlite3_unlock_notify(
7087 void (*xNotify)(
void **apArg,
int nArg),
7100 SQLITE_API
int sqlite3_stricmp(
const char *,
const char *);
7101 SQLITE_API
int sqlite3_strnicmp(
const char *,
const char *,
int);
7116 SQLITE_API
int sqlite3_strglob(
const char *zGlob,
const char *zStr);
7139 SQLITE_API
void sqlite3_log(
int iErrCode,
const char *zFormat, ...);
7176 SQLITE_API
void *sqlite3_wal_hook(
7178 int(*)(
void *,sqlite3*,
const char*,
int),
7210 SQLITE_API
int sqlite3_wal_autocheckpoint(sqlite3 *db,
int N);
7232 SQLITE_API
int sqlite3_wal_checkpoint(sqlite3 *db,
const char *zDb);
7307 SQLITE_API
int sqlite3_wal_checkpoint_v2(
7323 #define SQLITE_CHECKPOINT_PASSIVE 0
7324 #define SQLITE_CHECKPOINT_FULL 1
7325 #define SQLITE_CHECKPOINT_RESTART 2
7341 SQLITE_API
int sqlite3_vtab_config(sqlite3*,
int op, ...);
7382 #define SQLITE_VTAB_CONSTRAINT_SUPPORT 1
7394 SQLITE_API
int sqlite3_vtab_on_conflict(sqlite3 *);
7408 #define SQLITE_ROLLBACK 1
7410 #define SQLITE_FAIL 3
7412 #define SQLITE_REPLACE 5
7420 #ifdef SQLITE_OMIT_FLOATING_POINT
7442 #ifndef _SQLITE3RTREE_H_
7443 #define _SQLITE3RTREE_H_
7450 typedef struct sqlite3_rtree_geometry sqlite3_rtree_geometry;
7451 typedef struct sqlite3_rtree_query_info sqlite3_rtree_query_info;
7456 #ifdef SQLITE_RTREE_INT_ONLY
7457 typedef sqlite3_int64 sqlite3_rtree_dbl;
7459 typedef double sqlite3_rtree_dbl;
7468 SQLITE_API
int sqlite3_rtree_geometry_callback(
7471 int (*xGeom)(sqlite3_rtree_geometry*,
int, sqlite3_rtree_dbl*,
int*),
7480 struct sqlite3_rtree_geometry {
7483 sqlite3_rtree_dbl *aParam;
7485 void (*xDelUser)(
void *);
7494 SQLITE_API
int sqlite3_rtree_query_callback(
7496 const char *zQueryFunc,
7497 int (*xQueryFunc)(sqlite3_rtree_query_info*),
7499 void (*xDestructor)(
void*)
7512 struct sqlite3_rtree_query_info {
7515 sqlite3_rtree_dbl *aParam;
7517 void (*xDelUser)(
void*);
7518 sqlite3_rtree_dbl *aCoord;
7519 unsigned int *anQueue;
7523 sqlite3_int64 iRowid;
7524 sqlite3_rtree_dbl rParentScore;
7527 sqlite3_rtree_dbl rScore;
7533 #define NOT_WITHIN 0
7534 #define PARTLY_WITHIN 1
7535 #define FULLY_WITHIN 2