Fossil SCM
Update the built-in SQLite to the second 3.14 beta.
Commit
aa63cd405b1bb2d58dd5605007f6ff2fb5d0b4c7
Parent
94381d32ce3c9e7…
2 files changed
+812
-777
+458
-457
+812
-777
| --- src/sqlite3.c | ||
| +++ src/sqlite3.c | ||
| @@ -380,11 +380,11 @@ | ||
| 380 | 380 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 381 | 381 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 382 | 382 | */ |
| 383 | 383 | #define SQLITE_VERSION "3.14.0" |
| 384 | 384 | #define SQLITE_VERSION_NUMBER 3014000 |
| 385 | -#define SQLITE_SOURCE_ID "2016-08-02 08:45:26 7c38a79cdd42aaa45715aea330d10ca859098837" | |
| 385 | +#define SQLITE_SOURCE_ID "2016-08-04 13:23:28 9adda385267d1a0ecff259b42a284913668441a2" | |
| 386 | 386 | |
| 387 | 387 | /* |
| 388 | 388 | ** CAPI3REF: Run-Time Library Version Numbers |
| 389 | 389 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 390 | 390 | ** |
| @@ -413,13 +413,13 @@ | ||
| 413 | 413 | ** [SQLITE_SOURCE_ID] C preprocessor macro. |
| 414 | 414 | ** |
| 415 | 415 | ** See also: [sqlite_version()] and [sqlite_source_id()]. |
| 416 | 416 | */ |
| 417 | 417 | SQLITE_API const char sqlite3_version[] = SQLITE_VERSION; |
| 418 | -SQLITE_API const char *SQLITE_APICALL sqlite3_libversion(void); | |
| 419 | -SQLITE_API const char *SQLITE_APICALL sqlite3_sourceid(void); | |
| 420 | -SQLITE_API int SQLITE_APICALL sqlite3_libversion_number(void); | |
| 418 | +SQLITE_API const char *SQLITE_STDCALL sqlite3_libversion(void); | |
| 419 | +SQLITE_API const char *SQLITE_STDCALL sqlite3_sourceid(void); | |
| 420 | +SQLITE_API int SQLITE_STDCALL sqlite3_libversion_number(void); | |
| 421 | 421 | |
| 422 | 422 | /* |
| 423 | 423 | ** CAPI3REF: Run-Time Library Compilation Options Diagnostics |
| 424 | 424 | ** |
| 425 | 425 | ** ^The sqlite3_compileoption_used() function returns 0 or 1 |
| @@ -440,12 +440,12 @@ | ||
| 440 | 440 | ** |
| 441 | 441 | ** See also: SQL functions [sqlite_compileoption_used()] and |
| 442 | 442 | ** [sqlite_compileoption_get()] and the [compile_options pragma]. |
| 443 | 443 | */ |
| 444 | 444 | #ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS |
| 445 | -SQLITE_API int SQLITE_APICALL sqlite3_compileoption_used(const char *zOptName); | |
| 446 | -SQLITE_API const char *SQLITE_APICALL sqlite3_compileoption_get(int N); | |
| 445 | +SQLITE_API int SQLITE_STDCALL sqlite3_compileoption_used(const char *zOptName); | |
| 446 | +SQLITE_API const char *SQLITE_STDCALL sqlite3_compileoption_get(int N); | |
| 447 | 447 | #endif |
| 448 | 448 | |
| 449 | 449 | /* |
| 450 | 450 | ** CAPI3REF: Test To See If The Library Is Threadsafe |
| 451 | 451 | ** |
| @@ -480,11 +480,11 @@ | ||
| 480 | 480 | ** sqlite3_config(). In other words, the return value from sqlite3_threadsafe() |
| 481 | 481 | ** is unchanged by calls to sqlite3_config().)^ |
| 482 | 482 | ** |
| 483 | 483 | ** See the [threading mode] documentation for additional information. |
| 484 | 484 | */ |
| 485 | -SQLITE_API int SQLITE_APICALL sqlite3_threadsafe(void); | |
| 485 | +SQLITE_API int SQLITE_STDCALL sqlite3_threadsafe(void); | |
| 486 | 486 | |
| 487 | 487 | /* |
| 488 | 488 | ** CAPI3REF: Database Connection Handle |
| 489 | 489 | ** KEYWORDS: {database connection} {database connections} |
| 490 | 490 | ** |
| @@ -577,19 +577,19 @@ | ||
| 577 | 577 | ** from [sqlite3_open()], [sqlite3_open16()], or |
| 578 | 578 | ** [sqlite3_open_v2()], and not previously closed. |
| 579 | 579 | ** ^Calling sqlite3_close() or sqlite3_close_v2() with a NULL pointer |
| 580 | 580 | ** argument is a harmless no-op. |
| 581 | 581 | */ |
| 582 | -SQLITE_API int SQLITE_APICALL sqlite3_close(sqlite3*); | |
| 583 | -SQLITE_API int SQLITE_APICALL sqlite3_close_v2(sqlite3*); | |
| 582 | +SQLITE_API int SQLITE_STDCALL sqlite3_close(sqlite3*); | |
| 583 | +SQLITE_API int SQLITE_STDCALL sqlite3_close_v2(sqlite3*); | |
| 584 | 584 | |
| 585 | 585 | /* |
| 586 | 586 | ** The type for a callback function. |
| 587 | 587 | ** This is legacy and deprecated. It is included for historical |
| 588 | 588 | ** compatibility and is not documented. |
| 589 | 589 | */ |
| 590 | -typedef int (SQLITE_CALLBACK *sqlite3_callback)(void*,int,char**, char**); | |
| 590 | +typedef int (*sqlite3_callback)(void*,int,char**, char**); | |
| 591 | 591 | |
| 592 | 592 | /* |
| 593 | 593 | ** CAPI3REF: One-Step Query Execution Interface |
| 594 | 594 | ** METHOD: sqlite3 |
| 595 | 595 | ** |
| @@ -649,14 +649,14 @@ | ||
| 649 | 649 | ** the 1st parameter to sqlite3_exec() while sqlite3_exec() is running. |
| 650 | 650 | ** <li> The application must not modify the SQL statement text passed into |
| 651 | 651 | ** the 2nd parameter of sqlite3_exec() while sqlite3_exec() is running. |
| 652 | 652 | ** </ul> |
| 653 | 653 | */ |
| 654 | -SQLITE_API int SQLITE_APICALL sqlite3_exec( | |
| 654 | +SQLITE_API int SQLITE_STDCALL sqlite3_exec( | |
| 655 | 655 | sqlite3*, /* An open database */ |
| 656 | 656 | const char *sql, /* SQL to be evaluated */ |
| 657 | - int (SQLITE_CALLBACK *callback)(void*,int,char**,char**), /* Callback function */ | |
| 657 | + int (*callback)(void*,int,char**,char**), /* Callback function */ | |
| 658 | 658 | void *, /* 1st argument to callback */ |
| 659 | 659 | char **errmsg /* Error msg written here */ |
| 660 | 660 | ); |
| 661 | 661 | |
| 662 | 662 | /* |
| @@ -1000,30 +1000,30 @@ | ||
| 1000 | 1000 | ** database corruption. |
| 1001 | 1001 | */ |
| 1002 | 1002 | typedef struct sqlite3_io_methods sqlite3_io_methods; |
| 1003 | 1003 | struct sqlite3_io_methods { |
| 1004 | 1004 | int iVersion; |
| 1005 | - int (SQLITE_CALLBACK *xClose)(sqlite3_file*); | |
| 1006 | - int (SQLITE_CALLBACK *xRead)(sqlite3_file*, void*, int iAmt, sqlite3_int64 iOfst); | |
| 1007 | - int (SQLITE_CALLBACK *xWrite)(sqlite3_file*, const void*, int iAmt, sqlite3_int64 iOfst); | |
| 1008 | - int (SQLITE_CALLBACK *xTruncate)(sqlite3_file*, sqlite3_int64 size); | |
| 1009 | - int (SQLITE_CALLBACK *xSync)(sqlite3_file*, int flags); | |
| 1010 | - int (SQLITE_CALLBACK *xFileSize)(sqlite3_file*, sqlite3_int64 *pSize); | |
| 1011 | - int (SQLITE_CALLBACK *xLock)(sqlite3_file*, int); | |
| 1012 | - int (SQLITE_CALLBACK *xUnlock)(sqlite3_file*, int); | |
| 1013 | - int (SQLITE_CALLBACK *xCheckReservedLock)(sqlite3_file*, int *pResOut); | |
| 1014 | - int (SQLITE_CALLBACK *xFileControl)(sqlite3_file*, int op, void *pArg); | |
| 1015 | - int (SQLITE_CALLBACK *xSectorSize)(sqlite3_file*); | |
| 1016 | - int (SQLITE_CALLBACK *xDeviceCharacteristics)(sqlite3_file*); | |
| 1005 | + int (*xClose)(sqlite3_file*); | |
| 1006 | + int (*xRead)(sqlite3_file*, void*, int iAmt, sqlite3_int64 iOfst); | |
| 1007 | + int (*xWrite)(sqlite3_file*, const void*, int iAmt, sqlite3_int64 iOfst); | |
| 1008 | + int (*xTruncate)(sqlite3_file*, sqlite3_int64 size); | |
| 1009 | + int (*xSync)(sqlite3_file*, int flags); | |
| 1010 | + int (*xFileSize)(sqlite3_file*, sqlite3_int64 *pSize); | |
| 1011 | + int (*xLock)(sqlite3_file*, int); | |
| 1012 | + int (*xUnlock)(sqlite3_file*, int); | |
| 1013 | + int (*xCheckReservedLock)(sqlite3_file*, int *pResOut); | |
| 1014 | + int (*xFileControl)(sqlite3_file*, int op, void *pArg); | |
| 1015 | + int (*xSectorSize)(sqlite3_file*); | |
| 1016 | + int (*xDeviceCharacteristics)(sqlite3_file*); | |
| 1017 | 1017 | /* Methods above are valid for version 1 */ |
| 1018 | - int (SQLITE_CALLBACK *xShmMap)(sqlite3_file*, int iPg, int pgsz, int, void volatile**); | |
| 1019 | - int (SQLITE_CALLBACK *xShmLock)(sqlite3_file*, int offset, int n, int flags); | |
| 1020 | - void (SQLITE_CALLBACK *xShmBarrier)(sqlite3_file*); | |
| 1021 | - int (SQLITE_CALLBACK *xShmUnmap)(sqlite3_file*, int deleteFlag); | |
| 1018 | + int (*xShmMap)(sqlite3_file*, int iPg, int pgsz, int, void volatile**); | |
| 1019 | + int (*xShmLock)(sqlite3_file*, int offset, int n, int flags); | |
| 1020 | + void (*xShmBarrier)(sqlite3_file*); | |
| 1021 | + int (*xShmUnmap)(sqlite3_file*, int deleteFlag); | |
| 1022 | 1022 | /* Methods above are valid for version 2 */ |
| 1023 | - int (SQLITE_CALLBACK *xFetch)(sqlite3_file*, sqlite3_int64 iOfst, int iAmt, void **pp); | |
| 1024 | - int (SQLITE_CALLBACK *xUnfetch)(sqlite3_file*, sqlite3_int64 iOfst, void *p); | |
| 1023 | + int (*xFetch)(sqlite3_file*, sqlite3_int64 iOfst, int iAmt, void **pp); | |
| 1024 | + int (*xUnfetch)(sqlite3_file*, sqlite3_int64 iOfst, void *p); | |
| 1025 | 1025 | /* Methods above are valid for version 3 */ |
| 1026 | 1026 | /* Additional methods may be added in future releases */ |
| 1027 | 1027 | }; |
| 1028 | 1028 | |
| 1029 | 1029 | /* |
| @@ -1195,11 +1195,11 @@ | ||
| 1195 | 1195 | ** ^The [SQLITE_FCNTL_BUSYHANDLER] |
| 1196 | 1196 | ** file-control may be invoked by SQLite on the database file handle |
| 1197 | 1197 | ** shortly after it is opened in order to provide a custom VFS with access |
| 1198 | 1198 | ** to the connections busy-handler callback. The argument is of type (void **) |
| 1199 | 1199 | ** - an array of two (void *) values. The first (void *) actually points |
| 1200 | -** to a function of type (int (SQLITE_CALLBACK *)(void *)). In order to invoke the connections | |
| 1200 | +** to a function of type (int (*)(void *)). In order to invoke the connections | |
| 1201 | 1201 | ** busy-handler, this function should be invoked with the second (void *) in |
| 1202 | 1202 | ** the array as the only argument. If it returns non-zero, then the operation |
| 1203 | 1203 | ** should be retried. If it returns zero, the custom VFS should abandon the |
| 1204 | 1204 | ** current operation. |
| 1205 | 1205 | ** |
| @@ -1471,43 +1471,43 @@ | ||
| 1471 | 1471 | ** or all of these interfaces to be NULL or for their behavior to change |
| 1472 | 1472 | ** from one release to the next. Applications must not attempt to access |
| 1473 | 1473 | ** any of these methods if the iVersion of the VFS is less than 3. |
| 1474 | 1474 | */ |
| 1475 | 1475 | typedef struct sqlite3_vfs sqlite3_vfs; |
| 1476 | -typedef void (SQLITE_SYSAPI *sqlite3_syscall_ptr)(void); | |
| 1476 | +typedef void (*sqlite3_syscall_ptr)(void); | |
| 1477 | 1477 | struct sqlite3_vfs { |
| 1478 | 1478 | int iVersion; /* Structure version number (currently 3) */ |
| 1479 | 1479 | int szOsFile; /* Size of subclassed sqlite3_file */ |
| 1480 | 1480 | int mxPathname; /* Maximum file pathname length */ |
| 1481 | 1481 | sqlite3_vfs *pNext; /* Next registered VFS */ |
| 1482 | 1482 | const char *zName; /* Name of this virtual file system */ |
| 1483 | 1483 | void *pAppData; /* Pointer to application-specific data */ |
| 1484 | - int (SQLITE_CALLBACK *xOpen)(sqlite3_vfs*, const char *zName, sqlite3_file*, | |
| 1484 | + int (*xOpen)(sqlite3_vfs*, const char *zName, sqlite3_file*, | |
| 1485 | 1485 | int flags, int *pOutFlags); |
| 1486 | - int (SQLITE_CALLBACK *xDelete)(sqlite3_vfs*, const char *zName, int syncDir); | |
| 1487 | - int (SQLITE_CALLBACK *xAccess)(sqlite3_vfs*, const char *zName, int flags, int *pResOut); | |
| 1488 | - int (SQLITE_CALLBACK *xFullPathname)(sqlite3_vfs*, const char *zName, int nOut, char *zOut); | |
| 1489 | - void *(SQLITE_CALLBACK *xDlOpen)(sqlite3_vfs*, const char *zFilename); | |
| 1490 | - void (SQLITE_CALLBACK *xDlError)(sqlite3_vfs*, int nByte, char *zErrMsg); | |
| 1491 | - void (SQLITE_CALLBACK *(*xDlSym)(sqlite3_vfs*,void*, const char *zSymbol))(void); | |
| 1492 | - void (SQLITE_CALLBACK *xDlClose)(sqlite3_vfs*, void*); | |
| 1493 | - int (SQLITE_CALLBACK *xRandomness)(sqlite3_vfs*, int nByte, char *zOut); | |
| 1494 | - int (SQLITE_CALLBACK *xSleep)(sqlite3_vfs*, int microseconds); | |
| 1495 | - int (SQLITE_CALLBACK *xCurrentTime)(sqlite3_vfs*, double*); | |
| 1496 | - int (SQLITE_CALLBACK *xGetLastError)(sqlite3_vfs*, int, char *); | |
| 1486 | + int (*xDelete)(sqlite3_vfs*, const char *zName, int syncDir); | |
| 1487 | + int (*xAccess)(sqlite3_vfs*, const char *zName, int flags, int *pResOut); | |
| 1488 | + int (*xFullPathname)(sqlite3_vfs*, const char *zName, int nOut, char *zOut); | |
| 1489 | + void *(*xDlOpen)(sqlite3_vfs*, const char *zFilename); | |
| 1490 | + void (*xDlError)(sqlite3_vfs*, int nByte, char *zErrMsg); | |
| 1491 | + void (*(*xDlSym)(sqlite3_vfs*,void*, const char *zSymbol))(void); | |
| 1492 | + void (*xDlClose)(sqlite3_vfs*, void*); | |
| 1493 | + int (*xRandomness)(sqlite3_vfs*, int nByte, char *zOut); | |
| 1494 | + int (*xSleep)(sqlite3_vfs*, int microseconds); | |
| 1495 | + int (*xCurrentTime)(sqlite3_vfs*, double*); | |
| 1496 | + int (*xGetLastError)(sqlite3_vfs*, int, char *); | |
| 1497 | 1497 | /* |
| 1498 | 1498 | ** The methods above are in version 1 of the sqlite_vfs object |
| 1499 | 1499 | ** definition. Those that follow are added in version 2 or later |
| 1500 | 1500 | */ |
| 1501 | - int (SQLITE_CALLBACK *xCurrentTimeInt64)(sqlite3_vfs*, sqlite3_int64*); | |
| 1501 | + int (*xCurrentTimeInt64)(sqlite3_vfs*, sqlite3_int64*); | |
| 1502 | 1502 | /* |
| 1503 | 1503 | ** The methods above are in versions 1 and 2 of the sqlite_vfs object. |
| 1504 | 1504 | ** Those below are for version 3 and greater. |
| 1505 | 1505 | */ |
| 1506 | - int (SQLITE_CALLBACK *xSetSystemCall)(sqlite3_vfs*, const char *zName, sqlite3_syscall_ptr); | |
| 1507 | - sqlite3_syscall_ptr (SQLITE_CALLBACK *xGetSystemCall)(sqlite3_vfs*, const char *zName); | |
| 1508 | - const char *(SQLITE_CALLBACK *xNextSystemCall)(sqlite3_vfs*, const char *zName); | |
| 1506 | + int (*xSetSystemCall)(sqlite3_vfs*, const char *zName, sqlite3_syscall_ptr); | |
| 1507 | + sqlite3_syscall_ptr (*xGetSystemCall)(sqlite3_vfs*, const char *zName); | |
| 1508 | + const char *(*xNextSystemCall)(sqlite3_vfs*, const char *zName); | |
| 1509 | 1509 | /* |
| 1510 | 1510 | ** The methods above are in versions 1 through 3 of the sqlite_vfs object. |
| 1511 | 1511 | ** New fields may be appended in future versions. The iVersion |
| 1512 | 1512 | ** value will increment whenever this happens. |
| 1513 | 1513 | */ |
| @@ -1648,14 +1648,14 @@ | ||
| 1648 | 1648 | ** sqlite3_os_init() and sqlite3_os_end(). An application-supplied |
| 1649 | 1649 | ** implementation of sqlite3_os_init() or sqlite3_os_end() |
| 1650 | 1650 | ** must return [SQLITE_OK] on success and some other [error code] upon |
| 1651 | 1651 | ** failure. |
| 1652 | 1652 | */ |
| 1653 | -SQLITE_API int SQLITE_APICALL sqlite3_initialize(void); | |
| 1654 | -SQLITE_API int SQLITE_APICALL sqlite3_shutdown(void); | |
| 1655 | -SQLITE_API int SQLITE_APICALL sqlite3_os_init(void); | |
| 1656 | -SQLITE_API int SQLITE_APICALL sqlite3_os_end(void); | |
| 1653 | +SQLITE_API int SQLITE_STDCALL sqlite3_initialize(void); | |
| 1654 | +SQLITE_API int SQLITE_STDCALL sqlite3_shutdown(void); | |
| 1655 | +SQLITE_API int SQLITE_STDCALL sqlite3_os_init(void); | |
| 1656 | +SQLITE_API int SQLITE_STDCALL sqlite3_os_end(void); | |
| 1657 | 1657 | |
| 1658 | 1658 | /* |
| 1659 | 1659 | ** CAPI3REF: Configuring The SQLite Library |
| 1660 | 1660 | ** |
| 1661 | 1661 | ** The sqlite3_config() interface is used to make global configuration |
| @@ -1770,17 +1770,17 @@ | ||
| 1770 | 1770 | ** SQLite will never invoke xInit() more than once without an intervening |
| 1771 | 1771 | ** call to xShutdown(). |
| 1772 | 1772 | */ |
| 1773 | 1773 | typedef struct sqlite3_mem_methods sqlite3_mem_methods; |
| 1774 | 1774 | struct sqlite3_mem_methods { |
| 1775 | - void *(SQLITE_CALLBACK *xMalloc)(int); /* Memory allocation function */ | |
| 1776 | - void (SQLITE_CALLBACK *xFree)(void*); /* Free a prior allocation */ | |
| 1777 | - void *(SQLITE_CALLBACK *xRealloc)(void*,int); /* Resize an allocation */ | |
| 1778 | - int (SQLITE_CALLBACK *xSize)(void*); /* Return the size of an allocation */ | |
| 1779 | - int (SQLITE_CALLBACK *xRoundup)(int); /* Round up request size to allocation size */ | |
| 1780 | - int (SQLITE_CALLBACK *xInit)(void*); /* Initialize the memory allocator */ | |
| 1781 | - void (SQLITE_CALLBACK *xShutdown)(void*); /* Deinitialize the memory allocator */ | |
| 1775 | + void *(*xMalloc)(int); /* Memory allocation function */ | |
| 1776 | + void (*xFree)(void*); /* Free a prior allocation */ | |
| 1777 | + void *(*xRealloc)(void*,int); /* Resize an allocation */ | |
| 1778 | + int (*xSize)(void*); /* Return the size of an allocation */ | |
| 1779 | + int (*xRoundup)(int); /* Round up request size to allocation size */ | |
| 1780 | + int (*xInit)(void*); /* Initialize the memory allocator */ | |
| 1781 | + void (*xShutdown)(void*); /* Deinitialize the memory allocator */ | |
| 1782 | 1782 | void *pAppData; /* Argument to xInit() and xShutdown() */ |
| 1783 | 1783 | }; |
| 1784 | 1784 | |
| 1785 | 1785 | /* |
| 1786 | 1786 | ** CAPI3REF: Configuration Options |
| @@ -1993,11 +1993,11 @@ | ||
| 1993 | 1993 | ** |
| 1994 | 1994 | ** [[SQLITE_CONFIG_LOG]] <dt>SQLITE_CONFIG_LOG</dt> |
| 1995 | 1995 | ** <dd> The SQLITE_CONFIG_LOG option is used to configure the SQLite |
| 1996 | 1996 | ** global [error log]. |
| 1997 | 1997 | ** (^The SQLITE_CONFIG_LOG option takes two arguments: a pointer to a |
| 1998 | -** function with a call signature of void(SQLITE_CALLBACK *)(void*,int,const char*), | |
| 1998 | +** function with a call signature of void(*)(void*,int,const char*), | |
| 1999 | 1999 | ** and a pointer to void. ^If the function pointer is not NULL, it is |
| 2000 | 2000 | ** invoked by [sqlite3_log()] to process each logging event. ^If the |
| 2001 | 2001 | ** function pointer is NULL, the [sqlite3_log()] interface becomes a no-op. |
| 2002 | 2002 | ** ^The void pointer that is the second argument to SQLITE_CONFIG_LOG is |
| 2003 | 2003 | ** passed through as the first parameter to the application-defined logger |
| @@ -2046,11 +2046,11 @@ | ||
| 2046 | 2046 | ** |
| 2047 | 2047 | ** [[SQLITE_CONFIG_SQLLOG]] |
| 2048 | 2048 | ** <dt>SQLITE_CONFIG_SQLLOG |
| 2049 | 2049 | ** <dd>This option is only available if sqlite is compiled with the |
| 2050 | 2050 | ** [SQLITE_ENABLE_SQLLOG] pre-processor macro defined. The first argument should |
| 2051 | -** be a pointer to a function of type void(SQLITE_CALLBACK *)(void*,sqlite3*,const char*, int). | |
| 2051 | +** be a pointer to a function of type void(*)(void*,sqlite3*,const char*, int). | |
| 2052 | 2052 | ** The second should be of type (void*). The callback is invoked by the library |
| 2053 | 2053 | ** in three separate circumstances, identified by the value passed as the |
| 2054 | 2054 | ** fourth parameter. If the fourth parameter is 0, then the database connection |
| 2055 | 2055 | ** passed as the second argument has just been opened. The third argument |
| 2056 | 2056 | ** points to a buffer containing the name of the main database file. If the |
| @@ -2244,11 +2244,11 @@ | ||
| 2244 | 2244 | ** |
| 2245 | 2245 | ** ^The sqlite3_extended_result_codes() routine enables or disables the |
| 2246 | 2246 | ** [extended result codes] feature of SQLite. ^The extended result |
| 2247 | 2247 | ** codes are disabled by default for historical compatibility. |
| 2248 | 2248 | */ |
| 2249 | -SQLITE_API int SQLITE_APICALL sqlite3_extended_result_codes(sqlite3*, int onoff); | |
| 2249 | +SQLITE_API int SQLITE_STDCALL sqlite3_extended_result_codes(sqlite3*, int onoff); | |
| 2250 | 2250 | |
| 2251 | 2251 | /* |
| 2252 | 2252 | ** CAPI3REF: Last Insert Rowid |
| 2253 | 2253 | ** METHOD: sqlite3 |
| 2254 | 2254 | ** |
| @@ -2296,11 +2296,11 @@ | ||
| 2296 | 2296 | ** function is running and thus changes the last insert [rowid], |
| 2297 | 2297 | ** then the value returned by [sqlite3_last_insert_rowid()] is |
| 2298 | 2298 | ** unpredictable and might not equal either the old or the new |
| 2299 | 2299 | ** last insert [rowid]. |
| 2300 | 2300 | */ |
| 2301 | -SQLITE_API sqlite3_int64 SQLITE_APICALL sqlite3_last_insert_rowid(sqlite3*); | |
| 2301 | +SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_last_insert_rowid(sqlite3*); | |
| 2302 | 2302 | |
| 2303 | 2303 | /* |
| 2304 | 2304 | ** CAPI3REF: Count The Number Of Rows Modified |
| 2305 | 2305 | ** METHOD: sqlite3 |
| 2306 | 2306 | ** |
| @@ -2349,11 +2349,11 @@ | ||
| 2349 | 2349 | ** |
| 2350 | 2350 | ** If a separate thread makes changes on the same database connection |
| 2351 | 2351 | ** while [sqlite3_changes()] is running then the value returned |
| 2352 | 2352 | ** is unpredictable and not meaningful. |
| 2353 | 2353 | */ |
| 2354 | -SQLITE_API int SQLITE_APICALL sqlite3_changes(sqlite3*); | |
| 2354 | +SQLITE_API int SQLITE_STDCALL sqlite3_changes(sqlite3*); | |
| 2355 | 2355 | |
| 2356 | 2356 | /* |
| 2357 | 2357 | ** CAPI3REF: Total Number Of Rows Modified |
| 2358 | 2358 | ** METHOD: sqlite3 |
| 2359 | 2359 | ** |
| @@ -2373,11 +2373,11 @@ | ||
| 2373 | 2373 | ** |
| 2374 | 2374 | ** If a separate thread makes changes on the same database connection |
| 2375 | 2375 | ** while [sqlite3_total_changes()] is running then the value |
| 2376 | 2376 | ** returned is unpredictable and not meaningful. |
| 2377 | 2377 | */ |
| 2378 | -SQLITE_API int SQLITE_APICALL sqlite3_total_changes(sqlite3*); | |
| 2378 | +SQLITE_API int SQLITE_STDCALL sqlite3_total_changes(sqlite3*); | |
| 2379 | 2379 | |
| 2380 | 2380 | /* |
| 2381 | 2381 | ** CAPI3REF: Interrupt A Long-Running Query |
| 2382 | 2382 | ** METHOD: sqlite3 |
| 2383 | 2383 | ** |
| @@ -2413,11 +2413,11 @@ | ||
| 2413 | 2413 | ** that are started after the sqlite3_interrupt() call returns. |
| 2414 | 2414 | ** |
| 2415 | 2415 | ** If the database connection closes while [sqlite3_interrupt()] |
| 2416 | 2416 | ** is running then bad things will likely happen. |
| 2417 | 2417 | */ |
| 2418 | -SQLITE_API void SQLITE_APICALL sqlite3_interrupt(sqlite3*); | |
| 2418 | +SQLITE_API void SQLITE_STDCALL sqlite3_interrupt(sqlite3*); | |
| 2419 | 2419 | |
| 2420 | 2420 | /* |
| 2421 | 2421 | ** CAPI3REF: Determine If An SQL Statement Is Complete |
| 2422 | 2422 | ** |
| 2423 | 2423 | ** These routines are useful during command-line input to determine if the |
| @@ -2448,12 +2448,12 @@ | ||
| 2448 | 2448 | ** UTF-8 string. |
| 2449 | 2449 | ** |
| 2450 | 2450 | ** The input to [sqlite3_complete16()] must be a zero-terminated |
| 2451 | 2451 | ** UTF-16 string in native byte order. |
| 2452 | 2452 | */ |
| 2453 | -SQLITE_API int SQLITE_APICALL sqlite3_complete(const char *sql); | |
| 2454 | -SQLITE_API int SQLITE_APICALL sqlite3_complete16(const void *sql); | |
| 2453 | +SQLITE_API int SQLITE_STDCALL sqlite3_complete(const char *sql); | |
| 2454 | +SQLITE_API int SQLITE_STDCALL sqlite3_complete16(const void *sql); | |
| 2455 | 2455 | |
| 2456 | 2456 | /* |
| 2457 | 2457 | ** CAPI3REF: Register A Callback To Handle SQLITE_BUSY Errors |
| 2458 | 2458 | ** KEYWORDS: {busy-handler callback} {busy handler} |
| 2459 | 2459 | ** METHOD: sqlite3 |
| @@ -2510,11 +2510,11 @@ | ||
| 2510 | 2510 | ** result in undefined behavior. |
| 2511 | 2511 | ** |
| 2512 | 2512 | ** A busy handler must not close the database connection |
| 2513 | 2513 | ** or [prepared statement] that invoked the busy handler. |
| 2514 | 2514 | */ |
| 2515 | -SQLITE_API int SQLITE_APICALL sqlite3_busy_handler(sqlite3*,int(SQLITE_CALLBACK *)(void*,int),void*); | |
| 2515 | +SQLITE_API int SQLITE_STDCALL sqlite3_busy_handler(sqlite3*,int(*)(void*,int),void*); | |
| 2516 | 2516 | |
| 2517 | 2517 | /* |
| 2518 | 2518 | ** CAPI3REF: Set A Busy Timeout |
| 2519 | 2519 | ** METHOD: sqlite3 |
| 2520 | 2520 | ** |
| @@ -2533,11 +2533,11 @@ | ||
| 2533 | 2533 | ** was defined (using [sqlite3_busy_handler()]) prior to calling |
| 2534 | 2534 | ** this routine, that other busy handler is cleared.)^ |
| 2535 | 2535 | ** |
| 2536 | 2536 | ** See also: [PRAGMA busy_timeout] |
| 2537 | 2537 | */ |
| 2538 | -SQLITE_API int SQLITE_APICALL sqlite3_busy_timeout(sqlite3*, int ms); | |
| 2538 | +SQLITE_API int SQLITE_STDCALL sqlite3_busy_timeout(sqlite3*, int ms); | |
| 2539 | 2539 | |
| 2540 | 2540 | /* |
| 2541 | 2541 | ** CAPI3REF: Convenience Routines For Running Queries |
| 2542 | 2542 | ** METHOD: sqlite3 |
| 2543 | 2543 | ** |
| @@ -2608,19 +2608,19 @@ | ||
| 2608 | 2608 | ** interface defined here. As a consequence, errors that occur in the |
| 2609 | 2609 | ** wrapper layer outside of the internal [sqlite3_exec()] call are not |
| 2610 | 2610 | ** reflected in subsequent calls to [sqlite3_errcode()] or |
| 2611 | 2611 | ** [sqlite3_errmsg()]. |
| 2612 | 2612 | */ |
| 2613 | -SQLITE_API int SQLITE_APICALL sqlite3_get_table( | |
| 2613 | +SQLITE_API int SQLITE_STDCALL sqlite3_get_table( | |
| 2614 | 2614 | sqlite3 *db, /* An open database */ |
| 2615 | 2615 | const char *zSql, /* SQL to be evaluated */ |
| 2616 | 2616 | char ***pazResult, /* Results of the query */ |
| 2617 | 2617 | int *pnRow, /* Number of result rows written here */ |
| 2618 | 2618 | int *pnColumn, /* Number of result columns written here */ |
| 2619 | 2619 | char **pzErrmsg /* Error msg written here */ |
| 2620 | 2620 | ); |
| 2621 | -SQLITE_API void SQLITE_APICALL sqlite3_free_table(char **result); | |
| 2621 | +SQLITE_API void SQLITE_STDCALL sqlite3_free_table(char **result); | |
| 2622 | 2622 | |
| 2623 | 2623 | /* |
| 2624 | 2624 | ** CAPI3REF: Formatted String Printing Functions |
| 2625 | 2625 | ** |
| 2626 | 2626 | ** These routines are work-alikes of the "printf()" family of functions |
| @@ -2723,13 +2723,13 @@ | ||
| 2723 | 2723 | ** ^(The "%z" formatting option works like "%s" but with the |
| 2724 | 2724 | ** addition that after the string has been read and copied into |
| 2725 | 2725 | ** the result, [sqlite3_free()] is called on the input string.)^ |
| 2726 | 2726 | */ |
| 2727 | 2727 | SQLITE_API char *SQLITE_CDECL sqlite3_mprintf(const char*,...); |
| 2728 | -SQLITE_API char *SQLITE_APICALL sqlite3_vmprintf(const char*, va_list); | |
| 2728 | +SQLITE_API char *SQLITE_STDCALL sqlite3_vmprintf(const char*, va_list); | |
| 2729 | 2729 | SQLITE_API char *SQLITE_CDECL sqlite3_snprintf(int,char*,const char*, ...); |
| 2730 | -SQLITE_API char *SQLITE_APICALL sqlite3_vsnprintf(int,char*,const char*, va_list); | |
| 2730 | +SQLITE_API char *SQLITE_STDCALL sqlite3_vsnprintf(int,char*,const char*, va_list); | |
| 2731 | 2731 | |
| 2732 | 2732 | /* |
| 2733 | 2733 | ** CAPI3REF: Memory Allocation Subsystem |
| 2734 | 2734 | ** |
| 2735 | 2735 | ** The SQLite core uses these three routines for all of its own |
| @@ -2815,16 +2815,16 @@ | ||
| 2815 | 2815 | ** |
| 2816 | 2816 | ** The application must not read or write any part of |
| 2817 | 2817 | ** a block of memory after it has been released using |
| 2818 | 2818 | ** [sqlite3_free()] or [sqlite3_realloc()]. |
| 2819 | 2819 | */ |
| 2820 | -SQLITE_API void *SQLITE_APICALL sqlite3_malloc(int); | |
| 2821 | -SQLITE_API void *SQLITE_APICALL sqlite3_malloc64(sqlite3_uint64); | |
| 2822 | -SQLITE_API void *SQLITE_APICALL sqlite3_realloc(void*, int); | |
| 2823 | -SQLITE_API void *SQLITE_APICALL sqlite3_realloc64(void*, sqlite3_uint64); | |
| 2824 | -SQLITE_API void SQLITE_APICALL sqlite3_free(void*); | |
| 2825 | -SQLITE_API sqlite3_uint64 SQLITE_APICALL sqlite3_msize(void*); | |
| 2820 | +SQLITE_API void *SQLITE_STDCALL sqlite3_malloc(int); | |
| 2821 | +SQLITE_API void *SQLITE_STDCALL sqlite3_malloc64(sqlite3_uint64); | |
| 2822 | +SQLITE_API void *SQLITE_STDCALL sqlite3_realloc(void*, int); | |
| 2823 | +SQLITE_API void *SQLITE_STDCALL sqlite3_realloc64(void*, sqlite3_uint64); | |
| 2824 | +SQLITE_API void SQLITE_STDCALL sqlite3_free(void*); | |
| 2825 | +SQLITE_API sqlite3_uint64 SQLITE_STDCALL sqlite3_msize(void*); | |
| 2826 | 2826 | |
| 2827 | 2827 | /* |
| 2828 | 2828 | ** CAPI3REF: Memory Allocator Statistics |
| 2829 | 2829 | ** |
| 2830 | 2830 | ** SQLite provides these two interfaces for reporting on the status |
| @@ -2845,12 +2845,12 @@ | ||
| 2845 | 2845 | ** [sqlite3_memory_used()] if and only if the parameter to |
| 2846 | 2846 | ** [sqlite3_memory_highwater()] is true. ^The value returned |
| 2847 | 2847 | ** by [sqlite3_memory_highwater(1)] is the high-water mark |
| 2848 | 2848 | ** prior to the reset. |
| 2849 | 2849 | */ |
| 2850 | -SQLITE_API sqlite3_int64 SQLITE_APICALL sqlite3_memory_used(void); | |
| 2851 | -SQLITE_API sqlite3_int64 SQLITE_APICALL sqlite3_memory_highwater(int resetFlag); | |
| 2850 | +SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_memory_used(void); | |
| 2851 | +SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_memory_highwater(int resetFlag); | |
| 2852 | 2852 | |
| 2853 | 2853 | /* |
| 2854 | 2854 | ** CAPI3REF: Pseudo-Random Number Generator |
| 2855 | 2855 | ** |
| 2856 | 2856 | ** SQLite contains a high-quality pseudo-random number generator (PRNG) used to |
| @@ -2869,11 +2869,11 @@ | ||
| 2869 | 2869 | ** ^If the previous call to this routine had an N of 1 or more and a |
| 2870 | 2870 | ** non-NULL P then the pseudo-randomness is generated |
| 2871 | 2871 | ** internally and without recourse to the [sqlite3_vfs] xRandomness |
| 2872 | 2872 | ** method. |
| 2873 | 2873 | */ |
| 2874 | -SQLITE_API void SQLITE_APICALL sqlite3_randomness(int N, void *P); | |
| 2874 | +SQLITE_API void SQLITE_STDCALL sqlite3_randomness(int N, void *P); | |
| 2875 | 2875 | |
| 2876 | 2876 | /* |
| 2877 | 2877 | ** CAPI3REF: Compile-Time Authorization Callbacks |
| 2878 | 2878 | ** METHOD: sqlite3 |
| 2879 | 2879 | ** |
| @@ -2952,13 +2952,13 @@ | ||
| 2952 | 2952 | ** [sqlite3_prepare()] or its variants. Authorization is not |
| 2953 | 2953 | ** performed during statement evaluation in [sqlite3_step()], unless |
| 2954 | 2954 | ** as stated in the previous paragraph, sqlite3_step() invokes |
| 2955 | 2955 | ** sqlite3_prepare_v2() to reprepare a statement after a schema change. |
| 2956 | 2956 | */ |
| 2957 | -SQLITE_API int SQLITE_APICALL sqlite3_set_authorizer( | |
| 2957 | +SQLITE_API int SQLITE_STDCALL sqlite3_set_authorizer( | |
| 2958 | 2958 | sqlite3*, |
| 2959 | - int (SQLITE_CALLBACK *xAuth)(void*,int,const char*,const char*,const char*,const char*), | |
| 2959 | + int (*xAuth)(void*,int,const char*,const char*,const char*,const char*), | |
| 2960 | 2960 | void *pUserData |
| 2961 | 2961 | ); |
| 2962 | 2962 | |
| 2963 | 2963 | /* |
| 2964 | 2964 | ** CAPI3REF: Authorizer Return Codes |
| @@ -3060,14 +3060,14 @@ | ||
| 3060 | 3060 | ** digits in the time are meaningless. Future versions of SQLite |
| 3061 | 3061 | ** might provide greater resolution on the profiler callback. The |
| 3062 | 3062 | ** sqlite3_profile() function is considered experimental and is |
| 3063 | 3063 | ** subject to change in future versions of SQLite. |
| 3064 | 3064 | */ |
| 3065 | -SQLITE_API SQLITE_DEPRECATED void *SQLITE_APICALL sqlite3_trace(sqlite3*, | |
| 3066 | - void(SQLITE_CALLBACK *xTrace)(void*,const char*), void*); | |
| 3067 | -SQLITE_API SQLITE_DEPRECATED void *SQLITE_APICALL sqlite3_profile(sqlite3*, | |
| 3068 | - void(SQLITE_CALLBACK *xProfile)(void*,const char*,sqlite3_uint64), void*); | |
| 3065 | +SQLITE_API SQLITE_DEPRECATED void *SQLITE_STDCALL sqlite3_trace(sqlite3*, | |
| 3066 | + void(*xTrace)(void*,const char*), void*); | |
| 3067 | +SQLITE_API SQLITE_DEPRECATED void *SQLITE_STDCALL sqlite3_profile(sqlite3*, | |
| 3068 | + void(*xProfile)(void*,const char*,sqlite3_uint64), void*); | |
| 3069 | 3069 | |
| 3070 | 3070 | /* |
| 3071 | 3071 | ** CAPI3REF: SQL Trace Event Codes |
| 3072 | 3072 | ** KEYWORDS: SQLITE_TRACE |
| 3073 | 3073 | ** |
| @@ -3151,14 +3151,14 @@ | ||
| 3151 | 3151 | ** |
| 3152 | 3152 | ** The sqlite3_trace_v2() interface is intended to replace the legacy |
| 3153 | 3153 | ** interfaces [sqlite3_trace()] and [sqlite3_profile()], both of which |
| 3154 | 3154 | ** are deprecated. |
| 3155 | 3155 | */ |
| 3156 | -SQLITE_API int SQLITE_APICALL sqlite3_trace_v2( | |
| 3156 | +SQLITE_API int SQLITE_STDCALL sqlite3_trace_v2( | |
| 3157 | 3157 | sqlite3*, |
| 3158 | 3158 | unsigned uMask, |
| 3159 | - int(SQLITE_CALLBACK *xCallback)(unsigned,void*,void*,void*), | |
| 3159 | + int(*xCallback)(unsigned,void*,void*,void*), | |
| 3160 | 3160 | void *pCtx |
| 3161 | 3161 | ); |
| 3162 | 3162 | |
| 3163 | 3163 | /* |
| 3164 | 3164 | ** CAPI3REF: Query Progress Callbacks |
| @@ -3190,11 +3190,11 @@ | ||
| 3190 | 3190 | ** the database connection that invoked the progress handler. |
| 3191 | 3191 | ** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their |
| 3192 | 3192 | ** database connections for the meaning of "modify" in this paragraph. |
| 3193 | 3193 | ** |
| 3194 | 3194 | */ |
| 3195 | -SQLITE_API void SQLITE_APICALL sqlite3_progress_handler(sqlite3*, int, int(SQLITE_CALLBACK *)(void*), void*); | |
| 3195 | +SQLITE_API void SQLITE_STDCALL sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*); | |
| 3196 | 3196 | |
| 3197 | 3197 | /* |
| 3198 | 3198 | ** CAPI3REF: Opening A New Database Connection |
| 3199 | 3199 | ** CONSTRUCTOR: sqlite3 |
| 3200 | 3200 | ** |
| @@ -3419,19 +3419,19 @@ | ||
| 3419 | 3419 | ** prior to calling sqlite3_open() or sqlite3_open_v2(). Otherwise, various |
| 3420 | 3420 | ** features that require the use of temporary files may fail. |
| 3421 | 3421 | ** |
| 3422 | 3422 | ** See also: [sqlite3_temp_directory] |
| 3423 | 3423 | */ |
| 3424 | -SQLITE_API int SQLITE_APICALL sqlite3_open( | |
| 3424 | +SQLITE_API int SQLITE_STDCALL sqlite3_open( | |
| 3425 | 3425 | const char *filename, /* Database filename (UTF-8) */ |
| 3426 | 3426 | sqlite3 **ppDb /* OUT: SQLite db handle */ |
| 3427 | 3427 | ); |
| 3428 | -SQLITE_API int SQLITE_APICALL sqlite3_open16( | |
| 3428 | +SQLITE_API int SQLITE_STDCALL sqlite3_open16( | |
| 3429 | 3429 | const void *filename, /* Database filename (UTF-16) */ |
| 3430 | 3430 | sqlite3 **ppDb /* OUT: SQLite db handle */ |
| 3431 | 3431 | ); |
| 3432 | -SQLITE_API int SQLITE_APICALL sqlite3_open_v2( | |
| 3432 | +SQLITE_API int SQLITE_STDCALL sqlite3_open_v2( | |
| 3433 | 3433 | const char *filename, /* Database filename (UTF-8) */ |
| 3434 | 3434 | sqlite3 **ppDb, /* OUT: SQLite db handle */ |
| 3435 | 3435 | int flags, /* Flags */ |
| 3436 | 3436 | const char *zVfs /* Name of VFS module to use */ |
| 3437 | 3437 | ); |
| @@ -3473,13 +3473,13 @@ | ||
| 3473 | 3473 | ** sqlite3_uri_boolean(F,P,B) returns B. If F is not a NULL pointer and |
| 3474 | 3474 | ** is not a database file pathname pointer that SQLite passed into the xOpen |
| 3475 | 3475 | ** VFS method, then the behavior of this routine is undefined and probably |
| 3476 | 3476 | ** undesirable. |
| 3477 | 3477 | */ |
| 3478 | -SQLITE_API const char *SQLITE_APICALL sqlite3_uri_parameter(const char *zFilename, const char *zParam); | |
| 3479 | -SQLITE_API int SQLITE_APICALL sqlite3_uri_boolean(const char *zFile, const char *zParam, int bDefault); | |
| 3480 | -SQLITE_API sqlite3_int64 SQLITE_APICALL sqlite3_uri_int64(const char*, const char*, sqlite3_int64); | |
| 3478 | +SQLITE_API const char *SQLITE_STDCALL sqlite3_uri_parameter(const char *zFilename, const char *zParam); | |
| 3479 | +SQLITE_API int SQLITE_STDCALL sqlite3_uri_boolean(const char *zFile, const char *zParam, int bDefault); | |
| 3480 | +SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_uri_int64(const char*, const char*, sqlite3_int64); | |
| 3481 | 3481 | |
| 3482 | 3482 | |
| 3483 | 3483 | /* |
| 3484 | 3484 | ** CAPI3REF: Error Codes And Messages |
| 3485 | 3485 | ** METHOD: sqlite3 |
| @@ -3519,15 +3519,15 @@ | ||
| 3519 | 3519 | ** |
| 3520 | 3520 | ** If an interface fails with SQLITE_MISUSE, that means the interface |
| 3521 | 3521 | ** was invoked incorrectly by the application. In that case, the |
| 3522 | 3522 | ** error code and message may or may not be set. |
| 3523 | 3523 | */ |
| 3524 | -SQLITE_API int SQLITE_APICALL sqlite3_errcode(sqlite3 *db); | |
| 3525 | -SQLITE_API int SQLITE_APICALL sqlite3_extended_errcode(sqlite3 *db); | |
| 3526 | -SQLITE_API const char *SQLITE_APICALL sqlite3_errmsg(sqlite3*); | |
| 3527 | -SQLITE_API const void *SQLITE_APICALL sqlite3_errmsg16(sqlite3*); | |
| 3528 | -SQLITE_API const char *SQLITE_APICALL sqlite3_errstr(int); | |
| 3524 | +SQLITE_API int SQLITE_STDCALL sqlite3_errcode(sqlite3 *db); | |
| 3525 | +SQLITE_API int SQLITE_STDCALL sqlite3_extended_errcode(sqlite3 *db); | |
| 3526 | +SQLITE_API const char *SQLITE_STDCALL sqlite3_errmsg(sqlite3*); | |
| 3527 | +SQLITE_API const void *SQLITE_STDCALL sqlite3_errmsg16(sqlite3*); | |
| 3528 | +SQLITE_API const char *SQLITE_STDCALL sqlite3_errstr(int); | |
| 3529 | 3529 | |
| 3530 | 3530 | /* |
| 3531 | 3531 | ** CAPI3REF: Prepared Statement Object |
| 3532 | 3532 | ** KEYWORDS: {prepared statement} {prepared statements} |
| 3533 | 3533 | ** |
| @@ -3591,11 +3591,11 @@ | ||
| 3591 | 3591 | ** created by an untrusted script can be contained using the |
| 3592 | 3592 | ** [max_page_count] [PRAGMA]. |
| 3593 | 3593 | ** |
| 3594 | 3594 | ** New run-time limit categories may be added in future releases. |
| 3595 | 3595 | */ |
| 3596 | -SQLITE_API int SQLITE_APICALL sqlite3_limit(sqlite3*, int id, int newVal); | |
| 3596 | +SQLITE_API int SQLITE_STDCALL sqlite3_limit(sqlite3*, int id, int newVal); | |
| 3597 | 3597 | |
| 3598 | 3598 | /* |
| 3599 | 3599 | ** CAPI3REF: Run-Time Limit Categories |
| 3600 | 3600 | ** KEYWORDS: {limit category} {*limit categories} |
| 3601 | 3601 | ** |
| @@ -3743,32 +3743,32 @@ | ||
| 3743 | 3743 | ** or [GLOB] operator or if the parameter is compared to an indexed column |
| 3744 | 3744 | ** and the [SQLITE_ENABLE_STAT3] compile-time option is enabled. |
| 3745 | 3745 | ** </li> |
| 3746 | 3746 | ** </ol> |
| 3747 | 3747 | */ |
| 3748 | -SQLITE_API int SQLITE_APICALL sqlite3_prepare( | |
| 3748 | +SQLITE_API int SQLITE_STDCALL sqlite3_prepare( | |
| 3749 | 3749 | sqlite3 *db, /* Database handle */ |
| 3750 | 3750 | const char *zSql, /* SQL statement, UTF-8 encoded */ |
| 3751 | 3751 | int nByte, /* Maximum length of zSql in bytes. */ |
| 3752 | 3752 | sqlite3_stmt **ppStmt, /* OUT: Statement handle */ |
| 3753 | 3753 | const char **pzTail /* OUT: Pointer to unused portion of zSql */ |
| 3754 | 3754 | ); |
| 3755 | -SQLITE_API int SQLITE_APICALL sqlite3_prepare_v2( | |
| 3755 | +SQLITE_API int SQLITE_STDCALL sqlite3_prepare_v2( | |
| 3756 | 3756 | sqlite3 *db, /* Database handle */ |
| 3757 | 3757 | const char *zSql, /* SQL statement, UTF-8 encoded */ |
| 3758 | 3758 | int nByte, /* Maximum length of zSql in bytes. */ |
| 3759 | 3759 | sqlite3_stmt **ppStmt, /* OUT: Statement handle */ |
| 3760 | 3760 | const char **pzTail /* OUT: Pointer to unused portion of zSql */ |
| 3761 | 3761 | ); |
| 3762 | -SQLITE_API int SQLITE_APICALL sqlite3_prepare16( | |
| 3762 | +SQLITE_API int SQLITE_STDCALL sqlite3_prepare16( | |
| 3763 | 3763 | sqlite3 *db, /* Database handle */ |
| 3764 | 3764 | const void *zSql, /* SQL statement, UTF-16 encoded */ |
| 3765 | 3765 | int nByte, /* Maximum length of zSql in bytes. */ |
| 3766 | 3766 | sqlite3_stmt **ppStmt, /* OUT: Statement handle */ |
| 3767 | 3767 | const void **pzTail /* OUT: Pointer to unused portion of zSql */ |
| 3768 | 3768 | ); |
| 3769 | -SQLITE_API int SQLITE_APICALL sqlite3_prepare16_v2( | |
| 3769 | +SQLITE_API int SQLITE_STDCALL sqlite3_prepare16_v2( | |
| 3770 | 3770 | sqlite3 *db, /* Database handle */ |
| 3771 | 3771 | const void *zSql, /* SQL statement, UTF-16 encoded */ |
| 3772 | 3772 | int nByte, /* Maximum length of zSql in bytes. */ |
| 3773 | 3773 | sqlite3_stmt **ppStmt, /* OUT: Statement handle */ |
| 3774 | 3774 | const void **pzTail /* OUT: Pointer to unused portion of zSql */ |
| @@ -3803,12 +3803,12 @@ | ||
| 3803 | 3803 | ** automatically freed when the prepared statement is finalized. |
| 3804 | 3804 | ** ^The string returned by sqlite3_expanded_sql(P), on the other hand, |
| 3805 | 3805 | ** is obtained from [sqlite3_malloc()] and must be free by the application |
| 3806 | 3806 | ** by passing it to [sqlite3_free()]. |
| 3807 | 3807 | */ |
| 3808 | -SQLITE_API const char *SQLITE_APICALL sqlite3_sql(sqlite3_stmt *pStmt); | |
| 3809 | -SQLITE_API char *SQLITE_APICALL sqlite3_expanded_sql(sqlite3_stmt *pStmt); | |
| 3808 | +SQLITE_API const char *SQLITE_STDCALL sqlite3_sql(sqlite3_stmt *pStmt); | |
| 3809 | +SQLITE_API char *SQLITE_STDCALL sqlite3_expanded_sql(sqlite3_stmt *pStmt); | |
| 3810 | 3810 | |
| 3811 | 3811 | /* |
| 3812 | 3812 | ** CAPI3REF: Determine If An SQL Statement Writes The Database |
| 3813 | 3813 | ** METHOD: sqlite3_stmt |
| 3814 | 3814 | ** |
| @@ -3836,11 +3836,11 @@ | ||
| 3836 | 3836 | ** database. ^The [ATTACH] and [DETACH] statements also cause |
| 3837 | 3837 | ** sqlite3_stmt_readonly() to return true since, while those statements |
| 3838 | 3838 | ** change the configuration of a database connection, they do not make |
| 3839 | 3839 | ** changes to the content of the database files on disk. |
| 3840 | 3840 | */ |
| 3841 | -SQLITE_API int SQLITE_APICALL sqlite3_stmt_readonly(sqlite3_stmt *pStmt); | |
| 3841 | +SQLITE_API int SQLITE_STDCALL sqlite3_stmt_readonly(sqlite3_stmt *pStmt); | |
| 3842 | 3842 | |
| 3843 | 3843 | /* |
| 3844 | 3844 | ** CAPI3REF: Determine If A Prepared Statement Has Been Reset |
| 3845 | 3845 | ** METHOD: sqlite3_stmt |
| 3846 | 3846 | ** |
| @@ -3857,11 +3857,11 @@ | ||
| 3857 | 3857 | ** to locate all prepared statements associated with a database |
| 3858 | 3858 | ** connection that are in need of being reset. This can be used, |
| 3859 | 3859 | ** for example, in diagnostic routines to search for prepared |
| 3860 | 3860 | ** statements that are holding a transaction open. |
| 3861 | 3861 | */ |
| 3862 | -SQLITE_API int SQLITE_APICALL sqlite3_stmt_busy(sqlite3_stmt*); | |
| 3862 | +SQLITE_API int SQLITE_STDCALL sqlite3_stmt_busy(sqlite3_stmt*); | |
| 3863 | 3863 | |
| 3864 | 3864 | /* |
| 3865 | 3865 | ** CAPI3REF: Dynamically Typed Value Object |
| 3866 | 3866 | ** KEYWORDS: {protected sqlite3_value} {unprotected sqlite3_value} |
| 3867 | 3867 | ** |
| @@ -4021,24 +4021,24 @@ | ||
| 4021 | 4021 | ** index is out of range. ^[SQLITE_NOMEM] is returned if malloc() fails. |
| 4022 | 4022 | ** |
| 4023 | 4023 | ** See also: [sqlite3_bind_parameter_count()], |
| 4024 | 4024 | ** [sqlite3_bind_parameter_name()], and [sqlite3_bind_parameter_index()]. |
| 4025 | 4025 | */ |
| 4026 | -SQLITE_API int SQLITE_APICALL sqlite3_bind_blob(sqlite3_stmt*, int, const void*, int n, void(SQLITE_CALLBACK *)(void*)); | |
| 4027 | -SQLITE_API int SQLITE_APICALL sqlite3_bind_blob64(sqlite3_stmt*, int, const void*, sqlite3_uint64, | |
| 4028 | - void(SQLITE_CALLBACK *)(void*)); | |
| 4029 | -SQLITE_API int SQLITE_APICALL sqlite3_bind_double(sqlite3_stmt*, int, double); | |
| 4030 | -SQLITE_API int SQLITE_APICALL sqlite3_bind_int(sqlite3_stmt*, int, int); | |
| 4031 | -SQLITE_API int SQLITE_APICALL sqlite3_bind_int64(sqlite3_stmt*, int, sqlite3_int64); | |
| 4032 | -SQLITE_API int SQLITE_APICALL sqlite3_bind_null(sqlite3_stmt*, int); | |
| 4033 | -SQLITE_API int SQLITE_APICALL sqlite3_bind_text(sqlite3_stmt*,int,const char*,int,void(SQLITE_CALLBACK *)(void*)); | |
| 4034 | -SQLITE_API int SQLITE_APICALL sqlite3_bind_text16(sqlite3_stmt*, int, const void*, int, void(SQLITE_CALLBACK *)(void*)); | |
| 4035 | -SQLITE_API int SQLITE_APICALL sqlite3_bind_text64(sqlite3_stmt*, int, const char*, sqlite3_uint64, | |
| 4036 | - void(SQLITE_CALLBACK *)(void*), unsigned char encoding); | |
| 4037 | -SQLITE_API int SQLITE_APICALL sqlite3_bind_value(sqlite3_stmt*, int, const sqlite3_value*); | |
| 4038 | -SQLITE_API int SQLITE_APICALL sqlite3_bind_zeroblob(sqlite3_stmt*, int, int n); | |
| 4039 | -SQLITE_API int SQLITE_APICALL sqlite3_bind_zeroblob64(sqlite3_stmt*, int, sqlite3_uint64); | |
| 4026 | +SQLITE_API int SQLITE_STDCALL sqlite3_bind_blob(sqlite3_stmt*, int, const void*, int n, void(*)(void*)); | |
| 4027 | +SQLITE_API int SQLITE_STDCALL sqlite3_bind_blob64(sqlite3_stmt*, int, const void*, sqlite3_uint64, | |
| 4028 | + void(*)(void*)); | |
| 4029 | +SQLITE_API int SQLITE_STDCALL sqlite3_bind_double(sqlite3_stmt*, int, double); | |
| 4030 | +SQLITE_API int SQLITE_STDCALL sqlite3_bind_int(sqlite3_stmt*, int, int); | |
| 4031 | +SQLITE_API int SQLITE_STDCALL sqlite3_bind_int64(sqlite3_stmt*, int, sqlite3_int64); | |
| 4032 | +SQLITE_API int SQLITE_STDCALL sqlite3_bind_null(sqlite3_stmt*, int); | |
| 4033 | +SQLITE_API int SQLITE_STDCALL sqlite3_bind_text(sqlite3_stmt*,int,const char*,int,void(*)(void*)); | |
| 4034 | +SQLITE_API int SQLITE_STDCALL sqlite3_bind_text16(sqlite3_stmt*, int, const void*, int, void(*)(void*)); | |
| 4035 | +SQLITE_API int SQLITE_STDCALL sqlite3_bind_text64(sqlite3_stmt*, int, const char*, sqlite3_uint64, | |
| 4036 | + void(*)(void*), unsigned char encoding); | |
| 4037 | +SQLITE_API int SQLITE_STDCALL sqlite3_bind_value(sqlite3_stmt*, int, const sqlite3_value*); | |
| 4038 | +SQLITE_API int SQLITE_STDCALL sqlite3_bind_zeroblob(sqlite3_stmt*, int, int n); | |
| 4039 | +SQLITE_API int SQLITE_STDCALL sqlite3_bind_zeroblob64(sqlite3_stmt*, int, sqlite3_uint64); | |
| 4040 | 4040 | |
| 4041 | 4041 | /* |
| 4042 | 4042 | ** CAPI3REF: Number Of SQL Parameters |
| 4043 | 4043 | ** METHOD: sqlite3_stmt |
| 4044 | 4044 | ** |
| @@ -4055,11 +4055,11 @@ | ||
| 4055 | 4055 | ** |
| 4056 | 4056 | ** See also: [sqlite3_bind_blob|sqlite3_bind()], |
| 4057 | 4057 | ** [sqlite3_bind_parameter_name()], and |
| 4058 | 4058 | ** [sqlite3_bind_parameter_index()]. |
| 4059 | 4059 | */ |
| 4060 | -SQLITE_API int SQLITE_APICALL sqlite3_bind_parameter_count(sqlite3_stmt*); | |
| 4060 | +SQLITE_API int SQLITE_STDCALL sqlite3_bind_parameter_count(sqlite3_stmt*); | |
| 4061 | 4061 | |
| 4062 | 4062 | /* |
| 4063 | 4063 | ** CAPI3REF: Name Of A Host Parameter |
| 4064 | 4064 | ** METHOD: sqlite3_stmt |
| 4065 | 4065 | ** |
| @@ -4083,11 +4083,11 @@ | ||
| 4083 | 4083 | ** |
| 4084 | 4084 | ** See also: [sqlite3_bind_blob|sqlite3_bind()], |
| 4085 | 4085 | ** [sqlite3_bind_parameter_count()], and |
| 4086 | 4086 | ** [sqlite3_bind_parameter_index()]. |
| 4087 | 4087 | */ |
| 4088 | -SQLITE_API const char *SQLITE_APICALL sqlite3_bind_parameter_name(sqlite3_stmt*, int); | |
| 4088 | +SQLITE_API const char *SQLITE_STDCALL sqlite3_bind_parameter_name(sqlite3_stmt*, int); | |
| 4089 | 4089 | |
| 4090 | 4090 | /* |
| 4091 | 4091 | ** CAPI3REF: Index Of A Parameter With A Given Name |
| 4092 | 4092 | ** METHOD: sqlite3_stmt |
| 4093 | 4093 | ** |
| @@ -4100,21 +4100,21 @@ | ||
| 4100 | 4100 | ** |
| 4101 | 4101 | ** See also: [sqlite3_bind_blob|sqlite3_bind()], |
| 4102 | 4102 | ** [sqlite3_bind_parameter_count()], and |
| 4103 | 4103 | ** [sqlite3_bind_parameter_name()]. |
| 4104 | 4104 | */ |
| 4105 | -SQLITE_API int SQLITE_APICALL sqlite3_bind_parameter_index(sqlite3_stmt*, const char *zName); | |
| 4105 | +SQLITE_API int SQLITE_STDCALL sqlite3_bind_parameter_index(sqlite3_stmt*, const char *zName); | |
| 4106 | 4106 | |
| 4107 | 4107 | /* |
| 4108 | 4108 | ** CAPI3REF: Reset All Bindings On A Prepared Statement |
| 4109 | 4109 | ** METHOD: sqlite3_stmt |
| 4110 | 4110 | ** |
| 4111 | 4111 | ** ^Contrary to the intuition of many, [sqlite3_reset()] does not reset |
| 4112 | 4112 | ** the [sqlite3_bind_blob | bindings] on a [prepared statement]. |
| 4113 | 4113 | ** ^Use this routine to reset all host parameters to NULL. |
| 4114 | 4114 | */ |
| 4115 | -SQLITE_API int SQLITE_APICALL sqlite3_clear_bindings(sqlite3_stmt*); | |
| 4115 | +SQLITE_API int SQLITE_STDCALL sqlite3_clear_bindings(sqlite3_stmt*); | |
| 4116 | 4116 | |
| 4117 | 4117 | /* |
| 4118 | 4118 | ** CAPI3REF: Number Of Columns In A Result Set |
| 4119 | 4119 | ** METHOD: sqlite3_stmt |
| 4120 | 4120 | ** |
| @@ -4122,11 +4122,11 @@ | ||
| 4122 | 4122 | ** [prepared statement]. ^This routine returns 0 if pStmt is an SQL |
| 4123 | 4123 | ** statement that does not return data (for example an [UPDATE]). |
| 4124 | 4124 | ** |
| 4125 | 4125 | ** See also: [sqlite3_data_count()] |
| 4126 | 4126 | */ |
| 4127 | -SQLITE_API int SQLITE_APICALL sqlite3_column_count(sqlite3_stmt *pStmt); | |
| 4127 | +SQLITE_API int SQLITE_STDCALL sqlite3_column_count(sqlite3_stmt *pStmt); | |
| 4128 | 4128 | |
| 4129 | 4129 | /* |
| 4130 | 4130 | ** CAPI3REF: Column Names In A Result Set |
| 4131 | 4131 | ** METHOD: sqlite3_stmt |
| 4132 | 4132 | ** |
| @@ -4151,12 +4151,12 @@ | ||
| 4151 | 4151 | ** ^The name of a result column is the value of the "AS" clause for |
| 4152 | 4152 | ** that column, if there is an AS clause. If there is no AS clause |
| 4153 | 4153 | ** then the name of the column is unspecified and may change from |
| 4154 | 4154 | ** one release of SQLite to the next. |
| 4155 | 4155 | */ |
| 4156 | -SQLITE_API const char *SQLITE_APICALL sqlite3_column_name(sqlite3_stmt*, int N); | |
| 4157 | -SQLITE_API const void *SQLITE_APICALL sqlite3_column_name16(sqlite3_stmt*, int N); | |
| 4156 | +SQLITE_API const char *SQLITE_STDCALL sqlite3_column_name(sqlite3_stmt*, int N); | |
| 4157 | +SQLITE_API const void *SQLITE_STDCALL sqlite3_column_name16(sqlite3_stmt*, int N); | |
| 4158 | 4158 | |
| 4159 | 4159 | /* |
| 4160 | 4160 | ** CAPI3REF: Source Of Data In A Query Result |
| 4161 | 4161 | ** METHOD: sqlite3_stmt |
| 4162 | 4162 | ** |
| @@ -4200,16 +4200,16 @@ | ||
| 4200 | 4200 | ** If two or more threads call one or more |
| 4201 | 4201 | ** [sqlite3_column_database_name | column metadata interfaces] |
| 4202 | 4202 | ** for the same [prepared statement] and result column |
| 4203 | 4203 | ** at the same time then the results are undefined. |
| 4204 | 4204 | */ |
| 4205 | -SQLITE_API const char *SQLITE_APICALL sqlite3_column_database_name(sqlite3_stmt*,int); | |
| 4206 | -SQLITE_API const void *SQLITE_APICALL sqlite3_column_database_name16(sqlite3_stmt*,int); | |
| 4207 | -SQLITE_API const char *SQLITE_APICALL sqlite3_column_table_name(sqlite3_stmt*,int); | |
| 4208 | -SQLITE_API const void *SQLITE_APICALL sqlite3_column_table_name16(sqlite3_stmt*,int); | |
| 4209 | -SQLITE_API const char *SQLITE_APICALL sqlite3_column_origin_name(sqlite3_stmt*,int); | |
| 4210 | -SQLITE_API const void *SQLITE_APICALL sqlite3_column_origin_name16(sqlite3_stmt*,int); | |
| 4205 | +SQLITE_API const char *SQLITE_STDCALL sqlite3_column_database_name(sqlite3_stmt*,int); | |
| 4206 | +SQLITE_API const void *SQLITE_STDCALL sqlite3_column_database_name16(sqlite3_stmt*,int); | |
| 4207 | +SQLITE_API const char *SQLITE_STDCALL sqlite3_column_table_name(sqlite3_stmt*,int); | |
| 4208 | +SQLITE_API const void *SQLITE_STDCALL sqlite3_column_table_name16(sqlite3_stmt*,int); | |
| 4209 | +SQLITE_API const char *SQLITE_STDCALL sqlite3_column_origin_name(sqlite3_stmt*,int); | |
| 4210 | +SQLITE_API const void *SQLITE_STDCALL sqlite3_column_origin_name16(sqlite3_stmt*,int); | |
| 4211 | 4211 | |
| 4212 | 4212 | /* |
| 4213 | 4213 | ** CAPI3REF: Declared Datatype Of A Query Result |
| 4214 | 4214 | ** METHOD: sqlite3_stmt |
| 4215 | 4215 | ** |
| @@ -4237,12 +4237,12 @@ | ||
| 4237 | 4237 | ** data stored in that column is of the declared type. SQLite is |
| 4238 | 4238 | ** strongly typed, but the typing is dynamic not static. ^Type |
| 4239 | 4239 | ** is associated with individual values, not with the containers |
| 4240 | 4240 | ** used to hold those values. |
| 4241 | 4241 | */ |
| 4242 | -SQLITE_API const char *SQLITE_APICALL sqlite3_column_decltype(sqlite3_stmt*,int); | |
| 4243 | -SQLITE_API const void *SQLITE_APICALL sqlite3_column_decltype16(sqlite3_stmt*,int); | |
| 4242 | +SQLITE_API const char *SQLITE_STDCALL sqlite3_column_decltype(sqlite3_stmt*,int); | |
| 4243 | +SQLITE_API const void *SQLITE_STDCALL sqlite3_column_decltype16(sqlite3_stmt*,int); | |
| 4244 | 4244 | |
| 4245 | 4245 | /* |
| 4246 | 4246 | ** CAPI3REF: Evaluate An SQL Statement |
| 4247 | 4247 | ** METHOD: sqlite3_stmt |
| 4248 | 4248 | ** |
| @@ -4318,11 +4318,11 @@ | ||
| 4318 | 4318 | ** using either [sqlite3_prepare_v2()] or [sqlite3_prepare16_v2()] instead |
| 4319 | 4319 | ** of the legacy [sqlite3_prepare()] and [sqlite3_prepare16()] interfaces, |
| 4320 | 4320 | ** then the more specific [error codes] are returned directly |
| 4321 | 4321 | ** by sqlite3_step(). The use of the "v2" interface is recommended. |
| 4322 | 4322 | */ |
| 4323 | -SQLITE_API int SQLITE_APICALL sqlite3_step(sqlite3_stmt*); | |
| 4323 | +SQLITE_API int SQLITE_STDCALL sqlite3_step(sqlite3_stmt*); | |
| 4324 | 4324 | |
| 4325 | 4325 | /* |
| 4326 | 4326 | ** CAPI3REF: Number of columns in a result set |
| 4327 | 4327 | ** METHOD: sqlite3_stmt |
| 4328 | 4328 | ** |
| @@ -4339,11 +4339,11 @@ | ||
| 4339 | 4339 | ** where it always returns zero since each step of that multi-step |
| 4340 | 4340 | ** pragma returns 0 columns of data. |
| 4341 | 4341 | ** |
| 4342 | 4342 | ** See also: [sqlite3_column_count()] |
| 4343 | 4343 | */ |
| 4344 | -SQLITE_API int SQLITE_APICALL sqlite3_data_count(sqlite3_stmt *pStmt); | |
| 4344 | +SQLITE_API int SQLITE_STDCALL sqlite3_data_count(sqlite3_stmt *pStmt); | |
| 4345 | 4345 | |
| 4346 | 4346 | /* |
| 4347 | 4347 | ** CAPI3REF: Fundamental Datatypes |
| 4348 | 4348 | ** KEYWORDS: SQLITE_TEXT |
| 4349 | 4349 | ** |
| @@ -4529,20 +4529,20 @@ | ||
| 4529 | 4529 | ** of these routines, a default value is returned. The default value |
| 4530 | 4530 | ** is either the integer 0, the floating point number 0.0, or a NULL |
| 4531 | 4531 | ** pointer. Subsequent calls to [sqlite3_errcode()] will return |
| 4532 | 4532 | ** [SQLITE_NOMEM].)^ |
| 4533 | 4533 | */ |
| 4534 | -SQLITE_API const void *SQLITE_APICALL sqlite3_column_blob(sqlite3_stmt*, int iCol); | |
| 4535 | -SQLITE_API int SQLITE_APICALL sqlite3_column_bytes(sqlite3_stmt*, int iCol); | |
| 4536 | -SQLITE_API int SQLITE_APICALL sqlite3_column_bytes16(sqlite3_stmt*, int iCol); | |
| 4537 | -SQLITE_API double SQLITE_APICALL sqlite3_column_double(sqlite3_stmt*, int iCol); | |
| 4538 | -SQLITE_API int SQLITE_APICALL sqlite3_column_int(sqlite3_stmt*, int iCol); | |
| 4539 | -SQLITE_API sqlite3_int64 SQLITE_APICALL sqlite3_column_int64(sqlite3_stmt*, int iCol); | |
| 4540 | -SQLITE_API const unsigned char *SQLITE_APICALL sqlite3_column_text(sqlite3_stmt*, int iCol); | |
| 4541 | -SQLITE_API const void *SQLITE_APICALL sqlite3_column_text16(sqlite3_stmt*, int iCol); | |
| 4542 | -SQLITE_API int SQLITE_APICALL sqlite3_column_type(sqlite3_stmt*, int iCol); | |
| 4543 | -SQLITE_API sqlite3_value *SQLITE_APICALL sqlite3_column_value(sqlite3_stmt*, int iCol); | |
| 4534 | +SQLITE_API const void *SQLITE_STDCALL sqlite3_column_blob(sqlite3_stmt*, int iCol); | |
| 4535 | +SQLITE_API int SQLITE_STDCALL sqlite3_column_bytes(sqlite3_stmt*, int iCol); | |
| 4536 | +SQLITE_API int SQLITE_STDCALL sqlite3_column_bytes16(sqlite3_stmt*, int iCol); | |
| 4537 | +SQLITE_API double SQLITE_STDCALL sqlite3_column_double(sqlite3_stmt*, int iCol); | |
| 4538 | +SQLITE_API int SQLITE_STDCALL sqlite3_column_int(sqlite3_stmt*, int iCol); | |
| 4539 | +SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_column_int64(sqlite3_stmt*, int iCol); | |
| 4540 | +SQLITE_API const unsigned char *SQLITE_STDCALL sqlite3_column_text(sqlite3_stmt*, int iCol); | |
| 4541 | +SQLITE_API const void *SQLITE_STDCALL sqlite3_column_text16(sqlite3_stmt*, int iCol); | |
| 4542 | +SQLITE_API int SQLITE_STDCALL sqlite3_column_type(sqlite3_stmt*, int iCol); | |
| 4543 | +SQLITE_API sqlite3_value *SQLITE_STDCALL sqlite3_column_value(sqlite3_stmt*, int iCol); | |
| 4544 | 4544 | |
| 4545 | 4545 | /* |
| 4546 | 4546 | ** CAPI3REF: Destroy A Prepared Statement Object |
| 4547 | 4547 | ** DESTRUCTOR: sqlite3_stmt |
| 4548 | 4548 | ** |
| @@ -4566,11 +4566,11 @@ | ||
| 4566 | 4566 | ** resource leaks. It is a grievous error for the application to try to use |
| 4567 | 4567 | ** a prepared statement after it has been finalized. Any use of a prepared |
| 4568 | 4568 | ** statement after it has been finalized can result in undefined and |
| 4569 | 4569 | ** undesirable behavior such as segfaults and heap corruption. |
| 4570 | 4570 | */ |
| 4571 | -SQLITE_API int SQLITE_APICALL sqlite3_finalize(sqlite3_stmt *pStmt); | |
| 4571 | +SQLITE_API int SQLITE_STDCALL sqlite3_finalize(sqlite3_stmt *pStmt); | |
| 4572 | 4572 | |
| 4573 | 4573 | /* |
| 4574 | 4574 | ** CAPI3REF: Reset A Prepared Statement Object |
| 4575 | 4575 | ** METHOD: sqlite3_stmt |
| 4576 | 4576 | ** |
| @@ -4593,11 +4593,11 @@ | ||
| 4593 | 4593 | ** [sqlite3_reset(S)] returns an appropriate [error code]. |
| 4594 | 4594 | ** |
| 4595 | 4595 | ** ^The [sqlite3_reset(S)] interface does not change the values |
| 4596 | 4596 | ** of any [sqlite3_bind_blob|bindings] on the [prepared statement] S. |
| 4597 | 4597 | */ |
| 4598 | -SQLITE_API int SQLITE_APICALL sqlite3_reset(sqlite3_stmt *pStmt); | |
| 4598 | +SQLITE_API int SQLITE_STDCALL sqlite3_reset(sqlite3_stmt *pStmt); | |
| 4599 | 4599 | |
| 4600 | 4600 | /* |
| 4601 | 4601 | ** CAPI3REF: Create Or Redefine SQL Functions |
| 4602 | 4602 | ** KEYWORDS: {function creation routines} |
| 4603 | 4603 | ** KEYWORDS: {application-defined SQL function} |
| @@ -4693,40 +4693,40 @@ | ||
| 4693 | 4693 | ** ^An application-defined function is permitted to call other |
| 4694 | 4694 | ** SQLite interfaces. However, such calls must not |
| 4695 | 4695 | ** close the database connection nor finalize or reset the prepared |
| 4696 | 4696 | ** statement in which the function is running. |
| 4697 | 4697 | */ |
| 4698 | -SQLITE_API int SQLITE_APICALL sqlite3_create_function( | |
| 4698 | +SQLITE_API int SQLITE_STDCALL sqlite3_create_function( | |
| 4699 | 4699 | sqlite3 *db, |
| 4700 | 4700 | const char *zFunctionName, |
| 4701 | 4701 | int nArg, |
| 4702 | 4702 | int eTextRep, |
| 4703 | 4703 | void *pApp, |
| 4704 | - void (SQLITE_CALLBACK *xFunc)(sqlite3_context*,int,sqlite3_value**), | |
| 4705 | - void (SQLITE_CALLBACK *xStep)(sqlite3_context*,int,sqlite3_value**), | |
| 4706 | - void (SQLITE_CALLBACK *xFinal)(sqlite3_context*) | |
| 4704 | + void (*xFunc)(sqlite3_context*,int,sqlite3_value**), | |
| 4705 | + void (*xStep)(sqlite3_context*,int,sqlite3_value**), | |
| 4706 | + void (*xFinal)(sqlite3_context*) | |
| 4707 | 4707 | ); |
| 4708 | -SQLITE_API int SQLITE_APICALL sqlite3_create_function16( | |
| 4708 | +SQLITE_API int SQLITE_STDCALL sqlite3_create_function16( | |
| 4709 | 4709 | sqlite3 *db, |
| 4710 | 4710 | const void *zFunctionName, |
| 4711 | 4711 | int nArg, |
| 4712 | 4712 | int eTextRep, |
| 4713 | 4713 | void *pApp, |
| 4714 | - void (SQLITE_CALLBACK *xFunc)(sqlite3_context*,int,sqlite3_value**), | |
| 4715 | - void (SQLITE_CALLBACK *xStep)(sqlite3_context*,int,sqlite3_value**), | |
| 4716 | - void (SQLITE_CALLBACK *xFinal)(sqlite3_context*) | |
| 4714 | + void (*xFunc)(sqlite3_context*,int,sqlite3_value**), | |
| 4715 | + void (*xStep)(sqlite3_context*,int,sqlite3_value**), | |
| 4716 | + void (*xFinal)(sqlite3_context*) | |
| 4717 | 4717 | ); |
| 4718 | -SQLITE_API int SQLITE_APICALL sqlite3_create_function_v2( | |
| 4718 | +SQLITE_API int SQLITE_STDCALL sqlite3_create_function_v2( | |
| 4719 | 4719 | sqlite3 *db, |
| 4720 | 4720 | const char *zFunctionName, |
| 4721 | 4721 | int nArg, |
| 4722 | 4722 | int eTextRep, |
| 4723 | 4723 | void *pApp, |
| 4724 | - void (SQLITE_CALLBACK *xFunc)(sqlite3_context*,int,sqlite3_value**), | |
| 4725 | - void (SQLITE_CALLBACK *xStep)(sqlite3_context*,int,sqlite3_value**), | |
| 4726 | - void (SQLITE_CALLBACK *xFinal)(sqlite3_context*), | |
| 4727 | - void(SQLITE_CALLBACK *xDestroy)(void*) | |
| 4724 | + void (*xFunc)(sqlite3_context*,int,sqlite3_value**), | |
| 4725 | + void (*xStep)(sqlite3_context*,int,sqlite3_value**), | |
| 4726 | + void (*xFinal)(sqlite3_context*), | |
| 4727 | + void(*xDestroy)(void*) | |
| 4728 | 4728 | ); |
| 4729 | 4729 | |
| 4730 | 4730 | /* |
| 4731 | 4731 | ** CAPI3REF: Text Encodings |
| 4732 | 4732 | ** |
| @@ -4759,16 +4759,16 @@ | ||
| 4759 | 4759 | ** to be supported. However, new applications should avoid |
| 4760 | 4760 | ** the use of these functions. To encourage programmers to avoid |
| 4761 | 4761 | ** these functions, we will not explain what they do. |
| 4762 | 4762 | */ |
| 4763 | 4763 | #ifndef SQLITE_OMIT_DEPRECATED |
| 4764 | -SQLITE_API SQLITE_DEPRECATED int SQLITE_APICALL sqlite3_aggregate_count(sqlite3_context*); | |
| 4765 | -SQLITE_API SQLITE_DEPRECATED int SQLITE_APICALL sqlite3_expired(sqlite3_stmt*); | |
| 4766 | -SQLITE_API SQLITE_DEPRECATED int SQLITE_APICALL sqlite3_transfer_bindings(sqlite3_stmt*, sqlite3_stmt*); | |
| 4767 | -SQLITE_API SQLITE_DEPRECATED int SQLITE_APICALL sqlite3_global_recover(void); | |
| 4768 | -SQLITE_API SQLITE_DEPRECATED void SQLITE_APICALL sqlite3_thread_cleanup(void); | |
| 4769 | -SQLITE_API SQLITE_DEPRECATED int SQLITE_APICALL sqlite3_memory_alarm(void(SQLITE_CALLBACK *)(void*,sqlite3_int64,int), | |
| 4764 | +SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_aggregate_count(sqlite3_context*); | |
| 4765 | +SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_expired(sqlite3_stmt*); | |
| 4766 | +SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_transfer_bindings(sqlite3_stmt*, sqlite3_stmt*); | |
| 4767 | +SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_global_recover(void); | |
| 4768 | +SQLITE_API SQLITE_DEPRECATED void SQLITE_STDCALL sqlite3_thread_cleanup(void); | |
| 4769 | +SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_memory_alarm(void(*)(void*,sqlite3_int64,int), | |
| 4770 | 4770 | void*,sqlite3_int64); |
| 4771 | 4771 | #endif |
| 4772 | 4772 | |
| 4773 | 4773 | /* |
| 4774 | 4774 | ** CAPI3REF: Obtaining SQL Values |
| @@ -4814,22 +4814,22 @@ | ||
| 4814 | 4814 | ** or [sqlite3_value_text16()]. |
| 4815 | 4815 | ** |
| 4816 | 4816 | ** These routines must be called from the same thread as |
| 4817 | 4817 | ** the SQL function that supplied the [sqlite3_value*] parameters. |
| 4818 | 4818 | */ |
| 4819 | -SQLITE_API const void *SQLITE_APICALL sqlite3_value_blob(sqlite3_value*); | |
| 4820 | -SQLITE_API int SQLITE_APICALL sqlite3_value_bytes(sqlite3_value*); | |
| 4821 | -SQLITE_API int SQLITE_APICALL sqlite3_value_bytes16(sqlite3_value*); | |
| 4822 | -SQLITE_API double SQLITE_APICALL sqlite3_value_double(sqlite3_value*); | |
| 4823 | -SQLITE_API int SQLITE_APICALL sqlite3_value_int(sqlite3_value*); | |
| 4824 | -SQLITE_API sqlite3_int64 SQLITE_APICALL sqlite3_value_int64(sqlite3_value*); | |
| 4825 | -SQLITE_API const unsigned char *SQLITE_APICALL sqlite3_value_text(sqlite3_value*); | |
| 4826 | -SQLITE_API const void *SQLITE_APICALL sqlite3_value_text16(sqlite3_value*); | |
| 4827 | -SQLITE_API const void *SQLITE_APICALL sqlite3_value_text16le(sqlite3_value*); | |
| 4828 | -SQLITE_API const void *SQLITE_APICALL sqlite3_value_text16be(sqlite3_value*); | |
| 4829 | -SQLITE_API int SQLITE_APICALL sqlite3_value_type(sqlite3_value*); | |
| 4830 | -SQLITE_API int SQLITE_APICALL sqlite3_value_numeric_type(sqlite3_value*); | |
| 4819 | +SQLITE_API const void *SQLITE_STDCALL sqlite3_value_blob(sqlite3_value*); | |
| 4820 | +SQLITE_API int SQLITE_STDCALL sqlite3_value_bytes(sqlite3_value*); | |
| 4821 | +SQLITE_API int SQLITE_STDCALL sqlite3_value_bytes16(sqlite3_value*); | |
| 4822 | +SQLITE_API double SQLITE_STDCALL sqlite3_value_double(sqlite3_value*); | |
| 4823 | +SQLITE_API int SQLITE_STDCALL sqlite3_value_int(sqlite3_value*); | |
| 4824 | +SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_value_int64(sqlite3_value*); | |
| 4825 | +SQLITE_API const unsigned char *SQLITE_STDCALL sqlite3_value_text(sqlite3_value*); | |
| 4826 | +SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16(sqlite3_value*); | |
| 4827 | +SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16le(sqlite3_value*); | |
| 4828 | +SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16be(sqlite3_value*); | |
| 4829 | +SQLITE_API int SQLITE_STDCALL sqlite3_value_type(sqlite3_value*); | |
| 4830 | +SQLITE_API int SQLITE_STDCALL sqlite3_value_numeric_type(sqlite3_value*); | |
| 4831 | 4831 | |
| 4832 | 4832 | /* |
| 4833 | 4833 | ** CAPI3REF: Finding The Subtype Of SQL Values |
| 4834 | 4834 | ** METHOD: sqlite3_value |
| 4835 | 4835 | ** |
| @@ -4841,11 +4841,11 @@ | ||
| 4841 | 4841 | ** |
| 4842 | 4842 | ** SQLite makes no use of subtype itself. It merely passes the subtype |
| 4843 | 4843 | ** from the result of one [application-defined SQL function] into the |
| 4844 | 4844 | ** input of another. |
| 4845 | 4845 | */ |
| 4846 | -SQLITE_API unsigned int SQLITE_APICALL sqlite3_value_subtype(sqlite3_value*); | |
| 4846 | +SQLITE_API unsigned int SQLITE_STDCALL sqlite3_value_subtype(sqlite3_value*); | |
| 4847 | 4847 | |
| 4848 | 4848 | /* |
| 4849 | 4849 | ** CAPI3REF: Copy And Free SQL Values |
| 4850 | 4850 | ** METHOD: sqlite3_value |
| 4851 | 4851 | ** |
| @@ -4857,12 +4857,12 @@ | ||
| 4857 | 4857 | ** |
| 4858 | 4858 | ** ^The sqlite3_value_free(V) interface frees an [sqlite3_value] object |
| 4859 | 4859 | ** previously obtained from [sqlite3_value_dup()]. ^If V is a NULL pointer |
| 4860 | 4860 | ** then sqlite3_value_free(V) is a harmless no-op. |
| 4861 | 4861 | */ |
| 4862 | -SQLITE_API sqlite3_value *SQLITE_APICALL sqlite3_value_dup(const sqlite3_value*); | |
| 4863 | -SQLITE_API void SQLITE_APICALL sqlite3_value_free(sqlite3_value*); | |
| 4862 | +SQLITE_API sqlite3_value *SQLITE_STDCALL sqlite3_value_dup(const sqlite3_value*); | |
| 4863 | +SQLITE_API void SQLITE_STDCALL sqlite3_value_free(sqlite3_value*); | |
| 4864 | 4864 | |
| 4865 | 4865 | /* |
| 4866 | 4866 | ** CAPI3REF: Obtain Aggregate Function Context |
| 4867 | 4867 | ** METHOD: sqlite3_context |
| 4868 | 4868 | ** |
| @@ -4903,11 +4903,11 @@ | ||
| 4903 | 4903 | ** function. |
| 4904 | 4904 | ** |
| 4905 | 4905 | ** This routine must be called from the same thread in which |
| 4906 | 4906 | ** the aggregate SQL function is running. |
| 4907 | 4907 | */ |
| 4908 | -SQLITE_API void *SQLITE_APICALL sqlite3_aggregate_context(sqlite3_context*, int nBytes); | |
| 4908 | +SQLITE_API void *SQLITE_STDCALL sqlite3_aggregate_context(sqlite3_context*, int nBytes); | |
| 4909 | 4909 | |
| 4910 | 4910 | /* |
| 4911 | 4911 | ** CAPI3REF: User Data For Functions |
| 4912 | 4912 | ** METHOD: sqlite3_context |
| 4913 | 4913 | ** |
| @@ -4918,11 +4918,11 @@ | ||
| 4918 | 4918 | ** registered the application defined function. |
| 4919 | 4919 | ** |
| 4920 | 4920 | ** This routine must be called from the same thread in which |
| 4921 | 4921 | ** the application-defined function is running. |
| 4922 | 4922 | */ |
| 4923 | -SQLITE_API void *SQLITE_APICALL sqlite3_user_data(sqlite3_context*); | |
| 4923 | +SQLITE_API void *SQLITE_STDCALL sqlite3_user_data(sqlite3_context*); | |
| 4924 | 4924 | |
| 4925 | 4925 | /* |
| 4926 | 4926 | ** CAPI3REF: Database Connection For Functions |
| 4927 | 4927 | ** METHOD: sqlite3_context |
| 4928 | 4928 | ** |
| @@ -4930,11 +4930,11 @@ | ||
| 4930 | 4930 | ** the pointer to the [database connection] (the 1st parameter) |
| 4931 | 4931 | ** of the [sqlite3_create_function()] |
| 4932 | 4932 | ** and [sqlite3_create_function16()] routines that originally |
| 4933 | 4933 | ** registered the application defined function. |
| 4934 | 4934 | */ |
| 4935 | -SQLITE_API sqlite3 *SQLITE_APICALL sqlite3_context_db_handle(sqlite3_context*); | |
| 4935 | +SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3_context_db_handle(sqlite3_context*); | |
| 4936 | 4936 | |
| 4937 | 4937 | /* |
| 4938 | 4938 | ** CAPI3REF: Function Auxiliary Data |
| 4939 | 4939 | ** METHOD: sqlite3_context |
| 4940 | 4940 | ** |
| @@ -4962,16 +4962,17 @@ | ||
| 4962 | 4962 | ** NULL if the metadata has been discarded. |
| 4963 | 4963 | ** ^After each call to sqlite3_set_auxdata(C,N,P,X) where X is not NULL, |
| 4964 | 4964 | ** SQLite will invoke the destructor function X with parameter P exactly |
| 4965 | 4965 | ** once, when the metadata is discarded. |
| 4966 | 4966 | ** SQLite is free to discard the metadata at any time, including: <ul> |
| 4967 | -** <li> when the corresponding function parameter changes, or | |
| 4968 | -** <li> when [sqlite3_reset()] or [sqlite3_finalize()] is called for the | |
| 4969 | -** SQL statement, or | |
| 4970 | -** <li> when sqlite3_set_auxdata() is invoked again on the same parameter, or | |
| 4971 | -** <li> during the original sqlite3_set_auxdata() call when a memory | |
| 4972 | -** allocation error occurs. </ul>)^ | |
| 4967 | +** <li> ^(when the corresponding function parameter changes)^, or | |
| 4968 | +** <li> ^(when [sqlite3_reset()] or [sqlite3_finalize()] is called for the | |
| 4969 | +** SQL statement)^, or | |
| 4970 | +** <li> ^(when sqlite3_set_auxdata() is invoked again on the same | |
| 4971 | +** parameter)^, or | |
| 4972 | +** <li> ^(during the original sqlite3_set_auxdata() call when a memory | |
| 4973 | +** allocation error occurs.)^ </ul> | |
| 4973 | 4974 | ** |
| 4974 | 4975 | ** Note the last bullet in particular. The destructor X in |
| 4975 | 4976 | ** sqlite3_set_auxdata(C,N,P,X) might be called immediately, before the |
| 4976 | 4977 | ** sqlite3_set_auxdata() interface even returns. Hence sqlite3_set_auxdata() |
| 4977 | 4978 | ** should be called near the end of the function implementation and the |
| @@ -4983,12 +4984,12 @@ | ||
| 4983 | 4984 | ** values and [parameters] and expressions composed from the same.)^ |
| 4984 | 4985 | ** |
| 4985 | 4986 | ** These routines must be called from the same thread in which |
| 4986 | 4987 | ** the SQL function is running. |
| 4987 | 4988 | */ |
| 4988 | -SQLITE_API void *SQLITE_APICALL sqlite3_get_auxdata(sqlite3_context*, int N); | |
| 4989 | -SQLITE_API void SQLITE_APICALL sqlite3_set_auxdata(sqlite3_context*, int N, void*, void (SQLITE_CALLBACK *)(void*)); | |
| 4989 | +SQLITE_API void *SQLITE_STDCALL sqlite3_get_auxdata(sqlite3_context*, int N); | |
| 4990 | +SQLITE_API void SQLITE_STDCALL sqlite3_set_auxdata(sqlite3_context*, int N, void*, void (*)(void*)); | |
| 4990 | 4991 | |
| 4991 | 4992 | |
| 4992 | 4993 | /* |
| 4993 | 4994 | ** CAPI3REF: Constants Defining Special Destructor Behavior |
| 4994 | 4995 | ** |
| @@ -5001,11 +5002,11 @@ | ||
| 5001 | 5002 | ** the content before returning. |
| 5002 | 5003 | ** |
| 5003 | 5004 | ** The typedef is necessary to work around problems in certain |
| 5004 | 5005 | ** C++ compilers. |
| 5005 | 5006 | */ |
| 5006 | -typedef void (SQLITE_CALLBACK *sqlite3_destructor_type)(void*); | |
| 5007 | +typedef void (*sqlite3_destructor_type)(void*); | |
| 5007 | 5008 | #define SQLITE_STATIC ((sqlite3_destructor_type)0) |
| 5008 | 5009 | #define SQLITE_TRANSIENT ((sqlite3_destructor_type)-1) |
| 5009 | 5010 | |
| 5010 | 5011 | /* |
| 5011 | 5012 | ** CAPI3REF: Setting The Result Of An SQL Function |
| @@ -5120,31 +5121,31 @@ | ||
| 5120 | 5121 | ** |
| 5121 | 5122 | ** If these routines are called from within the different thread |
| 5122 | 5123 | ** than the one containing the application-defined function that received |
| 5123 | 5124 | ** the [sqlite3_context] pointer, the results are undefined. |
| 5124 | 5125 | */ |
| 5125 | -SQLITE_API void SQLITE_APICALL sqlite3_result_blob(sqlite3_context*, const void*, int, void(SQLITE_CALLBACK *)(void*)); | |
| 5126 | -SQLITE_API void SQLITE_APICALL sqlite3_result_blob64(sqlite3_context*,const void*, | |
| 5127 | - sqlite3_uint64,void(SQLITE_CALLBACK *)(void*)); | |
| 5128 | -SQLITE_API void SQLITE_APICALL sqlite3_result_double(sqlite3_context*, double); | |
| 5129 | -SQLITE_API void SQLITE_APICALL sqlite3_result_error(sqlite3_context*, const char*, int); | |
| 5130 | -SQLITE_API void SQLITE_APICALL sqlite3_result_error16(sqlite3_context*, const void*, int); | |
| 5131 | -SQLITE_API void SQLITE_APICALL sqlite3_result_error_toobig(sqlite3_context*); | |
| 5132 | -SQLITE_API void SQLITE_APICALL sqlite3_result_error_nomem(sqlite3_context*); | |
| 5133 | -SQLITE_API void SQLITE_APICALL sqlite3_result_error_code(sqlite3_context*, int); | |
| 5134 | -SQLITE_API void SQLITE_APICALL sqlite3_result_int(sqlite3_context*, int); | |
| 5135 | -SQLITE_API void SQLITE_APICALL sqlite3_result_int64(sqlite3_context*, sqlite3_int64); | |
| 5136 | -SQLITE_API void SQLITE_APICALL sqlite3_result_null(sqlite3_context*); | |
| 5137 | -SQLITE_API void SQLITE_APICALL sqlite3_result_text(sqlite3_context*, const char*, int, void(SQLITE_CALLBACK *)(void*)); | |
| 5138 | -SQLITE_API void SQLITE_APICALL sqlite3_result_text64(sqlite3_context*, const char*,sqlite3_uint64, | |
| 5139 | - void(SQLITE_CALLBACK *)(void*), unsigned char encoding); | |
| 5140 | -SQLITE_API void SQLITE_APICALL sqlite3_result_text16(sqlite3_context*, const void*, int, void(SQLITE_CALLBACK *)(void*)); | |
| 5141 | -SQLITE_API void SQLITE_APICALL sqlite3_result_text16le(sqlite3_context*, const void*, int,void(SQLITE_CALLBACK *)(void*)); | |
| 5142 | -SQLITE_API void SQLITE_APICALL sqlite3_result_text16be(sqlite3_context*, const void*, int,void(SQLITE_CALLBACK *)(void*)); | |
| 5143 | -SQLITE_API void SQLITE_APICALL sqlite3_result_value(sqlite3_context*, sqlite3_value*); | |
| 5144 | -SQLITE_API void SQLITE_APICALL sqlite3_result_zeroblob(sqlite3_context*, int n); | |
| 5145 | -SQLITE_API int SQLITE_APICALL sqlite3_result_zeroblob64(sqlite3_context*, sqlite3_uint64 n); | |
| 5126 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_blob(sqlite3_context*, const void*, int, void(*)(void*)); | |
| 5127 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_blob64(sqlite3_context*,const void*, | |
| 5128 | + sqlite3_uint64,void(*)(void*)); | |
| 5129 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_double(sqlite3_context*, double); | |
| 5130 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_error(sqlite3_context*, const char*, int); | |
| 5131 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_error16(sqlite3_context*, const void*, int); | |
| 5132 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_error_toobig(sqlite3_context*); | |
| 5133 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_error_nomem(sqlite3_context*); | |
| 5134 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_error_code(sqlite3_context*, int); | |
| 5135 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_int(sqlite3_context*, int); | |
| 5136 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_int64(sqlite3_context*, sqlite3_int64); | |
| 5137 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_null(sqlite3_context*); | |
| 5138 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_text(sqlite3_context*, const char*, int, void(*)(void*)); | |
| 5139 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_text64(sqlite3_context*, const char*,sqlite3_uint64, | |
| 5140 | + void(*)(void*), unsigned char encoding); | |
| 5141 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_text16(sqlite3_context*, const void*, int, void(*)(void*)); | |
| 5142 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_text16le(sqlite3_context*, const void*, int,void(*)(void*)); | |
| 5143 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_text16be(sqlite3_context*, const void*, int,void(*)(void*)); | |
| 5144 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_value(sqlite3_context*, sqlite3_value*); | |
| 5145 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_zeroblob(sqlite3_context*, int n); | |
| 5146 | +SQLITE_API int SQLITE_STDCALL sqlite3_result_zeroblob64(sqlite3_context*, sqlite3_uint64 n); | |
| 5146 | 5147 | |
| 5147 | 5148 | |
| 5148 | 5149 | /* |
| 5149 | 5150 | ** CAPI3REF: Setting The Subtype Of An SQL Function |
| 5150 | 5151 | ** METHOD: sqlite3_context |
| @@ -5155,11 +5156,11 @@ | ||
| 5155 | 5156 | ** of the subtype T are preserved in current versions of SQLite; |
| 5156 | 5157 | ** higher order bits are discarded. |
| 5157 | 5158 | ** The number of subtype bytes preserved by SQLite might increase |
| 5158 | 5159 | ** in future releases of SQLite. |
| 5159 | 5160 | */ |
| 5160 | -SQLITE_API void SQLITE_APICALL sqlite3_result_subtype(sqlite3_context*,unsigned int); | |
| 5161 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_subtype(sqlite3_context*,unsigned int); | |
| 5161 | 5162 | |
| 5162 | 5163 | /* |
| 5163 | 5164 | ** CAPI3REF: Define New Collating Sequences |
| 5164 | 5165 | ** METHOD: sqlite3 |
| 5165 | 5166 | ** |
| @@ -5237,31 +5238,31 @@ | ||
| 5237 | 5238 | ** is unfortunate but cannot be changed without breaking backwards |
| 5238 | 5239 | ** compatibility. |
| 5239 | 5240 | ** |
| 5240 | 5241 | ** See also: [sqlite3_collation_needed()] and [sqlite3_collation_needed16()]. |
| 5241 | 5242 | */ |
| 5242 | -SQLITE_API int SQLITE_APICALL sqlite3_create_collation( | |
| 5243 | +SQLITE_API int SQLITE_STDCALL sqlite3_create_collation( | |
| 5243 | 5244 | sqlite3*, |
| 5244 | 5245 | const char *zName, |
| 5245 | 5246 | int eTextRep, |
| 5246 | 5247 | void *pArg, |
| 5247 | - int(SQLITE_CALLBACK *xCompare)(void*,int,const void*,int,const void*) | |
| 5248 | + int(*xCompare)(void*,int,const void*,int,const void*) | |
| 5248 | 5249 | ); |
| 5249 | -SQLITE_API int SQLITE_APICALL sqlite3_create_collation_v2( | |
| 5250 | +SQLITE_API int SQLITE_STDCALL sqlite3_create_collation_v2( | |
| 5250 | 5251 | sqlite3*, |
| 5251 | 5252 | const char *zName, |
| 5252 | 5253 | int eTextRep, |
| 5253 | 5254 | void *pArg, |
| 5254 | - int(SQLITE_CALLBACK *xCompare)(void*,int,const void*,int,const void*), | |
| 5255 | - void(SQLITE_CALLBACK *xDestroy)(void*) | |
| 5255 | + int(*xCompare)(void*,int,const void*,int,const void*), | |
| 5256 | + void(*xDestroy)(void*) | |
| 5256 | 5257 | ); |
| 5257 | -SQLITE_API int SQLITE_APICALL sqlite3_create_collation16( | |
| 5258 | +SQLITE_API int SQLITE_STDCALL sqlite3_create_collation16( | |
| 5258 | 5259 | sqlite3*, |
| 5259 | 5260 | const void *zName, |
| 5260 | 5261 | int eTextRep, |
| 5261 | 5262 | void *pArg, |
| 5262 | - int(SQLITE_CALLBACK *xCompare)(void*,int,const void*,int,const void*) | |
| 5263 | + int(*xCompare)(void*,int,const void*,int,const void*) | |
| 5263 | 5264 | ); |
| 5264 | 5265 | |
| 5265 | 5266 | /* |
| 5266 | 5267 | ** CAPI3REF: Collation Needed Callbacks |
| 5267 | 5268 | ** METHOD: sqlite3 |
| @@ -5287,19 +5288,19 @@ | ||
| 5287 | 5288 | ** |
| 5288 | 5289 | ** The callback function should register the desired collation using |
| 5289 | 5290 | ** [sqlite3_create_collation()], [sqlite3_create_collation16()], or |
| 5290 | 5291 | ** [sqlite3_create_collation_v2()]. |
| 5291 | 5292 | */ |
| 5292 | -SQLITE_API int SQLITE_APICALL sqlite3_collation_needed( | |
| 5293 | +SQLITE_API int SQLITE_STDCALL sqlite3_collation_needed( | |
| 5293 | 5294 | sqlite3*, |
| 5294 | 5295 | void*, |
| 5295 | - void(SQLITE_CALLBACK *)(void*,sqlite3*,int eTextRep,const char*) | |
| 5296 | + void(*)(void*,sqlite3*,int eTextRep,const char*) | |
| 5296 | 5297 | ); |
| 5297 | -SQLITE_API int SQLITE_APICALL sqlite3_collation_needed16( | |
| 5298 | +SQLITE_API int SQLITE_STDCALL sqlite3_collation_needed16( | |
| 5298 | 5299 | sqlite3*, |
| 5299 | 5300 | void*, |
| 5300 | - void(SQLITE_CALLBACK *)(void*,sqlite3*,int eTextRep,const void*) | |
| 5301 | + void(*)(void*,sqlite3*,int eTextRep,const void*) | |
| 5301 | 5302 | ); |
| 5302 | 5303 | |
| 5303 | 5304 | #ifdef SQLITE_HAS_CODEC |
| 5304 | 5305 | /* |
| 5305 | 5306 | ** Specify the key for an encrypted database. This routine should be |
| @@ -5306,15 +5307,15 @@ | ||
| 5306 | 5307 | ** called right after sqlite3_open(). |
| 5307 | 5308 | ** |
| 5308 | 5309 | ** The code to implement this API is not available in the public release |
| 5309 | 5310 | ** of SQLite. |
| 5310 | 5311 | */ |
| 5311 | -SQLITE_API int SQLITE_APICALL sqlite3_key( | |
| 5312 | +SQLITE_API int SQLITE_STDCALL sqlite3_key( | |
| 5312 | 5313 | sqlite3 *db, /* Database to be rekeyed */ |
| 5313 | 5314 | const void *pKey, int nKey /* The key */ |
| 5314 | 5315 | ); |
| 5315 | -SQLITE_API int SQLITE_APICALL sqlite3_key_v2( | |
| 5316 | +SQLITE_API int SQLITE_STDCALL sqlite3_key_v2( | |
| 5316 | 5317 | sqlite3 *db, /* Database to be rekeyed */ |
| 5317 | 5318 | const char *zDbName, /* Name of the database */ |
| 5318 | 5319 | const void *pKey, int nKey /* The key */ |
| 5319 | 5320 | ); |
| 5320 | 5321 | |
| @@ -5324,35 +5325,35 @@ | ||
| 5324 | 5325 | ** database is decrypted. |
| 5325 | 5326 | ** |
| 5326 | 5327 | ** The code to implement this API is not available in the public release |
| 5327 | 5328 | ** of SQLite. |
| 5328 | 5329 | */ |
| 5329 | -SQLITE_API int SQLITE_APICALL sqlite3_rekey( | |
| 5330 | +SQLITE_API int SQLITE_STDCALL sqlite3_rekey( | |
| 5330 | 5331 | sqlite3 *db, /* Database to be rekeyed */ |
| 5331 | 5332 | const void *pKey, int nKey /* The new key */ |
| 5332 | 5333 | ); |
| 5333 | -SQLITE_API int SQLITE_APICALL sqlite3_rekey_v2( | |
| 5334 | +SQLITE_API int SQLITE_STDCALL sqlite3_rekey_v2( | |
| 5334 | 5335 | sqlite3 *db, /* Database to be rekeyed */ |
| 5335 | 5336 | const char *zDbName, /* Name of the database */ |
| 5336 | 5337 | const void *pKey, int nKey /* The new key */ |
| 5337 | 5338 | ); |
| 5338 | 5339 | |
| 5339 | 5340 | /* |
| 5340 | 5341 | ** Specify the activation key for a SEE database. Unless |
| 5341 | 5342 | ** activated, none of the SEE routines will work. |
| 5342 | 5343 | */ |
| 5343 | -SQLITE_API void SQLITE_APICALL sqlite3_activate_see( | |
| 5344 | +SQLITE_API void SQLITE_STDCALL sqlite3_activate_see( | |
| 5344 | 5345 | const char *zPassPhrase /* Activation phrase */ |
| 5345 | 5346 | ); |
| 5346 | 5347 | #endif |
| 5347 | 5348 | |
| 5348 | 5349 | #ifdef SQLITE_ENABLE_CEROD |
| 5349 | 5350 | /* |
| 5350 | 5351 | ** Specify the activation key for a CEROD database. Unless |
| 5351 | 5352 | ** activated, none of the CEROD routines will work. |
| 5352 | 5353 | */ |
| 5353 | -SQLITE_API void SQLITE_APICALL sqlite3_activate_cerod( | |
| 5354 | +SQLITE_API void SQLITE_STDCALL sqlite3_activate_cerod( | |
| 5354 | 5355 | const char *zPassPhrase /* Activation phrase */ |
| 5355 | 5356 | ); |
| 5356 | 5357 | #endif |
| 5357 | 5358 | |
| 5358 | 5359 | /* |
| @@ -5370,11 +5371,11 @@ | ||
| 5370 | 5371 | ** method of the default [sqlite3_vfs] object. If the xSleep() method |
| 5371 | 5372 | ** of the default VFS is not implemented correctly, or not implemented at |
| 5372 | 5373 | ** all, then the behavior of sqlite3_sleep() may deviate from the description |
| 5373 | 5374 | ** in the previous paragraphs. |
| 5374 | 5375 | */ |
| 5375 | -SQLITE_API int SQLITE_APICALL sqlite3_sleep(int); | |
| 5376 | +SQLITE_API int SQLITE_STDCALL sqlite3_sleep(int); | |
| 5376 | 5377 | |
| 5377 | 5378 | /* |
| 5378 | 5379 | ** CAPI3REF: Name Of The Folder Holding Temporary Files |
| 5379 | 5380 | ** |
| 5380 | 5381 | ** ^(If this global variable is made to point to a string which is |
| @@ -5489,11 +5490,11 @@ | ||
| 5489 | 5490 | ** |
| 5490 | 5491 | ** If another thread changes the autocommit status of the database |
| 5491 | 5492 | ** connection while this routine is running, then the return value |
| 5492 | 5493 | ** is undefined. |
| 5493 | 5494 | */ |
| 5494 | -SQLITE_API int SQLITE_APICALL sqlite3_get_autocommit(sqlite3*); | |
| 5495 | +SQLITE_API int SQLITE_STDCALL sqlite3_get_autocommit(sqlite3*); | |
| 5495 | 5496 | |
| 5496 | 5497 | /* |
| 5497 | 5498 | ** CAPI3REF: Find The Database Handle Of A Prepared Statement |
| 5498 | 5499 | ** METHOD: sqlite3_stmt |
| 5499 | 5500 | ** |
| @@ -5502,11 +5503,11 @@ | ||
| 5502 | 5503 | ** returned by sqlite3_db_handle is the same [database connection] |
| 5503 | 5504 | ** that was the first argument |
| 5504 | 5505 | ** to the [sqlite3_prepare_v2()] call (or its variants) that was used to |
| 5505 | 5506 | ** create the statement in the first place. |
| 5506 | 5507 | */ |
| 5507 | -SQLITE_API sqlite3 *SQLITE_APICALL sqlite3_db_handle(sqlite3_stmt*); | |
| 5508 | +SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3_db_handle(sqlite3_stmt*); | |
| 5508 | 5509 | |
| 5509 | 5510 | /* |
| 5510 | 5511 | ** CAPI3REF: Return The Filename For A Database Connection |
| 5511 | 5512 | ** METHOD: sqlite3 |
| 5512 | 5513 | ** |
| @@ -5519,21 +5520,21 @@ | ||
| 5519 | 5520 | ** ^The filename returned by this function is the output of the |
| 5520 | 5521 | ** xFullPathname method of the [VFS]. ^In other words, the filename |
| 5521 | 5522 | ** will be an absolute pathname, even if the filename used |
| 5522 | 5523 | ** to open the database originally was a URI or relative pathname. |
| 5523 | 5524 | */ |
| 5524 | -SQLITE_API const char *SQLITE_APICALL sqlite3_db_filename(sqlite3 *db, const char *zDbName); | |
| 5525 | +SQLITE_API const char *SQLITE_STDCALL sqlite3_db_filename(sqlite3 *db, const char *zDbName); | |
| 5525 | 5526 | |
| 5526 | 5527 | /* |
| 5527 | 5528 | ** CAPI3REF: Determine if a database is read-only |
| 5528 | 5529 | ** METHOD: sqlite3 |
| 5529 | 5530 | ** |
| 5530 | 5531 | ** ^The sqlite3_db_readonly(D,N) interface returns 1 if the database N |
| 5531 | 5532 | ** of connection D is read-only, 0 if it is read/write, or -1 if N is not |
| 5532 | 5533 | ** the name of a database on connection D. |
| 5533 | 5534 | */ |
| 5534 | -SQLITE_API int SQLITE_APICALL sqlite3_db_readonly(sqlite3 *db, const char *zDbName); | |
| 5535 | +SQLITE_API int SQLITE_STDCALL sqlite3_db_readonly(sqlite3 *db, const char *zDbName); | |
| 5535 | 5536 | |
| 5536 | 5537 | /* |
| 5537 | 5538 | ** CAPI3REF: Find the next prepared statement |
| 5538 | 5539 | ** METHOD: sqlite3 |
| 5539 | 5540 | ** |
| @@ -5545,11 +5546,11 @@ | ||
| 5545 | 5546 | ** |
| 5546 | 5547 | ** The [database connection] pointer D in a call to |
| 5547 | 5548 | ** [sqlite3_next_stmt(D,S)] must refer to an open database |
| 5548 | 5549 | ** connection and in particular must not be a NULL pointer. |
| 5549 | 5550 | */ |
| 5550 | -SQLITE_API sqlite3_stmt *SQLITE_APICALL sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt); | |
| 5551 | +SQLITE_API sqlite3_stmt *SQLITE_STDCALL sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt); | |
| 5551 | 5552 | |
| 5552 | 5553 | /* |
| 5553 | 5554 | ** CAPI3REF: Commit And Rollback Notification Callbacks |
| 5554 | 5555 | ** METHOD: sqlite3 |
| 5555 | 5556 | ** |
| @@ -5594,12 +5595,12 @@ | ||
| 5594 | 5595 | ** ^The rollback callback is not invoked if a transaction is |
| 5595 | 5596 | ** automatically rolled back because the database connection is closed. |
| 5596 | 5597 | ** |
| 5597 | 5598 | ** See also the [sqlite3_update_hook()] interface. |
| 5598 | 5599 | */ |
| 5599 | -SQLITE_API void *SQLITE_APICALL sqlite3_commit_hook(sqlite3*, int(SQLITE_CALLBACK *)(void*), void*); | |
| 5600 | -SQLITE_API void *SQLITE_APICALL sqlite3_rollback_hook(sqlite3*, void(SQLITE_CALLBACK *)(void *), void*); | |
| 5600 | +SQLITE_API void *SQLITE_STDCALL sqlite3_commit_hook(sqlite3*, int(*)(void*), void*); | |
| 5601 | +SQLITE_API void *SQLITE_STDCALL sqlite3_rollback_hook(sqlite3*, void(*)(void *), void*); | |
| 5601 | 5602 | |
| 5602 | 5603 | /* |
| 5603 | 5604 | ** CAPI3REF: Data Change Notification Callbacks |
| 5604 | 5605 | ** METHOD: sqlite3 |
| 5605 | 5606 | ** |
| @@ -5646,13 +5647,13 @@ | ||
| 5646 | 5647 | ** the first call on D. |
| 5647 | 5648 | ** |
| 5648 | 5649 | ** See also the [sqlite3_commit_hook()], [sqlite3_rollback_hook()], |
| 5649 | 5650 | ** and [sqlite3_preupdate_hook()] interfaces. |
| 5650 | 5651 | */ |
| 5651 | -SQLITE_API void *SQLITE_APICALL sqlite3_update_hook( | |
| 5652 | +SQLITE_API void *SQLITE_STDCALL sqlite3_update_hook( | |
| 5652 | 5653 | sqlite3*, |
| 5653 | - void(SQLITE_CALLBACK *)(void *,int ,char const *,char const *,sqlite3_int64), | |
| 5654 | + void(*)(void *,int ,char const *,char const *,sqlite3_int64), | |
| 5654 | 5655 | void* |
| 5655 | 5656 | ); |
| 5656 | 5657 | |
| 5657 | 5658 | /* |
| 5658 | 5659 | ** CAPI3REF: Enable Or Disable Shared Pager Cache |
| @@ -5686,11 +5687,11 @@ | ||
| 5686 | 5687 | ** This interface is threadsafe on processors where writing a |
| 5687 | 5688 | ** 32-bit integer is atomic. |
| 5688 | 5689 | ** |
| 5689 | 5690 | ** See Also: [SQLite Shared-Cache Mode] |
| 5690 | 5691 | */ |
| 5691 | -SQLITE_API int SQLITE_APICALL sqlite3_enable_shared_cache(int); | |
| 5692 | +SQLITE_API int SQLITE_STDCALL sqlite3_enable_shared_cache(int); | |
| 5692 | 5693 | |
| 5693 | 5694 | /* |
| 5694 | 5695 | ** CAPI3REF: Attempt To Free Heap Memory |
| 5695 | 5696 | ** |
| 5696 | 5697 | ** ^The sqlite3_release_memory() interface attempts to free N bytes |
| @@ -5702,11 +5703,11 @@ | ||
| 5702 | 5703 | ** ^The sqlite3_release_memory() routine is a no-op returning zero |
| 5703 | 5704 | ** if SQLite is not compiled with [SQLITE_ENABLE_MEMORY_MANAGEMENT]. |
| 5704 | 5705 | ** |
| 5705 | 5706 | ** See also: [sqlite3_db_release_memory()] |
| 5706 | 5707 | */ |
| 5707 | -SQLITE_API int SQLITE_APICALL sqlite3_release_memory(int); | |
| 5708 | +SQLITE_API int SQLITE_STDCALL sqlite3_release_memory(int); | |
| 5708 | 5709 | |
| 5709 | 5710 | /* |
| 5710 | 5711 | ** CAPI3REF: Free Memory Used By A Database Connection |
| 5711 | 5712 | ** METHOD: sqlite3 |
| 5712 | 5713 | ** |
| @@ -5716,11 +5717,11 @@ | ||
| 5716 | 5717 | ** when the [SQLITE_ENABLE_MEMORY_MANAGEMENT] compile-time option is |
| 5717 | 5718 | ** omitted. |
| 5718 | 5719 | ** |
| 5719 | 5720 | ** See also: [sqlite3_release_memory()] |
| 5720 | 5721 | */ |
| 5721 | -SQLITE_API int SQLITE_APICALL sqlite3_db_release_memory(sqlite3*); | |
| 5722 | +SQLITE_API int SQLITE_STDCALL sqlite3_db_release_memory(sqlite3*); | |
| 5722 | 5723 | |
| 5723 | 5724 | /* |
| 5724 | 5725 | ** CAPI3REF: Impose A Limit On Heap Size |
| 5725 | 5726 | ** |
| 5726 | 5727 | ** ^The sqlite3_soft_heap_limit64() interface sets and/or queries the |
| @@ -5768,11 +5769,11 @@ | ||
| 5768 | 5769 | ** the use of [SQLITE_ENABLE_MEMORY_MANAGEMENT]. |
| 5769 | 5770 | ** |
| 5770 | 5771 | ** The circumstances under which SQLite will enforce the soft heap limit may |
| 5771 | 5772 | ** changes in future releases of SQLite. |
| 5772 | 5773 | */ |
| 5773 | -SQLITE_API sqlite3_int64 SQLITE_APICALL sqlite3_soft_heap_limit64(sqlite3_int64 N); | |
| 5774 | +SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_soft_heap_limit64(sqlite3_int64 N); | |
| 5774 | 5775 | |
| 5775 | 5776 | /* |
| 5776 | 5777 | ** CAPI3REF: Deprecated Soft Heap Limit Interface |
| 5777 | 5778 | ** DEPRECATED |
| 5778 | 5779 | ** |
| @@ -5779,11 +5780,11 @@ | ||
| 5779 | 5780 | ** This is a deprecated version of the [sqlite3_soft_heap_limit64()] |
| 5780 | 5781 | ** interface. This routine is provided for historical compatibility |
| 5781 | 5782 | ** only. All new applications should use the |
| 5782 | 5783 | ** [sqlite3_soft_heap_limit64()] interface rather than this one. |
| 5783 | 5784 | */ |
| 5784 | -SQLITE_API SQLITE_DEPRECATED void SQLITE_APICALL sqlite3_soft_heap_limit(int N); | |
| 5785 | +SQLITE_API SQLITE_DEPRECATED void SQLITE_STDCALL sqlite3_soft_heap_limit(int N); | |
| 5785 | 5786 | |
| 5786 | 5787 | |
| 5787 | 5788 | /* |
| 5788 | 5789 | ** CAPI3REF: Extract Metadata About A Column Of A Table |
| 5789 | 5790 | ** METHOD: sqlite3 |
| @@ -5849,11 +5850,11 @@ | ||
| 5849 | 5850 | ** |
| 5850 | 5851 | ** ^This function causes all database schemas to be read from disk and |
| 5851 | 5852 | ** parsed, if that has not already been done, and returns an error if |
| 5852 | 5853 | ** any errors are encountered while loading the schema. |
| 5853 | 5854 | */ |
| 5854 | -SQLITE_API int SQLITE_APICALL sqlite3_table_column_metadata( | |
| 5855 | +SQLITE_API int SQLITE_STDCALL sqlite3_table_column_metadata( | |
| 5855 | 5856 | sqlite3 *db, /* Connection handle */ |
| 5856 | 5857 | const char *zDbName, /* Database name or NULL */ |
| 5857 | 5858 | const char *zTableName, /* Table name */ |
| 5858 | 5859 | const char *zColumnName, /* Column name */ |
| 5859 | 5860 | char const **pzDataType, /* OUTPUT: Declared data type */ |
| @@ -5905,11 +5906,11 @@ | ||
| 5905 | 5906 | ** disabled and prevent SQL injections from giving attackers |
| 5906 | 5907 | ** access to extension loading capabilities. |
| 5907 | 5908 | ** |
| 5908 | 5909 | ** See also the [load_extension() SQL function]. |
| 5909 | 5910 | */ |
| 5910 | -SQLITE_API int SQLITE_APICALL sqlite3_load_extension( | |
| 5911 | +SQLITE_API int SQLITE_STDCALL sqlite3_load_extension( | |
| 5911 | 5912 | sqlite3 *db, /* Load the extension into this database connection */ |
| 5912 | 5913 | const char *zFile, /* Name of the shared library containing extension */ |
| 5913 | 5914 | const char *zProc, /* Entry point. Derived from zFile if 0 */ |
| 5914 | 5915 | char **pzErrMsg /* Put error message here if not 0 */ |
| 5915 | 5916 | ); |
| @@ -5928,20 +5929,20 @@ | ||
| 5928 | 5929 | ** to turn extension loading on and call it with onoff==0 to turn |
| 5929 | 5930 | ** it back off again. |
| 5930 | 5931 | ** |
| 5931 | 5932 | ** ^This interface enables or disables both the C-API |
| 5932 | 5933 | ** [sqlite3_load_extension()] and the SQL function [load_extension()]. |
| 5933 | -** Use [sqlite3_db_config](db,[SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION],..) | |
| 5934 | -** to enable or disable only the C-API. | |
| 5934 | +** ^(Use [sqlite3_db_config](db,[SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION],..) | |
| 5935 | +** to enable or disable only the C-API.)^ | |
| 5935 | 5936 | ** |
| 5936 | 5937 | ** <b>Security warning:</b> It is recommended that extension loading |
| 5937 | 5938 | ** be disabled using the [SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION] method |
| 5938 | 5939 | ** rather than this interface, so the [load_extension()] SQL function |
| 5939 | 5940 | ** remains disabled. This will prevent SQL injections from giving attackers |
| 5940 | 5941 | ** access to extension loading capabilities. |
| 5941 | 5942 | */ |
| 5942 | -SQLITE_API int SQLITE_APICALL sqlite3_enable_load_extension(sqlite3 *db, int onoff); | |
| 5943 | +SQLITE_API int SQLITE_STDCALL sqlite3_enable_load_extension(sqlite3 *db, int onoff); | |
| 5943 | 5944 | |
| 5944 | 5945 | /* |
| 5945 | 5946 | ** CAPI3REF: Automatically Load Statically Linked Extensions |
| 5946 | 5947 | ** |
| 5947 | 5948 | ** ^This interface causes the xEntryPoint() function to be invoked for |
| @@ -5975,11 +5976,11 @@ | ||
| 5975 | 5976 | ** will be called more than once for each database connection that is opened. |
| 5976 | 5977 | ** |
| 5977 | 5978 | ** See also: [sqlite3_reset_auto_extension()] |
| 5978 | 5979 | ** and [sqlite3_cancel_auto_extension()] |
| 5979 | 5980 | */ |
| 5980 | -SQLITE_API int SQLITE_APICALL sqlite3_auto_extension(void(SQLITE_CALLBACK *xEntryPoint)(void)); | |
| 5981 | +SQLITE_API int SQLITE_STDCALL sqlite3_auto_extension(void(*xEntryPoint)(void)); | |
| 5981 | 5982 | |
| 5982 | 5983 | /* |
| 5983 | 5984 | ** CAPI3REF: Cancel Automatic Extension Loading |
| 5984 | 5985 | ** |
| 5985 | 5986 | ** ^The [sqlite3_cancel_auto_extension(X)] interface unregisters the |
| @@ -5987,19 +5988,19 @@ | ||
| 5987 | 5988 | ** [sqlite3_auto_extension(X)]. ^The [sqlite3_cancel_auto_extension(X)] |
| 5988 | 5989 | ** routine returns 1 if initialization routine X was successfully |
| 5989 | 5990 | ** unregistered and it returns 0 if X was not on the list of initialization |
| 5990 | 5991 | ** routines. |
| 5991 | 5992 | */ |
| 5992 | -SQLITE_API int SQLITE_APICALL sqlite3_cancel_auto_extension(void(SQLITE_CALLBACK *xEntryPoint)(void)); | |
| 5993 | +SQLITE_API int SQLITE_STDCALL sqlite3_cancel_auto_extension(void(*xEntryPoint)(void)); | |
| 5993 | 5994 | |
| 5994 | 5995 | /* |
| 5995 | 5996 | ** CAPI3REF: Reset Automatic Extension Loading |
| 5996 | 5997 | ** |
| 5997 | 5998 | ** ^This interface disables all automatic extensions previously |
| 5998 | 5999 | ** registered using [sqlite3_auto_extension()]. |
| 5999 | 6000 | */ |
| 6000 | -SQLITE_API void SQLITE_APICALL sqlite3_reset_auto_extension(void); | |
| 6001 | +SQLITE_API void SQLITE_STDCALL sqlite3_reset_auto_extension(void); | |
| 6001 | 6002 | |
| 6002 | 6003 | /* |
| 6003 | 6004 | ** The interface to the virtual-table mechanism is currently considered |
| 6004 | 6005 | ** to be experimental. The interface might change in incompatible ways. |
| 6005 | 6006 | ** If this is a problem for you, do not use the interface at this time. |
| @@ -6032,41 +6033,41 @@ | ||
| 6032 | 6033 | ** of this structure must not change while it is registered with |
| 6033 | 6034 | ** any database connection. |
| 6034 | 6035 | */ |
| 6035 | 6036 | struct sqlite3_module { |
| 6036 | 6037 | int iVersion; |
| 6037 | - int (SQLITE_CALLBACK *xCreate)(sqlite3*, void *pAux, | |
| 6038 | - int argc, const char *const*argv, | |
| 6039 | - sqlite3_vtab **ppVTab, char**); | |
| 6040 | - int (SQLITE_CALLBACK *xConnect)(sqlite3*, void *pAux, | |
| 6041 | - int argc, const char *const*argv, | |
| 6042 | - sqlite3_vtab **ppVTab, char**); | |
| 6043 | - int (SQLITE_CALLBACK *xBestIndex)(sqlite3_vtab *pVTab, sqlite3_index_info*); | |
| 6044 | - int (SQLITE_CALLBACK *xDisconnect)(sqlite3_vtab *pVTab); | |
| 6045 | - int (SQLITE_CALLBACK *xDestroy)(sqlite3_vtab *pVTab); | |
| 6046 | - int (SQLITE_CALLBACK *xOpen)(sqlite3_vtab *pVTab, sqlite3_vtab_cursor **ppCursor); | |
| 6047 | - int (SQLITE_CALLBACK *xClose)(sqlite3_vtab_cursor*); | |
| 6048 | - int (SQLITE_CALLBACK *xFilter)(sqlite3_vtab_cursor*, int idxNum, const char *idxStr, | |
| 6049 | - int argc, sqlite3_value **argv); | |
| 6050 | - int (SQLITE_CALLBACK *xNext)(sqlite3_vtab_cursor*); | |
| 6051 | - int (SQLITE_CALLBACK *xEof)(sqlite3_vtab_cursor*); | |
| 6052 | - int (SQLITE_CALLBACK *xColumn)(sqlite3_vtab_cursor*, sqlite3_context*, int); | |
| 6053 | - int (SQLITE_CALLBACK *xRowid)(sqlite3_vtab_cursor*, sqlite3_int64 *pRowid); | |
| 6054 | - int (SQLITE_CALLBACK *xUpdate)(sqlite3_vtab *, int, sqlite3_value **, sqlite3_int64 *); | |
| 6055 | - int (SQLITE_CALLBACK *xBegin)(sqlite3_vtab *pVTab); | |
| 6056 | - int (SQLITE_CALLBACK *xSync)(sqlite3_vtab *pVTab); | |
| 6057 | - int (SQLITE_CALLBACK *xCommit)(sqlite3_vtab *pVTab); | |
| 6058 | - int (SQLITE_CALLBACK *xRollback)(sqlite3_vtab *pVTab); | |
| 6059 | - int (SQLITE_CALLBACK *xFindFunction)(sqlite3_vtab *pVtab, int nArg, const char *zName, | |
| 6060 | - void (SQLITE_CALLBACK **pxFunc)(sqlite3_context*,int,sqlite3_value**), | |
| 6061 | - void **ppArg); | |
| 6062 | - int (SQLITE_CALLBACK *xRename)(sqlite3_vtab *pVtab, const char *zNew); | |
| 6063 | - /* The methods above are in version 1 of the sqlite_module object. Those | |
| 6064 | - ** below are for version 2 and greater. */ | |
| 6065 | - int (SQLITE_CALLBACK *xSavepoint)(sqlite3_vtab *pVTab, int); | |
| 6066 | - int (SQLITE_CALLBACK *xRelease)(sqlite3_vtab *pVTab, int); | |
| 6067 | - int (SQLITE_CALLBACK *xRollbackTo)(sqlite3_vtab *pVTab, int); | |
| 6038 | + int (*xCreate)(sqlite3*, void *pAux, | |
| 6039 | + int argc, const char *const*argv, | |
| 6040 | + sqlite3_vtab **ppVTab, char**); | |
| 6041 | + int (*xConnect)(sqlite3*, void *pAux, | |
| 6042 | + int argc, const char *const*argv, | |
| 6043 | + sqlite3_vtab **ppVTab, char**); | |
| 6044 | + int (*xBestIndex)(sqlite3_vtab *pVTab, sqlite3_index_info*); | |
| 6045 | + int (*xDisconnect)(sqlite3_vtab *pVTab); | |
| 6046 | + int (*xDestroy)(sqlite3_vtab *pVTab); | |
| 6047 | + int (*xOpen)(sqlite3_vtab *pVTab, sqlite3_vtab_cursor **ppCursor); | |
| 6048 | + int (*xClose)(sqlite3_vtab_cursor*); | |
| 6049 | + int (*xFilter)(sqlite3_vtab_cursor*, int idxNum, const char *idxStr, | |
| 6050 | + int argc, sqlite3_value **argv); | |
| 6051 | + int (*xNext)(sqlite3_vtab_cursor*); | |
| 6052 | + int (*xEof)(sqlite3_vtab_cursor*); | |
| 6053 | + int (*xColumn)(sqlite3_vtab_cursor*, sqlite3_context*, int); | |
| 6054 | + int (*xRowid)(sqlite3_vtab_cursor*, sqlite3_int64 *pRowid); | |
| 6055 | + int (*xUpdate)(sqlite3_vtab *, int, sqlite3_value **, sqlite3_int64 *); | |
| 6056 | + int (*xBegin)(sqlite3_vtab *pVTab); | |
| 6057 | + int (*xSync)(sqlite3_vtab *pVTab); | |
| 6058 | + int (*xCommit)(sqlite3_vtab *pVTab); | |
| 6059 | + int (*xRollback)(sqlite3_vtab *pVTab); | |
| 6060 | + int (*xFindFunction)(sqlite3_vtab *pVtab, int nArg, const char *zName, | |
| 6061 | + void (**pxFunc)(sqlite3_context*,int,sqlite3_value**), | |
| 6062 | + void **ppArg); | |
| 6063 | + int (*xRename)(sqlite3_vtab *pVtab, const char *zNew); | |
| 6064 | + /* The methods above are in version 1 of the sqlite_module object. Those | |
| 6065 | + ** below are for version 2 and greater. */ | |
| 6066 | + int (*xSavepoint)(sqlite3_vtab *pVTab, int); | |
| 6067 | + int (*xRelease)(sqlite3_vtab *pVTab, int); | |
| 6068 | + int (*xRollbackTo)(sqlite3_vtab *pVTab, int); | |
| 6068 | 6069 | }; |
| 6069 | 6070 | |
| 6070 | 6071 | /* |
| 6071 | 6072 | ** CAPI3REF: Virtual Table Indexing Information |
| 6072 | 6073 | ** KEYWORDS: sqlite3_index_info |
| @@ -6240,22 +6241,22 @@ | ||
| 6240 | 6241 | ** be invoked if the call to sqlite3_create_module_v2() fails. |
| 6241 | 6242 | ** ^The sqlite3_create_module() |
| 6242 | 6243 | ** interface is equivalent to sqlite3_create_module_v2() with a NULL |
| 6243 | 6244 | ** destructor. |
| 6244 | 6245 | */ |
| 6245 | -SQLITE_API int SQLITE_APICALL sqlite3_create_module( | |
| 6246 | +SQLITE_API int SQLITE_STDCALL sqlite3_create_module( | |
| 6246 | 6247 | sqlite3 *db, /* SQLite connection to register module with */ |
| 6247 | 6248 | const char *zName, /* Name of the module */ |
| 6248 | 6249 | const sqlite3_module *p, /* Methods for the module */ |
| 6249 | 6250 | void *pClientData /* Client data for xCreate/xConnect */ |
| 6250 | 6251 | ); |
| 6251 | -SQLITE_API int SQLITE_APICALL sqlite3_create_module_v2( | |
| 6252 | +SQLITE_API int SQLITE_STDCALL sqlite3_create_module_v2( | |
| 6252 | 6253 | sqlite3 *db, /* SQLite connection to register module with */ |
| 6253 | 6254 | const char *zName, /* Name of the module */ |
| 6254 | 6255 | const sqlite3_module *p, /* Methods for the module */ |
| 6255 | 6256 | void *pClientData, /* Client data for xCreate/xConnect */ |
| 6256 | - void(SQLITE_CALLBACK *xDestroy)(void*) /* Module destructor function */ | |
| 6257 | + void(*xDestroy)(void*) /* Module destructor function */ | |
| 6257 | 6258 | ); |
| 6258 | 6259 | |
| 6259 | 6260 | /* |
| 6260 | 6261 | ** CAPI3REF: Virtual Table Instance Object |
| 6261 | 6262 | ** KEYWORDS: sqlite3_vtab |
| @@ -6309,11 +6310,11 @@ | ||
| 6309 | 6310 | ** ^The [xCreate] and [xConnect] methods of a |
| 6310 | 6311 | ** [virtual table module] call this interface |
| 6311 | 6312 | ** to declare the format (the names and datatypes of the columns) of |
| 6312 | 6313 | ** the virtual tables they implement. |
| 6313 | 6314 | */ |
| 6314 | -SQLITE_API int SQLITE_APICALL sqlite3_declare_vtab(sqlite3*, const char *zSQL); | |
| 6315 | +SQLITE_API int SQLITE_STDCALL sqlite3_declare_vtab(sqlite3*, const char *zSQL); | |
| 6315 | 6316 | |
| 6316 | 6317 | /* |
| 6317 | 6318 | ** CAPI3REF: Overload A Function For A Virtual Table |
| 6318 | 6319 | ** METHOD: sqlite3 |
| 6319 | 6320 | ** |
| @@ -6328,11 +6329,11 @@ | ||
| 6328 | 6329 | ** of the new function always causes an exception to be thrown. So |
| 6329 | 6330 | ** the new function is not good for anything by itself. Its only |
| 6330 | 6331 | ** purpose is to be a placeholder function that can be overloaded |
| 6331 | 6332 | ** by a [virtual table]. |
| 6332 | 6333 | */ |
| 6333 | -SQLITE_API int SQLITE_APICALL sqlite3_overload_function(sqlite3*, const char *zFuncName, int nArg); | |
| 6334 | +SQLITE_API int SQLITE_STDCALL sqlite3_overload_function(sqlite3*, const char *zFuncName, int nArg); | |
| 6334 | 6335 | |
| 6335 | 6336 | /* |
| 6336 | 6337 | ** The interface to the virtual-table mechanism defined above (back up |
| 6337 | 6338 | ** to a comment remarkably similar to this one) is currently considered |
| 6338 | 6339 | ** to be experimental. The interface might change in incompatible ways. |
| @@ -6427,11 +6428,11 @@ | ||
| 6427 | 6428 | ** zero-filled blob to read or write using the incremental-blob interface. |
| 6428 | 6429 | ** |
| 6429 | 6430 | ** To avoid a resource leak, every open [BLOB handle] should eventually |
| 6430 | 6431 | ** be released by a call to [sqlite3_blob_close()]. |
| 6431 | 6432 | */ |
| 6432 | -SQLITE_API int SQLITE_APICALL sqlite3_blob_open( | |
| 6433 | +SQLITE_API int SQLITE_STDCALL sqlite3_blob_open( | |
| 6433 | 6434 | sqlite3*, |
| 6434 | 6435 | const char *zDb, |
| 6435 | 6436 | const char *zTable, |
| 6436 | 6437 | const char *zColumn, |
| 6437 | 6438 | sqlite3_int64 iRow, |
| @@ -6460,11 +6461,11 @@ | ||
| 6460 | 6461 | ** SQLITE_ABORT. ^Calling [sqlite3_blob_bytes()] on an aborted blob handle |
| 6461 | 6462 | ** always returns zero. |
| 6462 | 6463 | ** |
| 6463 | 6464 | ** ^This function sets the database handle error code and message. |
| 6464 | 6465 | */ |
| 6465 | -SQLITE_API int SQLITE_APICALL sqlite3_blob_reopen(sqlite3_blob *, sqlite3_int64); | |
| 6466 | +SQLITE_API int SQLITE_STDCALL sqlite3_blob_reopen(sqlite3_blob *, sqlite3_int64); | |
| 6466 | 6467 | |
| 6467 | 6468 | /* |
| 6468 | 6469 | ** CAPI3REF: Close A BLOB Handle |
| 6469 | 6470 | ** DESTRUCTOR: sqlite3_blob |
| 6470 | 6471 | ** |
| @@ -6483,11 +6484,11 @@ | ||
| 6483 | 6484 | ** with a null pointer (such as would be returned by a failed call to |
| 6484 | 6485 | ** [sqlite3_blob_open()]) is a harmless no-op. ^Otherwise, if this function |
| 6485 | 6486 | ** is passed a valid open blob handle, the values returned by the |
| 6486 | 6487 | ** sqlite3_errcode() and sqlite3_errmsg() functions are set before returning. |
| 6487 | 6488 | */ |
| 6488 | -SQLITE_API int SQLITE_APICALL sqlite3_blob_close(sqlite3_blob *); | |
| 6489 | +SQLITE_API int SQLITE_STDCALL sqlite3_blob_close(sqlite3_blob *); | |
| 6489 | 6490 | |
| 6490 | 6491 | /* |
| 6491 | 6492 | ** CAPI3REF: Return The Size Of An Open BLOB |
| 6492 | 6493 | ** METHOD: sqlite3_blob |
| 6493 | 6494 | ** |
| @@ -6499,11 +6500,11 @@ | ||
| 6499 | 6500 | ** This routine only works on a [BLOB handle] which has been created |
| 6500 | 6501 | ** by a prior successful call to [sqlite3_blob_open()] and which has not |
| 6501 | 6502 | ** been closed by [sqlite3_blob_close()]. Passing any other pointer in |
| 6502 | 6503 | ** to this routine results in undefined and probably undesirable behavior. |
| 6503 | 6504 | */ |
| 6504 | -SQLITE_API int SQLITE_APICALL sqlite3_blob_bytes(sqlite3_blob *); | |
| 6505 | +SQLITE_API int SQLITE_STDCALL sqlite3_blob_bytes(sqlite3_blob *); | |
| 6505 | 6506 | |
| 6506 | 6507 | /* |
| 6507 | 6508 | ** CAPI3REF: Read Data From A BLOB Incrementally |
| 6508 | 6509 | ** METHOD: sqlite3_blob |
| 6509 | 6510 | ** |
| @@ -6528,11 +6529,11 @@ | ||
| 6528 | 6529 | ** been closed by [sqlite3_blob_close()]. Passing any other pointer in |
| 6529 | 6530 | ** to this routine results in undefined and probably undesirable behavior. |
| 6530 | 6531 | ** |
| 6531 | 6532 | ** See also: [sqlite3_blob_write()]. |
| 6532 | 6533 | */ |
| 6533 | -SQLITE_API int SQLITE_APICALL sqlite3_blob_read(sqlite3_blob *, void *Z, int N, int iOffset); | |
| 6534 | +SQLITE_API int SQLITE_STDCALL sqlite3_blob_read(sqlite3_blob *, void *Z, int N, int iOffset); | |
| 6534 | 6535 | |
| 6535 | 6536 | /* |
| 6536 | 6537 | ** CAPI3REF: Write Data Into A BLOB Incrementally |
| 6537 | 6538 | ** METHOD: sqlite3_blob |
| 6538 | 6539 | ** |
| @@ -6570,11 +6571,11 @@ | ||
| 6570 | 6571 | ** been closed by [sqlite3_blob_close()]. Passing any other pointer in |
| 6571 | 6572 | ** to this routine results in undefined and probably undesirable behavior. |
| 6572 | 6573 | ** |
| 6573 | 6574 | ** See also: [sqlite3_blob_read()]. |
| 6574 | 6575 | */ |
| 6575 | -SQLITE_API int SQLITE_APICALL sqlite3_blob_write(sqlite3_blob *, const void *z, int n, int iOffset); | |
| 6576 | +SQLITE_API int SQLITE_STDCALL sqlite3_blob_write(sqlite3_blob *, const void *z, int n, int iOffset); | |
| 6576 | 6577 | |
| 6577 | 6578 | /* |
| 6578 | 6579 | ** CAPI3REF: Virtual File System Objects |
| 6579 | 6580 | ** |
| 6580 | 6581 | ** A virtual filesystem (VFS) is an [sqlite3_vfs] object |
| @@ -6601,13 +6602,13 @@ | ||
| 6601 | 6602 | ** |
| 6602 | 6603 | ** ^Unregister a VFS with the sqlite3_vfs_unregister() interface. |
| 6603 | 6604 | ** ^(If the default VFS is unregistered, another VFS is chosen as |
| 6604 | 6605 | ** the default. The choice for the new VFS is arbitrary.)^ |
| 6605 | 6606 | */ |
| 6606 | -SQLITE_API sqlite3_vfs *SQLITE_APICALL sqlite3_vfs_find(const char *zVfsName); | |
| 6607 | -SQLITE_API int SQLITE_APICALL sqlite3_vfs_register(sqlite3_vfs*, int makeDflt); | |
| 6608 | -SQLITE_API int SQLITE_APICALL sqlite3_vfs_unregister(sqlite3_vfs*); | |
| 6607 | +SQLITE_API sqlite3_vfs *SQLITE_STDCALL sqlite3_vfs_find(const char *zVfsName); | |
| 6608 | +SQLITE_API int SQLITE_STDCALL sqlite3_vfs_register(sqlite3_vfs*, int makeDflt); | |
| 6609 | +SQLITE_API int SQLITE_STDCALL sqlite3_vfs_unregister(sqlite3_vfs*); | |
| 6609 | 6610 | |
| 6610 | 6611 | /* |
| 6611 | 6612 | ** CAPI3REF: Mutexes |
| 6612 | 6613 | ** |
| 6613 | 6614 | ** The SQLite core uses these routines for thread |
| @@ -6719,15 +6720,15 @@ | ||
| 6719 | 6720 | ** sqlite3_mutex_leave() is a NULL pointer, then all three routines |
| 6720 | 6721 | ** behave as no-ops. |
| 6721 | 6722 | ** |
| 6722 | 6723 | ** See also: [sqlite3_mutex_held()] and [sqlite3_mutex_notheld()]. |
| 6723 | 6724 | */ |
| 6724 | -SQLITE_API sqlite3_mutex *SQLITE_APICALL sqlite3_mutex_alloc(int); | |
| 6725 | -SQLITE_API void SQLITE_APICALL sqlite3_mutex_free(sqlite3_mutex*); | |
| 6726 | -SQLITE_API void SQLITE_APICALL sqlite3_mutex_enter(sqlite3_mutex*); | |
| 6727 | -SQLITE_API int SQLITE_APICALL sqlite3_mutex_try(sqlite3_mutex*); | |
| 6728 | -SQLITE_API void SQLITE_APICALL sqlite3_mutex_leave(sqlite3_mutex*); | |
| 6725 | +SQLITE_API sqlite3_mutex *SQLITE_STDCALL sqlite3_mutex_alloc(int); | |
| 6726 | +SQLITE_API void SQLITE_STDCALL sqlite3_mutex_free(sqlite3_mutex*); | |
| 6727 | +SQLITE_API void SQLITE_STDCALL sqlite3_mutex_enter(sqlite3_mutex*); | |
| 6728 | +SQLITE_API int SQLITE_STDCALL sqlite3_mutex_try(sqlite3_mutex*); | |
| 6729 | +SQLITE_API void SQLITE_STDCALL sqlite3_mutex_leave(sqlite3_mutex*); | |
| 6729 | 6730 | |
| 6730 | 6731 | /* |
| 6731 | 6732 | ** CAPI3REF: Mutex Methods Object |
| 6732 | 6733 | ** |
| 6733 | 6734 | ** An instance of this structure defines the low-level routines |
| @@ -6792,19 +6793,19 @@ | ||
| 6792 | 6793 | ** If xMutexInit fails in any way, it is expected to clean up after itself |
| 6793 | 6794 | ** prior to returning. |
| 6794 | 6795 | */ |
| 6795 | 6796 | typedef struct sqlite3_mutex_methods sqlite3_mutex_methods; |
| 6796 | 6797 | struct sqlite3_mutex_methods { |
| 6797 | - int (SQLITE_CALLBACK *xMutexInit)(void); | |
| 6798 | - int (SQLITE_CALLBACK *xMutexEnd)(void); | |
| 6799 | - sqlite3_mutex *(SQLITE_CALLBACK *xMutexAlloc)(int); | |
| 6800 | - void (SQLITE_CALLBACK *xMutexFree)(sqlite3_mutex *); | |
| 6801 | - void (SQLITE_CALLBACK *xMutexEnter)(sqlite3_mutex *); | |
| 6802 | - int (SQLITE_CALLBACK *xMutexTry)(sqlite3_mutex *); | |
| 6803 | - void (SQLITE_CALLBACK *xMutexLeave)(sqlite3_mutex *); | |
| 6804 | - int (SQLITE_CALLBACK *xMutexHeld)(sqlite3_mutex *); | |
| 6805 | - int (SQLITE_CALLBACK *xMutexNotheld)(sqlite3_mutex *); | |
| 6798 | + int (*xMutexInit)(void); | |
| 6799 | + int (*xMutexEnd)(void); | |
| 6800 | + sqlite3_mutex *(*xMutexAlloc)(int); | |
| 6801 | + void (*xMutexFree)(sqlite3_mutex *); | |
| 6802 | + void (*xMutexEnter)(sqlite3_mutex *); | |
| 6803 | + int (*xMutexTry)(sqlite3_mutex *); | |
| 6804 | + void (*xMutexLeave)(sqlite3_mutex *); | |
| 6805 | + int (*xMutexHeld)(sqlite3_mutex *); | |
| 6806 | + int (*xMutexNotheld)(sqlite3_mutex *); | |
| 6806 | 6807 | }; |
| 6807 | 6808 | |
| 6808 | 6809 | /* |
| 6809 | 6810 | ** CAPI3REF: Mutex Verification Routines |
| 6810 | 6811 | ** |
| @@ -6833,12 +6834,12 @@ | ||
| 6833 | 6834 | ** call to sqlite3_mutex_held() to fail, so a non-zero return is |
| 6834 | 6835 | ** the appropriate thing to do. The sqlite3_mutex_notheld() |
| 6835 | 6836 | ** interface should also return 1 when given a NULL pointer. |
| 6836 | 6837 | */ |
| 6837 | 6838 | #ifndef NDEBUG |
| 6838 | -SQLITE_API int SQLITE_APICALL sqlite3_mutex_held(sqlite3_mutex*); | |
| 6839 | -SQLITE_API int SQLITE_APICALL sqlite3_mutex_notheld(sqlite3_mutex*); | |
| 6839 | +SQLITE_API int SQLITE_STDCALL sqlite3_mutex_held(sqlite3_mutex*); | |
| 6840 | +SQLITE_API int SQLITE_STDCALL sqlite3_mutex_notheld(sqlite3_mutex*); | |
| 6840 | 6841 | #endif |
| 6841 | 6842 | |
| 6842 | 6843 | /* |
| 6843 | 6844 | ** CAPI3REF: Mutex Types |
| 6844 | 6845 | ** |
| @@ -6874,11 +6875,11 @@ | ||
| 6874 | 6875 | ** serializes access to the [database connection] given in the argument |
| 6875 | 6876 | ** when the [threading mode] is Serialized. |
| 6876 | 6877 | ** ^If the [threading mode] is Single-thread or Multi-thread then this |
| 6877 | 6878 | ** routine returns a NULL pointer. |
| 6878 | 6879 | */ |
| 6879 | -SQLITE_API sqlite3_mutex *SQLITE_APICALL sqlite3_db_mutex(sqlite3*); | |
| 6880 | +SQLITE_API sqlite3_mutex *SQLITE_STDCALL sqlite3_db_mutex(sqlite3*); | |
| 6880 | 6881 | |
| 6881 | 6882 | /* |
| 6882 | 6883 | ** CAPI3REF: Low-Level Control Of Database Files |
| 6883 | 6884 | ** METHOD: sqlite3 |
| 6884 | 6885 | ** |
| @@ -6909,11 +6910,11 @@ | ||
| 6909 | 6910 | ** an incorrect zDbName and an SQLITE_ERROR return from the underlying |
| 6910 | 6911 | ** xFileControl method. |
| 6911 | 6912 | ** |
| 6912 | 6913 | ** See also: [SQLITE_FCNTL_LOCKSTATE] |
| 6913 | 6914 | */ |
| 6914 | -SQLITE_API int SQLITE_APICALL sqlite3_file_control(sqlite3*, const char *zDbName, int op, void*); | |
| 6915 | +SQLITE_API int SQLITE_STDCALL sqlite3_file_control(sqlite3*, const char *zDbName, int op, void*); | |
| 6915 | 6916 | |
| 6916 | 6917 | /* |
| 6917 | 6918 | ** CAPI3REF: Testing Interface |
| 6918 | 6919 | ** |
| 6919 | 6920 | ** ^The sqlite3_test_control() interface is used to read out internal |
| @@ -6991,12 +6992,12 @@ | ||
| 6991 | 6992 | ** be represented by a 32-bit integer, then the values returned by |
| 6992 | 6993 | ** sqlite3_status() are undefined. |
| 6993 | 6994 | ** |
| 6994 | 6995 | ** See also: [sqlite3_db_status()] |
| 6995 | 6996 | */ |
| 6996 | -SQLITE_API int SQLITE_APICALL sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag); | |
| 6997 | -SQLITE_API int SQLITE_APICALL sqlite3_status64( | |
| 6997 | +SQLITE_API int SQLITE_STDCALL sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag); | |
| 6998 | +SQLITE_API int SQLITE_STDCALL sqlite3_status64( | |
| 6998 | 6999 | int op, |
| 6999 | 7000 | sqlite3_int64 *pCurrent, |
| 7000 | 7001 | sqlite3_int64 *pHighwater, |
| 7001 | 7002 | int resetFlag |
| 7002 | 7003 | ); |
| @@ -7117,11 +7118,11 @@ | ||
| 7117 | 7118 | ** ^The sqlite3_db_status() routine returns SQLITE_OK on success and a |
| 7118 | 7119 | ** non-zero [error code] on failure. |
| 7119 | 7120 | ** |
| 7120 | 7121 | ** See also: [sqlite3_status()] and [sqlite3_stmt_status()]. |
| 7121 | 7122 | */ |
| 7122 | -SQLITE_API int SQLITE_APICALL sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int resetFlg); | |
| 7123 | +SQLITE_API int SQLITE_STDCALL sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int resetFlg); | |
| 7123 | 7124 | |
| 7124 | 7125 | /* |
| 7125 | 7126 | ** CAPI3REF: Status Parameters for database connections |
| 7126 | 7127 | ** KEYWORDS: {SQLITE_DBSTATUS options} |
| 7127 | 7128 | ** |
| @@ -7260,11 +7261,11 @@ | ||
| 7260 | 7261 | ** ^If the resetFlg is true, then the counter is reset to zero after this |
| 7261 | 7262 | ** interface call returns. |
| 7262 | 7263 | ** |
| 7263 | 7264 | ** See also: [sqlite3_status()] and [sqlite3_db_status()]. |
| 7264 | 7265 | */ |
| 7265 | -SQLITE_API int SQLITE_APICALL sqlite3_stmt_status(sqlite3_stmt*, int op,int resetFlg); | |
| 7266 | +SQLITE_API int SQLITE_STDCALL sqlite3_stmt_status(sqlite3_stmt*, int op,int resetFlg); | |
| 7266 | 7267 | |
| 7267 | 7268 | /* |
| 7268 | 7269 | ** CAPI3REF: Status Parameters for prepared statements |
| 7269 | 7270 | ** KEYWORDS: {SQLITE_STMTSTATUS counter} {SQLITE_STMTSTATUS counters} |
| 7270 | 7271 | ** |
| @@ -7496,22 +7497,22 @@ | ||
| 7496 | 7497 | */ |
| 7497 | 7498 | typedef struct sqlite3_pcache_methods2 sqlite3_pcache_methods2; |
| 7498 | 7499 | struct sqlite3_pcache_methods2 { |
| 7499 | 7500 | int iVersion; |
| 7500 | 7501 | void *pArg; |
| 7501 | - int (SQLITE_CALLBACK *xInit)(void*); | |
| 7502 | - void (SQLITE_CALLBACK *xShutdown)(void*); | |
| 7503 | - sqlite3_pcache *(SQLITE_CALLBACK *xCreate)(int szPage, int szExtra, int bPurgeable); | |
| 7504 | - void (SQLITE_CALLBACK *xCachesize)(sqlite3_pcache*, int nCachesize); | |
| 7505 | - int (SQLITE_CALLBACK *xPagecount)(sqlite3_pcache*); | |
| 7506 | - sqlite3_pcache_page *(SQLITE_CALLBACK *xFetch)(sqlite3_pcache*, unsigned key, int createFlag); | |
| 7507 | - void (SQLITE_CALLBACK *xUnpin)(sqlite3_pcache*, sqlite3_pcache_page*, int discard); | |
| 7508 | - void (SQLITE_CALLBACK *xRekey)(sqlite3_pcache*, sqlite3_pcache_page*, | |
| 7502 | + int (*xInit)(void*); | |
| 7503 | + void (*xShutdown)(void*); | |
| 7504 | + sqlite3_pcache *(*xCreate)(int szPage, int szExtra, int bPurgeable); | |
| 7505 | + void (*xCachesize)(sqlite3_pcache*, int nCachesize); | |
| 7506 | + int (*xPagecount)(sqlite3_pcache*); | |
| 7507 | + sqlite3_pcache_page *(*xFetch)(sqlite3_pcache*, unsigned key, int createFlag); | |
| 7508 | + void (*xUnpin)(sqlite3_pcache*, sqlite3_pcache_page*, int discard); | |
| 7509 | + void (*xRekey)(sqlite3_pcache*, sqlite3_pcache_page*, | |
| 7509 | 7510 | unsigned oldKey, unsigned newKey); |
| 7510 | - void (SQLITE_CALLBACK *xTruncate)(sqlite3_pcache*, unsigned iLimit); | |
| 7511 | - void (SQLITE_CALLBACK *xDestroy)(sqlite3_pcache*); | |
| 7512 | - void (SQLITE_CALLBACK *xShrink)(sqlite3_pcache*); | |
| 7511 | + void (*xTruncate)(sqlite3_pcache*, unsigned iLimit); | |
| 7512 | + void (*xDestroy)(sqlite3_pcache*); | |
| 7513 | + void (*xShrink)(sqlite3_pcache*); | |
| 7513 | 7514 | }; |
| 7514 | 7515 | |
| 7515 | 7516 | /* |
| 7516 | 7517 | ** This is the obsolete pcache_methods object that has now been replaced |
| 7517 | 7518 | ** by sqlite3_pcache_methods2. This object is not used by SQLite. It is |
| @@ -7518,20 +7519,20 @@ | ||
| 7518 | 7519 | ** retained in the header file for backwards compatibility only. |
| 7519 | 7520 | */ |
| 7520 | 7521 | typedef struct sqlite3_pcache_methods sqlite3_pcache_methods; |
| 7521 | 7522 | struct sqlite3_pcache_methods { |
| 7522 | 7523 | void *pArg; |
| 7523 | - int (SQLITE_CALLBACK *xInit)(void*); | |
| 7524 | - void (SQLITE_CALLBACK *xShutdown)(void*); | |
| 7525 | - sqlite3_pcache *(SQLITE_CALLBACK *xCreate)(int szPage, int bPurgeable); | |
| 7526 | - void (SQLITE_CALLBACK *xCachesize)(sqlite3_pcache*, int nCachesize); | |
| 7527 | - int (SQLITE_CALLBACK *xPagecount)(sqlite3_pcache*); | |
| 7528 | - void *(SQLITE_CALLBACK *xFetch)(sqlite3_pcache*, unsigned key, int createFlag); | |
| 7529 | - void (SQLITE_CALLBACK *xUnpin)(sqlite3_pcache*, void*, int discard); | |
| 7530 | - void (SQLITE_CALLBACK *xRekey)(sqlite3_pcache*, void*, unsigned oldKey, unsigned newKey); | |
| 7531 | - void (SQLITE_CALLBACK *xTruncate)(sqlite3_pcache*, unsigned iLimit); | |
| 7532 | - void (SQLITE_CALLBACK *xDestroy)(sqlite3_pcache*); | |
| 7524 | + int (*xInit)(void*); | |
| 7525 | + void (*xShutdown)(void*); | |
| 7526 | + sqlite3_pcache *(*xCreate)(int szPage, int bPurgeable); | |
| 7527 | + void (*xCachesize)(sqlite3_pcache*, int nCachesize); | |
| 7528 | + int (*xPagecount)(sqlite3_pcache*); | |
| 7529 | + void *(*xFetch)(sqlite3_pcache*, unsigned key, int createFlag); | |
| 7530 | + void (*xUnpin)(sqlite3_pcache*, void*, int discard); | |
| 7531 | + void (*xRekey)(sqlite3_pcache*, void*, unsigned oldKey, unsigned newKey); | |
| 7532 | + void (*xTruncate)(sqlite3_pcache*, unsigned iLimit); | |
| 7533 | + void (*xDestroy)(sqlite3_pcache*); | |
| 7533 | 7534 | }; |
| 7534 | 7535 | |
| 7535 | 7536 | |
| 7536 | 7537 | /* |
| 7537 | 7538 | ** CAPI3REF: Online Backup Object |
| @@ -7729,20 +7730,20 @@ | ||
| 7729 | 7730 | ** However, the sqlite3_backup_remaining() and sqlite3_backup_pagecount() |
| 7730 | 7731 | ** APIs are not strictly speaking threadsafe. If they are invoked at the |
| 7731 | 7732 | ** same time as another thread is invoking sqlite3_backup_step() it is |
| 7732 | 7733 | ** possible that they return invalid values. |
| 7733 | 7734 | */ |
| 7734 | -SQLITE_API sqlite3_backup *SQLITE_APICALL sqlite3_backup_init( | |
| 7735 | +SQLITE_API sqlite3_backup *SQLITE_STDCALL sqlite3_backup_init( | |
| 7735 | 7736 | sqlite3 *pDest, /* Destination database handle */ |
| 7736 | 7737 | const char *zDestName, /* Destination database name */ |
| 7737 | 7738 | sqlite3 *pSource, /* Source database handle */ |
| 7738 | 7739 | const char *zSourceName /* Source database name */ |
| 7739 | 7740 | ); |
| 7740 | -SQLITE_API int SQLITE_APICALL sqlite3_backup_step(sqlite3_backup *p, int nPage); | |
| 7741 | -SQLITE_API int SQLITE_APICALL sqlite3_backup_finish(sqlite3_backup *p); | |
| 7742 | -SQLITE_API int SQLITE_APICALL sqlite3_backup_remaining(sqlite3_backup *p); | |
| 7743 | -SQLITE_API int SQLITE_APICALL sqlite3_backup_pagecount(sqlite3_backup *p); | |
| 7741 | +SQLITE_API int SQLITE_STDCALL sqlite3_backup_step(sqlite3_backup *p, int nPage); | |
| 7742 | +SQLITE_API int SQLITE_STDCALL sqlite3_backup_finish(sqlite3_backup *p); | |
| 7743 | +SQLITE_API int SQLITE_STDCALL sqlite3_backup_remaining(sqlite3_backup *p); | |
| 7744 | +SQLITE_API int SQLITE_STDCALL sqlite3_backup_pagecount(sqlite3_backup *p); | |
| 7744 | 7745 | |
| 7745 | 7746 | /* |
| 7746 | 7747 | ** CAPI3REF: Unlock Notification |
| 7747 | 7748 | ** METHOD: sqlite3 |
| 7748 | 7749 | ** |
| @@ -7855,13 +7856,13 @@ | ||
| 7855 | 7856 | ** by an sqlite3_step() call. ^(If there is a blocking connection, then the |
| 7856 | 7857 | ** extended error code is set to SQLITE_LOCKED_SHAREDCACHE. Otherwise, in |
| 7857 | 7858 | ** the special "DROP TABLE/INDEX" case, the extended error code is just |
| 7858 | 7859 | ** SQLITE_LOCKED.)^ |
| 7859 | 7860 | */ |
| 7860 | -SQLITE_API int SQLITE_APICALL sqlite3_unlock_notify( | |
| 7861 | +SQLITE_API int SQLITE_STDCALL sqlite3_unlock_notify( | |
| 7861 | 7862 | sqlite3 *pBlocked, /* Waiting connection */ |
| 7862 | - void (SQLITE_CALLBACK *xNotify)(void **apArg, int nArg), /* Callback function to invoke */ | |
| 7863 | + void (*xNotify)(void **apArg, int nArg), /* Callback function to invoke */ | |
| 7863 | 7864 | void *pNotifyArg /* Argument to pass to xNotify */ |
| 7864 | 7865 | ); |
| 7865 | 7866 | |
| 7866 | 7867 | |
| 7867 | 7868 | /* |
| @@ -7870,12 +7871,12 @@ | ||
| 7870 | 7871 | ** ^The [sqlite3_stricmp()] and [sqlite3_strnicmp()] APIs allow applications |
| 7871 | 7872 | ** and extensions to compare the contents of two buffers containing UTF-8 |
| 7872 | 7873 | ** strings in a case-independent fashion, using the same definition of "case |
| 7873 | 7874 | ** independence" that SQLite uses internally when comparing identifiers. |
| 7874 | 7875 | */ |
| 7875 | -SQLITE_API int SQLITE_APICALL sqlite3_stricmp(const char *, const char *); | |
| 7876 | -SQLITE_API int SQLITE_APICALL sqlite3_strnicmp(const char *, const char *, int); | |
| 7876 | +SQLITE_API int SQLITE_STDCALL sqlite3_stricmp(const char *, const char *); | |
| 7877 | +SQLITE_API int SQLITE_STDCALL sqlite3_strnicmp(const char *, const char *, int); | |
| 7877 | 7878 | |
| 7878 | 7879 | /* |
| 7879 | 7880 | ** CAPI3REF: String Globbing |
| 7880 | 7881 | * |
| 7881 | 7882 | ** ^The [sqlite3_strglob(P,X)] interface returns zero if and only if |
| @@ -7888,11 +7889,11 @@ | ||
| 7888 | 7889 | ** Note that this routine returns zero on a match and non-zero if the strings |
| 7889 | 7890 | ** do not match, the same as [sqlite3_stricmp()] and [sqlite3_strnicmp()]. |
| 7890 | 7891 | ** |
| 7891 | 7892 | ** See also: [sqlite3_strlike()]. |
| 7892 | 7893 | */ |
| 7893 | -SQLITE_API int SQLITE_APICALL sqlite3_strglob(const char *zGlob, const char *zStr); | |
| 7894 | +SQLITE_API int SQLITE_STDCALL sqlite3_strglob(const char *zGlob, const char *zStr); | |
| 7894 | 7895 | |
| 7895 | 7896 | /* |
| 7896 | 7897 | ** CAPI3REF: String LIKE Matching |
| 7897 | 7898 | * |
| 7898 | 7899 | ** ^The [sqlite3_strlike(P,X,E)] interface returns zero if and only if |
| @@ -7911,11 +7912,11 @@ | ||
| 7911 | 7912 | ** Note that this routine returns zero on a match and non-zero if the strings |
| 7912 | 7913 | ** do not match, the same as [sqlite3_stricmp()] and [sqlite3_strnicmp()]. |
| 7913 | 7914 | ** |
| 7914 | 7915 | ** See also: [sqlite3_strglob()]. |
| 7915 | 7916 | */ |
| 7916 | -SQLITE_API int SQLITE_APICALL sqlite3_strlike(const char *zGlob, const char *zStr, unsigned int cEsc); | |
| 7917 | +SQLITE_API int SQLITE_STDCALL sqlite3_strlike(const char *zGlob, const char *zStr, unsigned int cEsc); | |
| 7917 | 7918 | |
| 7918 | 7919 | /* |
| 7919 | 7920 | ** CAPI3REF: Error Logging Interface |
| 7920 | 7921 | ** |
| 7921 | 7922 | ** ^The [sqlite3_log()] interface writes a message into the [error log] |
| @@ -7970,13 +7971,13 @@ | ||
| 7970 | 7971 | ** previously registered write-ahead log callback. ^Note that the |
| 7971 | 7972 | ** [sqlite3_wal_autocheckpoint()] interface and the |
| 7972 | 7973 | ** [wal_autocheckpoint pragma] both invoke [sqlite3_wal_hook()] and will |
| 7973 | 7974 | ** overwrite any prior [sqlite3_wal_hook()] settings. |
| 7974 | 7975 | */ |
| 7975 | -SQLITE_API void *SQLITE_APICALL sqlite3_wal_hook( | |
| 7976 | +SQLITE_API void *SQLITE_STDCALL sqlite3_wal_hook( | |
| 7976 | 7977 | sqlite3*, |
| 7977 | - int(SQLITE_CALLBACK *)(void *,sqlite3*,const char*,int), | |
| 7978 | + int(*)(void *,sqlite3*,const char*,int), | |
| 7978 | 7979 | void* |
| 7979 | 7980 | ); |
| 7980 | 7981 | |
| 7981 | 7982 | /* |
| 7982 | 7983 | ** CAPI3REF: Configure an auto-checkpoint |
| @@ -8005,11 +8006,11 @@ | ||
| 8005 | 8006 | ** enabled with a threshold of 1000 or [SQLITE_DEFAULT_WAL_AUTOCHECKPOINT] |
| 8006 | 8007 | ** pages. The use of this interface |
| 8007 | 8008 | ** is only necessary if the default setting is found to be suboptimal |
| 8008 | 8009 | ** for a particular application. |
| 8009 | 8010 | */ |
| 8010 | -SQLITE_API int SQLITE_APICALL sqlite3_wal_autocheckpoint(sqlite3 *db, int N); | |
| 8011 | +SQLITE_API int SQLITE_STDCALL sqlite3_wal_autocheckpoint(sqlite3 *db, int N); | |
| 8011 | 8012 | |
| 8012 | 8013 | /* |
| 8013 | 8014 | ** CAPI3REF: Checkpoint a database |
| 8014 | 8015 | ** METHOD: sqlite3 |
| 8015 | 8016 | ** |
| @@ -8027,11 +8028,11 @@ | ||
| 8027 | 8028 | ** interface was added. This interface is retained for backwards |
| 8028 | 8029 | ** compatibility and as a convenience for applications that need to manually |
| 8029 | 8030 | ** start a callback but which do not need the full power (and corresponding |
| 8030 | 8031 | ** complication) of [sqlite3_wal_checkpoint_v2()]. |
| 8031 | 8032 | */ |
| 8032 | -SQLITE_API int SQLITE_APICALL sqlite3_wal_checkpoint(sqlite3 *db, const char *zDb); | |
| 8033 | +SQLITE_API int SQLITE_STDCALL sqlite3_wal_checkpoint(sqlite3 *db, const char *zDb); | |
| 8033 | 8034 | |
| 8034 | 8035 | /* |
| 8035 | 8036 | ** CAPI3REF: Checkpoint a database |
| 8036 | 8037 | ** METHOD: sqlite3 |
| 8037 | 8038 | ** |
| @@ -8121,11 +8122,11 @@ | ||
| 8121 | 8122 | ** [sqlite3_errcode()] and [sqlite3_errmsg()]. |
| 8122 | 8123 | ** |
| 8123 | 8124 | ** ^The [PRAGMA wal_checkpoint] command can be used to invoke this interface |
| 8124 | 8125 | ** from SQL. |
| 8125 | 8126 | */ |
| 8126 | -SQLITE_API int SQLITE_APICALL sqlite3_wal_checkpoint_v2( | |
| 8127 | +SQLITE_API int SQLITE_STDCALL sqlite3_wal_checkpoint_v2( | |
| 8127 | 8128 | sqlite3 *db, /* Database handle */ |
| 8128 | 8129 | const char *zDb, /* Name of attached database (or NULL) */ |
| 8129 | 8130 | int eMode, /* SQLITE_CHECKPOINT_* value */ |
| 8130 | 8131 | int *pnLog, /* OUT: Size of WAL log in frames */ |
| 8131 | 8132 | int *pnCkpt /* OUT: Total number of frames checkpointed */ |
| @@ -8210,11 +8211,11 @@ | ||
| 8210 | 8211 | ** value returned is one of [SQLITE_ROLLBACK], [SQLITE_IGNORE], [SQLITE_FAIL], |
| 8211 | 8212 | ** [SQLITE_ABORT], or [SQLITE_REPLACE], according to the [ON CONFLICT] mode |
| 8212 | 8213 | ** of the SQL statement that triggered the call to the [xUpdate] method of the |
| 8213 | 8214 | ** [virtual table]. |
| 8214 | 8215 | */ |
| 8215 | -SQLITE_API int SQLITE_APICALL sqlite3_vtab_on_conflict(sqlite3 *); | |
| 8216 | +SQLITE_API int SQLITE_STDCALL sqlite3_vtab_on_conflict(sqlite3 *); | |
| 8216 | 8217 | |
| 8217 | 8218 | /* |
| 8218 | 8219 | ** CAPI3REF: Conflict resolution modes |
| 8219 | 8220 | ** KEYWORDS: {conflict resolution mode} |
| 8220 | 8221 | ** |
| @@ -8315,11 +8316,11 @@ | ||
| 8315 | 8316 | ** as if the loop did not exist - it returns non-zero and leave the variable |
| 8316 | 8317 | ** that pOut points to unchanged. |
| 8317 | 8318 | ** |
| 8318 | 8319 | ** See also: [sqlite3_stmt_scanstatus_reset()] |
| 8319 | 8320 | */ |
| 8320 | -SQLITE_API int SQLITE_APICALL sqlite3_stmt_scanstatus( | |
| 8321 | +SQLITE_API int SQLITE_STDCALL sqlite3_stmt_scanstatus( | |
| 8321 | 8322 | sqlite3_stmt *pStmt, /* Prepared statement for which info desired */ |
| 8322 | 8323 | int idx, /* Index of loop to report on */ |
| 8323 | 8324 | int iScanStatusOp, /* Information desired. SQLITE_SCANSTAT_* */ |
| 8324 | 8325 | void *pOut /* Result written here */ |
| 8325 | 8326 | ); |
| @@ -8331,11 +8332,11 @@ | ||
| 8331 | 8332 | ** ^Zero all [sqlite3_stmt_scanstatus()] related event counters. |
| 8332 | 8333 | ** |
| 8333 | 8334 | ** This API is only available if the library is built with pre-processor |
| 8334 | 8335 | ** symbol [SQLITE_ENABLE_STMT_SCANSTATUS] defined. |
| 8335 | 8336 | */ |
| 8336 | -SQLITE_API void SQLITE_APICALL sqlite3_stmt_scanstatus_reset(sqlite3_stmt*); | |
| 8337 | +SQLITE_API void SQLITE_STDCALL sqlite3_stmt_scanstatus_reset(sqlite3_stmt*); | |
| 8337 | 8338 | |
| 8338 | 8339 | /* |
| 8339 | 8340 | ** CAPI3REF: Flush caches to disk mid-transaction |
| 8340 | 8341 | ** |
| 8341 | 8342 | ** ^If a write-transaction is open on [database connection] D when the |
| @@ -8363,11 +8364,11 @@ | ||
| 8363 | 8364 | ** ^Otherwise, if no error occurs, [sqlite3_db_cacheflush()] returns SQLITE_OK. |
| 8364 | 8365 | ** |
| 8365 | 8366 | ** ^This function does not set the database handle error code or message |
| 8366 | 8367 | ** returned by the [sqlite3_errcode()] and [sqlite3_errmsg()] functions. |
| 8367 | 8368 | */ |
| 8368 | -SQLITE_API int SQLITE_APICALL sqlite3_db_cacheflush(sqlite3*); | |
| 8369 | +SQLITE_API int SQLITE_STDCALL sqlite3_db_cacheflush(sqlite3*); | |
| 8369 | 8370 | |
| 8370 | 8371 | /* |
| 8371 | 8372 | ** CAPI3REF: The pre-update hook. |
| 8372 | 8373 | ** |
| 8373 | 8374 | ** ^These interfaces are only available if SQLite is compiled using the |
| @@ -8443,13 +8444,13 @@ | ||
| 8443 | 8444 | ** triggers; or 2 for changes resulting from triggers called by top-level |
| 8444 | 8445 | ** triggers; and so forth. |
| 8445 | 8446 | ** |
| 8446 | 8447 | ** See also: [sqlite3_update_hook()] |
| 8447 | 8448 | */ |
| 8448 | -SQLITE_API SQLITE_EXPERIMENTAL void *SQLITE_APICALL sqlite3_preupdate_hook( | |
| 8449 | +SQLITE_API SQLITE_EXPERIMENTAL void *SQLITE_STDCALL sqlite3_preupdate_hook( | |
| 8449 | 8450 | sqlite3 *db, |
| 8450 | - void(SQLITE_CALLBACK *xPreUpdate)( | |
| 8451 | + void(*xPreUpdate)( | |
| 8451 | 8452 | void *pCtx, /* Copy of third arg to preupdate_hook() */ |
| 8452 | 8453 | sqlite3 *db, /* Database handle */ |
| 8453 | 8454 | int op, /* SQLITE_UPDATE, DELETE or INSERT */ |
| 8454 | 8455 | char const *zDb, /* Database name */ |
| 8455 | 8456 | char const *zName, /* Table name */ |
| @@ -8456,14 +8457,14 @@ | ||
| 8456 | 8457 | sqlite3_int64 iKey1, /* Rowid of row about to be deleted/updated */ |
| 8457 | 8458 | sqlite3_int64 iKey2 /* New rowid value (for a rowid UPDATE) */ |
| 8458 | 8459 | ), |
| 8459 | 8460 | void* |
| 8460 | 8461 | ); |
| 8461 | -SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_APICALL sqlite3_preupdate_old(sqlite3 *, int, sqlite3_value **); | |
| 8462 | -SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_APICALL sqlite3_preupdate_count(sqlite3 *); | |
| 8463 | -SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_APICALL sqlite3_preupdate_depth(sqlite3 *); | |
| 8464 | -SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_APICALL sqlite3_preupdate_new(sqlite3 *, int, sqlite3_value **); | |
| 8462 | +SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_preupdate_old(sqlite3 *, int, sqlite3_value **); | |
| 8463 | +SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_preupdate_count(sqlite3 *); | |
| 8464 | +SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_preupdate_depth(sqlite3 *); | |
| 8465 | +SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_preupdate_new(sqlite3 *, int, sqlite3_value **); | |
| 8465 | 8466 | |
| 8466 | 8467 | /* |
| 8467 | 8468 | ** CAPI3REF: Low-level system error code |
| 8468 | 8469 | ** |
| 8469 | 8470 | ** ^Attempt to return the underlying operating system error code or error |
| @@ -8471,11 +8472,11 @@ | ||
| 8471 | 8472 | ** The return value is OS-dependent. For example, on unix systems, after |
| 8472 | 8473 | ** [sqlite3_open_v2()] returns [SQLITE_CANTOPEN], this interface could be |
| 8473 | 8474 | ** called to get back the underlying "errno" that caused the problem, such |
| 8474 | 8475 | ** as ENOSPC, EAUTH, EISDIR, and so forth. |
| 8475 | 8476 | */ |
| 8476 | -SQLITE_API int SQLITE_APICALL sqlite3_system_errno(sqlite3*); | |
| 8477 | +SQLITE_API int SQLITE_STDCALL sqlite3_system_errno(sqlite3*); | |
| 8477 | 8478 | |
| 8478 | 8479 | /* |
| 8479 | 8480 | ** CAPI3REF: Database Snapshot |
| 8480 | 8481 | ** KEYWORDS: {snapshot} |
| 8481 | 8482 | ** EXPERIMENTAL |
| @@ -8521,11 +8522,11 @@ | ||
| 8521 | 8522 | ** to avoid a memory leak. |
| 8522 | 8523 | ** |
| 8523 | 8524 | ** The [sqlite3_snapshot_get()] interface is only available when the |
| 8524 | 8525 | ** SQLITE_ENABLE_SNAPSHOT compile-time option is used. |
| 8525 | 8526 | */ |
| 8526 | -SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_APICALL sqlite3_snapshot_get( | |
| 8527 | +SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_snapshot_get( | |
| 8527 | 8528 | sqlite3 *db, |
| 8528 | 8529 | const char *zSchema, |
| 8529 | 8530 | sqlite3_snapshot **ppSnapshot |
| 8530 | 8531 | ); |
| 8531 | 8532 | |
| @@ -8559,11 +8560,11 @@ | ||
| 8559 | 8560 | ** database connection in order to make it ready to use snapshots.) |
| 8560 | 8561 | ** |
| 8561 | 8562 | ** The [sqlite3_snapshot_open()] interface is only available when the |
| 8562 | 8563 | ** SQLITE_ENABLE_SNAPSHOT compile-time option is used. |
| 8563 | 8564 | */ |
| 8564 | -SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_APICALL sqlite3_snapshot_open( | |
| 8565 | +SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_snapshot_open( | |
| 8565 | 8566 | sqlite3 *db, |
| 8566 | 8567 | const char *zSchema, |
| 8567 | 8568 | sqlite3_snapshot *pSnapshot |
| 8568 | 8569 | ); |
| 8569 | 8570 | |
| @@ -8576,11 +8577,11 @@ | ||
| 8576 | 8577 | ** using this routine to avoid a memory leak. |
| 8577 | 8578 | ** |
| 8578 | 8579 | ** The [sqlite3_snapshot_free()] interface is only available when the |
| 8579 | 8580 | ** SQLITE_ENABLE_SNAPSHOT compile-time option is used. |
| 8580 | 8581 | */ |
| 8581 | -SQLITE_API SQLITE_EXPERIMENTAL void SQLITE_APICALL sqlite3_snapshot_free(sqlite3_snapshot*); | |
| 8582 | +SQLITE_API SQLITE_EXPERIMENTAL void SQLITE_STDCALL sqlite3_snapshot_free(sqlite3_snapshot*); | |
| 8582 | 8583 | |
| 8583 | 8584 | /* |
| 8584 | 8585 | ** CAPI3REF: Compare the ages of two snapshot handles. |
| 8585 | 8586 | ** EXPERIMENTAL |
| 8586 | 8587 | ** |
| @@ -8600,11 +8601,11 @@ | ||
| 8600 | 8601 | ** |
| 8601 | 8602 | ** Otherwise, this API returns a negative value if P1 refers to an older |
| 8602 | 8603 | ** snapshot than P2, zero if the two handles refer to the same database |
| 8603 | 8604 | ** snapshot, and a positive value if P1 is a newer snapshot than P2. |
| 8604 | 8605 | */ |
| 8605 | -SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_APICALL sqlite3_snapshot_cmp( | |
| 8606 | +SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_snapshot_cmp( | |
| 8606 | 8607 | sqlite3_snapshot *p1, |
| 8607 | 8608 | sqlite3_snapshot *p2 |
| 8608 | 8609 | ); |
| 8609 | 8610 | |
| 8610 | 8611 | /* |
| @@ -8658,14 +8659,14 @@ | ||
| 8658 | 8659 | ** Register a geometry callback named zGeom that can be used as part of an |
| 8659 | 8660 | ** R-Tree geometry query as follows: |
| 8660 | 8661 | ** |
| 8661 | 8662 | ** SELECT ... FROM <rtree> WHERE <rtree col> MATCH $zGeom(... params ...) |
| 8662 | 8663 | */ |
| 8663 | -SQLITE_API int SQLITE_APICALL sqlite3_rtree_geometry_callback( | |
| 8664 | +SQLITE_API int SQLITE_STDCALL sqlite3_rtree_geometry_callback( | |
| 8664 | 8665 | sqlite3 *db, |
| 8665 | 8666 | const char *zGeom, |
| 8666 | - int (SQLITE_CALLBACK *xGeom)(sqlite3_rtree_geometry*, int, sqlite3_rtree_dbl*,int*), | |
| 8667 | + int (*xGeom)(sqlite3_rtree_geometry*, int, sqlite3_rtree_dbl*,int*), | |
| 8667 | 8668 | void *pContext |
| 8668 | 8669 | ); |
| 8669 | 8670 | |
| 8670 | 8671 | |
| 8671 | 8672 | /* |
| @@ -8675,25 +8676,25 @@ | ||
| 8675 | 8676 | struct sqlite3_rtree_geometry { |
| 8676 | 8677 | void *pContext; /* Copy of pContext passed to s_r_g_c() */ |
| 8677 | 8678 | int nParam; /* Size of array aParam[] */ |
| 8678 | 8679 | sqlite3_rtree_dbl *aParam; /* Parameters passed to SQL geom function */ |
| 8679 | 8680 | void *pUser; /* Callback implementation user data */ |
| 8680 | - void (SQLITE_CALLBACK *xDelUser)(void *); /* Called by SQLite to clean up pUser */ | |
| 8681 | + void (*xDelUser)(void *); /* Called by SQLite to clean up pUser */ | |
| 8681 | 8682 | }; |
| 8682 | 8683 | |
| 8683 | 8684 | /* |
| 8684 | 8685 | ** Register a 2nd-generation geometry callback named zScore that can be |
| 8685 | 8686 | ** used as part of an R-Tree geometry query as follows: |
| 8686 | 8687 | ** |
| 8687 | 8688 | ** SELECT ... FROM <rtree> WHERE <rtree col> MATCH $zQueryFunc(... params ...) |
| 8688 | 8689 | */ |
| 8689 | -SQLITE_API int SQLITE_APICALL sqlite3_rtree_query_callback( | |
| 8690 | +SQLITE_API int SQLITE_STDCALL sqlite3_rtree_query_callback( | |
| 8690 | 8691 | sqlite3 *db, |
| 8691 | 8692 | const char *zQueryFunc, |
| 8692 | - int (SQLITE_CALLBACK *xQueryFunc)(sqlite3_rtree_query_info*), | |
| 8693 | + int (*xQueryFunc)(sqlite3_rtree_query_info*), | |
| 8693 | 8694 | void *pContext, |
| 8694 | - void (SQLITE_CALLBACK *xDestructor)(void*) | |
| 8695 | + void (*xDestructor)(void*) | |
| 8695 | 8696 | ); |
| 8696 | 8697 | |
| 8697 | 8698 | |
| 8698 | 8699 | /* |
| 8699 | 8700 | ** A pointer to a structure of the following type is passed as the |
| @@ -8707,11 +8708,11 @@ | ||
| 8707 | 8708 | struct sqlite3_rtree_query_info { |
| 8708 | 8709 | void *pContext; /* pContext from when function registered */ |
| 8709 | 8710 | int nParam; /* Number of function parameters */ |
| 8710 | 8711 | sqlite3_rtree_dbl *aParam; /* value of function parameters */ |
| 8711 | 8712 | void *pUser; /* callback can use this, if desired */ |
| 8712 | - void (SQLITE_CALLBACK *xDelUser)(void*); /* function to free pUser */ | |
| 8713 | + void (*xDelUser)(void*); /* function to free pUser */ | |
| 8713 | 8714 | sqlite3_rtree_dbl *aCoord; /* Coordinates of node or entry to check */ |
| 8714 | 8715 | unsigned int *anQueue; /* Number of pending entries in the queue */ |
| 8715 | 8716 | int nCoord; /* Number of coordinates */ |
| 8716 | 8717 | int iLevel; /* Level of current node or entry */ |
| 8717 | 8718 | int mxLevel; /* The largest iLevel value in the tree */ |
| @@ -8903,11 +8904,11 @@ | ||
| 8903 | 8904 | ** If xFilter returns 0, changes is not tracked. Note that once a table is |
| 8904 | 8905 | ** attached, xFilter will not be called again. |
| 8905 | 8906 | */ |
| 8906 | 8907 | void sqlite3session_table_filter( |
| 8907 | 8908 | sqlite3_session *pSession, /* Session object */ |
| 8908 | - int(SQLITE_CALLBACK *xFilter)( | |
| 8909 | + int(*xFilter)( | |
| 8909 | 8910 | void *pCtx, /* Copy of third arg to _filter_table() */ |
| 8910 | 8911 | const char *zTab /* Table name */ |
| 8911 | 8912 | ), |
| 8912 | 8913 | void *pCtx /* First argument passed to xFilter */ |
| 8913 | 8914 | ); |
| @@ -9478,11 +9479,11 @@ | ||
| 9478 | 9479 | ** An sqlite3_changegroup object is used to combine two or more changesets |
| 9479 | 9480 | ** (or patchsets) into a single changeset (or patchset). A single changegroup |
| 9480 | 9481 | ** object may combine changesets or patchsets, but not both. The output is |
| 9481 | 9482 | ** always in the same format as the input. |
| 9482 | 9483 | ** |
| 9483 | -** If successful, this function returns SQLITE_OK and populates (SQLITE_CALLBACK *pp) with | |
| 9484 | +** If successful, this function returns SQLITE_OK and populates (*pp) with | |
| 9484 | 9485 | ** a pointer to a new sqlite3_changegroup object before returning. The caller |
| 9485 | 9486 | ** should eventually free the returned object using a call to |
| 9486 | 9487 | ** sqlite3changegroup_delete(). If an error occurs, an SQLite error code |
| 9487 | 9488 | ** (i.e. SQLITE_NOMEM) is returned and *pp is set to NULL. |
| 9488 | 9489 | ** |
| @@ -9598,11 +9599,11 @@ | ||
| 9598 | 9599 | ** changes for tables that do not appear in the first changeset, they are |
| 9599 | 9600 | ** appended onto the end of the output changeset, again in the order in |
| 9600 | 9601 | ** which they are first encountered. |
| 9601 | 9602 | ** |
| 9602 | 9603 | ** If an error occurs, an SQLite error code is returned and the output |
| 9603 | -** variables (SQLITE_CALLBACK *pnData) and (*ppData) are set to 0. Otherwise, SQLITE_OK | |
| 9604 | +** variables (*pnData) and (*ppData) are set to 0. Otherwise, SQLITE_OK | |
| 9604 | 9605 | ** is returned and the output variables are set to the size of and a |
| 9605 | 9606 | ** pointer to the output buffer, respectively. In this case it is the |
| 9606 | 9607 | ** responsibility of the caller to eventually free the buffer using a |
| 9607 | 9608 | ** call to sqlite3_free(). |
| 9608 | 9609 | */ |
| @@ -9755,15 +9756,15 @@ | ||
| 9755 | 9756 | */ |
| 9756 | 9757 | int sqlite3changeset_apply( |
| 9757 | 9758 | sqlite3 *db, /* Apply change to "main" db of this handle */ |
| 9758 | 9759 | int nChangeset, /* Size of changeset in bytes */ |
| 9759 | 9760 | void *pChangeset, /* Changeset blob */ |
| 9760 | - int(SQLITE_CALLBACK *xFilter)( | |
| 9761 | + int(*xFilter)( | |
| 9761 | 9762 | void *pCtx, /* Copy of sixth arg to _apply() */ |
| 9762 | 9763 | const char *zTab /* Table name */ |
| 9763 | 9764 | ), |
| 9764 | - int(SQLITE_CALLBACK *xConflict)( | |
| 9765 | + int(*xConflict)( | |
| 9765 | 9766 | void *pCtx, /* Copy of sixth arg to _apply() */ |
| 9766 | 9767 | int eConflict, /* DATA, MISSING, CONFLICT, CONSTRAINT */ |
| 9767 | 9768 | sqlite3_changeset_iter *p /* Handle describing change and conflict */ |
| 9768 | 9769 | ), |
| 9769 | 9770 | void *pCtx /* First argument passed to xConflict */ |
| @@ -9900,20 +9901,20 @@ | ||
| 9900 | 9901 | ** </pre> |
| 9901 | 9902 | ** |
| 9902 | 9903 | ** Is replaced by: |
| 9903 | 9904 | ** |
| 9904 | 9905 | ** <pre> |
| 9905 | -** int (SQLITE_CALLBACK *xInput)(void *pIn, void *pData, int *pnData), | |
| 9906 | +** int (*xInput)(void *pIn, void *pData, int *pnData), | |
| 9906 | 9907 | ** void *pIn, |
| 9907 | 9908 | ** </pre> |
| 9908 | 9909 | ** |
| 9909 | 9910 | ** Each time the xInput callback is invoked by the sessions module, the first |
| 9910 | 9911 | ** argument passed is a copy of the supplied pIn context pointer. The second |
| 9911 | -** argument, pData, points to a buffer (SQLITE_CALLBACK *pnData) bytes in size. Assuming no | |
| 9912 | -** error occurs the xInput method should copy up to (SQLITE_CALLBACK *pnData) bytes of data | |
| 9913 | -** into the buffer and set (SQLITE_CALLBACK *pnData) to the actual number of bytes copied | |
| 9914 | -** before returning SQLITE_OK. If the input is completely exhausted, (SQLITE_CALLBACK *pnData) | |
| 9912 | +** argument, pData, points to a buffer (*pnData) bytes in size. Assuming no | |
| 9913 | +** error occurs the xInput method should copy up to (*pnData) bytes of data | |
| 9914 | +** into the buffer and set (*pnData) to the actual number of bytes copied | |
| 9915 | +** before returning SQLITE_OK. If the input is completely exhausted, (*pnData) | |
| 9915 | 9916 | ** should be set to zero to indicate this. Or, if an error occurs, an SQLite |
| 9916 | 9917 | ** error code should be returned. In all cases, if an xInput callback returns |
| 9917 | 9918 | ** an error, all processing is abandoned and the streaming API function |
| 9918 | 9919 | ** returns a copy of the error code to the caller. |
| 9919 | 9920 | ** |
| @@ -9934,11 +9935,11 @@ | ||
| 9934 | 9935 | ** </pre> |
| 9935 | 9936 | ** |
| 9936 | 9937 | ** Is replaced by: |
| 9937 | 9938 | ** |
| 9938 | 9939 | ** <pre> |
| 9939 | -** int (SQLITE_CALLBACK *xOutput)(void *pOut, const void *pData, int nData), | |
| 9940 | +** int (*xOutput)(void *pOut, const void *pData, int nData), | |
| 9940 | 9941 | ** void *pOut |
| 9941 | 9942 | ** </pre> |
| 9942 | 9943 | ** |
| 9943 | 9944 | ** The xOutput callback is invoked zero or more times to return data to |
| 9944 | 9945 | ** the application. The first parameter passed to each call is a copy of the |
| @@ -9954,58 +9955,58 @@ | ||
| 9954 | 9955 | ** parameter set to a value less than or equal to zero. Other than this, |
| 9955 | 9956 | ** no guarantees are made as to the size of the chunks of data returned. |
| 9956 | 9957 | */ |
| 9957 | 9958 | int sqlite3changeset_apply_strm( |
| 9958 | 9959 | sqlite3 *db, /* Apply change to "main" db of this handle */ |
| 9959 | - int (SQLITE_CALLBACK *xInput)(void *pIn, void *pData, int *pnData), /* Input function */ | |
| 9960 | + int (*xInput)(void *pIn, void *pData, int *pnData), /* Input function */ | |
| 9960 | 9961 | void *pIn, /* First arg for xInput */ |
| 9961 | - int(SQLITE_CALLBACK *xFilter)( | |
| 9962 | + int(*xFilter)( | |
| 9962 | 9963 | void *pCtx, /* Copy of sixth arg to _apply() */ |
| 9963 | 9964 | const char *zTab /* Table name */ |
| 9964 | 9965 | ), |
| 9965 | - int(SQLITE_CALLBACK *xConflict)( | |
| 9966 | + int(*xConflict)( | |
| 9966 | 9967 | void *pCtx, /* Copy of sixth arg to _apply() */ |
| 9967 | 9968 | int eConflict, /* DATA, MISSING, CONFLICT, CONSTRAINT */ |
| 9968 | 9969 | sqlite3_changeset_iter *p /* Handle describing change and conflict */ |
| 9969 | 9970 | ), |
| 9970 | 9971 | void *pCtx /* First argument passed to xConflict */ |
| 9971 | 9972 | ); |
| 9972 | 9973 | int sqlite3changeset_concat_strm( |
| 9973 | - int (SQLITE_CALLBACK *xInputA)(void *pIn, void *pData, int *pnData), | |
| 9974 | + int (*xInputA)(void *pIn, void *pData, int *pnData), | |
| 9974 | 9975 | void *pInA, |
| 9975 | - int (SQLITE_CALLBACK *xInputB)(void *pIn, void *pData, int *pnData), | |
| 9976 | + int (*xInputB)(void *pIn, void *pData, int *pnData), | |
| 9976 | 9977 | void *pInB, |
| 9977 | - int (SQLITE_CALLBACK *xOutput)(void *pOut, const void *pData, int nData), | |
| 9978 | + int (*xOutput)(void *pOut, const void *pData, int nData), | |
| 9978 | 9979 | void *pOut |
| 9979 | 9980 | ); |
| 9980 | 9981 | int sqlite3changeset_invert_strm( |
| 9981 | - int (SQLITE_CALLBACK *xInput)(void *pIn, void *pData, int *pnData), | |
| 9982 | + int (*xInput)(void *pIn, void *pData, int *pnData), | |
| 9982 | 9983 | void *pIn, |
| 9983 | - int (SQLITE_CALLBACK *xOutput)(void *pOut, const void *pData, int nData), | |
| 9984 | + int (*xOutput)(void *pOut, const void *pData, int nData), | |
| 9984 | 9985 | void *pOut |
| 9985 | 9986 | ); |
| 9986 | 9987 | int sqlite3changeset_start_strm( |
| 9987 | 9988 | sqlite3_changeset_iter **pp, |
| 9988 | - int (SQLITE_CALLBACK *xInput)(void *pIn, void *pData, int *pnData), | |
| 9989 | + int (*xInput)(void *pIn, void *pData, int *pnData), | |
| 9989 | 9990 | void *pIn |
| 9990 | 9991 | ); |
| 9991 | 9992 | int sqlite3session_changeset_strm( |
| 9992 | 9993 | sqlite3_session *pSession, |
| 9993 | - int (SQLITE_CALLBACK *xOutput)(void *pOut, const void *pData, int nData), | |
| 9994 | + int (*xOutput)(void *pOut, const void *pData, int nData), | |
| 9994 | 9995 | void *pOut |
| 9995 | 9996 | ); |
| 9996 | 9997 | int sqlite3session_patchset_strm( |
| 9997 | 9998 | sqlite3_session *pSession, |
| 9998 | - int (SQLITE_CALLBACK *xOutput)(void *pOut, const void *pData, int nData), | |
| 9999 | + int (*xOutput)(void *pOut, const void *pData, int nData), | |
| 9999 | 10000 | void *pOut |
| 10000 | 10001 | ); |
| 10001 | 10002 | int sqlite3changegroup_add_strm(sqlite3_changegroup*, |
| 10002 | - int (SQLITE_CALLBACK *xInput)(void *pIn, void *pData, int *pnData), | |
| 10003 | + int (*xInput)(void *pIn, void *pData, int *pnData), | |
| 10003 | 10004 | void *pIn |
| 10004 | 10005 | ); |
| 10005 | 10006 | int sqlite3changegroup_output_strm(sqlite3_changegroup*, |
| 10006 | - int (SQLITE_CALLBACK *xOutput)(void *pOut, const void *pData, int nData), | |
| 10007 | + int (*xOutput)(void *pOut, const void *pData, int nData), | |
| 10007 | 10008 | void *pOut |
| 10008 | 10009 | ); |
| 10009 | 10010 | |
| 10010 | 10011 | |
| 10011 | 10012 | /* |
| @@ -10056,11 +10057,11 @@ | ||
| 10056 | 10057 | |
| 10057 | 10058 | typedef struct Fts5ExtensionApi Fts5ExtensionApi; |
| 10058 | 10059 | typedef struct Fts5Context Fts5Context; |
| 10059 | 10060 | typedef struct Fts5PhraseIter Fts5PhraseIter; |
| 10060 | 10061 | |
| 10061 | -typedef void (SQLITE_CALLBACK *fts5_extension_function)( | |
| 10062 | +typedef void (*fts5_extension_function)( | |
| 10062 | 10063 | const Fts5ExtensionApi *pApi, /* API offered by current FTS version */ |
| 10063 | 10064 | Fts5Context *pFts, /* First arg to pass to pApi functions */ |
| 10064 | 10065 | sqlite3_context *pCtx, /* Context for returning result/error */ |
| 10065 | 10066 | int nVal, /* Number of values in apVal[] array */ |
| 10066 | 10067 | sqlite3_value **apVal /* Array of trailing arguments */ |
| @@ -10107,15 +10108,15 @@ | ||
| 10107 | 10108 | ** This function may be quite inefficient if used with an FTS5 table |
| 10108 | 10109 | ** created with the "columnsize=0" option. |
| 10109 | 10110 | ** |
| 10110 | 10111 | ** xColumnText: |
| 10111 | 10112 | ** This function attempts to retrieve the text of column iCol of the |
| 10112 | -** current document. If successful, (SQLITE_CALLBACK *pz) is set to point to a buffer | |
| 10113 | -** containing the text in utf-8 encoding, (SQLITE_CALLBACK *pn) is set to the size in bytes | |
| 10113 | +** current document. If successful, (*pz) is set to point to a buffer | |
| 10114 | +** containing the text in utf-8 encoding, (*pn) is set to the size in bytes | |
| 10114 | 10115 | ** (not characters) of the buffer and SQLITE_OK is returned. Otherwise, |
| 10115 | 10116 | ** if an error occurs, an SQLite error code is returned and the final values |
| 10116 | -** of (SQLITE_CALLBACK *pz) and (*pn) are undefined. | |
| 10117 | +** of (*pz) and (*pn) are undefined. | |
| 10117 | 10118 | ** |
| 10118 | 10119 | ** xPhraseCount: |
| 10119 | 10120 | ** Returns the number of phrases in the current query expression. |
| 10120 | 10121 | ** |
| 10121 | 10122 | ** xPhraseSize: |
| @@ -10220,11 +10221,11 @@ | ||
| 10220 | 10221 | ** xRowCount(pFts5, pnRow) |
| 10221 | 10222 | ** |
| 10222 | 10223 | ** This function is used to retrieve the total number of rows in the table. |
| 10223 | 10224 | ** In other words, the same value that would be returned by: |
| 10224 | 10225 | ** |
| 10225 | -** SELECT count(SQLITE_CALLBACK *) FROM ftstable; | |
| 10226 | +** SELECT count(*) FROM ftstable; | |
| 10226 | 10227 | ** |
| 10227 | 10228 | ** xPhraseFirst() |
| 10228 | 10229 | ** This function is used, along with type Fts5PhraseIter and the xPhraseNext |
| 10229 | 10230 | ** method, to iterate through all instances of a single query phrase within |
| 10230 | 10231 | ** the current row. This is the same information as is accessible via the |
| @@ -10287,43 +10288,43 @@ | ||
| 10287 | 10288 | ** See xPhraseFirstColumn above. |
| 10288 | 10289 | */ |
| 10289 | 10290 | struct Fts5ExtensionApi { |
| 10290 | 10291 | int iVersion; /* Currently always set to 3 */ |
| 10291 | 10292 | |
| 10292 | - void *(SQLITE_CALLBACK *xUserData)(Fts5Context*); | |
| 10293 | + void *(*xUserData)(Fts5Context*); | |
| 10293 | 10294 | |
| 10294 | - int (SQLITE_CALLBACK *xColumnCount)(Fts5Context*); | |
| 10295 | - int (SQLITE_CALLBACK *xRowCount)(Fts5Context*, sqlite3_int64 *pnRow); | |
| 10296 | - int (SQLITE_CALLBACK *xColumnTotalSize)(Fts5Context*, int iCol, sqlite3_int64 *pnToken); | |
| 10295 | + int (*xColumnCount)(Fts5Context*); | |
| 10296 | + int (*xRowCount)(Fts5Context*, sqlite3_int64 *pnRow); | |
| 10297 | + int (*xColumnTotalSize)(Fts5Context*, int iCol, sqlite3_int64 *pnToken); | |
| 10297 | 10298 | |
| 10298 | - int (SQLITE_CALLBACK *xTokenize)(Fts5Context*, | |
| 10299 | + int (*xTokenize)(Fts5Context*, | |
| 10299 | 10300 | const char *pText, int nText, /* Text to tokenize */ |
| 10300 | 10301 | void *pCtx, /* Context passed to xToken() */ |
| 10301 | - int (SQLITE_CALLBACK *xToken)(void*, int, const char*, int, int, int) /* Callback */ | |
| 10302 | - ); | |
| 10303 | - | |
| 10304 | - int (SQLITE_CALLBACK *xPhraseCount)(Fts5Context*); | |
| 10305 | - int (SQLITE_CALLBACK *xPhraseSize)(Fts5Context*, int iPhrase); | |
| 10306 | - | |
| 10307 | - int (SQLITE_CALLBACK *xInstCount)(Fts5Context*, int *pnInst); | |
| 10308 | - int (SQLITE_CALLBACK *xInst)(Fts5Context*, int iIdx, int *piPhrase, int *piCol, int *piOff); | |
| 10309 | - | |
| 10310 | - sqlite3_int64 (SQLITE_CALLBACK *xRowid)(Fts5Context*); | |
| 10311 | - int (SQLITE_CALLBACK *xColumnText)(Fts5Context*, int iCol, const char **pz, int *pn); | |
| 10312 | - int (SQLITE_CALLBACK *xColumnSize)(Fts5Context*, int iCol, int *pnToken); | |
| 10313 | - | |
| 10314 | - int (SQLITE_CALLBACK *xQueryPhrase)(Fts5Context*, int iPhrase, void *pUserData, | |
| 10315 | - int(SQLITE_CALLBACK *)(const Fts5ExtensionApi*,Fts5Context*,void*) | |
| 10316 | - ); | |
| 10317 | - int (SQLITE_CALLBACK *xSetAuxdata)(Fts5Context*, void *pAux, void(*xDelete)(void*)); | |
| 10318 | - void *(SQLITE_CALLBACK *xGetAuxdata)(Fts5Context*, int bClear); | |
| 10319 | - | |
| 10320 | - int (SQLITE_CALLBACK *xPhraseFirst)(Fts5Context*, int iPhrase, Fts5PhraseIter*, int*, int*); | |
| 10321 | - void (SQLITE_CALLBACK *xPhraseNext)(Fts5Context*, Fts5PhraseIter*, int *piCol, int *piOff); | |
| 10322 | - | |
| 10323 | - int (SQLITE_CALLBACK *xPhraseFirstColumn)(Fts5Context*, int iPhrase, Fts5PhraseIter*, int*); | |
| 10324 | - void (SQLITE_CALLBACK *xPhraseNextColumn)(Fts5Context*, Fts5PhraseIter*, int *piCol); | |
| 10302 | + int (*xToken)(void*, int, const char*, int, int, int) /* Callback */ | |
| 10303 | + ); | |
| 10304 | + | |
| 10305 | + int (*xPhraseCount)(Fts5Context*); | |
| 10306 | + int (*xPhraseSize)(Fts5Context*, int iPhrase); | |
| 10307 | + | |
| 10308 | + int (*xInstCount)(Fts5Context*, int *pnInst); | |
| 10309 | + int (*xInst)(Fts5Context*, int iIdx, int *piPhrase, int *piCol, int *piOff); | |
| 10310 | + | |
| 10311 | + sqlite3_int64 (*xRowid)(Fts5Context*); | |
| 10312 | + int (*xColumnText)(Fts5Context*, int iCol, const char **pz, int *pn); | |
| 10313 | + int (*xColumnSize)(Fts5Context*, int iCol, int *pnToken); | |
| 10314 | + | |
| 10315 | + int (*xQueryPhrase)(Fts5Context*, int iPhrase, void *pUserData, | |
| 10316 | + int(*)(const Fts5ExtensionApi*,Fts5Context*,void*) | |
| 10317 | + ); | |
| 10318 | + int (*xSetAuxdata)(Fts5Context*, void *pAux, void(*xDelete)(void*)); | |
| 10319 | + void *(*xGetAuxdata)(Fts5Context*, int bClear); | |
| 10320 | + | |
| 10321 | + int (*xPhraseFirst)(Fts5Context*, int iPhrase, Fts5PhraseIter*, int*, int*); | |
| 10322 | + void (*xPhraseNext)(Fts5Context*, Fts5PhraseIter*, int *piCol, int *piOff); | |
| 10323 | + | |
| 10324 | + int (*xPhraseFirstColumn)(Fts5Context*, int iPhrase, Fts5PhraseIter*, int*); | |
| 10325 | + void (*xPhraseNextColumn)(Fts5Context*, Fts5PhraseIter*, int *piCol); | |
| 10325 | 10326 | }; |
| 10326 | 10327 | |
| 10327 | 10328 | /* |
| 10328 | 10329 | ** CUSTOM AUXILIARY FUNCTIONS |
| 10329 | 10330 | *************************************************************************/ |
| @@ -10347,11 +10348,11 @@ | ||
| 10347 | 10348 | ** The second and third arguments are an array of nul-terminated strings |
| 10348 | 10349 | ** containing the tokenizer arguments, if any, specified following the |
| 10349 | 10350 | ** tokenizer name as part of the CREATE VIRTUAL TABLE statement used |
| 10350 | 10351 | ** to create the FTS5 table. |
| 10351 | 10352 | ** |
| 10352 | -** The final argument is an output variable. If successful, (SQLITE_CALLBACK *ppOut) | |
| 10353 | +** The final argument is an output variable. If successful, (*ppOut) | |
| 10353 | 10354 | ** should be set to point to the new tokenizer handle and SQLITE_OK |
| 10354 | 10355 | ** returned. If an error occurs, some value other than SQLITE_OK should |
| 10355 | 10356 | ** be returned. In this case, fts5 assumes that the final value of *ppOut |
| 10356 | 10357 | ** is undefined. |
| 10357 | 10358 | ** |
| @@ -10521,17 +10522,17 @@ | ||
| 10521 | 10522 | ** inefficient. |
| 10522 | 10523 | */ |
| 10523 | 10524 | typedef struct Fts5Tokenizer Fts5Tokenizer; |
| 10524 | 10525 | typedef struct fts5_tokenizer fts5_tokenizer; |
| 10525 | 10526 | struct fts5_tokenizer { |
| 10526 | - int (SQLITE_CALLBACK *xCreate)(void*, const char **azArg, int nArg, Fts5Tokenizer **ppOut); | |
| 10527 | - void (SQLITE_CALLBACK *xDelete)(Fts5Tokenizer*); | |
| 10528 | - int (SQLITE_CALLBACK *xTokenize)(Fts5Tokenizer*, | |
| 10527 | + int (*xCreate)(void*, const char **azArg, int nArg, Fts5Tokenizer **ppOut); | |
| 10528 | + void (*xDelete)(Fts5Tokenizer*); | |
| 10529 | + int (*xTokenize)(Fts5Tokenizer*, | |
| 10529 | 10530 | void *pCtx, |
| 10530 | 10531 | int flags, /* Mask of FTS5_TOKENIZE_* flags */ |
| 10531 | 10532 | const char *pText, int nText, |
| 10532 | - int (SQLITE_CALLBACK *xToken)( | |
| 10533 | + int (*xToken)( | |
| 10533 | 10534 | void *pCtx, /* Copy of 2nd argument to xTokenize() */ |
| 10534 | 10535 | int tflags, /* Mask of FTS5_TOKEN_* flags */ |
| 10535 | 10536 | const char *pToken, /* Pointer to buffer containing token */ |
| 10536 | 10537 | int nToken, /* Size of token in bytes */ |
| 10537 | 10538 | int iStart, /* Byte offset of token within input text */ |
| @@ -10560,33 +10561,33 @@ | ||
| 10560 | 10561 | typedef struct fts5_api fts5_api; |
| 10561 | 10562 | struct fts5_api { |
| 10562 | 10563 | int iVersion; /* Currently always set to 2 */ |
| 10563 | 10564 | |
| 10564 | 10565 | /* Create a new tokenizer */ |
| 10565 | - int (SQLITE_CALLBACK *xCreateTokenizer)( | |
| 10566 | + int (*xCreateTokenizer)( | |
| 10566 | 10567 | fts5_api *pApi, |
| 10567 | 10568 | const char *zName, |
| 10568 | 10569 | void *pContext, |
| 10569 | 10570 | fts5_tokenizer *pTokenizer, |
| 10570 | - void (SQLITE_CALLBACK *xDestroy)(void*) | |
| 10571 | + void (*xDestroy)(void*) | |
| 10571 | 10572 | ); |
| 10572 | 10573 | |
| 10573 | 10574 | /* Find an existing tokenizer */ |
| 10574 | - int (SQLITE_CALLBACK *xFindTokenizer)( | |
| 10575 | + int (*xFindTokenizer)( | |
| 10575 | 10576 | fts5_api *pApi, |
| 10576 | 10577 | const char *zName, |
| 10577 | 10578 | void **ppContext, |
| 10578 | 10579 | fts5_tokenizer *pTokenizer |
| 10579 | 10580 | ); |
| 10580 | 10581 | |
| 10581 | 10582 | /* Create a new auxiliary function */ |
| 10582 | - int (SQLITE_CALLBACK *xCreateFunction)( | |
| 10583 | + int (*xCreateFunction)( | |
| 10583 | 10584 | fts5_api *pApi, |
| 10584 | 10585 | const char *zName, |
| 10585 | 10586 | void *pContext, |
| 10586 | 10587 | fts5_extension_function xFunction, |
| 10587 | - void (SQLITE_CALLBACK *xDestroy)(void*) | |
| 10588 | + void (*xDestroy)(void*) | |
| 10588 | 10589 | ); |
| 10589 | 10590 | }; |
| 10590 | 10591 | |
| 10591 | 10592 | /* |
| 10592 | 10593 | ** END OF REGISTRATION API |
| @@ -11900,12 +11901,12 @@ | ||
| 11900 | 11901 | */ |
| 11901 | 11902 | #ifdef SQLITE_OMIT_WSD |
| 11902 | 11903 | #define SQLITE_WSD const |
| 11903 | 11904 | #define GLOBAL(t,v) (*(t*)sqlite3_wsd_find((void*)&(v), sizeof(v))) |
| 11904 | 11905 | #define sqlite3GlobalConfig GLOBAL(struct Sqlite3Config, sqlite3Config) |
| 11905 | -SQLITE_API int SQLITE_APICALL sqlite3_wsd_init(int N, int J); | |
| 11906 | -SQLITE_API void *SQLITE_APICALL sqlite3_wsd_find(void *K, int L); | |
| 11906 | +SQLITE_API int SQLITE_STDCALL sqlite3_wsd_init(int N, int J); | |
| 11907 | +SQLITE_API void *SQLITE_STDCALL sqlite3_wsd_find(void *K, int L); | |
| 11907 | 11908 | #else |
| 11908 | 11909 | #define SQLITE_WSD |
| 11909 | 11910 | #define GLOBAL(t,v) v |
| 11910 | 11911 | #define sqlite3GlobalConfig sqlite3Config |
| 11911 | 11912 | #endif |
| @@ -17560,11 +17561,11 @@ | ||
| 17560 | 17561 | ** was used and false if not. |
| 17561 | 17562 | ** |
| 17562 | 17563 | ** The name can optionally begin with "SQLITE_" but the "SQLITE_" prefix |
| 17563 | 17564 | ** is not required for a match. |
| 17564 | 17565 | */ |
| 17565 | -SQLITE_API int SQLITE_APICALL sqlite3_compileoption_used(const char *zOptName){ | |
| 17566 | +SQLITE_API int SQLITE_STDCALL sqlite3_compileoption_used(const char *zOptName){ | |
| 17566 | 17567 | int i, n; |
| 17567 | 17568 | |
| 17568 | 17569 | #if SQLITE_ENABLE_API_ARMOR |
| 17569 | 17570 | if( zOptName==0 ){ |
| 17570 | 17571 | (void)SQLITE_MISUSE_BKPT; |
| @@ -17588,11 +17589,11 @@ | ||
| 17588 | 17589 | |
| 17589 | 17590 | /* |
| 17590 | 17591 | ** Return the N-th compile-time option string. If N is out of range, |
| 17591 | 17592 | ** return a NULL pointer. |
| 17592 | 17593 | */ |
| 17593 | -SQLITE_API const char *SQLITE_APICALL sqlite3_compileoption_get(int N){ | |
| 17594 | +SQLITE_API const char *SQLITE_STDCALL sqlite3_compileoption_get(int N){ | |
| 17594 | 17595 | if( N>=0 && N<ArraySize(azCompileOpt) ){ |
| 17595 | 17596 | return azCompileOpt[N]; |
| 17596 | 17597 | } |
| 17597 | 17598 | return 0; |
| 17598 | 17599 | } |
| @@ -18298,11 +18299,11 @@ | ||
| 18298 | 18299 | } |
| 18299 | 18300 | |
| 18300 | 18301 | /* |
| 18301 | 18302 | ** Query status information. |
| 18302 | 18303 | */ |
| 18303 | -SQLITE_API int SQLITE_APICALL sqlite3_status64( | |
| 18304 | +SQLITE_API int SQLITE_STDCALL sqlite3_status64( | |
| 18304 | 18305 | int op, |
| 18305 | 18306 | sqlite3_int64 *pCurrent, |
| 18306 | 18307 | sqlite3_int64 *pHighwater, |
| 18307 | 18308 | int resetFlag |
| 18308 | 18309 | ){ |
| @@ -18323,11 +18324,11 @@ | ||
| 18323 | 18324 | } |
| 18324 | 18325 | sqlite3_mutex_leave(pMutex); |
| 18325 | 18326 | (void)pMutex; /* Prevent warning when SQLITE_THREADSAFE=0 */ |
| 18326 | 18327 | return SQLITE_OK; |
| 18327 | 18328 | } |
| 18328 | -SQLITE_API int SQLITE_APICALL sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag){ | |
| 18329 | +SQLITE_API int SQLITE_STDCALL sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag){ | |
| 18329 | 18330 | sqlite3_int64 iCur = 0, iHwtr = 0; |
| 18330 | 18331 | int rc; |
| 18331 | 18332 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 18332 | 18333 | if( pCurrent==0 || pHighwater==0 ) return SQLITE_MISUSE_BKPT; |
| 18333 | 18334 | #endif |
| @@ -18340,11 +18341,11 @@ | ||
| 18340 | 18341 | } |
| 18341 | 18342 | |
| 18342 | 18343 | /* |
| 18343 | 18344 | ** Query status information for a single database connection |
| 18344 | 18345 | */ |
| 18345 | -SQLITE_API int SQLITE_APICALL sqlite3_db_status( | |
| 18346 | +SQLITE_API int SQLITE_STDCALL sqlite3_db_status( | |
| 18346 | 18347 | sqlite3 *db, /* The database connection whose status is desired */ |
| 18347 | 18348 | int op, /* Status verb */ |
| 18348 | 18349 | int *pCurrent, /* Write current value here */ |
| 18349 | 18350 | int *pHighwater, /* Write high-water mark here */ |
| 18350 | 18351 | int resetFlag /* Reset high-water mark if true */ |
| @@ -19632,11 +19633,10 @@ | ||
| 19632 | 19633 | int argc, |
| 19633 | 19634 | sqlite3_value **argv |
| 19634 | 19635 | ){ |
| 19635 | 19636 | time_t t; |
| 19636 | 19637 | char *zFormat = (char *)sqlite3_user_data(context); |
| 19637 | - sqlite3 *db; | |
| 19638 | 19638 | sqlite3_int64 iT; |
| 19639 | 19639 | struct tm *pTm; |
| 19640 | 19640 | struct tm sNow; |
| 19641 | 19641 | char zBuf[20]; |
| 19642 | 19642 | |
| @@ -20018,11 +20018,11 @@ | ||
| 20018 | 20018 | |
| 20019 | 20019 | /* |
| 20020 | 20020 | ** Locate a VFS by name. If no name is given, simply return the |
| 20021 | 20021 | ** first VFS on the list. |
| 20022 | 20022 | */ |
| 20023 | -SQLITE_API sqlite3_vfs *SQLITE_APICALL sqlite3_vfs_find(const char *zVfs){ | |
| 20023 | +SQLITE_API sqlite3_vfs *SQLITE_STDCALL sqlite3_vfs_find(const char *zVfs){ | |
| 20024 | 20024 | sqlite3_vfs *pVfs = 0; |
| 20025 | 20025 | #if SQLITE_THREADSAFE |
| 20026 | 20026 | sqlite3_mutex *mutex; |
| 20027 | 20027 | #endif |
| 20028 | 20028 | #ifndef SQLITE_OMIT_AUTOINIT |
| @@ -20064,11 +20064,11 @@ | ||
| 20064 | 20064 | /* |
| 20065 | 20065 | ** Register a VFS with the system. It is harmless to register the same |
| 20066 | 20066 | ** VFS multiple times. The new VFS becomes the default if makeDflt is |
| 20067 | 20067 | ** true. |
| 20068 | 20068 | */ |
| 20069 | -SQLITE_API int SQLITE_APICALL sqlite3_vfs_register(sqlite3_vfs *pVfs, int makeDflt){ | |
| 20069 | +SQLITE_API int SQLITE_STDCALL sqlite3_vfs_register(sqlite3_vfs *pVfs, int makeDflt){ | |
| 20070 | 20070 | MUTEX_LOGIC(sqlite3_mutex *mutex;) |
| 20071 | 20071 | #ifndef SQLITE_OMIT_AUTOINIT |
| 20072 | 20072 | int rc = sqlite3_initialize(); |
| 20073 | 20073 | if( rc ) return rc; |
| 20074 | 20074 | #endif |
| @@ -20092,11 +20092,11 @@ | ||
| 20092 | 20092 | } |
| 20093 | 20093 | |
| 20094 | 20094 | /* |
| 20095 | 20095 | ** Unregister a VFS so that it is no longer accessible. |
| 20096 | 20096 | */ |
| 20097 | -SQLITE_API int SQLITE_APICALL sqlite3_vfs_unregister(sqlite3_vfs *pVfs){ | |
| 20097 | +SQLITE_API int SQLITE_STDCALL sqlite3_vfs_unregister(sqlite3_vfs *pVfs){ | |
| 20098 | 20098 | #if SQLITE_THREADSAFE |
| 20099 | 20099 | sqlite3_mutex *mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER); |
| 20100 | 20100 | #endif |
| 20101 | 20101 | sqlite3_mutex_enter(mutex); |
| 20102 | 20102 | vfsUnlink(pVfs); |
| @@ -22443,11 +22443,11 @@ | ||
| 22443 | 22443 | } |
| 22444 | 22444 | |
| 22445 | 22445 | /* |
| 22446 | 22446 | ** Retrieve a pointer to a static mutex or allocate a new dynamic one. |
| 22447 | 22447 | */ |
| 22448 | -SQLITE_API sqlite3_mutex *SQLITE_APICALL sqlite3_mutex_alloc(int id){ | |
| 22448 | +SQLITE_API sqlite3_mutex *SQLITE_STDCALL sqlite3_mutex_alloc(int id){ | |
| 22449 | 22449 | #ifndef SQLITE_OMIT_AUTOINIT |
| 22450 | 22450 | if( id<=SQLITE_MUTEX_RECURSIVE && sqlite3_initialize() ) return 0; |
| 22451 | 22451 | if( id>SQLITE_MUTEX_RECURSIVE && sqlite3MutexInit() ) return 0; |
| 22452 | 22452 | #endif |
| 22453 | 22453 | assert( sqlite3GlobalConfig.mutex.xMutexAlloc ); |
| @@ -22464,11 +22464,11 @@ | ||
| 22464 | 22464 | } |
| 22465 | 22465 | |
| 22466 | 22466 | /* |
| 22467 | 22467 | ** Free a dynamic mutex. |
| 22468 | 22468 | */ |
| 22469 | -SQLITE_API void SQLITE_APICALL sqlite3_mutex_free(sqlite3_mutex *p){ | |
| 22469 | +SQLITE_API void SQLITE_STDCALL sqlite3_mutex_free(sqlite3_mutex *p){ | |
| 22470 | 22470 | if( p ){ |
| 22471 | 22471 | assert( sqlite3GlobalConfig.mutex.xMutexFree ); |
| 22472 | 22472 | sqlite3GlobalConfig.mutex.xMutexFree(p); |
| 22473 | 22473 | } |
| 22474 | 22474 | } |
| @@ -22475,11 +22475,11 @@ | ||
| 22475 | 22475 | |
| 22476 | 22476 | /* |
| 22477 | 22477 | ** Obtain the mutex p. If some other thread already has the mutex, block |
| 22478 | 22478 | ** until it can be obtained. |
| 22479 | 22479 | */ |
| 22480 | -SQLITE_API void SQLITE_APICALL sqlite3_mutex_enter(sqlite3_mutex *p){ | |
| 22480 | +SQLITE_API void SQLITE_STDCALL sqlite3_mutex_enter(sqlite3_mutex *p){ | |
| 22481 | 22481 | if( p ){ |
| 22482 | 22482 | assert( sqlite3GlobalConfig.mutex.xMutexEnter ); |
| 22483 | 22483 | sqlite3GlobalConfig.mutex.xMutexEnter(p); |
| 22484 | 22484 | } |
| 22485 | 22485 | } |
| @@ -22486,11 +22486,11 @@ | ||
| 22486 | 22486 | |
| 22487 | 22487 | /* |
| 22488 | 22488 | ** Obtain the mutex p. If successful, return SQLITE_OK. Otherwise, if another |
| 22489 | 22489 | ** thread holds the mutex and it cannot be obtained, return SQLITE_BUSY. |
| 22490 | 22490 | */ |
| 22491 | -SQLITE_API int SQLITE_APICALL sqlite3_mutex_try(sqlite3_mutex *p){ | |
| 22491 | +SQLITE_API int SQLITE_STDCALL sqlite3_mutex_try(sqlite3_mutex *p){ | |
| 22492 | 22492 | int rc = SQLITE_OK; |
| 22493 | 22493 | if( p ){ |
| 22494 | 22494 | assert( sqlite3GlobalConfig.mutex.xMutexTry ); |
| 22495 | 22495 | return sqlite3GlobalConfig.mutex.xMutexTry(p); |
| 22496 | 22496 | } |
| @@ -22501,11 +22501,11 @@ | ||
| 22501 | 22501 | ** The sqlite3_mutex_leave() routine exits a mutex that was previously |
| 22502 | 22502 | ** entered by the same thread. The behavior is undefined if the mutex |
| 22503 | 22503 | ** is not currently entered. If a NULL pointer is passed as an argument |
| 22504 | 22504 | ** this function is a no-op. |
| 22505 | 22505 | */ |
| 22506 | -SQLITE_API void SQLITE_APICALL sqlite3_mutex_leave(sqlite3_mutex *p){ | |
| 22506 | +SQLITE_API void SQLITE_STDCALL sqlite3_mutex_leave(sqlite3_mutex *p){ | |
| 22507 | 22507 | if( p ){ |
| 22508 | 22508 | assert( sqlite3GlobalConfig.mutex.xMutexLeave ); |
| 22509 | 22509 | sqlite3GlobalConfig.mutex.xMutexLeave(p); |
| 22510 | 22510 | } |
| 22511 | 22511 | } |
| @@ -22513,15 +22513,15 @@ | ||
| 22513 | 22513 | #ifndef NDEBUG |
| 22514 | 22514 | /* |
| 22515 | 22515 | ** The sqlite3_mutex_held() and sqlite3_mutex_notheld() routine are |
| 22516 | 22516 | ** intended for use inside assert() statements. |
| 22517 | 22517 | */ |
| 22518 | -SQLITE_API int SQLITE_APICALL sqlite3_mutex_held(sqlite3_mutex *p){ | |
| 22518 | +SQLITE_API int SQLITE_STDCALL sqlite3_mutex_held(sqlite3_mutex *p){ | |
| 22519 | 22519 | assert( p==0 || sqlite3GlobalConfig.mutex.xMutexHeld ); |
| 22520 | 22520 | return p==0 || sqlite3GlobalConfig.mutex.xMutexHeld(p); |
| 22521 | 22521 | } |
| 22522 | -SQLITE_API int SQLITE_APICALL sqlite3_mutex_notheld(sqlite3_mutex *p){ | |
| 22522 | +SQLITE_API int SQLITE_STDCALL sqlite3_mutex_notheld(sqlite3_mutex *p){ | |
| 22523 | 22523 | assert( p==0 || sqlite3GlobalConfig.mutex.xMutexNotheld ); |
| 22524 | 22524 | return p==0 || sqlite3GlobalConfig.mutex.xMutexNotheld(p); |
| 22525 | 22525 | } |
| 22526 | 22526 | #endif |
| 22527 | 22527 | |
| @@ -23549,12 +23549,12 @@ | ||
| 23549 | 23549 | ** of the sqlite3_initialize() and sqlite3_shutdown() processing, the |
| 23550 | 23550 | ** "interlocked" magic used here is probably not strictly necessary. |
| 23551 | 23551 | */ |
| 23552 | 23552 | static LONG SQLITE_WIN32_VOLATILE winMutex_lock = 0; |
| 23553 | 23553 | |
| 23554 | -SQLITE_API int SQLITE_APICALL sqlite3_win32_is_nt(void); /* os_win.c */ | |
| 23555 | -SQLITE_API void SQLITE_APICALL sqlite3_win32_sleep(DWORD milliseconds); /* os_win.c */ | |
| 23554 | +SQLITE_API int SQLITE_STDCALL sqlite3_win32_is_nt(void); /* os_win.c */ | |
| 23555 | +SQLITE_API void SQLITE_STDCALL sqlite3_win32_sleep(DWORD milliseconds); /* os_win.c */ | |
| 23556 | 23556 | |
| 23557 | 23557 | static int winMutexInit(void){ |
| 23558 | 23558 | /* The first to increment to 1 does actual initialization */ |
| 23559 | 23559 | if( InterlockedCompareExchange(&winMutex_lock, 1, 0)==0 ){ |
| 23560 | 23560 | int i; |
| @@ -23850,11 +23850,11 @@ | ||
| 23850 | 23850 | /* |
| 23851 | 23851 | ** Attempt to release up to n bytes of non-essential memory currently |
| 23852 | 23852 | ** held by SQLite. An example of non-essential memory is memory used to |
| 23853 | 23853 | ** cache database pages that are not currently in use. |
| 23854 | 23854 | */ |
| 23855 | -SQLITE_API int SQLITE_APICALL sqlite3_release_memory(int n){ | |
| 23855 | +SQLITE_API int SQLITE_STDCALL sqlite3_release_memory(int n){ | |
| 23856 | 23856 | #ifdef SQLITE_ENABLE_MEMORY_MANAGEMENT |
| 23857 | 23857 | return sqlite3PcacheReleaseMemory(n); |
| 23858 | 23858 | #else |
| 23859 | 23859 | /* IMPLEMENTATION-OF: R-34391-24921 The sqlite3_release_memory() routine |
| 23860 | 23860 | ** is a no-op returning zero if SQLite is not compiled with |
| @@ -23909,11 +23909,11 @@ | ||
| 23909 | 23909 | /* |
| 23910 | 23910 | ** Deprecated external interface. It used to set an alarm callback |
| 23911 | 23911 | ** that was invoked when memory usage grew too large. Now it is a |
| 23912 | 23912 | ** no-op. |
| 23913 | 23913 | */ |
| 23914 | -SQLITE_API int SQLITE_APICALL sqlite3_memory_alarm( | |
| 23914 | +SQLITE_API int SQLITE_STDCALL sqlite3_memory_alarm( | |
| 23915 | 23915 | void(*xCallback)(void *pArg, sqlite3_int64 used,int N), |
| 23916 | 23916 | void *pArg, |
| 23917 | 23917 | sqlite3_int64 iThreshold |
| 23918 | 23918 | ){ |
| 23919 | 23919 | (void)xCallback; |
| @@ -23925,11 +23925,11 @@ | ||
| 23925 | 23925 | |
| 23926 | 23926 | /* |
| 23927 | 23927 | ** Set the soft heap-size limit for the library. Passing a zero or |
| 23928 | 23928 | ** negative value indicates no limit. |
| 23929 | 23929 | */ |
| 23930 | -SQLITE_API sqlite3_int64 SQLITE_APICALL sqlite3_soft_heap_limit64(sqlite3_int64 n){ | |
| 23930 | +SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_soft_heap_limit64(sqlite3_int64 n){ | |
| 23931 | 23931 | sqlite3_int64 priorLimit; |
| 23932 | 23932 | sqlite3_int64 excess; |
| 23933 | 23933 | sqlite3_int64 nUsed; |
| 23934 | 23934 | #ifndef SQLITE_OMIT_AUTOINIT |
| 23935 | 23935 | int rc = sqlite3_initialize(); |
| @@ -23947,11 +23947,11 @@ | ||
| 23947 | 23947 | sqlite3_mutex_leave(mem0.mutex); |
| 23948 | 23948 | excess = sqlite3_memory_used() - n; |
| 23949 | 23949 | if( excess>0 ) sqlite3_release_memory((int)(excess & 0x7fffffff)); |
| 23950 | 23950 | return priorLimit; |
| 23951 | 23951 | } |
| 23952 | -SQLITE_API void SQLITE_APICALL sqlite3_soft_heap_limit(int n){ | |
| 23952 | +SQLITE_API void SQLITE_STDCALL sqlite3_soft_heap_limit(int n){ | |
| 23953 | 23953 | if( n<0 ) n = 0; |
| 23954 | 23954 | sqlite3_soft_heap_limit64(n); |
| 23955 | 23955 | } |
| 23956 | 23956 | |
| 23957 | 23957 | /* |
| @@ -24016,11 +24016,11 @@ | ||
| 24016 | 24016 | } |
| 24017 | 24017 | |
| 24018 | 24018 | /* |
| 24019 | 24019 | ** Return the amount of memory currently checked out. |
| 24020 | 24020 | */ |
| 24021 | -SQLITE_API sqlite3_int64 SQLITE_APICALL sqlite3_memory_used(void){ | |
| 24021 | +SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_memory_used(void){ | |
| 24022 | 24022 | sqlite3_int64 res, mx; |
| 24023 | 24023 | sqlite3_status64(SQLITE_STATUS_MEMORY_USED, &res, &mx, 0); |
| 24024 | 24024 | return res; |
| 24025 | 24025 | } |
| 24026 | 24026 | |
| @@ -24027,11 +24027,11 @@ | ||
| 24027 | 24027 | /* |
| 24028 | 24028 | ** Return the maximum amount of memory that has ever been |
| 24029 | 24029 | ** checked out since either the beginning of this process |
| 24030 | 24030 | ** or since the most recent reset. |
| 24031 | 24031 | */ |
| 24032 | -SQLITE_API sqlite3_int64 SQLITE_APICALL sqlite3_memory_highwater(int resetFlag){ | |
| 24032 | +SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_memory_highwater(int resetFlag){ | |
| 24033 | 24033 | sqlite3_int64 res, mx; |
| 24034 | 24034 | sqlite3_status64(SQLITE_STATUS_MEMORY_USED, &res, &mx, resetFlag); |
| 24035 | 24035 | return mx; |
| 24036 | 24036 | } |
| 24037 | 24037 | |
| @@ -24107,17 +24107,17 @@ | ||
| 24107 | 24107 | /* |
| 24108 | 24108 | ** This version of the memory allocation is for use by the application. |
| 24109 | 24109 | ** First make sure the memory subsystem is initialized, then do the |
| 24110 | 24110 | ** allocation. |
| 24111 | 24111 | */ |
| 24112 | -SQLITE_API void *SQLITE_APICALL sqlite3_malloc(int n){ | |
| 24112 | +SQLITE_API void *SQLITE_STDCALL sqlite3_malloc(int n){ | |
| 24113 | 24113 | #ifndef SQLITE_OMIT_AUTOINIT |
| 24114 | 24114 | if( sqlite3_initialize() ) return 0; |
| 24115 | 24115 | #endif |
| 24116 | 24116 | return n<=0 ? 0 : sqlite3Malloc(n); |
| 24117 | 24117 | } |
| 24118 | -SQLITE_API void *SQLITE_APICALL sqlite3_malloc64(sqlite3_uint64 n){ | |
| 24118 | +SQLITE_API void *SQLITE_STDCALL sqlite3_malloc64(sqlite3_uint64 n){ | |
| 24119 | 24119 | #ifndef SQLITE_OMIT_AUTOINIT |
| 24120 | 24120 | if( sqlite3_initialize() ) return 0; |
| 24121 | 24121 | #endif |
| 24122 | 24122 | return sqlite3Malloc(n); |
| 24123 | 24123 | } |
| @@ -24256,20 +24256,20 @@ | ||
| 24256 | 24256 | }else{ |
| 24257 | 24257 | assert( sqlite3_mutex_held(db->mutex) ); |
| 24258 | 24258 | return db->lookaside.sz; |
| 24259 | 24259 | } |
| 24260 | 24260 | } |
| 24261 | -SQLITE_API sqlite3_uint64 SQLITE_APICALL sqlite3_msize(void *p){ | |
| 24261 | +SQLITE_API sqlite3_uint64 SQLITE_STDCALL sqlite3_msize(void *p){ | |
| 24262 | 24262 | assert( sqlite3MemdebugNoType(p, (u8)~MEMTYPE_HEAP) ); |
| 24263 | 24263 | assert( sqlite3MemdebugHasType(p, MEMTYPE_HEAP) ); |
| 24264 | 24264 | return p ? sqlite3GlobalConfig.m.xSize(p) : 0; |
| 24265 | 24265 | } |
| 24266 | 24266 | |
| 24267 | 24267 | /* |
| 24268 | 24268 | ** Free memory previously obtained from sqlite3Malloc(). |
| 24269 | 24269 | */ |
| 24270 | -SQLITE_API void SQLITE_APICALL sqlite3_free(void *p){ | |
| 24270 | +SQLITE_API void SQLITE_STDCALL sqlite3_free(void *p){ | |
| 24271 | 24271 | if( p==0 ) return; /* IMP: R-49053-54554 */ |
| 24272 | 24272 | assert( sqlite3MemdebugHasType(p, MEMTYPE_HEAP) ); |
| 24273 | 24273 | assert( sqlite3MemdebugNoType(p, (u8)~MEMTYPE_HEAP) ); |
| 24274 | 24274 | if( sqlite3GlobalConfig.bMemstat ){ |
| 24275 | 24275 | sqlite3_mutex_enter(mem0.mutex); |
| @@ -24374,18 +24374,18 @@ | ||
| 24374 | 24374 | |
| 24375 | 24375 | /* |
| 24376 | 24376 | ** The public interface to sqlite3Realloc. Make sure that the memory |
| 24377 | 24377 | ** subsystem is initialized prior to invoking sqliteRealloc. |
| 24378 | 24378 | */ |
| 24379 | -SQLITE_API void *SQLITE_APICALL sqlite3_realloc(void *pOld, int n){ | |
| 24379 | +SQLITE_API void *SQLITE_STDCALL sqlite3_realloc(void *pOld, int n){ | |
| 24380 | 24380 | #ifndef SQLITE_OMIT_AUTOINIT |
| 24381 | 24381 | if( sqlite3_initialize() ) return 0; |
| 24382 | 24382 | #endif |
| 24383 | 24383 | if( n<0 ) n = 0; /* IMP: R-26507-47431 */ |
| 24384 | 24384 | return sqlite3Realloc(pOld, n); |
| 24385 | 24385 | } |
| 24386 | -SQLITE_API void *SQLITE_APICALL sqlite3_realloc64(void *pOld, sqlite3_uint64 n){ | |
| 24386 | +SQLITE_API void *SQLITE_STDCALL sqlite3_realloc64(void *pOld, sqlite3_uint64 n){ | |
| 24387 | 24387 | #ifndef SQLITE_OMIT_AUTOINIT |
| 24388 | 24388 | if( sqlite3_initialize() ) return 0; |
| 24389 | 24389 | #endif |
| 24390 | 24390 | return sqlite3Realloc(pOld, n); |
| 24391 | 24391 | } |
| @@ -25608,11 +25608,11 @@ | ||
| 25608 | 25608 | |
| 25609 | 25609 | /* |
| 25610 | 25610 | ** Print into memory obtained from sqlite3_malloc(). Omit the internal |
| 25611 | 25611 | ** %-conversion extensions. |
| 25612 | 25612 | */ |
| 25613 | -SQLITE_API char *SQLITE_APICALL sqlite3_vmprintf(const char *zFormat, va_list ap){ | |
| 25613 | +SQLITE_API char *SQLITE_STDCALL sqlite3_vmprintf(const char *zFormat, va_list ap){ | |
| 25614 | 25614 | char *z; |
| 25615 | 25615 | char zBase[SQLITE_PRINT_BUF_SIZE]; |
| 25616 | 25616 | StrAccum acc; |
| 25617 | 25617 | |
| 25618 | 25618 | #ifdef SQLITE_ENABLE_API_ARMOR |
| @@ -25657,11 +25657,11 @@ | ||
| 25657 | 25657 | ** this without breaking compatibility, so we just have to live with the |
| 25658 | 25658 | ** mistake. |
| 25659 | 25659 | ** |
| 25660 | 25660 | ** sqlite3_vsnprintf() is the varargs version. |
| 25661 | 25661 | */ |
| 25662 | -SQLITE_API char *SQLITE_APICALL sqlite3_vsnprintf(int n, char *zBuf, const char *zFormat, va_list ap){ | |
| 25662 | +SQLITE_API char *SQLITE_STDCALL sqlite3_vsnprintf(int n, char *zBuf, const char *zFormat, va_list ap){ | |
| 25663 | 25663 | StrAccum acc; |
| 25664 | 25664 | if( n<=0 ) return zBuf; |
| 25665 | 25665 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 25666 | 25666 | if( zBuf==0 || zFormat==0 ) { |
| 25667 | 25667 | (void)SQLITE_MISUSE_BKPT; |
| @@ -26284,11 +26284,11 @@ | ||
| 26284 | 26284 | } sqlite3Prng; |
| 26285 | 26285 | |
| 26286 | 26286 | /* |
| 26287 | 26287 | ** Return N random bytes. |
| 26288 | 26288 | */ |
| 26289 | -SQLITE_API void SQLITE_APICALL sqlite3_randomness(int N, void *pBuf){ | |
| 26289 | +SQLITE_API void SQLITE_STDCALL sqlite3_randomness(int N, void *pBuf){ | |
| 26290 | 26290 | unsigned char t; |
| 26291 | 26291 | unsigned char *zBuf = pBuf; |
| 26292 | 26292 | |
| 26293 | 26293 | /* The "wsdPrng" macro will resolve to the pseudo-random number generator |
| 26294 | 26294 | ** state vector. If writable static data is unsupported on the target, |
| @@ -27487,11 +27487,11 @@ | ||
| 27487 | 27487 | ** sqlite3_strnicmp() APIs allow applications and extensions to compare |
| 27488 | 27488 | ** the contents of two buffers containing UTF-8 strings in a |
| 27489 | 27489 | ** case-independent fashion, using the same definition of "case |
| 27490 | 27490 | ** independence" that SQLite uses internally when comparing identifiers. |
| 27491 | 27491 | */ |
| 27492 | -SQLITE_API int SQLITE_APICALL sqlite3_stricmp(const char *zLeft, const char *zRight){ | |
| 27492 | +SQLITE_API int SQLITE_STDCALL sqlite3_stricmp(const char *zLeft, const char *zRight){ | |
| 27493 | 27493 | if( zLeft==0 ){ |
| 27494 | 27494 | return zRight ? -1 : 0; |
| 27495 | 27495 | }else if( zRight==0 ){ |
| 27496 | 27496 | return 1; |
| 27497 | 27497 | } |
| @@ -27508,11 +27508,11 @@ | ||
| 27508 | 27508 | a++; |
| 27509 | 27509 | b++; |
| 27510 | 27510 | } |
| 27511 | 27511 | return c; |
| 27512 | 27512 | } |
| 27513 | -SQLITE_API int SQLITE_APICALL sqlite3_strnicmp(const char *zLeft, const char *zRight, int N){ | |
| 27513 | +SQLITE_API int SQLITE_STDCALL sqlite3_strnicmp(const char *zLeft, const char *zRight, int N){ | |
| 27514 | 27514 | register unsigned char *a, *b; |
| 27515 | 27515 | if( zLeft==0 ){ |
| 27516 | 27516 | return zRight ? -1 : 0; |
| 27517 | 27517 | }else if( zRight==0 ){ |
| 27518 | 27518 | return 1; |
| @@ -36807,11 +36807,11 @@ | ||
| 36807 | 36807 | ** This routine is called once during SQLite initialization and by a |
| 36808 | 36808 | ** single thread. The memory allocation and mutex subsystems have not |
| 36809 | 36809 | ** necessarily been initialized when this routine is called, and so they |
| 36810 | 36810 | ** should not be used. |
| 36811 | 36811 | */ |
| 36812 | -SQLITE_API int SQLITE_APICALL sqlite3_os_init(void){ | |
| 36812 | +SQLITE_API int SQLITE_STDCALL sqlite3_os_init(void){ | |
| 36813 | 36813 | /* |
| 36814 | 36814 | ** The following macro defines an initializer for an sqlite3_vfs object. |
| 36815 | 36815 | ** The name of the VFS is NAME. The pAppData is a pointer to a pointer |
| 36816 | 36816 | ** to the "finder" function. (pAppData is a pointer to a pointer because |
| 36817 | 36817 | ** silly C90 rules prohibit a void* from being cast to a function pointer |
| @@ -36906,11 +36906,11 @@ | ||
| 36906 | 36906 | ** |
| 36907 | 36907 | ** Some operating systems might need to do some cleanup in this routine, |
| 36908 | 36908 | ** to release dynamically allocated objects. But not on unix. |
| 36909 | 36909 | ** This routine is a no-op for unix. |
| 36910 | 36910 | */ |
| 36911 | -SQLITE_API int SQLITE_APICALL sqlite3_os_end(void){ | |
| 36911 | +SQLITE_API int SQLITE_STDCALL sqlite3_os_end(void){ | |
| 36912 | 36912 | return SQLITE_OK; |
| 36913 | 36913 | } |
| 36914 | 36914 | |
| 36915 | 36915 | #endif /* SQLITE_OS_UNIX */ |
| 36916 | 36916 | |
| @@ -38341,11 +38341,11 @@ | ||
| 38341 | 38341 | ** compact it. Upon success, SQLITE_OK will be returned. Upon failure, one |
| 38342 | 38342 | ** of SQLITE_NOMEM, SQLITE_ERROR, or SQLITE_NOTFOUND will be returned. The |
| 38343 | 38343 | ** "pnLargest" argument, if non-zero, will be used to return the size of the |
| 38344 | 38344 | ** largest committed free block in the heap, in bytes. |
| 38345 | 38345 | */ |
| 38346 | -SQLITE_API int SQLITE_APICALL sqlite3_win32_compact_heap(LPUINT pnLargest){ | |
| 38346 | +SQLITE_API int SQLITE_STDCALL sqlite3_win32_compact_heap(LPUINT pnLargest){ | |
| 38347 | 38347 | int rc = SQLITE_OK; |
| 38348 | 38348 | UINT nLargest = 0; |
| 38349 | 38349 | HANDLE hHeap; |
| 38350 | 38350 | |
| 38351 | 38351 | winMemAssertMagic(); |
| @@ -38381,11 +38381,11 @@ | ||
| 38381 | 38381 | ** If a Win32 native heap has been configured, this function will attempt to |
| 38382 | 38382 | ** destroy and recreate it. If the Win32 native heap is not isolated and/or |
| 38383 | 38383 | ** the sqlite3_memory_used() function does not return zero, SQLITE_BUSY will |
| 38384 | 38384 | ** be returned and no changes will be made to the Win32 native heap. |
| 38385 | 38385 | */ |
| 38386 | -SQLITE_API int SQLITE_APICALL sqlite3_win32_reset_heap(){ | |
| 38386 | +SQLITE_API int SQLITE_STDCALL sqlite3_win32_reset_heap(){ | |
| 38387 | 38387 | int rc; |
| 38388 | 38388 | MUTEX_LOGIC( sqlite3_mutex *pMaster; ) /* The main static mutex */ |
| 38389 | 38389 | MUTEX_LOGIC( sqlite3_mutex *pMem; ) /* The memsys static mutex */ |
| 38390 | 38390 | MUTEX_LOGIC( pMaster = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER); ) |
| 38391 | 38391 | MUTEX_LOGIC( pMem = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MEM); ) |
| @@ -38426,11 +38426,11 @@ | ||
| 38426 | 38426 | /* |
| 38427 | 38427 | ** This function outputs the specified (ANSI) string to the Win32 debugger |
| 38428 | 38428 | ** (if available). |
| 38429 | 38429 | */ |
| 38430 | 38430 | |
| 38431 | -SQLITE_API void SQLITE_APICALL sqlite3_win32_write_debug(const char *zBuf, int nBuf){ | |
| 38431 | +SQLITE_API void SQLITE_STDCALL sqlite3_win32_write_debug(const char *zBuf, int nBuf){ | |
| 38432 | 38432 | char zDbgBuf[SQLITE_WIN32_DBG_BUF_SIZE]; |
| 38433 | 38433 | int nMin = MIN(nBuf, (SQLITE_WIN32_DBG_BUF_SIZE - 1)); /* may be negative. */ |
| 38434 | 38434 | if( nMin<-1 ) nMin = -1; /* all negative values become -1. */ |
| 38435 | 38435 | assert( nMin==-1 || nMin==0 || nMin<SQLITE_WIN32_DBG_BUF_SIZE ); |
| 38436 | 38436 | #ifdef SQLITE_ENABLE_API_ARMOR |
| @@ -38472,11 +38472,11 @@ | ||
| 38472 | 38472 | */ |
| 38473 | 38473 | #if SQLITE_OS_WINRT |
| 38474 | 38474 | static HANDLE sleepObj = NULL; |
| 38475 | 38475 | #endif |
| 38476 | 38476 | |
| 38477 | -SQLITE_API void SQLITE_APICALL sqlite3_win32_sleep(DWORD milliseconds){ | |
| 38477 | +SQLITE_API void SQLITE_STDCALL sqlite3_win32_sleep(DWORD milliseconds){ | |
| 38478 | 38478 | #if SQLITE_OS_WINRT |
| 38479 | 38479 | if ( sleepObj==NULL ){ |
| 38480 | 38480 | sleepObj = osCreateEventExW(NULL, NULL, CREATE_EVENT_MANUAL_RESET, |
| 38481 | 38481 | SYNCHRONIZE); |
| 38482 | 38482 | } |
| @@ -38521,11 +38521,11 @@ | ||
| 38521 | 38521 | |
| 38522 | 38522 | /* |
| 38523 | 38523 | ** This function determines if the machine is running a version of Windows |
| 38524 | 38524 | ** based on the NT kernel. |
| 38525 | 38525 | */ |
| 38526 | -SQLITE_API int SQLITE_APICALL sqlite3_win32_is_nt(void){ | |
| 38526 | +SQLITE_API int SQLITE_STDCALL sqlite3_win32_is_nt(void){ | |
| 38527 | 38527 | #if SQLITE_OS_WINRT |
| 38528 | 38528 | /* |
| 38529 | 38529 | ** NOTE: The WinRT sub-platform is always assumed to be based on the NT |
| 38530 | 38530 | ** kernel. |
| 38531 | 38531 | */ |
| @@ -38909,11 +38909,11 @@ | ||
| 38909 | 38909 | } |
| 38910 | 38910 | |
| 38911 | 38911 | /* |
| 38912 | 38912 | ** This is a public wrapper for the winUtf8ToUnicode() function. |
| 38913 | 38913 | */ |
| 38914 | -SQLITE_API LPWSTR SQLITE_APICALL sqlite3_win32_utf8_to_unicode(const char *zText){ | |
| 38914 | +SQLITE_API LPWSTR SQLITE_STDCALL sqlite3_win32_utf8_to_unicode(const char *zText){ | |
| 38915 | 38915 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 38916 | 38916 | if( !zText ){ |
| 38917 | 38917 | (void)SQLITE_MISUSE_BKPT; |
| 38918 | 38918 | return 0; |
| 38919 | 38919 | } |
| @@ -38925,11 +38925,11 @@ | ||
| 38925 | 38925 | } |
| 38926 | 38926 | |
| 38927 | 38927 | /* |
| 38928 | 38928 | ** This is a public wrapper for the winUnicodeToUtf8() function. |
| 38929 | 38929 | */ |
| 38930 | -SQLITE_API char *SQLITE_APICALL sqlite3_win32_unicode_to_utf8(LPCWSTR zWideText){ | |
| 38930 | +SQLITE_API char *SQLITE_STDCALL sqlite3_win32_unicode_to_utf8(LPCWSTR zWideText){ | |
| 38931 | 38931 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 38932 | 38932 | if( !zWideText ){ |
| 38933 | 38933 | (void)SQLITE_MISUSE_BKPT; |
| 38934 | 38934 | return 0; |
| 38935 | 38935 | } |
| @@ -38941,11 +38941,11 @@ | ||
| 38941 | 38941 | } |
| 38942 | 38942 | |
| 38943 | 38943 | /* |
| 38944 | 38944 | ** This is a public wrapper for the winMbcsToUtf8() function. |
| 38945 | 38945 | */ |
| 38946 | -SQLITE_API char *SQLITE_APICALL sqlite3_win32_mbcs_to_utf8(const char *zText){ | |
| 38946 | +SQLITE_API char *SQLITE_STDCALL sqlite3_win32_mbcs_to_utf8(const char *zText){ | |
| 38947 | 38947 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 38948 | 38948 | if( !zText ){ |
| 38949 | 38949 | (void)SQLITE_MISUSE_BKPT; |
| 38950 | 38950 | return 0; |
| 38951 | 38951 | } |
| @@ -38957,11 +38957,11 @@ | ||
| 38957 | 38957 | } |
| 38958 | 38958 | |
| 38959 | 38959 | /* |
| 38960 | 38960 | ** This is a public wrapper for the winMbcsToUtf8() function. |
| 38961 | 38961 | */ |
| 38962 | -SQLITE_API char *SQLITE_APICALL sqlite3_win32_mbcs_to_utf8_v2(const char *zText, int useAnsi){ | |
| 38962 | +SQLITE_API char *SQLITE_STDCALL sqlite3_win32_mbcs_to_utf8_v2(const char *zText, int useAnsi){ | |
| 38963 | 38963 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 38964 | 38964 | if( !zText ){ |
| 38965 | 38965 | (void)SQLITE_MISUSE_BKPT; |
| 38966 | 38966 | return 0; |
| 38967 | 38967 | } |
| @@ -38973,11 +38973,11 @@ | ||
| 38973 | 38973 | } |
| 38974 | 38974 | |
| 38975 | 38975 | /* |
| 38976 | 38976 | ** This is a public wrapper for the winUtf8ToMbcs() function. |
| 38977 | 38977 | */ |
| 38978 | -SQLITE_API char *SQLITE_APICALL sqlite3_win32_utf8_to_mbcs(const char *zText){ | |
| 38978 | +SQLITE_API char *SQLITE_STDCALL sqlite3_win32_utf8_to_mbcs(const char *zText){ | |
| 38979 | 38979 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 38980 | 38980 | if( !zText ){ |
| 38981 | 38981 | (void)SQLITE_MISUSE_BKPT; |
| 38982 | 38982 | return 0; |
| 38983 | 38983 | } |
| @@ -38989,11 +38989,11 @@ | ||
| 38989 | 38989 | } |
| 38990 | 38990 | |
| 38991 | 38991 | /* |
| 38992 | 38992 | ** This is a public wrapper for the winUtf8ToMbcs() function. |
| 38993 | 38993 | */ |
| 38994 | -SQLITE_API char *SQLITE_APICALL sqlite3_win32_utf8_to_mbcs_v2(const char *zText, int useAnsi){ | |
| 38994 | +SQLITE_API char *SQLITE_STDCALL sqlite3_win32_utf8_to_mbcs_v2(const char *zText, int useAnsi){ | |
| 38995 | 38995 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 38996 | 38996 | if( !zText ){ |
| 38997 | 38997 | (void)SQLITE_MISUSE_BKPT; |
| 38998 | 38998 | return 0; |
| 38999 | 38999 | } |
| @@ -39009,11 +39009,11 @@ | ||
| 39009 | 39009 | ** the provided arguments. The type argument must be 1 in order to set the |
| 39010 | 39010 | ** data directory or 2 in order to set the temporary directory. The zValue |
| 39011 | 39011 | ** argument is the name of the directory to use. The return value will be |
| 39012 | 39012 | ** SQLITE_OK if successful. |
| 39013 | 39013 | */ |
| 39014 | -SQLITE_API int SQLITE_APICALL sqlite3_win32_set_directory(DWORD type, LPCWSTR zValue){ | |
| 39014 | +SQLITE_API int SQLITE_STDCALL sqlite3_win32_set_directory(DWORD type, LPCWSTR zValue){ | |
| 39015 | 39015 | char **ppDirectory = 0; |
| 39016 | 39016 | #ifndef SQLITE_OMIT_AUTOINIT |
| 39017 | 39017 | int rc = sqlite3_initialize(); |
| 39018 | 39018 | if( rc ) return rc; |
| 39019 | 39019 | #endif |
| @@ -42927,11 +42927,11 @@ | ||
| 42927 | 42927 | } |
| 42928 | 42928 | |
| 42929 | 42929 | /* |
| 42930 | 42930 | ** Initialize and deinitialize the operating system interface. |
| 42931 | 42931 | */ |
| 42932 | -SQLITE_API int SQLITE_APICALL sqlite3_os_init(void){ | |
| 42932 | +SQLITE_API int SQLITE_STDCALL sqlite3_os_init(void){ | |
| 42933 | 42933 | static sqlite3_vfs winVfs = { |
| 42934 | 42934 | 3, /* iVersion */ |
| 42935 | 42935 | sizeof(winFile), /* szOsFile */ |
| 42936 | 42936 | SQLITE_WIN32_MAX_PATH_BYTES, /* mxPathname */ |
| 42937 | 42937 | 0, /* pNext */ |
| @@ -43058,11 +43058,11 @@ | ||
| 43058 | 43058 | #endif |
| 43059 | 43059 | |
| 43060 | 43060 | return SQLITE_OK; |
| 43061 | 43061 | } |
| 43062 | 43062 | |
| 43063 | -SQLITE_API int SQLITE_APICALL sqlite3_os_end(void){ | |
| 43063 | +SQLITE_API int SQLITE_STDCALL sqlite3_os_end(void){ | |
| 43064 | 43064 | #if SQLITE_OS_WINRT |
| 43065 | 43065 | if( sleepObj!=NULL ){ |
| 43066 | 43066 | osCloseHandle(sleepObj); |
| 43067 | 43067 | sleepObj = NULL; |
| 43068 | 43068 | } |
| @@ -57053,11 +57053,11 @@ | ||
| 57053 | 57053 | |
| 57054 | 57054 | /* |
| 57055 | 57055 | ** Return a +ve value if snapshot p1 is newer than p2. A -ve value if |
| 57056 | 57056 | ** p1 is older than p2 and zero if p1 and p2 are the same snapshot. |
| 57057 | 57057 | */ |
| 57058 | -SQLITE_API int SQLITE_APICALL sqlite3_snapshot_cmp(sqlite3_snapshot *p1, sqlite3_snapshot *p2){ | |
| 57058 | +SQLITE_API int SQLITE_STDCALL sqlite3_snapshot_cmp(sqlite3_snapshot *p1, sqlite3_snapshot *p2){ | |
| 57059 | 57059 | WalIndexHdr *pHdr1 = (WalIndexHdr*)p1; |
| 57060 | 57060 | WalIndexHdr *pHdr2 = (WalIndexHdr*)p2; |
| 57061 | 57061 | |
| 57062 | 57062 | /* aSalt[0] is a copy of the value stored in the wal file header. It |
| 57063 | 57063 | ** is incremented each time the wal file is restarted. */ |
| @@ -58190,11 +58190,11 @@ | ||
| 58190 | 58190 | ** |
| 58191 | 58191 | ** This routine has no effect on existing database connections. |
| 58192 | 58192 | ** The shared cache setting effects only future calls to |
| 58193 | 58193 | ** sqlite3_open(), sqlite3_open16(), or sqlite3_open_v2(). |
| 58194 | 58194 | */ |
| 58195 | -SQLITE_API int SQLITE_APICALL sqlite3_enable_shared_cache(int enable){ | |
| 58195 | +SQLITE_API int SQLITE_STDCALL sqlite3_enable_shared_cache(int enable){ | |
| 58196 | 58196 | sqlite3GlobalConfig.sharedCacheEnabled = enable; |
| 58197 | 58197 | return SQLITE_OK; |
| 58198 | 58198 | } |
| 58199 | 58199 | #endif |
| 58200 | 58200 | |
| @@ -64489,11 +64489,11 @@ | ||
| 64489 | 64489 | } |
| 64490 | 64490 | } |
| 64491 | 64491 | |
| 64492 | 64492 | /* |
| 64493 | 64493 | ** A CellArray object contains a cache of pointers and sizes for a |
| 64494 | -** consecutive sequence of cells that might be held multiple pages. | |
| 64494 | +** consecutive sequence of cells that might be held on multiple pages. | |
| 64495 | 64495 | */ |
| 64496 | 64496 | typedef struct CellArray CellArray; |
| 64497 | 64497 | struct CellArray { |
| 64498 | 64498 | int nCell; /* Number of cells in apCell[] */ |
| 64499 | 64499 | MemPage *pRef; /* Reference page */ |
| @@ -67963,11 +67963,11 @@ | ||
| 67963 | 67963 | ** a pointer to the new sqlite3_backup object. |
| 67964 | 67964 | ** |
| 67965 | 67965 | ** If an error occurs, NULL is returned and an error code and error message |
| 67966 | 67966 | ** stored in database handle pDestDb. |
| 67967 | 67967 | */ |
| 67968 | -SQLITE_API sqlite3_backup *SQLITE_APICALL sqlite3_backup_init( | |
| 67968 | +SQLITE_API sqlite3_backup *SQLITE_STDCALL sqlite3_backup_init( | |
| 67969 | 67969 | sqlite3* pDestDb, /* Database to write to */ |
| 67970 | 67970 | const char *zDestDb, /* Name of database within pDestDb */ |
| 67971 | 67971 | sqlite3* pSrcDb, /* Database connection to read from */ |
| 67972 | 67972 | const char *zSrcDb /* Name of database within pSrcDb */ |
| 67973 | 67973 | ){ |
| @@ -68171,11 +68171,11 @@ | ||
| 68171 | 68171 | } |
| 68172 | 68172 | |
| 68173 | 68173 | /* |
| 68174 | 68174 | ** Copy nPage pages from the source b-tree to the destination. |
| 68175 | 68175 | */ |
| 68176 | -SQLITE_API int SQLITE_APICALL sqlite3_backup_step(sqlite3_backup *p, int nPage){ | |
| 68176 | +SQLITE_API int SQLITE_STDCALL sqlite3_backup_step(sqlite3_backup *p, int nPage){ | |
| 68177 | 68177 | int rc; |
| 68178 | 68178 | int destMode; /* Destination journal mode */ |
| 68179 | 68179 | int pgszSrc = 0; /* Source page size */ |
| 68180 | 68180 | int pgszDest = 0; /* Destination page size */ |
| 68181 | 68181 | |
| @@ -68415,11 +68415,11 @@ | ||
| 68415 | 68415 | } |
| 68416 | 68416 | |
| 68417 | 68417 | /* |
| 68418 | 68418 | ** Release all resources associated with an sqlite3_backup* handle. |
| 68419 | 68419 | */ |
| 68420 | -SQLITE_API int SQLITE_APICALL sqlite3_backup_finish(sqlite3_backup *p){ | |
| 68420 | +SQLITE_API int SQLITE_STDCALL sqlite3_backup_finish(sqlite3_backup *p){ | |
| 68421 | 68421 | sqlite3_backup **pp; /* Ptr to head of pagers backup list */ |
| 68422 | 68422 | sqlite3 *pSrcDb; /* Source database connection */ |
| 68423 | 68423 | int rc; /* Value to return */ |
| 68424 | 68424 | |
| 68425 | 68425 | /* Enter the mutexes */ |
| @@ -68467,11 +68467,11 @@ | ||
| 68467 | 68467 | |
| 68468 | 68468 | /* |
| 68469 | 68469 | ** Return the number of pages still to be backed up as of the most recent |
| 68470 | 68470 | ** call to sqlite3_backup_step(). |
| 68471 | 68471 | */ |
| 68472 | -SQLITE_API int SQLITE_APICALL sqlite3_backup_remaining(sqlite3_backup *p){ | |
| 68472 | +SQLITE_API int SQLITE_STDCALL sqlite3_backup_remaining(sqlite3_backup *p){ | |
| 68473 | 68473 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 68474 | 68474 | if( p==0 ){ |
| 68475 | 68475 | (void)SQLITE_MISUSE_BKPT; |
| 68476 | 68476 | return 0; |
| 68477 | 68477 | } |
| @@ -68481,11 +68481,11 @@ | ||
| 68481 | 68481 | |
| 68482 | 68482 | /* |
| 68483 | 68483 | ** Return the total number of pages in the source database as of the most |
| 68484 | 68484 | ** recent call to sqlite3_backup_step(). |
| 68485 | 68485 | */ |
| 68486 | -SQLITE_API int SQLITE_APICALL sqlite3_backup_pagecount(sqlite3_backup *p){ | |
| 68486 | +SQLITE_API int SQLITE_STDCALL sqlite3_backup_pagecount(sqlite3_backup *p){ | |
| 68487 | 68487 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 68488 | 68488 | if( p==0 ){ |
| 68489 | 68489 | (void)SQLITE_MISUSE_BKPT; |
| 68490 | 68490 | return 0; |
| 68491 | 68491 | } |
| @@ -74935,11 +74935,11 @@ | ||
| 74935 | 74935 | ** execution environment changes in a way that would alter the program |
| 74936 | 74936 | ** that sqlite3_prepare() generates. For example, if new functions or |
| 74937 | 74937 | ** collating sequences are registered or if an authorizer function is |
| 74938 | 74938 | ** added or changed. |
| 74939 | 74939 | */ |
| 74940 | -SQLITE_API int SQLITE_APICALL sqlite3_expired(sqlite3_stmt *pStmt){ | |
| 74940 | +SQLITE_API int SQLITE_STDCALL sqlite3_expired(sqlite3_stmt *pStmt){ | |
| 74941 | 74941 | Vdbe *p = (Vdbe*)pStmt; |
| 74942 | 74942 | return p==0 || p->expired; |
| 74943 | 74943 | } |
| 74944 | 74944 | #endif |
| 74945 | 74945 | |
| @@ -75004,11 +75004,11 @@ | ||
| 75004 | 75004 | ** machine. |
| 75005 | 75005 | ** |
| 75006 | 75006 | ** This routine sets the error code and string returned by |
| 75007 | 75007 | ** sqlite3_errcode(), sqlite3_errmsg() and sqlite3_errmsg16(). |
| 75008 | 75008 | */ |
| 75009 | -SQLITE_API int SQLITE_APICALL sqlite3_finalize(sqlite3_stmt *pStmt){ | |
| 75009 | +SQLITE_API int SQLITE_STDCALL sqlite3_finalize(sqlite3_stmt *pStmt){ | |
| 75010 | 75010 | int rc; |
| 75011 | 75011 | if( pStmt==0 ){ |
| 75012 | 75012 | /* IMPLEMENTATION-OF: R-57228-12904 Invoking sqlite3_finalize() on a NULL |
| 75013 | 75013 | ** pointer is a harmless no-op. */ |
| 75014 | 75014 | rc = SQLITE_OK; |
| @@ -75031,11 +75031,11 @@ | ||
| 75031 | 75031 | ** the prior execution is returned. |
| 75032 | 75032 | ** |
| 75033 | 75033 | ** This routine sets the error code and string returned by |
| 75034 | 75034 | ** sqlite3_errcode(), sqlite3_errmsg() and sqlite3_errmsg16(). |
| 75035 | 75035 | */ |
| 75036 | -SQLITE_API int SQLITE_APICALL sqlite3_reset(sqlite3_stmt *pStmt){ | |
| 75036 | +SQLITE_API int SQLITE_STDCALL sqlite3_reset(sqlite3_stmt *pStmt){ | |
| 75037 | 75037 | int rc; |
| 75038 | 75038 | if( pStmt==0 ){ |
| 75039 | 75039 | rc = SQLITE_OK; |
| 75040 | 75040 | }else{ |
| 75041 | 75041 | Vdbe *v = (Vdbe*)pStmt; |
| @@ -75052,11 +75052,11 @@ | ||
| 75052 | 75052 | } |
| 75053 | 75053 | |
| 75054 | 75054 | /* |
| 75055 | 75055 | ** Set all the parameters in the compiled SQL statement to NULL. |
| 75056 | 75056 | */ |
| 75057 | -SQLITE_API int SQLITE_APICALL sqlite3_clear_bindings(sqlite3_stmt *pStmt){ | |
| 75057 | +SQLITE_API int SQLITE_STDCALL sqlite3_clear_bindings(sqlite3_stmt *pStmt){ | |
| 75058 | 75058 | int i; |
| 75059 | 75059 | int rc = SQLITE_OK; |
| 75060 | 75060 | Vdbe *p = (Vdbe*)pStmt; |
| 75061 | 75061 | #if SQLITE_THREADSAFE |
| 75062 | 75062 | sqlite3_mutex *mutex = ((Vdbe*)pStmt)->db->mutex; |
| @@ -75076,11 +75076,11 @@ | ||
| 75076 | 75076 | |
| 75077 | 75077 | /**************************** sqlite3_value_ ******************************* |
| 75078 | 75078 | ** The following routines extract information from a Mem or sqlite3_value |
| 75079 | 75079 | ** structure. |
| 75080 | 75080 | */ |
| 75081 | -SQLITE_API const void *SQLITE_APICALL sqlite3_value_blob(sqlite3_value *pVal){ | |
| 75081 | +SQLITE_API const void *SQLITE_STDCALL sqlite3_value_blob(sqlite3_value *pVal){ | |
| 75082 | 75082 | Mem *p = (Mem*)pVal; |
| 75083 | 75083 | if( p->flags & (MEM_Blob|MEM_Str) ){ |
| 75084 | 75084 | if( sqlite3VdbeMemExpandBlob(p)!=SQLITE_OK ){ |
| 75085 | 75085 | assert( p->flags==MEM_Null && p->z==0 ); |
| 75086 | 75086 | return 0; |
| @@ -75089,48 +75089,48 @@ | ||
| 75089 | 75089 | return p->n ? p->z : 0; |
| 75090 | 75090 | }else{ |
| 75091 | 75091 | return sqlite3_value_text(pVal); |
| 75092 | 75092 | } |
| 75093 | 75093 | } |
| 75094 | -SQLITE_API int SQLITE_APICALL sqlite3_value_bytes(sqlite3_value *pVal){ | |
| 75094 | +SQLITE_API int SQLITE_STDCALL sqlite3_value_bytes(sqlite3_value *pVal){ | |
| 75095 | 75095 | return sqlite3ValueBytes(pVal, SQLITE_UTF8); |
| 75096 | 75096 | } |
| 75097 | -SQLITE_API int SQLITE_APICALL sqlite3_value_bytes16(sqlite3_value *pVal){ | |
| 75097 | +SQLITE_API int SQLITE_STDCALL sqlite3_value_bytes16(sqlite3_value *pVal){ | |
| 75098 | 75098 | return sqlite3ValueBytes(pVal, SQLITE_UTF16NATIVE); |
| 75099 | 75099 | } |
| 75100 | -SQLITE_API double SQLITE_APICALL sqlite3_value_double(sqlite3_value *pVal){ | |
| 75100 | +SQLITE_API double SQLITE_STDCALL sqlite3_value_double(sqlite3_value *pVal){ | |
| 75101 | 75101 | return sqlite3VdbeRealValue((Mem*)pVal); |
| 75102 | 75102 | } |
| 75103 | -SQLITE_API int SQLITE_APICALL sqlite3_value_int(sqlite3_value *pVal){ | |
| 75103 | +SQLITE_API int SQLITE_STDCALL sqlite3_value_int(sqlite3_value *pVal){ | |
| 75104 | 75104 | return (int)sqlite3VdbeIntValue((Mem*)pVal); |
| 75105 | 75105 | } |
| 75106 | -SQLITE_API sqlite_int64 SQLITE_APICALL sqlite3_value_int64(sqlite3_value *pVal){ | |
| 75106 | +SQLITE_API sqlite_int64 SQLITE_STDCALL sqlite3_value_int64(sqlite3_value *pVal){ | |
| 75107 | 75107 | return sqlite3VdbeIntValue((Mem*)pVal); |
| 75108 | 75108 | } |
| 75109 | -SQLITE_API unsigned int SQLITE_APICALL sqlite3_value_subtype(sqlite3_value *pVal){ | |
| 75109 | +SQLITE_API unsigned int SQLITE_STDCALL sqlite3_value_subtype(sqlite3_value *pVal){ | |
| 75110 | 75110 | Mem *pMem = (Mem*)pVal; |
| 75111 | 75111 | return ((pMem->flags & MEM_Subtype) ? pMem->eSubtype : 0); |
| 75112 | 75112 | } |
| 75113 | -SQLITE_API const unsigned char *SQLITE_APICALL sqlite3_value_text(sqlite3_value *pVal){ | |
| 75113 | +SQLITE_API const unsigned char *SQLITE_STDCALL sqlite3_value_text(sqlite3_value *pVal){ | |
| 75114 | 75114 | return (const unsigned char *)sqlite3ValueText(pVal, SQLITE_UTF8); |
| 75115 | 75115 | } |
| 75116 | 75116 | #ifndef SQLITE_OMIT_UTF16 |
| 75117 | -SQLITE_API const void *SQLITE_APICALL sqlite3_value_text16(sqlite3_value* pVal){ | |
| 75117 | +SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16(sqlite3_value* pVal){ | |
| 75118 | 75118 | return sqlite3ValueText(pVal, SQLITE_UTF16NATIVE); |
| 75119 | 75119 | } |
| 75120 | -SQLITE_API const void *SQLITE_APICALL sqlite3_value_text16be(sqlite3_value *pVal){ | |
| 75120 | +SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16be(sqlite3_value *pVal){ | |
| 75121 | 75121 | return sqlite3ValueText(pVal, SQLITE_UTF16BE); |
| 75122 | 75122 | } |
| 75123 | -SQLITE_API const void *SQLITE_APICALL sqlite3_value_text16le(sqlite3_value *pVal){ | |
| 75123 | +SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16le(sqlite3_value *pVal){ | |
| 75124 | 75124 | return sqlite3ValueText(pVal, SQLITE_UTF16LE); |
| 75125 | 75125 | } |
| 75126 | 75126 | #endif /* SQLITE_OMIT_UTF16 */ |
| 75127 | 75127 | /* EVIDENCE-OF: R-12793-43283 Every value in SQLite has one of five |
| 75128 | 75128 | ** fundamental datatypes: 64-bit signed integer 64-bit IEEE floating |
| 75129 | 75129 | ** point number string BLOB NULL |
| 75130 | 75130 | */ |
| 75131 | -SQLITE_API int SQLITE_APICALL sqlite3_value_type(sqlite3_value* pVal){ | |
| 75131 | +SQLITE_API int SQLITE_STDCALL sqlite3_value_type(sqlite3_value* pVal){ | |
| 75132 | 75132 | static const u8 aType[] = { |
| 75133 | 75133 | SQLITE_BLOB, /* 0x00 */ |
| 75134 | 75134 | SQLITE_NULL, /* 0x01 */ |
| 75135 | 75135 | SQLITE_TEXT, /* 0x02 */ |
| 75136 | 75136 | SQLITE_NULL, /* 0x03 */ |
| @@ -75166,11 +75166,11 @@ | ||
| 75166 | 75166 | return aType[pVal->flags&MEM_AffMask]; |
| 75167 | 75167 | } |
| 75168 | 75168 | |
| 75169 | 75169 | /* Make a copy of an sqlite3_value object |
| 75170 | 75170 | */ |
| 75171 | -SQLITE_API sqlite3_value *SQLITE_APICALL sqlite3_value_dup(const sqlite3_value *pOrig){ | |
| 75171 | +SQLITE_API sqlite3_value *SQLITE_STDCALL sqlite3_value_dup(const sqlite3_value *pOrig){ | |
| 75172 | 75172 | sqlite3_value *pNew; |
| 75173 | 75173 | if( pOrig==0 ) return 0; |
| 75174 | 75174 | pNew = sqlite3_malloc( sizeof(*pNew) ); |
| 75175 | 75175 | if( pNew==0 ) return 0; |
| 75176 | 75176 | memset(pNew, 0, sizeof(*pNew)); |
| @@ -75189,11 +75189,11 @@ | ||
| 75189 | 75189 | } |
| 75190 | 75190 | |
| 75191 | 75191 | /* Destroy an sqlite3_value object previously obtained from |
| 75192 | 75192 | ** sqlite3_value_dup(). |
| 75193 | 75193 | */ |
| 75194 | -SQLITE_API void SQLITE_APICALL sqlite3_value_free(sqlite3_value *pOld){ | |
| 75194 | +SQLITE_API void SQLITE_STDCALL sqlite3_value_free(sqlite3_value *pOld){ | |
| 75195 | 75195 | sqlite3ValueFree(pOld); |
| 75196 | 75196 | } |
| 75197 | 75197 | |
| 75198 | 75198 | |
| 75199 | 75199 | /**************************** sqlite3_result_ ******************************* |
| @@ -75232,21 +75232,21 @@ | ||
| 75232 | 75232 | xDel((void*)p); |
| 75233 | 75233 | } |
| 75234 | 75234 | if( pCtx ) sqlite3_result_error_toobig(pCtx); |
| 75235 | 75235 | return SQLITE_TOOBIG; |
| 75236 | 75236 | } |
| 75237 | -SQLITE_API void SQLITE_APICALL sqlite3_result_blob( | |
| 75237 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_blob( | |
| 75238 | 75238 | sqlite3_context *pCtx, |
| 75239 | 75239 | const void *z, |
| 75240 | 75240 | int n, |
| 75241 | 75241 | void (*xDel)(void *) |
| 75242 | 75242 | ){ |
| 75243 | 75243 | assert( n>=0 ); |
| 75244 | 75244 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75245 | 75245 | setResultStrOrError(pCtx, z, n, 0, xDel); |
| 75246 | 75246 | } |
| 75247 | -SQLITE_API void SQLITE_APICALL sqlite3_result_blob64( | |
| 75247 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_blob64( | |
| 75248 | 75248 | sqlite3_context *pCtx, |
| 75249 | 75249 | const void *z, |
| 75250 | 75250 | sqlite3_uint64 n, |
| 75251 | 75251 | void (*xDel)(void *) |
| 75252 | 75252 | ){ |
| @@ -75256,56 +75256,56 @@ | ||
| 75256 | 75256 | (void)invokeValueDestructor(z, xDel, pCtx); |
| 75257 | 75257 | }else{ |
| 75258 | 75258 | setResultStrOrError(pCtx, z, (int)n, 0, xDel); |
| 75259 | 75259 | } |
| 75260 | 75260 | } |
| 75261 | -SQLITE_API void SQLITE_APICALL sqlite3_result_double(sqlite3_context *pCtx, double rVal){ | |
| 75261 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_double(sqlite3_context *pCtx, double rVal){ | |
| 75262 | 75262 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75263 | 75263 | sqlite3VdbeMemSetDouble(pCtx->pOut, rVal); |
| 75264 | 75264 | } |
| 75265 | -SQLITE_API void SQLITE_APICALL sqlite3_result_error(sqlite3_context *pCtx, const char *z, int n){ | |
| 75265 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_error(sqlite3_context *pCtx, const char *z, int n){ | |
| 75266 | 75266 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75267 | 75267 | pCtx->isError = SQLITE_ERROR; |
| 75268 | 75268 | pCtx->fErrorOrAux = 1; |
| 75269 | 75269 | sqlite3VdbeMemSetStr(pCtx->pOut, z, n, SQLITE_UTF8, SQLITE_TRANSIENT); |
| 75270 | 75270 | } |
| 75271 | 75271 | #ifndef SQLITE_OMIT_UTF16 |
| 75272 | -SQLITE_API void SQLITE_APICALL sqlite3_result_error16(sqlite3_context *pCtx, const void *z, int n){ | |
| 75272 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_error16(sqlite3_context *pCtx, const void *z, int n){ | |
| 75273 | 75273 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75274 | 75274 | pCtx->isError = SQLITE_ERROR; |
| 75275 | 75275 | pCtx->fErrorOrAux = 1; |
| 75276 | 75276 | sqlite3VdbeMemSetStr(pCtx->pOut, z, n, SQLITE_UTF16NATIVE, SQLITE_TRANSIENT); |
| 75277 | 75277 | } |
| 75278 | 75278 | #endif |
| 75279 | -SQLITE_API void SQLITE_APICALL sqlite3_result_int(sqlite3_context *pCtx, int iVal){ | |
| 75279 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_int(sqlite3_context *pCtx, int iVal){ | |
| 75280 | 75280 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75281 | 75281 | sqlite3VdbeMemSetInt64(pCtx->pOut, (i64)iVal); |
| 75282 | 75282 | } |
| 75283 | -SQLITE_API void SQLITE_APICALL sqlite3_result_int64(sqlite3_context *pCtx, i64 iVal){ | |
| 75283 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_int64(sqlite3_context *pCtx, i64 iVal){ | |
| 75284 | 75284 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75285 | 75285 | sqlite3VdbeMemSetInt64(pCtx->pOut, iVal); |
| 75286 | 75286 | } |
| 75287 | -SQLITE_API void SQLITE_APICALL sqlite3_result_null(sqlite3_context *pCtx){ | |
| 75287 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_null(sqlite3_context *pCtx){ | |
| 75288 | 75288 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75289 | 75289 | sqlite3VdbeMemSetNull(pCtx->pOut); |
| 75290 | 75290 | } |
| 75291 | -SQLITE_API void SQLITE_APICALL sqlite3_result_subtype(sqlite3_context *pCtx, unsigned int eSubtype){ | |
| 75291 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_subtype(sqlite3_context *pCtx, unsigned int eSubtype){ | |
| 75292 | 75292 | Mem *pOut = pCtx->pOut; |
| 75293 | 75293 | assert( sqlite3_mutex_held(pOut->db->mutex) ); |
| 75294 | 75294 | pOut->eSubtype = eSubtype & 0xff; |
| 75295 | 75295 | pOut->flags |= MEM_Subtype; |
| 75296 | 75296 | } |
| 75297 | -SQLITE_API void SQLITE_APICALL sqlite3_result_text( | |
| 75297 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_text( | |
| 75298 | 75298 | sqlite3_context *pCtx, |
| 75299 | 75299 | const char *z, |
| 75300 | 75300 | int n, |
| 75301 | 75301 | void (*xDel)(void *) |
| 75302 | 75302 | ){ |
| 75303 | 75303 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75304 | 75304 | setResultStrOrError(pCtx, z, n, SQLITE_UTF8, xDel); |
| 75305 | 75305 | } |
| 75306 | -SQLITE_API void SQLITE_APICALL sqlite3_result_text64( | |
| 75306 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_text64( | |
| 75307 | 75307 | sqlite3_context *pCtx, |
| 75308 | 75308 | const char *z, |
| 75309 | 75309 | sqlite3_uint64 n, |
| 75310 | 75310 | void (*xDel)(void *), |
| 75311 | 75311 | unsigned char enc |
| @@ -75318,56 +75318,56 @@ | ||
| 75318 | 75318 | }else{ |
| 75319 | 75319 | setResultStrOrError(pCtx, z, (int)n, enc, xDel); |
| 75320 | 75320 | } |
| 75321 | 75321 | } |
| 75322 | 75322 | #ifndef SQLITE_OMIT_UTF16 |
| 75323 | -SQLITE_API void SQLITE_APICALL sqlite3_result_text16( | |
| 75323 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_text16( | |
| 75324 | 75324 | sqlite3_context *pCtx, |
| 75325 | 75325 | const void *z, |
| 75326 | 75326 | int n, |
| 75327 | 75327 | void (*xDel)(void *) |
| 75328 | 75328 | ){ |
| 75329 | 75329 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75330 | 75330 | setResultStrOrError(pCtx, z, n, SQLITE_UTF16NATIVE, xDel); |
| 75331 | 75331 | } |
| 75332 | -SQLITE_API void SQLITE_APICALL sqlite3_result_text16be( | |
| 75332 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_text16be( | |
| 75333 | 75333 | sqlite3_context *pCtx, |
| 75334 | 75334 | const void *z, |
| 75335 | 75335 | int n, |
| 75336 | 75336 | void (*xDel)(void *) |
| 75337 | 75337 | ){ |
| 75338 | 75338 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75339 | 75339 | setResultStrOrError(pCtx, z, n, SQLITE_UTF16BE, xDel); |
| 75340 | 75340 | } |
| 75341 | -SQLITE_API void SQLITE_APICALL sqlite3_result_text16le( | |
| 75341 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_text16le( | |
| 75342 | 75342 | sqlite3_context *pCtx, |
| 75343 | 75343 | const void *z, |
| 75344 | 75344 | int n, |
| 75345 | 75345 | void (*xDel)(void *) |
| 75346 | 75346 | ){ |
| 75347 | 75347 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75348 | 75348 | setResultStrOrError(pCtx, z, n, SQLITE_UTF16LE, xDel); |
| 75349 | 75349 | } |
| 75350 | 75350 | #endif /* SQLITE_OMIT_UTF16 */ |
| 75351 | -SQLITE_API void SQLITE_APICALL sqlite3_result_value(sqlite3_context *pCtx, sqlite3_value *pValue){ | |
| 75351 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_value(sqlite3_context *pCtx, sqlite3_value *pValue){ | |
| 75352 | 75352 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75353 | 75353 | sqlite3VdbeMemCopy(pCtx->pOut, pValue); |
| 75354 | 75354 | } |
| 75355 | -SQLITE_API void SQLITE_APICALL sqlite3_result_zeroblob(sqlite3_context *pCtx, int n){ | |
| 75355 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_zeroblob(sqlite3_context *pCtx, int n){ | |
| 75356 | 75356 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75357 | 75357 | sqlite3VdbeMemSetZeroBlob(pCtx->pOut, n); |
| 75358 | 75358 | } |
| 75359 | -SQLITE_API int SQLITE_APICALL sqlite3_result_zeroblob64(sqlite3_context *pCtx, u64 n){ | |
| 75359 | +SQLITE_API int SQLITE_STDCALL sqlite3_result_zeroblob64(sqlite3_context *pCtx, u64 n){ | |
| 75360 | 75360 | Mem *pOut = pCtx->pOut; |
| 75361 | 75361 | assert( sqlite3_mutex_held(pOut->db->mutex) ); |
| 75362 | 75362 | if( n>(u64)pOut->db->aLimit[SQLITE_LIMIT_LENGTH] ){ |
| 75363 | 75363 | return SQLITE_TOOBIG; |
| 75364 | 75364 | } |
| 75365 | 75365 | sqlite3VdbeMemSetZeroBlob(pCtx->pOut, (int)n); |
| 75366 | 75366 | return SQLITE_OK; |
| 75367 | 75367 | } |
| 75368 | -SQLITE_API void SQLITE_APICALL sqlite3_result_error_code(sqlite3_context *pCtx, int errCode){ | |
| 75368 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_error_code(sqlite3_context *pCtx, int errCode){ | |
| 75369 | 75369 | pCtx->isError = errCode; |
| 75370 | 75370 | pCtx->fErrorOrAux = 1; |
| 75371 | 75371 | #ifdef SQLITE_DEBUG |
| 75372 | 75372 | if( pCtx->pVdbe ) pCtx->pVdbe->rcApp = errCode; |
| 75373 | 75373 | #endif |
| @@ -75376,20 +75376,20 @@ | ||
| 75376 | 75376 | SQLITE_UTF8, SQLITE_STATIC); |
| 75377 | 75377 | } |
| 75378 | 75378 | } |
| 75379 | 75379 | |
| 75380 | 75380 | /* Force an SQLITE_TOOBIG error. */ |
| 75381 | -SQLITE_API void SQLITE_APICALL sqlite3_result_error_toobig(sqlite3_context *pCtx){ | |
| 75381 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_error_toobig(sqlite3_context *pCtx){ | |
| 75382 | 75382 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75383 | 75383 | pCtx->isError = SQLITE_TOOBIG; |
| 75384 | 75384 | pCtx->fErrorOrAux = 1; |
| 75385 | 75385 | sqlite3VdbeMemSetStr(pCtx->pOut, "string or blob too big", -1, |
| 75386 | 75386 | SQLITE_UTF8, SQLITE_STATIC); |
| 75387 | 75387 | } |
| 75388 | 75388 | |
| 75389 | 75389 | /* An SQLITE_NOMEM error. */ |
| 75390 | -SQLITE_API void SQLITE_APICALL sqlite3_result_error_nomem(sqlite3_context *pCtx){ | |
| 75390 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_error_nomem(sqlite3_context *pCtx){ | |
| 75391 | 75391 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75392 | 75392 | sqlite3VdbeMemSetNull(pCtx->pOut); |
| 75393 | 75393 | pCtx->isError = SQLITE_NOMEM_BKPT; |
| 75394 | 75394 | pCtx->fErrorOrAux = 1; |
| 75395 | 75395 | sqlite3OomFault(pCtx->pOut->db); |
| @@ -75557,11 +75557,11 @@ | ||
| 75557 | 75557 | /* |
| 75558 | 75558 | ** This is the top-level implementation of sqlite3_step(). Call |
| 75559 | 75559 | ** sqlite3Step() to do most of the work. If a schema error occurs, |
| 75560 | 75560 | ** call sqlite3Reprepare() and try again. |
| 75561 | 75561 | */ |
| 75562 | -SQLITE_API int SQLITE_APICALL sqlite3_step(sqlite3_stmt *pStmt){ | |
| 75562 | +SQLITE_API int SQLITE_STDCALL sqlite3_step(sqlite3_stmt *pStmt){ | |
| 75563 | 75563 | int rc = SQLITE_OK; /* Result from sqlite3Step() */ |
| 75564 | 75564 | int rc2 = SQLITE_OK; /* Result from sqlite3Reprepare() */ |
| 75565 | 75565 | Vdbe *v = (Vdbe*)pStmt; /* the prepared statement */ |
| 75566 | 75566 | int cnt = 0; /* Counter to prevent infinite loop of reprepares */ |
| 75567 | 75567 | sqlite3 *db; /* The database connection */ |
| @@ -75608,11 +75608,11 @@ | ||
| 75608 | 75608 | |
| 75609 | 75609 | /* |
| 75610 | 75610 | ** Extract the user data from a sqlite3_context structure and return a |
| 75611 | 75611 | ** pointer to it. |
| 75612 | 75612 | */ |
| 75613 | -SQLITE_API void *SQLITE_APICALL sqlite3_user_data(sqlite3_context *p){ | |
| 75613 | +SQLITE_API void *SQLITE_STDCALL sqlite3_user_data(sqlite3_context *p){ | |
| 75614 | 75614 | assert( p && p->pFunc ); |
| 75615 | 75615 | return p->pFunc->pUserData; |
| 75616 | 75616 | } |
| 75617 | 75617 | |
| 75618 | 75618 | /* |
| @@ -75623,11 +75623,11 @@ | ||
| 75623 | 75623 | ** returns a copy of the pointer to the database connection (the 1st |
| 75624 | 75624 | ** parameter) of the sqlite3_create_function() and |
| 75625 | 75625 | ** sqlite3_create_function16() routines that originally registered the |
| 75626 | 75626 | ** application defined function. |
| 75627 | 75627 | */ |
| 75628 | -SQLITE_API sqlite3 *SQLITE_APICALL sqlite3_context_db_handle(sqlite3_context *p){ | |
| 75628 | +SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3_context_db_handle(sqlite3_context *p){ | |
| 75629 | 75629 | assert( p && p->pOut ); |
| 75630 | 75630 | return p->pOut->db; |
| 75631 | 75631 | } |
| 75632 | 75632 | |
| 75633 | 75633 | /* |
| @@ -75699,11 +75699,11 @@ | ||
| 75699 | 75699 | /* |
| 75700 | 75700 | ** Allocate or return the aggregate context for a user function. A new |
| 75701 | 75701 | ** context is allocated on the first call. Subsequent calls return the |
| 75702 | 75702 | ** same context that was returned on prior calls. |
| 75703 | 75703 | */ |
| 75704 | -SQLITE_API void *SQLITE_APICALL sqlite3_aggregate_context(sqlite3_context *p, int nByte){ | |
| 75704 | +SQLITE_API void *SQLITE_STDCALL sqlite3_aggregate_context(sqlite3_context *p, int nByte){ | |
| 75705 | 75705 | assert( p && p->pFunc && p->pFunc->xFinalize ); |
| 75706 | 75706 | assert( sqlite3_mutex_held(p->pOut->db->mutex) ); |
| 75707 | 75707 | testcase( nByte<0 ); |
| 75708 | 75708 | if( (p->pMem->flags & MEM_Agg)==0 ){ |
| 75709 | 75709 | return createAggContext(p, nByte); |
| @@ -75714,11 +75714,11 @@ | ||
| 75714 | 75714 | |
| 75715 | 75715 | /* |
| 75716 | 75716 | ** Return the auxiliary data pointer, if any, for the iArg'th argument to |
| 75717 | 75717 | ** the user-function defined by pCtx. |
| 75718 | 75718 | */ |
| 75719 | -SQLITE_API void *SQLITE_APICALL sqlite3_get_auxdata(sqlite3_context *pCtx, int iArg){ | |
| 75719 | +SQLITE_API void *SQLITE_STDCALL sqlite3_get_auxdata(sqlite3_context *pCtx, int iArg){ | |
| 75720 | 75720 | AuxData *pAuxData; |
| 75721 | 75721 | |
| 75722 | 75722 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75723 | 75723 | #if SQLITE_ENABLE_STAT3_OR_STAT4 |
| 75724 | 75724 | if( pCtx->pVdbe==0 ) return 0; |
| @@ -75735,11 +75735,11 @@ | ||
| 75735 | 75735 | /* |
| 75736 | 75736 | ** Set the auxiliary data pointer and delete function, for the iArg'th |
| 75737 | 75737 | ** argument to the user-function defined by pCtx. Any previous value is |
| 75738 | 75738 | ** deleted by calling the delete function specified when it was set. |
| 75739 | 75739 | */ |
| 75740 | -SQLITE_API void SQLITE_APICALL sqlite3_set_auxdata( | |
| 75740 | +SQLITE_API void SQLITE_STDCALL sqlite3_set_auxdata( | |
| 75741 | 75741 | sqlite3_context *pCtx, |
| 75742 | 75742 | int iArg, |
| 75743 | 75743 | void *pAux, |
| 75744 | 75744 | void (*xDelete)(void*) |
| 75745 | 75745 | ){ |
| @@ -75790,29 +75790,29 @@ | ||
| 75790 | 75790 | ** This function is deprecated. Do not use it for new code. It is |
| 75791 | 75791 | ** provide only to avoid breaking legacy code. New aggregate function |
| 75792 | 75792 | ** implementations should keep their own counts within their aggregate |
| 75793 | 75793 | ** context. |
| 75794 | 75794 | */ |
| 75795 | -SQLITE_API int SQLITE_APICALL sqlite3_aggregate_count(sqlite3_context *p){ | |
| 75795 | +SQLITE_API int SQLITE_STDCALL sqlite3_aggregate_count(sqlite3_context *p){ | |
| 75796 | 75796 | assert( p && p->pMem && p->pFunc && p->pFunc->xFinalize ); |
| 75797 | 75797 | return p->pMem->n; |
| 75798 | 75798 | } |
| 75799 | 75799 | #endif |
| 75800 | 75800 | |
| 75801 | 75801 | /* |
| 75802 | 75802 | ** Return the number of columns in the result set for the statement pStmt. |
| 75803 | 75803 | */ |
| 75804 | -SQLITE_API int SQLITE_APICALL sqlite3_column_count(sqlite3_stmt *pStmt){ | |
| 75804 | +SQLITE_API int SQLITE_STDCALL sqlite3_column_count(sqlite3_stmt *pStmt){ | |
| 75805 | 75805 | Vdbe *pVm = (Vdbe *)pStmt; |
| 75806 | 75806 | return pVm ? pVm->nResColumn : 0; |
| 75807 | 75807 | } |
| 75808 | 75808 | |
| 75809 | 75809 | /* |
| 75810 | 75810 | ** Return the number of values available from the current row of the |
| 75811 | 75811 | ** currently executing statement pStmt. |
| 75812 | 75812 | */ |
| 75813 | -SQLITE_API int SQLITE_APICALL sqlite3_data_count(sqlite3_stmt *pStmt){ | |
| 75813 | +SQLITE_API int SQLITE_STDCALL sqlite3_data_count(sqlite3_stmt *pStmt){ | |
| 75814 | 75814 | Vdbe *pVm = (Vdbe *)pStmt; |
| 75815 | 75815 | if( pVm==0 || pVm->pResultSet==0 ) return 0; |
| 75816 | 75816 | return pVm->nResColumn; |
| 75817 | 75817 | } |
| 75818 | 75818 | |
| @@ -75911,67 +75911,67 @@ | ||
| 75911 | 75911 | |
| 75912 | 75912 | /**************************** sqlite3_column_ ******************************* |
| 75913 | 75913 | ** The following routines are used to access elements of the current row |
| 75914 | 75914 | ** in the result set. |
| 75915 | 75915 | */ |
| 75916 | -SQLITE_API const void *SQLITE_APICALL sqlite3_column_blob(sqlite3_stmt *pStmt, int i){ | |
| 75916 | +SQLITE_API const void *SQLITE_STDCALL sqlite3_column_blob(sqlite3_stmt *pStmt, int i){ | |
| 75917 | 75917 | const void *val; |
| 75918 | 75918 | val = sqlite3_value_blob( columnMem(pStmt,i) ); |
| 75919 | 75919 | /* Even though there is no encoding conversion, value_blob() might |
| 75920 | 75920 | ** need to call malloc() to expand the result of a zeroblob() |
| 75921 | 75921 | ** expression. |
| 75922 | 75922 | */ |
| 75923 | 75923 | columnMallocFailure(pStmt); |
| 75924 | 75924 | return val; |
| 75925 | 75925 | } |
| 75926 | -SQLITE_API int SQLITE_APICALL sqlite3_column_bytes(sqlite3_stmt *pStmt, int i){ | |
| 75926 | +SQLITE_API int SQLITE_STDCALL sqlite3_column_bytes(sqlite3_stmt *pStmt, int i){ | |
| 75927 | 75927 | int val = sqlite3_value_bytes( columnMem(pStmt,i) ); |
| 75928 | 75928 | columnMallocFailure(pStmt); |
| 75929 | 75929 | return val; |
| 75930 | 75930 | } |
| 75931 | -SQLITE_API int SQLITE_APICALL sqlite3_column_bytes16(sqlite3_stmt *pStmt, int i){ | |
| 75931 | +SQLITE_API int SQLITE_STDCALL sqlite3_column_bytes16(sqlite3_stmt *pStmt, int i){ | |
| 75932 | 75932 | int val = sqlite3_value_bytes16( columnMem(pStmt,i) ); |
| 75933 | 75933 | columnMallocFailure(pStmt); |
| 75934 | 75934 | return val; |
| 75935 | 75935 | } |
| 75936 | -SQLITE_API double SQLITE_APICALL sqlite3_column_double(sqlite3_stmt *pStmt, int i){ | |
| 75936 | +SQLITE_API double SQLITE_STDCALL sqlite3_column_double(sqlite3_stmt *pStmt, int i){ | |
| 75937 | 75937 | double val = sqlite3_value_double( columnMem(pStmt,i) ); |
| 75938 | 75938 | columnMallocFailure(pStmt); |
| 75939 | 75939 | return val; |
| 75940 | 75940 | } |
| 75941 | -SQLITE_API int SQLITE_APICALL sqlite3_column_int(sqlite3_stmt *pStmt, int i){ | |
| 75941 | +SQLITE_API int SQLITE_STDCALL sqlite3_column_int(sqlite3_stmt *pStmt, int i){ | |
| 75942 | 75942 | int val = sqlite3_value_int( columnMem(pStmt,i) ); |
| 75943 | 75943 | columnMallocFailure(pStmt); |
| 75944 | 75944 | return val; |
| 75945 | 75945 | } |
| 75946 | -SQLITE_API sqlite_int64 SQLITE_APICALL sqlite3_column_int64(sqlite3_stmt *pStmt, int i){ | |
| 75946 | +SQLITE_API sqlite_int64 SQLITE_STDCALL sqlite3_column_int64(sqlite3_stmt *pStmt, int i){ | |
| 75947 | 75947 | sqlite_int64 val = sqlite3_value_int64( columnMem(pStmt,i) ); |
| 75948 | 75948 | columnMallocFailure(pStmt); |
| 75949 | 75949 | return val; |
| 75950 | 75950 | } |
| 75951 | -SQLITE_API const unsigned char *SQLITE_APICALL sqlite3_column_text(sqlite3_stmt *pStmt, int i){ | |
| 75951 | +SQLITE_API const unsigned char *SQLITE_STDCALL sqlite3_column_text(sqlite3_stmt *pStmt, int i){ | |
| 75952 | 75952 | const unsigned char *val = sqlite3_value_text( columnMem(pStmt,i) ); |
| 75953 | 75953 | columnMallocFailure(pStmt); |
| 75954 | 75954 | return val; |
| 75955 | 75955 | } |
| 75956 | -SQLITE_API sqlite3_value *SQLITE_APICALL sqlite3_column_value(sqlite3_stmt *pStmt, int i){ | |
| 75956 | +SQLITE_API sqlite3_value *SQLITE_STDCALL sqlite3_column_value(sqlite3_stmt *pStmt, int i){ | |
| 75957 | 75957 | Mem *pOut = columnMem(pStmt, i); |
| 75958 | 75958 | if( pOut->flags&MEM_Static ){ |
| 75959 | 75959 | pOut->flags &= ~MEM_Static; |
| 75960 | 75960 | pOut->flags |= MEM_Ephem; |
| 75961 | 75961 | } |
| 75962 | 75962 | columnMallocFailure(pStmt); |
| 75963 | 75963 | return (sqlite3_value *)pOut; |
| 75964 | 75964 | } |
| 75965 | 75965 | #ifndef SQLITE_OMIT_UTF16 |
| 75966 | -SQLITE_API const void *SQLITE_APICALL sqlite3_column_text16(sqlite3_stmt *pStmt, int i){ | |
| 75966 | +SQLITE_API const void *SQLITE_STDCALL sqlite3_column_text16(sqlite3_stmt *pStmt, int i){ | |
| 75967 | 75967 | const void *val = sqlite3_value_text16( columnMem(pStmt,i) ); |
| 75968 | 75968 | columnMallocFailure(pStmt); |
| 75969 | 75969 | return val; |
| 75970 | 75970 | } |
| 75971 | 75971 | #endif /* SQLITE_OMIT_UTF16 */ |
| 75972 | -SQLITE_API int SQLITE_APICALL sqlite3_column_type(sqlite3_stmt *pStmt, int i){ | |
| 75972 | +SQLITE_API int SQLITE_STDCALL sqlite3_column_type(sqlite3_stmt *pStmt, int i){ | |
| 75973 | 75973 | int iType = sqlite3_value_type( columnMem(pStmt,i) ); |
| 75974 | 75974 | columnMallocFailure(pStmt); |
| 75975 | 75975 | return iType; |
| 75976 | 75976 | } |
| 75977 | 75977 | |
| @@ -76031,16 +76031,16 @@ | ||
| 76031 | 76031 | |
| 76032 | 76032 | /* |
| 76033 | 76033 | ** Return the name of the Nth column of the result set returned by SQL |
| 76034 | 76034 | ** statement pStmt. |
| 76035 | 76035 | */ |
| 76036 | -SQLITE_API const char *SQLITE_APICALL sqlite3_column_name(sqlite3_stmt *pStmt, int N){ | |
| 76036 | +SQLITE_API const char *SQLITE_STDCALL sqlite3_column_name(sqlite3_stmt *pStmt, int N){ | |
| 76037 | 76037 | return columnName( |
| 76038 | 76038 | pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_NAME); |
| 76039 | 76039 | } |
| 76040 | 76040 | #ifndef SQLITE_OMIT_UTF16 |
| 76041 | -SQLITE_API const void *SQLITE_APICALL sqlite3_column_name16(sqlite3_stmt *pStmt, int N){ | |
| 76041 | +SQLITE_API const void *SQLITE_STDCALL sqlite3_column_name16(sqlite3_stmt *pStmt, int N){ | |
| 76042 | 76042 | return columnName( |
| 76043 | 76043 | pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_NAME); |
| 76044 | 76044 | } |
| 76045 | 76045 | #endif |
| 76046 | 76046 | |
| @@ -76056,16 +76056,16 @@ | ||
| 76056 | 76056 | #ifndef SQLITE_OMIT_DECLTYPE |
| 76057 | 76057 | /* |
| 76058 | 76058 | ** Return the column declaration type (if applicable) of the 'i'th column |
| 76059 | 76059 | ** of the result set of SQL statement pStmt. |
| 76060 | 76060 | */ |
| 76061 | -SQLITE_API const char *SQLITE_APICALL sqlite3_column_decltype(sqlite3_stmt *pStmt, int N){ | |
| 76061 | +SQLITE_API const char *SQLITE_STDCALL sqlite3_column_decltype(sqlite3_stmt *pStmt, int N){ | |
| 76062 | 76062 | return columnName( |
| 76063 | 76063 | pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_DECLTYPE); |
| 76064 | 76064 | } |
| 76065 | 76065 | #ifndef SQLITE_OMIT_UTF16 |
| 76066 | -SQLITE_API const void *SQLITE_APICALL sqlite3_column_decltype16(sqlite3_stmt *pStmt, int N){ | |
| 76066 | +SQLITE_API const void *SQLITE_STDCALL sqlite3_column_decltype16(sqlite3_stmt *pStmt, int N){ | |
| 76067 | 76067 | return columnName( |
| 76068 | 76068 | pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_DECLTYPE); |
| 76069 | 76069 | } |
| 76070 | 76070 | #endif /* SQLITE_OMIT_UTF16 */ |
| 76071 | 76071 | #endif /* SQLITE_OMIT_DECLTYPE */ |
| @@ -76074,16 +76074,16 @@ | ||
| 76074 | 76074 | /* |
| 76075 | 76075 | ** Return the name of the database from which a result column derives. |
| 76076 | 76076 | ** NULL is returned if the result column is an expression or constant or |
| 76077 | 76077 | ** anything else which is not an unambiguous reference to a database column. |
| 76078 | 76078 | */ |
| 76079 | -SQLITE_API const char *SQLITE_APICALL sqlite3_column_database_name(sqlite3_stmt *pStmt, int N){ | |
| 76079 | +SQLITE_API const char *SQLITE_STDCALL sqlite3_column_database_name(sqlite3_stmt *pStmt, int N){ | |
| 76080 | 76080 | return columnName( |
| 76081 | 76081 | pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_DATABASE); |
| 76082 | 76082 | } |
| 76083 | 76083 | #ifndef SQLITE_OMIT_UTF16 |
| 76084 | -SQLITE_API const void *SQLITE_APICALL sqlite3_column_database_name16(sqlite3_stmt *pStmt, int N){ | |
| 76084 | +SQLITE_API const void *SQLITE_STDCALL sqlite3_column_database_name16(sqlite3_stmt *pStmt, int N){ | |
| 76085 | 76085 | return columnName( |
| 76086 | 76086 | pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_DATABASE); |
| 76087 | 76087 | } |
| 76088 | 76088 | #endif /* SQLITE_OMIT_UTF16 */ |
| 76089 | 76089 | |
| @@ -76090,16 +76090,16 @@ | ||
| 76090 | 76090 | /* |
| 76091 | 76091 | ** Return the name of the table from which a result column derives. |
| 76092 | 76092 | ** NULL is returned if the result column is an expression or constant or |
| 76093 | 76093 | ** anything else which is not an unambiguous reference to a database column. |
| 76094 | 76094 | */ |
| 76095 | -SQLITE_API const char *SQLITE_APICALL sqlite3_column_table_name(sqlite3_stmt *pStmt, int N){ | |
| 76095 | +SQLITE_API const char *SQLITE_STDCALL sqlite3_column_table_name(sqlite3_stmt *pStmt, int N){ | |
| 76096 | 76096 | return columnName( |
| 76097 | 76097 | pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_TABLE); |
| 76098 | 76098 | } |
| 76099 | 76099 | #ifndef SQLITE_OMIT_UTF16 |
| 76100 | -SQLITE_API const void *SQLITE_APICALL sqlite3_column_table_name16(sqlite3_stmt *pStmt, int N){ | |
| 76100 | +SQLITE_API const void *SQLITE_STDCALL sqlite3_column_table_name16(sqlite3_stmt *pStmt, int N){ | |
| 76101 | 76101 | return columnName( |
| 76102 | 76102 | pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_TABLE); |
| 76103 | 76103 | } |
| 76104 | 76104 | #endif /* SQLITE_OMIT_UTF16 */ |
| 76105 | 76105 | |
| @@ -76106,16 +76106,16 @@ | ||
| 76106 | 76106 | /* |
| 76107 | 76107 | ** Return the name of the table column from which a result column derives. |
| 76108 | 76108 | ** NULL is returned if the result column is an expression or constant or |
| 76109 | 76109 | ** anything else which is not an unambiguous reference to a database column. |
| 76110 | 76110 | */ |
| 76111 | -SQLITE_API const char *SQLITE_APICALL sqlite3_column_origin_name(sqlite3_stmt *pStmt, int N){ | |
| 76111 | +SQLITE_API const char *SQLITE_STDCALL sqlite3_column_origin_name(sqlite3_stmt *pStmt, int N){ | |
| 76112 | 76112 | return columnName( |
| 76113 | 76113 | pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_COLUMN); |
| 76114 | 76114 | } |
| 76115 | 76115 | #ifndef SQLITE_OMIT_UTF16 |
| 76116 | -SQLITE_API const void *SQLITE_APICALL sqlite3_column_origin_name16(sqlite3_stmt *pStmt, int N){ | |
| 76116 | +SQLITE_API const void *SQLITE_STDCALL sqlite3_column_origin_name16(sqlite3_stmt *pStmt, int N){ | |
| 76117 | 76117 | return columnName( |
| 76118 | 76118 | pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_COLUMN); |
| 76119 | 76119 | } |
| 76120 | 76120 | #endif /* SQLITE_OMIT_UTF16 */ |
| 76121 | 76121 | #endif /* SQLITE_ENABLE_COLUMN_METADATA */ |
| @@ -76212,11 +76212,11 @@ | ||
| 76212 | 76212 | |
| 76213 | 76213 | |
| 76214 | 76214 | /* |
| 76215 | 76215 | ** Bind a blob value to an SQL statement variable. |
| 76216 | 76216 | */ |
| 76217 | -SQLITE_API int SQLITE_APICALL sqlite3_bind_blob( | |
| 76217 | +SQLITE_API int SQLITE_STDCALL sqlite3_bind_blob( | |
| 76218 | 76218 | sqlite3_stmt *pStmt, |
| 76219 | 76219 | int i, |
| 76220 | 76220 | const void *zData, |
| 76221 | 76221 | int nData, |
| 76222 | 76222 | void (*xDel)(void*) |
| @@ -76224,11 +76224,11 @@ | ||
| 76224 | 76224 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 76225 | 76225 | if( nData<0 ) return SQLITE_MISUSE_BKPT; |
| 76226 | 76226 | #endif |
| 76227 | 76227 | return bindText(pStmt, i, zData, nData, xDel, 0); |
| 76228 | 76228 | } |
| 76229 | -SQLITE_API int SQLITE_APICALL sqlite3_bind_blob64( | |
| 76229 | +SQLITE_API int SQLITE_STDCALL sqlite3_bind_blob64( | |
| 76230 | 76230 | sqlite3_stmt *pStmt, |
| 76231 | 76231 | int i, |
| 76232 | 76232 | const void *zData, |
| 76233 | 76233 | sqlite3_uint64 nData, |
| 76234 | 76234 | void (*xDel)(void*) |
| @@ -76238,52 +76238,52 @@ | ||
| 76238 | 76238 | return invokeValueDestructor(zData, xDel, 0); |
| 76239 | 76239 | }else{ |
| 76240 | 76240 | return bindText(pStmt, i, zData, (int)nData, xDel, 0); |
| 76241 | 76241 | } |
| 76242 | 76242 | } |
| 76243 | -SQLITE_API int SQLITE_APICALL sqlite3_bind_double(sqlite3_stmt *pStmt, int i, double rValue){ | |
| 76243 | +SQLITE_API int SQLITE_STDCALL sqlite3_bind_double(sqlite3_stmt *pStmt, int i, double rValue){ | |
| 76244 | 76244 | int rc; |
| 76245 | 76245 | Vdbe *p = (Vdbe *)pStmt; |
| 76246 | 76246 | rc = vdbeUnbind(p, i); |
| 76247 | 76247 | if( rc==SQLITE_OK ){ |
| 76248 | 76248 | sqlite3VdbeMemSetDouble(&p->aVar[i-1], rValue); |
| 76249 | 76249 | sqlite3_mutex_leave(p->db->mutex); |
| 76250 | 76250 | } |
| 76251 | 76251 | return rc; |
| 76252 | 76252 | } |
| 76253 | -SQLITE_API int SQLITE_APICALL sqlite3_bind_int(sqlite3_stmt *p, int i, int iValue){ | |
| 76253 | +SQLITE_API int SQLITE_STDCALL sqlite3_bind_int(sqlite3_stmt *p, int i, int iValue){ | |
| 76254 | 76254 | return sqlite3_bind_int64(p, i, (i64)iValue); |
| 76255 | 76255 | } |
| 76256 | -SQLITE_API int SQLITE_APICALL sqlite3_bind_int64(sqlite3_stmt *pStmt, int i, sqlite_int64 iValue){ | |
| 76256 | +SQLITE_API int SQLITE_STDCALL sqlite3_bind_int64(sqlite3_stmt *pStmt, int i, sqlite_int64 iValue){ | |
| 76257 | 76257 | int rc; |
| 76258 | 76258 | Vdbe *p = (Vdbe *)pStmt; |
| 76259 | 76259 | rc = vdbeUnbind(p, i); |
| 76260 | 76260 | if( rc==SQLITE_OK ){ |
| 76261 | 76261 | sqlite3VdbeMemSetInt64(&p->aVar[i-1], iValue); |
| 76262 | 76262 | sqlite3_mutex_leave(p->db->mutex); |
| 76263 | 76263 | } |
| 76264 | 76264 | return rc; |
| 76265 | 76265 | } |
| 76266 | -SQLITE_API int SQLITE_APICALL sqlite3_bind_null(sqlite3_stmt *pStmt, int i){ | |
| 76266 | +SQLITE_API int SQLITE_STDCALL sqlite3_bind_null(sqlite3_stmt *pStmt, int i){ | |
| 76267 | 76267 | int rc; |
| 76268 | 76268 | Vdbe *p = (Vdbe*)pStmt; |
| 76269 | 76269 | rc = vdbeUnbind(p, i); |
| 76270 | 76270 | if( rc==SQLITE_OK ){ |
| 76271 | 76271 | sqlite3_mutex_leave(p->db->mutex); |
| 76272 | 76272 | } |
| 76273 | 76273 | return rc; |
| 76274 | 76274 | } |
| 76275 | -SQLITE_API int SQLITE_APICALL sqlite3_bind_text( | |
| 76275 | +SQLITE_API int SQLITE_STDCALL sqlite3_bind_text( | |
| 76276 | 76276 | sqlite3_stmt *pStmt, |
| 76277 | 76277 | int i, |
| 76278 | 76278 | const char *zData, |
| 76279 | 76279 | int nData, |
| 76280 | 76280 | void (*xDel)(void*) |
| 76281 | 76281 | ){ |
| 76282 | 76282 | return bindText(pStmt, i, zData, nData, xDel, SQLITE_UTF8); |
| 76283 | 76283 | } |
| 76284 | -SQLITE_API int SQLITE_APICALL sqlite3_bind_text64( | |
| 76284 | +SQLITE_API int SQLITE_STDCALL sqlite3_bind_text64( | |
| 76285 | 76285 | sqlite3_stmt *pStmt, |
| 76286 | 76286 | int i, |
| 76287 | 76287 | const char *zData, |
| 76288 | 76288 | sqlite3_uint64 nData, |
| 76289 | 76289 | void (*xDel)(void*), |
| @@ -76296,21 +76296,21 @@ | ||
| 76296 | 76296 | if( enc==SQLITE_UTF16 ) enc = SQLITE_UTF16NATIVE; |
| 76297 | 76297 | return bindText(pStmt, i, zData, (int)nData, xDel, enc); |
| 76298 | 76298 | } |
| 76299 | 76299 | } |
| 76300 | 76300 | #ifndef SQLITE_OMIT_UTF16 |
| 76301 | -SQLITE_API int SQLITE_APICALL sqlite3_bind_text16( | |
| 76301 | +SQLITE_API int SQLITE_STDCALL sqlite3_bind_text16( | |
| 76302 | 76302 | sqlite3_stmt *pStmt, |
| 76303 | 76303 | int i, |
| 76304 | 76304 | const void *zData, |
| 76305 | 76305 | int nData, |
| 76306 | 76306 | void (*xDel)(void*) |
| 76307 | 76307 | ){ |
| 76308 | 76308 | return bindText(pStmt, i, zData, nData, xDel, SQLITE_UTF16NATIVE); |
| 76309 | 76309 | } |
| 76310 | 76310 | #endif /* SQLITE_OMIT_UTF16 */ |
| 76311 | -SQLITE_API int SQLITE_APICALL sqlite3_bind_value(sqlite3_stmt *pStmt, int i, const sqlite3_value *pValue){ | |
| 76311 | +SQLITE_API int SQLITE_STDCALL sqlite3_bind_value(sqlite3_stmt *pStmt, int i, const sqlite3_value *pValue){ | |
| 76312 | 76312 | int rc; |
| 76313 | 76313 | switch( sqlite3_value_type((sqlite3_value*)pValue) ){ |
| 76314 | 76314 | case SQLITE_INTEGER: { |
| 76315 | 76315 | rc = sqlite3_bind_int64(pStmt, i, pValue->u.i); |
| 76316 | 76316 | break; |
| @@ -76337,21 +76337,21 @@ | ||
| 76337 | 76337 | break; |
| 76338 | 76338 | } |
| 76339 | 76339 | } |
| 76340 | 76340 | return rc; |
| 76341 | 76341 | } |
| 76342 | -SQLITE_API int SQLITE_APICALL sqlite3_bind_zeroblob(sqlite3_stmt *pStmt, int i, int n){ | |
| 76342 | +SQLITE_API int SQLITE_STDCALL sqlite3_bind_zeroblob(sqlite3_stmt *pStmt, int i, int n){ | |
| 76343 | 76343 | int rc; |
| 76344 | 76344 | Vdbe *p = (Vdbe *)pStmt; |
| 76345 | 76345 | rc = vdbeUnbind(p, i); |
| 76346 | 76346 | if( rc==SQLITE_OK ){ |
| 76347 | 76347 | sqlite3VdbeMemSetZeroBlob(&p->aVar[i-1], n); |
| 76348 | 76348 | sqlite3_mutex_leave(p->db->mutex); |
| 76349 | 76349 | } |
| 76350 | 76350 | return rc; |
| 76351 | 76351 | } |
| 76352 | -SQLITE_API int SQLITE_APICALL sqlite3_bind_zeroblob64(sqlite3_stmt *pStmt, int i, sqlite3_uint64 n){ | |
| 76352 | +SQLITE_API int SQLITE_STDCALL sqlite3_bind_zeroblob64(sqlite3_stmt *pStmt, int i, sqlite3_uint64 n){ | |
| 76353 | 76353 | int rc; |
| 76354 | 76354 | Vdbe *p = (Vdbe *)pStmt; |
| 76355 | 76355 | sqlite3_mutex_enter(p->db->mutex); |
| 76356 | 76356 | if( n>(u64)p->db->aLimit[SQLITE_LIMIT_LENGTH] ){ |
| 76357 | 76357 | rc = SQLITE_TOOBIG; |
| @@ -76366,11 +76366,11 @@ | ||
| 76366 | 76366 | |
| 76367 | 76367 | /* |
| 76368 | 76368 | ** Return the number of wildcards that can be potentially bound to. |
| 76369 | 76369 | ** This routine is added to support DBD::SQLite. |
| 76370 | 76370 | */ |
| 76371 | -SQLITE_API int SQLITE_APICALL sqlite3_bind_parameter_count(sqlite3_stmt *pStmt){ | |
| 76371 | +SQLITE_API int SQLITE_STDCALL sqlite3_bind_parameter_count(sqlite3_stmt *pStmt){ | |
| 76372 | 76372 | Vdbe *p = (Vdbe*)pStmt; |
| 76373 | 76373 | return p ? p->nVar : 0; |
| 76374 | 76374 | } |
| 76375 | 76375 | |
| 76376 | 76376 | /* |
| @@ -76377,11 +76377,11 @@ | ||
| 76377 | 76377 | ** Return the name of a wildcard parameter. Return NULL if the index |
| 76378 | 76378 | ** is out of range or if the wildcard is unnamed. |
| 76379 | 76379 | ** |
| 76380 | 76380 | ** The result is always UTF-8. |
| 76381 | 76381 | */ |
| 76382 | -SQLITE_API const char *SQLITE_APICALL sqlite3_bind_parameter_name(sqlite3_stmt *pStmt, int i){ | |
| 76382 | +SQLITE_API const char *SQLITE_STDCALL sqlite3_bind_parameter_name(sqlite3_stmt *pStmt, int i){ | |
| 76383 | 76383 | Vdbe *p = (Vdbe*)pStmt; |
| 76384 | 76384 | if( p==0 || i<1 || i>p->nzVar ){ |
| 76385 | 76385 | return 0; |
| 76386 | 76386 | } |
| 76387 | 76387 | return p->azVar[i-1]; |
| @@ -76405,11 +76405,11 @@ | ||
| 76405 | 76405 | } |
| 76406 | 76406 | } |
| 76407 | 76407 | } |
| 76408 | 76408 | return 0; |
| 76409 | 76409 | } |
| 76410 | -SQLITE_API int SQLITE_APICALL sqlite3_bind_parameter_index(sqlite3_stmt *pStmt, const char *zName){ | |
| 76410 | +SQLITE_API int SQLITE_STDCALL sqlite3_bind_parameter_index(sqlite3_stmt *pStmt, const char *zName){ | |
| 76411 | 76411 | return sqlite3VdbeParameterIndex((Vdbe*)pStmt, zName, sqlite3Strlen30(zName)); |
| 76412 | 76412 | } |
| 76413 | 76413 | |
| 76414 | 76414 | /* |
| 76415 | 76415 | ** Transfer all bindings from the first statement over to the second. |
| @@ -76439,11 +76439,11 @@ | ||
| 76439 | 76439 | ** |
| 76440 | 76440 | ** If the two statements contain a different number of bindings, then |
| 76441 | 76441 | ** an SQLITE_ERROR is returned. Nothing else can go wrong, so otherwise |
| 76442 | 76442 | ** SQLITE_OK is returned. |
| 76443 | 76443 | */ |
| 76444 | -SQLITE_API int SQLITE_APICALL sqlite3_transfer_bindings(sqlite3_stmt *pFromStmt, sqlite3_stmt *pToStmt){ | |
| 76444 | +SQLITE_API int SQLITE_STDCALL sqlite3_transfer_bindings(sqlite3_stmt *pFromStmt, sqlite3_stmt *pToStmt){ | |
| 76445 | 76445 | Vdbe *pFrom = (Vdbe*)pFromStmt; |
| 76446 | 76446 | Vdbe *pTo = (Vdbe*)pToStmt; |
| 76447 | 76447 | if( pFrom->nVar!=pTo->nVar ){ |
| 76448 | 76448 | return SQLITE_ERROR; |
| 76449 | 76449 | } |
| @@ -76461,26 +76461,26 @@ | ||
| 76461 | 76461 | ** Return the sqlite3* database handle to which the prepared statement given |
| 76462 | 76462 | ** in the argument belongs. This is the same database handle that was |
| 76463 | 76463 | ** the first argument to the sqlite3_prepare() that was used to create |
| 76464 | 76464 | ** the statement in the first place. |
| 76465 | 76465 | */ |
| 76466 | -SQLITE_API sqlite3 *SQLITE_APICALL sqlite3_db_handle(sqlite3_stmt *pStmt){ | |
| 76466 | +SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3_db_handle(sqlite3_stmt *pStmt){ | |
| 76467 | 76467 | return pStmt ? ((Vdbe*)pStmt)->db : 0; |
| 76468 | 76468 | } |
| 76469 | 76469 | |
| 76470 | 76470 | /* |
| 76471 | 76471 | ** Return true if the prepared statement is guaranteed to not modify the |
| 76472 | 76472 | ** database. |
| 76473 | 76473 | */ |
| 76474 | -SQLITE_API int SQLITE_APICALL sqlite3_stmt_readonly(sqlite3_stmt *pStmt){ | |
| 76474 | +SQLITE_API int SQLITE_STDCALL sqlite3_stmt_readonly(sqlite3_stmt *pStmt){ | |
| 76475 | 76475 | return pStmt ? ((Vdbe*)pStmt)->readOnly : 1; |
| 76476 | 76476 | } |
| 76477 | 76477 | |
| 76478 | 76478 | /* |
| 76479 | 76479 | ** Return true if the prepared statement is in need of being reset. |
| 76480 | 76480 | */ |
| 76481 | -SQLITE_API int SQLITE_APICALL sqlite3_stmt_busy(sqlite3_stmt *pStmt){ | |
| 76481 | +SQLITE_API int SQLITE_STDCALL sqlite3_stmt_busy(sqlite3_stmt *pStmt){ | |
| 76482 | 76482 | Vdbe *v = (Vdbe*)pStmt; |
| 76483 | 76483 | return v!=0 && v->pc>=0 && v->magic==VDBE_MAGIC_RUN; |
| 76484 | 76484 | } |
| 76485 | 76485 | |
| 76486 | 76486 | /* |
| @@ -76487,11 +76487,11 @@ | ||
| 76487 | 76487 | ** Return a pointer to the next prepared statement after pStmt associated |
| 76488 | 76488 | ** with database connection pDb. If pStmt is NULL, return the first |
| 76489 | 76489 | ** prepared statement for the database connection. Return NULL if there |
| 76490 | 76490 | ** are no more. |
| 76491 | 76491 | */ |
| 76492 | -SQLITE_API sqlite3_stmt *SQLITE_APICALL sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt){ | |
| 76492 | +SQLITE_API sqlite3_stmt *SQLITE_STDCALL sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt){ | |
| 76493 | 76493 | sqlite3_stmt *pNext; |
| 76494 | 76494 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 76495 | 76495 | if( !sqlite3SafetyCheckOk(pDb) ){ |
| 76496 | 76496 | (void)SQLITE_MISUSE_BKPT; |
| 76497 | 76497 | return 0; |
| @@ -76508,11 +76508,11 @@ | ||
| 76508 | 76508 | } |
| 76509 | 76509 | |
| 76510 | 76510 | /* |
| 76511 | 76511 | ** Return the value of a status counter for a prepared statement |
| 76512 | 76512 | */ |
| 76513 | -SQLITE_API int SQLITE_APICALL sqlite3_stmt_status(sqlite3_stmt *pStmt, int op, int resetFlag){ | |
| 76513 | +SQLITE_API int SQLITE_STDCALL sqlite3_stmt_status(sqlite3_stmt *pStmt, int op, int resetFlag){ | |
| 76514 | 76514 | Vdbe *pVdbe = (Vdbe*)pStmt; |
| 76515 | 76515 | u32 v; |
| 76516 | 76516 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 76517 | 76517 | if( !pStmt ){ |
| 76518 | 76518 | (void)SQLITE_MISUSE_BKPT; |
| @@ -76525,11 +76525,11 @@ | ||
| 76525 | 76525 | } |
| 76526 | 76526 | |
| 76527 | 76527 | /* |
| 76528 | 76528 | ** Return the SQL associated with a prepared statement |
| 76529 | 76529 | */ |
| 76530 | -SQLITE_API const char *SQLITE_APICALL sqlite3_sql(sqlite3_stmt *pStmt){ | |
| 76530 | +SQLITE_API const char *SQLITE_STDCALL sqlite3_sql(sqlite3_stmt *pStmt){ | |
| 76531 | 76531 | Vdbe *p = (Vdbe *)pStmt; |
| 76532 | 76532 | return p ? p->zSql : 0; |
| 76533 | 76533 | } |
| 76534 | 76534 | |
| 76535 | 76535 | /* |
| @@ -76539,11 +76539,11 @@ | ||
| 76539 | 76539 | ** freeing the returned string by passing it to sqlite3_free(). |
| 76540 | 76540 | ** |
| 76541 | 76541 | ** The SQLITE_TRACE_SIZE_LIMIT puts an upper bound on the size of |
| 76542 | 76542 | ** expanded bound parameters. |
| 76543 | 76543 | */ |
| 76544 | -SQLITE_API char *SQLITE_APICALL sqlite3_expanded_sql(sqlite3_stmt *pStmt){ | |
| 76544 | +SQLITE_API char *SQLITE_STDCALL sqlite3_expanded_sql(sqlite3_stmt *pStmt){ | |
| 76545 | 76545 | #ifdef SQLITE_OMIT_TRACE |
| 76546 | 76546 | return 0; |
| 76547 | 76547 | #else |
| 76548 | 76548 | char *z = 0; |
| 76549 | 76549 | const char *zSql = sqlite3_sql(pStmt); |
| @@ -76581,11 +76581,11 @@ | ||
| 76581 | 76581 | |
| 76582 | 76582 | /* |
| 76583 | 76583 | ** This function is called from within a pre-update callback to retrieve |
| 76584 | 76584 | ** a field of the row currently being updated or deleted. |
| 76585 | 76585 | */ |
| 76586 | -SQLITE_API int SQLITE_APICALL sqlite3_preupdate_old(sqlite3 *db, int iIdx, sqlite3_value **ppValue){ | |
| 76586 | +SQLITE_API int SQLITE_STDCALL sqlite3_preupdate_old(sqlite3 *db, int iIdx, sqlite3_value **ppValue){ | |
| 76587 | 76587 | PreUpdate *p = db->pPreUpdate; |
| 76588 | 76588 | int rc = SQLITE_OK; |
| 76589 | 76589 | |
| 76590 | 76590 | /* Test that this call is being made from within an SQLITE_DELETE or |
| 76591 | 76591 | ** SQLITE_UPDATE pre-update callback, and that iIdx is within range. */ |
| @@ -76636,11 +76636,11 @@ | ||
| 76636 | 76636 | #ifdef SQLITE_ENABLE_PREUPDATE_HOOK |
| 76637 | 76637 | /* |
| 76638 | 76638 | ** This function is called from within a pre-update callback to retrieve |
| 76639 | 76639 | ** the number of columns in the row being updated, deleted or inserted. |
| 76640 | 76640 | */ |
| 76641 | -SQLITE_API int SQLITE_APICALL sqlite3_preupdate_count(sqlite3 *db){ | |
| 76641 | +SQLITE_API int SQLITE_STDCALL sqlite3_preupdate_count(sqlite3 *db){ | |
| 76642 | 76642 | PreUpdate *p = db->pPreUpdate; |
| 76643 | 76643 | return (p ? p->keyinfo.nField : 0); |
| 76644 | 76644 | } |
| 76645 | 76645 | #endif /* SQLITE_ENABLE_PREUPDATE_HOOK */ |
| 76646 | 76646 | |
| @@ -76654,11 +76654,11 @@ | ||
| 76654 | 76654 | ** top-level trigger etc.). |
| 76655 | 76655 | ** |
| 76656 | 76656 | ** For the purposes of the previous paragraph, a foreign key CASCADE, SET NULL |
| 76657 | 76657 | ** or SET DEFAULT action is considered a trigger. |
| 76658 | 76658 | */ |
| 76659 | -SQLITE_API int SQLITE_APICALL sqlite3_preupdate_depth(sqlite3 *db){ | |
| 76659 | +SQLITE_API int SQLITE_STDCALL sqlite3_preupdate_depth(sqlite3 *db){ | |
| 76660 | 76660 | PreUpdate *p = db->pPreUpdate; |
| 76661 | 76661 | return (p ? p->v->nFrame : 0); |
| 76662 | 76662 | } |
| 76663 | 76663 | #endif /* SQLITE_ENABLE_PREUPDATE_HOOK */ |
| 76664 | 76664 | |
| @@ -76665,11 +76665,11 @@ | ||
| 76665 | 76665 | #ifdef SQLITE_ENABLE_PREUPDATE_HOOK |
| 76666 | 76666 | /* |
| 76667 | 76667 | ** This function is called from within a pre-update callback to retrieve |
| 76668 | 76668 | ** a field of the row currently being updated or inserted. |
| 76669 | 76669 | */ |
| 76670 | -SQLITE_API int SQLITE_APICALL sqlite3_preupdate_new(sqlite3 *db, int iIdx, sqlite3_value **ppValue){ | |
| 76670 | +SQLITE_API int SQLITE_STDCALL sqlite3_preupdate_new(sqlite3 *db, int iIdx, sqlite3_value **ppValue){ | |
| 76671 | 76671 | PreUpdate *p = db->pPreUpdate; |
| 76672 | 76672 | int rc = SQLITE_OK; |
| 76673 | 76673 | Mem *pMem; |
| 76674 | 76674 | |
| 76675 | 76675 | if( !p || p->op==SQLITE_DELETE ){ |
| @@ -76739,11 +76739,11 @@ | ||
| 76739 | 76739 | |
| 76740 | 76740 | #ifdef SQLITE_ENABLE_STMT_SCANSTATUS |
| 76741 | 76741 | /* |
| 76742 | 76742 | ** Return status data for a single loop within query pStmt. |
| 76743 | 76743 | */ |
| 76744 | -SQLITE_API int SQLITE_APICALL sqlite3_stmt_scanstatus( | |
| 76744 | +SQLITE_API int SQLITE_STDCALL sqlite3_stmt_scanstatus( | |
| 76745 | 76745 | sqlite3_stmt *pStmt, /* Prepared statement being queried */ |
| 76746 | 76746 | int idx, /* Index of loop to report on */ |
| 76747 | 76747 | int iScanStatusOp, /* Which metric to return */ |
| 76748 | 76748 | void *pOut /* OUT: Write the answer here */ |
| 76749 | 76749 | ){ |
| @@ -76798,11 +76798,11 @@ | ||
| 76798 | 76798 | } |
| 76799 | 76799 | |
| 76800 | 76800 | /* |
| 76801 | 76801 | ** Zero all counters associated with the sqlite3_stmt_scanstatus() data. |
| 76802 | 76802 | */ |
| 76803 | -SQLITE_API void SQLITE_APICALL sqlite3_stmt_scanstatus_reset(sqlite3_stmt *pStmt){ | |
| 76803 | +SQLITE_API void SQLITE_STDCALL sqlite3_stmt_scanstatus_reset(sqlite3_stmt *pStmt){ | |
| 76804 | 76804 | Vdbe *p = (Vdbe*)pStmt; |
| 76805 | 76805 | memset(p->anExec, 0, p->nOp * sizeof(i64)); |
| 76806 | 76806 | } |
| 76807 | 76807 | #endif /* SQLITE_ENABLE_STMT_SCANSTATUS */ |
| 76808 | 76808 | |
| @@ -77325,11 +77325,11 @@ | ||
| 77325 | 77325 | ** Try to convert the type of a function argument or a result column |
| 77326 | 77326 | ** into a numeric representation. Use either INTEGER or REAL whichever |
| 77327 | 77327 | ** is appropriate. But only do the conversion if it is possible without |
| 77328 | 77328 | ** loss of information and return the revised type of the argument. |
| 77329 | 77329 | */ |
| 77330 | -SQLITE_API int SQLITE_APICALL sqlite3_value_numeric_type(sqlite3_value *pVal){ | |
| 77330 | +SQLITE_API int SQLITE_STDCALL sqlite3_value_numeric_type(sqlite3_value *pVal){ | |
| 77331 | 77331 | int eType = sqlite3_value_type(pVal); |
| 77332 | 77332 | if( eType==SQLITE_TEXT ){ |
| 77333 | 77333 | Mem *pMem = (Mem*)pVal; |
| 77334 | 77334 | applyNumericAffinity(pMem, 0); |
| 77335 | 77335 | eType = sqlite3_value_type(pVal); |
| @@ -84177,11 +84177,11 @@ | ||
| 84177 | 84177 | } |
| 84178 | 84178 | |
| 84179 | 84179 | /* |
| 84180 | 84180 | ** Open a blob handle. |
| 84181 | 84181 | */ |
| 84182 | -SQLITE_API int SQLITE_APICALL sqlite3_blob_open( | |
| 84182 | +SQLITE_API int SQLITE_STDCALL sqlite3_blob_open( | |
| 84183 | 84183 | sqlite3* db, /* The database connection */ |
| 84184 | 84184 | const char *zDb, /* The attached database containing the blob */ |
| 84185 | 84185 | const char *zTable, /* The table containing the blob */ |
| 84186 | 84186 | const char *zColumn, /* The column containing the blob */ |
| 84187 | 84187 | sqlite_int64 iRow, /* The row containing the glob */ |
| @@ -84418,11 +84418,11 @@ | ||
| 84418 | 84418 | |
| 84419 | 84419 | /* |
| 84420 | 84420 | ** Close a blob handle that was previously created using |
| 84421 | 84421 | ** sqlite3_blob_open(). |
| 84422 | 84422 | */ |
| 84423 | -SQLITE_API int SQLITE_APICALL sqlite3_blob_close(sqlite3_blob *pBlob){ | |
| 84423 | +SQLITE_API int SQLITE_STDCALL sqlite3_blob_close(sqlite3_blob *pBlob){ | |
| 84424 | 84424 | Incrblob *p = (Incrblob *)pBlob; |
| 84425 | 84425 | int rc; |
| 84426 | 84426 | sqlite3 *db; |
| 84427 | 84427 | |
| 84428 | 84428 | if( p ){ |
| @@ -84511,28 +84511,28 @@ | ||
| 84511 | 84511 | } |
| 84512 | 84512 | |
| 84513 | 84513 | /* |
| 84514 | 84514 | ** Read data from a blob handle. |
| 84515 | 84515 | */ |
| 84516 | -SQLITE_API int SQLITE_APICALL sqlite3_blob_read(sqlite3_blob *pBlob, void *z, int n, int iOffset){ | |
| 84516 | +SQLITE_API int SQLITE_STDCALL sqlite3_blob_read(sqlite3_blob *pBlob, void *z, int n, int iOffset){ | |
| 84517 | 84517 | return blobReadWrite(pBlob, z, n, iOffset, sqlite3BtreeData); |
| 84518 | 84518 | } |
| 84519 | 84519 | |
| 84520 | 84520 | /* |
| 84521 | 84521 | ** Write data to a blob handle. |
| 84522 | 84522 | */ |
| 84523 | -SQLITE_API int SQLITE_APICALL sqlite3_blob_write(sqlite3_blob *pBlob, const void *z, int n, int iOffset){ | |
| 84523 | +SQLITE_API int SQLITE_STDCALL sqlite3_blob_write(sqlite3_blob *pBlob, const void *z, int n, int iOffset){ | |
| 84524 | 84524 | return blobReadWrite(pBlob, (void *)z, n, iOffset, sqlite3BtreePutData); |
| 84525 | 84525 | } |
| 84526 | 84526 | |
| 84527 | 84527 | /* |
| 84528 | 84528 | ** Query a blob handle for the size of the data. |
| 84529 | 84529 | ** |
| 84530 | 84530 | ** The Incrblob.nByte field is fixed for the lifetime of the Incrblob |
| 84531 | 84531 | ** so no mutex is required for access. |
| 84532 | 84532 | */ |
| 84533 | -SQLITE_API int SQLITE_APICALL sqlite3_blob_bytes(sqlite3_blob *pBlob){ | |
| 84533 | +SQLITE_API int SQLITE_STDCALL sqlite3_blob_bytes(sqlite3_blob *pBlob){ | |
| 84534 | 84534 | Incrblob *p = (Incrblob *)pBlob; |
| 84535 | 84535 | return (p && p->pStmt) ? p->nByte : 0; |
| 84536 | 84536 | } |
| 84537 | 84537 | |
| 84538 | 84538 | /* |
| @@ -84543,11 +84543,11 @@ | ||
| 84543 | 84543 | ** contain a blob or text value, then an error code is returned and the |
| 84544 | 84544 | ** database handle error code and message set. If this happens, then all |
| 84545 | 84545 | ** subsequent calls to sqlite3_blob_xxx() functions (except blob_close()) |
| 84546 | 84546 | ** immediately return SQLITE_ABORT. |
| 84547 | 84547 | */ |
| 84548 | -SQLITE_API int SQLITE_APICALL sqlite3_blob_reopen(sqlite3_blob *pBlob, sqlite3_int64 iRow){ | |
| 84548 | +SQLITE_API int SQLITE_STDCALL sqlite3_blob_reopen(sqlite3_blob *pBlob, sqlite3_int64 iRow){ | |
| 84549 | 84549 | int rc; |
| 84550 | 84550 | Incrblob *p = (Incrblob *)pBlob; |
| 84551 | 84551 | sqlite3 *db; |
| 84552 | 84552 | |
| 84553 | 84553 | if( p==0 ) return SQLITE_MISUSE_BKPT; |
| @@ -88640,11 +88640,15 @@ | ||
| 88640 | 88640 | } |
| 88641 | 88641 | if( is_agg && (pNC->ncFlags & NC_AllowAgg)==0 ){ |
| 88642 | 88642 | sqlite3ErrorMsg(pParse, "misuse of aggregate function %.*s()", nId,zId); |
| 88643 | 88643 | pNC->nErr++; |
| 88644 | 88644 | is_agg = 0; |
| 88645 | - }else if( no_such_func && pParse->db->init.busy==0 ){ | |
| 88645 | + }else if( no_such_func && pParse->db->init.busy==0 | |
| 88646 | +#ifdef SQLITE_ENABLE_UNKNOWN_SQL_FUNCTION | |
| 88647 | + && pParse->explain==0 | |
| 88648 | +#endif | |
| 88649 | + ){ | |
| 88646 | 88650 | sqlite3ErrorMsg(pParse, "no such function: %.*s", nId, zId); |
| 88647 | 88651 | pNC->nErr++; |
| 88648 | 88652 | }else if( wrong_num_args ){ |
| 88649 | 88653 | sqlite3ErrorMsg(pParse,"wrong number of arguments to function %.*s()", |
| 88650 | 88654 | nId, zId); |
| @@ -92365,10 +92369,15 @@ | ||
| 92365 | 92369 | } |
| 92366 | 92370 | nFarg = pFarg ? pFarg->nExpr : 0; |
| 92367 | 92371 | assert( !ExprHasProperty(pExpr, EP_IntValue) ); |
| 92368 | 92372 | zId = pExpr->u.zToken; |
| 92369 | 92373 | pDef = sqlite3FindFunction(db, zId, nFarg, enc, 0); |
| 92374 | +#ifdef SQLITE_ENABLE_UNKNOWN_SQL_FUNCTION | |
| 92375 | + if( pDef==0 && pParse->explain ){ | |
| 92376 | + pDef = sqlite3FindFunction(db, "unknown", nFarg, enc, 0); | |
| 92377 | + } | |
| 92378 | +#endif | |
| 92370 | 92379 | if( pDef==0 || pDef->xFinalize!=0 ){ |
| 92371 | 92380 | sqlite3ErrorMsg(pParse, "unknown function: %s()", zId); |
| 92372 | 92381 | break; |
| 92373 | 92382 | } |
| 92374 | 92383 | |
| @@ -97147,11 +97156,11 @@ | ||
| 97147 | 97156 | ** and attempts to write the column will be ignored. |
| 97148 | 97157 | ** |
| 97149 | 97158 | ** Setting the auth function to NULL disables this hook. The default |
| 97150 | 97159 | ** setting of the auth function is NULL. |
| 97151 | 97160 | */ |
| 97152 | -SQLITE_API int SQLITE_APICALL sqlite3_set_authorizer( | |
| 97161 | +SQLITE_API int SQLITE_STDCALL sqlite3_set_authorizer( | |
| 97153 | 97162 | sqlite3 *db, |
| 97154 | 97163 | int (*xAuth)(void*,int,const char*,const char*,const char*,const char*), |
| 97155 | 97164 | void *pArg |
| 97156 | 97165 | ){ |
| 97157 | 97166 | #ifdef SQLITE_ENABLE_API_ARMOR |
| @@ -103910,18 +103919,18 @@ | ||
| 103910 | 103919 | } |
| 103911 | 103920 | |
| 103912 | 103921 | /* |
| 103913 | 103922 | ** The sqlite3_strglob() interface. |
| 103914 | 103923 | */ |
| 103915 | -SQLITE_API int SQLITE_APICALL sqlite3_strglob(const char *zGlobPattern, const char *zString){ | |
| 103924 | +SQLITE_API int SQLITE_STDCALL sqlite3_strglob(const char *zGlobPattern, const char *zString){ | |
| 103916 | 103925 | return patternCompare((u8*)zGlobPattern, (u8*)zString, &globInfo, '[')==0; |
| 103917 | 103926 | } |
| 103918 | 103927 | |
| 103919 | 103928 | /* |
| 103920 | 103929 | ** The sqlite3_strlike() interface. |
| 103921 | 103930 | */ |
| 103922 | -SQLITE_API int SQLITE_APICALL sqlite3_strlike(const char *zPattern, const char *zStr, unsigned int esc){ | |
| 103931 | +SQLITE_API int SQLITE_STDCALL sqlite3_strlike(const char *zPattern, const char *zStr, unsigned int esc){ | |
| 103923 | 103932 | return patternCompare((u8*)zPattern, (u8*)zStr, &likeInfoNorm, esc)==0; |
| 103924 | 103933 | } |
| 103925 | 103934 | |
| 103926 | 103935 | /* |
| 103927 | 103936 | ** Count the number of times that the LIKE operator (or GLOB which is |
| @@ -104473,10 +104482,30 @@ | ||
| 104473 | 104482 | } |
| 104474 | 104483 | } |
| 104475 | 104484 | sqlite3_result_text(context, (char*)zIn, nIn, SQLITE_TRANSIENT); |
| 104476 | 104485 | } |
| 104477 | 104486 | |
| 104487 | + | |
| 104488 | +#ifdef SQLITE_ENABLE_UNKNOWN_SQL_FUNCTION | |
| 104489 | +/* | |
| 104490 | +** The "unknown" function is automatically substituted in place of | |
| 104491 | +** any unrecognized function name when doing an EXPLAIN or EXPLAIN QUERY PLAN | |
| 104492 | +** when the SQLITE_ENABLE_UNKNOWN_FUNCTION compile-time option is used. | |
| 104493 | +** When the "sqlite3" command-line shell is built using this functionality, | |
| 104494 | +** that allows an EXPLAIN or EXPLAIN QUERY PLAN for complex queries | |
| 104495 | +** involving application-defined functions to be examined in a generic | |
| 104496 | +** sqlite3 shell. | |
| 104497 | +*/ | |
| 104498 | +static void unknownFunc( | |
| 104499 | + sqlite3_context *context, | |
| 104500 | + int argc, | |
| 104501 | + sqlite3_value **argv | |
| 104502 | +){ | |
| 104503 | + /* no-op */ | |
| 104504 | +} | |
| 104505 | +#endif /*SQLITE_ENABLE_UNKNOWN_SQL_FUNCTION*/ | |
| 104506 | + | |
| 104478 | 104507 | |
| 104479 | 104508 | /* IMP: R-25361-16150 This function is omitted from SQLite by default. It |
| 104480 | 104509 | ** is only available if the SQLITE_SOUNDEX compile-time option is used |
| 104481 | 104510 | ** when SQLite is built. |
| 104482 | 104511 | */ |
| @@ -104944,17 +104973,20 @@ | ||
| 104944 | 104973 | AGGREGATE(count, 1, 0, 0, countStep, countFinalize ), |
| 104945 | 104974 | AGGREGATE(group_concat, 1, 0, 0, groupConcatStep, groupConcatFinalize), |
| 104946 | 104975 | AGGREGATE(group_concat, 2, 0, 0, groupConcatStep, groupConcatFinalize), |
| 104947 | 104976 | |
| 104948 | 104977 | LIKEFUNC(glob, 2, &globInfo, SQLITE_FUNC_LIKE|SQLITE_FUNC_CASE), |
| 104949 | - #ifdef SQLITE_CASE_SENSITIVE_LIKE | |
| 104978 | +#ifdef SQLITE_CASE_SENSITIVE_LIKE | |
| 104950 | 104979 | LIKEFUNC(like, 2, &likeInfoAlt, SQLITE_FUNC_LIKE|SQLITE_FUNC_CASE), |
| 104951 | 104980 | LIKEFUNC(like, 3, &likeInfoAlt, SQLITE_FUNC_LIKE|SQLITE_FUNC_CASE), |
| 104952 | - #else | |
| 104981 | +#else | |
| 104953 | 104982 | LIKEFUNC(like, 2, &likeInfoNorm, SQLITE_FUNC_LIKE), |
| 104954 | 104983 | LIKEFUNC(like, 3, &likeInfoNorm, SQLITE_FUNC_LIKE), |
| 104955 | - #endif | |
| 104984 | +#endif | |
| 104985 | +#ifdef SQLITE_ENABLE_UNKNOWN_SQL_FUNCTION | |
| 104986 | + FUNCTION(unknown, -1, 0, 0, unknownFunc ), | |
| 104987 | +#endif | |
| 104956 | 104988 | FUNCTION(coalesce, 1, 0, 0, 0 ), |
| 104957 | 104989 | FUNCTION(coalesce, 0, 0, 0, 0 ), |
| 104958 | 104990 | FUNCTION2(coalesce, -1, 0, 0, noopFunc, SQLITE_FUNC_COALESCE), |
| 104959 | 104991 | }; |
| 104960 | 104992 | #ifndef SQLITE_OMIT_ALTERTABLE |
| @@ -108613,11 +108645,11 @@ | ||
| 108613 | 108645 | ** If the SQL is a query, then for each row in the query result |
| 108614 | 108646 | ** the xCallback() function is called. pArg becomes the first |
| 108615 | 108647 | ** argument to xCallback(). If xCallback=NULL then no callback |
| 108616 | 108648 | ** is invoked, even for queries. |
| 108617 | 108649 | */ |
| 108618 | -SQLITE_API int SQLITE_APICALL sqlite3_exec( | |
| 108650 | +SQLITE_API int SQLITE_STDCALL sqlite3_exec( | |
| 108619 | 108651 | sqlite3 *db, /* The database on which the SQL executes */ |
| 108620 | 108652 | const char *zSql, /* The SQL to be executed */ |
| 108621 | 108653 | sqlite3_callback xCallback, /* Invoke this callback routine */ |
| 108622 | 108654 | void *pArg, /* First argument to xCallback() */ |
| 108623 | 108655 | char **pzErrMsg /* Write error messages here */ |
| @@ -109875,11 +109907,11 @@ | ||
| 109875 | 109907 | db->aExtension = aHandle; |
| 109876 | 109908 | |
| 109877 | 109909 | db->aExtension[db->nExtension++] = handle; |
| 109878 | 109910 | return SQLITE_OK; |
| 109879 | 109911 | } |
| 109880 | -SQLITE_API int SQLITE_APICALL sqlite3_load_extension( | |
| 109912 | +SQLITE_API int SQLITE_STDCALL sqlite3_load_extension( | |
| 109881 | 109913 | sqlite3 *db, /* Load the extension into this database connection */ |
| 109882 | 109914 | const char *zFile, /* Name of the shared library containing extension */ |
| 109883 | 109915 | const char *zProc, /* Entry point. Use "sqlite3_extension_init" if 0 */ |
| 109884 | 109916 | char **pzErrMsg /* Put error message here if not 0 */ |
| 109885 | 109917 | ){ |
| @@ -109906,11 +109938,11 @@ | ||
| 109906 | 109938 | |
| 109907 | 109939 | /* |
| 109908 | 109940 | ** Enable or disable extension loading. Extension loading is disabled by |
| 109909 | 109941 | ** default so as not to open security holes in older applications. |
| 109910 | 109942 | */ |
| 109911 | -SQLITE_API int SQLITE_APICALL sqlite3_enable_load_extension(sqlite3 *db, int onoff){ | |
| 109943 | +SQLITE_API int SQLITE_STDCALL sqlite3_enable_load_extension(sqlite3 *db, int onoff){ | |
| 109912 | 109944 | sqlite3_mutex_enter(db->mutex); |
| 109913 | 109945 | if( onoff ){ |
| 109914 | 109946 | db->flags |= SQLITE_LoadExtension|SQLITE_LoadExtFunc; |
| 109915 | 109947 | }else{ |
| 109916 | 109948 | db->flags &= ~(SQLITE_LoadExtension|SQLITE_LoadExtFunc); |
| @@ -109963,11 +109995,11 @@ | ||
| 109963 | 109995 | |
| 109964 | 109996 | /* |
| 109965 | 109997 | ** Register a statically linked extension that is automatically |
| 109966 | 109998 | ** loaded by every new database connection. |
| 109967 | 109999 | */ |
| 109968 | -SQLITE_API int SQLITE_APICALL sqlite3_auto_extension( | |
| 110000 | +SQLITE_API int SQLITE_STDCALL sqlite3_auto_extension( | |
| 109969 | 110001 | void (*xInit)(void) |
| 109970 | 110002 | ){ |
| 109971 | 110003 | int rc = SQLITE_OK; |
| 109972 | 110004 | #ifndef SQLITE_OMIT_AUTOINIT |
| 109973 | 110005 | rc = sqlite3_initialize(); |
| @@ -110010,11 +110042,11 @@ | ||
| 110010 | 110042 | ** routine is a no-op. |
| 110011 | 110043 | ** |
| 110012 | 110044 | ** Return 1 if xInit was found on the list and removed. Return 0 if xInit |
| 110013 | 110045 | ** was not on the list. |
| 110014 | 110046 | */ |
| 110015 | -SQLITE_API int SQLITE_APICALL sqlite3_cancel_auto_extension( | |
| 110047 | +SQLITE_API int SQLITE_STDCALL sqlite3_cancel_auto_extension( | |
| 110016 | 110048 | void (*xInit)(void) |
| 110017 | 110049 | ){ |
| 110018 | 110050 | #if SQLITE_THREADSAFE |
| 110019 | 110051 | sqlite3_mutex *mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER); |
| 110020 | 110052 | #endif |
| @@ -110035,11 +110067,11 @@ | ||
| 110035 | 110067 | } |
| 110036 | 110068 | |
| 110037 | 110069 | /* |
| 110038 | 110070 | ** Reset the automatic extension loading mechanism. |
| 110039 | 110071 | */ |
| 110040 | -SQLITE_API void SQLITE_APICALL sqlite3_reset_auto_extension(void){ | |
| 110072 | +SQLITE_API void SQLITE_STDCALL sqlite3_reset_auto_extension(void){ | |
| 110041 | 110073 | #ifndef SQLITE_OMIT_AUTOINIT |
| 110042 | 110074 | if( sqlite3_initialize()==SQLITE_OK ) |
| 110043 | 110075 | #endif |
| 110044 | 110076 | { |
| 110045 | 110077 | #if SQLITE_THREADSAFE |
| @@ -113296,11 +113328,11 @@ | ||
| 113296 | 113328 | ** and so if a schema change occurs, SQLITE_SCHEMA is returned by |
| 113297 | 113329 | ** sqlite3_step(). In the new version, the original SQL text is retained |
| 113298 | 113330 | ** and the statement is automatically recompiled if an schema change |
| 113299 | 113331 | ** occurs. |
| 113300 | 113332 | */ |
| 113301 | -SQLITE_API int SQLITE_APICALL sqlite3_prepare( | |
| 113333 | +SQLITE_API int SQLITE_STDCALL sqlite3_prepare( | |
| 113302 | 113334 | sqlite3 *db, /* Database handle. */ |
| 113303 | 113335 | const char *zSql, /* UTF-8 encoded SQL statement. */ |
| 113304 | 113336 | int nBytes, /* Length of zSql in bytes. */ |
| 113305 | 113337 | sqlite3_stmt **ppStmt, /* OUT: A pointer to the prepared statement */ |
| 113306 | 113338 | const char **pzTail /* OUT: End of parsed string */ |
| @@ -113308,11 +113340,11 @@ | ||
| 113308 | 113340 | int rc; |
| 113309 | 113341 | rc = sqlite3LockAndPrepare(db,zSql,nBytes,0,0,ppStmt,pzTail); |
| 113310 | 113342 | assert( rc==SQLITE_OK || ppStmt==0 || *ppStmt==0 ); /* VERIFY: F13021 */ |
| 113311 | 113343 | return rc; |
| 113312 | 113344 | } |
| 113313 | -SQLITE_API int SQLITE_APICALL sqlite3_prepare_v2( | |
| 113345 | +SQLITE_API int SQLITE_STDCALL sqlite3_prepare_v2( | |
| 113314 | 113346 | sqlite3 *db, /* Database handle. */ |
| 113315 | 113347 | const char *zSql, /* UTF-8 encoded SQL statement. */ |
| 113316 | 113348 | int nBytes, /* Length of zSql in bytes. */ |
| 113317 | 113349 | sqlite3_stmt **ppStmt, /* OUT: A pointer to the prepared statement */ |
| 113318 | 113350 | const char **pzTail /* OUT: End of parsed string */ |
| @@ -113384,11 +113416,11 @@ | ||
| 113384 | 113416 | ** and so if a schema change occurs, SQLITE_SCHEMA is returned by |
| 113385 | 113417 | ** sqlite3_step(). In the new version, the original SQL text is retained |
| 113386 | 113418 | ** and the statement is automatically recompiled if an schema change |
| 113387 | 113419 | ** occurs. |
| 113388 | 113420 | */ |
| 113389 | -SQLITE_API int SQLITE_APICALL sqlite3_prepare16( | |
| 113421 | +SQLITE_API int SQLITE_STDCALL sqlite3_prepare16( | |
| 113390 | 113422 | sqlite3 *db, /* Database handle. */ |
| 113391 | 113423 | const void *zSql, /* UTF-16 encoded SQL statement. */ |
| 113392 | 113424 | int nBytes, /* Length of zSql in bytes. */ |
| 113393 | 113425 | sqlite3_stmt **ppStmt, /* OUT: A pointer to the prepared statement */ |
| 113394 | 113426 | const void **pzTail /* OUT: End of parsed string */ |
| @@ -113396,11 +113428,11 @@ | ||
| 113396 | 113428 | int rc; |
| 113397 | 113429 | rc = sqlite3Prepare16(db,zSql,nBytes,0,ppStmt,pzTail); |
| 113398 | 113430 | assert( rc==SQLITE_OK || ppStmt==0 || *ppStmt==0 ); /* VERIFY: F13021 */ |
| 113399 | 113431 | return rc; |
| 113400 | 113432 | } |
| 113401 | -SQLITE_API int SQLITE_APICALL sqlite3_prepare16_v2( | |
| 113433 | +SQLITE_API int SQLITE_STDCALL sqlite3_prepare16_v2( | |
| 113402 | 113434 | sqlite3 *db, /* Database handle. */ |
| 113403 | 113435 | const void *zSql, /* UTF-16 encoded SQL statement. */ |
| 113404 | 113436 | int nBytes, /* Length of zSql in bytes. */ |
| 113405 | 113437 | sqlite3_stmt **ppStmt, /* OUT: A pointer to the prepared statement */ |
| 113406 | 113438 | const void **pzTail /* OUT: End of parsed string */ |
| @@ -119239,11 +119271,11 @@ | ||
| 119239 | 119271 | ** The result that is written to ***pazResult is held in memory obtained |
| 119240 | 119272 | ** from malloc(). But the caller cannot free this memory directly. |
| 119241 | 119273 | ** Instead, the entire table should be passed to sqlite3_free_table() when |
| 119242 | 119274 | ** the calling procedure is finished using it. |
| 119243 | 119275 | */ |
| 119244 | -SQLITE_API int SQLITE_APICALL sqlite3_get_table( | |
| 119276 | +SQLITE_API int SQLITE_STDCALL sqlite3_get_table( | |
| 119245 | 119277 | sqlite3 *db, /* The database on which the SQL executes */ |
| 119246 | 119278 | const char *zSql, /* The SQL to be executed */ |
| 119247 | 119279 | char ***pazResult, /* Write the result table here */ |
| 119248 | 119280 | int *pnRow, /* Write the number of rows in the result here */ |
| 119249 | 119281 | int *pnColumn, /* Write the number of columns of result here */ |
| @@ -119308,11 +119340,11 @@ | ||
| 119308 | 119340 | } |
| 119309 | 119341 | |
| 119310 | 119342 | /* |
| 119311 | 119343 | ** This routine frees the space the sqlite3_get_table() malloced. |
| 119312 | 119344 | */ |
| 119313 | -SQLITE_API void SQLITE_APICALL sqlite3_free_table( | |
| 119345 | +SQLITE_API void SQLITE_STDCALL sqlite3_free_table( | |
| 119314 | 119346 | char **azResult /* Result returned from sqlite3_get_table() */ |
| 119315 | 119347 | ){ |
| 119316 | 119348 | if( azResult ){ |
| 119317 | 119349 | int i, n; |
| 119318 | 119350 | azResult--; |
| @@ -121718,11 +121750,11 @@ | ||
| 121718 | 121750 | |
| 121719 | 121751 | |
| 121720 | 121752 | /* |
| 121721 | 121753 | ** External API function used to create a new virtual-table module. |
| 121722 | 121754 | */ |
| 121723 | -SQLITE_API int SQLITE_APICALL sqlite3_create_module( | |
| 121755 | +SQLITE_API int SQLITE_STDCALL sqlite3_create_module( | |
| 121724 | 121756 | sqlite3 *db, /* Database in which module is registered */ |
| 121725 | 121757 | const char *zName, /* Name assigned to this module */ |
| 121726 | 121758 | const sqlite3_module *pModule, /* The definition of the module */ |
| 121727 | 121759 | void *pAux /* Context pointer for xCreate/xConnect */ |
| 121728 | 121760 | ){ |
| @@ -121733,11 +121765,11 @@ | ||
| 121733 | 121765 | } |
| 121734 | 121766 | |
| 121735 | 121767 | /* |
| 121736 | 121768 | ** External API function used to create a new virtual-table module. |
| 121737 | 121769 | */ |
| 121738 | -SQLITE_API int SQLITE_APICALL sqlite3_create_module_v2( | |
| 121770 | +SQLITE_API int SQLITE_STDCALL sqlite3_create_module_v2( | |
| 121739 | 121771 | sqlite3 *db, /* Database in which module is registered */ |
| 121740 | 121772 | const char *zName, /* Name assigned to this module */ |
| 121741 | 121773 | const sqlite3_module *pModule, /* The definition of the module */ |
| 121742 | 121774 | void *pAux, /* Context pointer for xCreate/xConnect */ |
| 121743 | 121775 | void (*xDestroy)(void *) /* Module destructor function */ |
| @@ -122357,11 +122389,11 @@ | ||
| 122357 | 122389 | /* |
| 122358 | 122390 | ** This function is used to set the schema of a virtual table. It is only |
| 122359 | 122391 | ** valid to call this function from within the xCreate() or xConnect() of a |
| 122360 | 122392 | ** virtual table module. |
| 122361 | 122393 | */ |
| 122362 | -SQLITE_API int SQLITE_APICALL sqlite3_declare_vtab(sqlite3 *db, const char *zCreateTable){ | |
| 122394 | +SQLITE_API int SQLITE_STDCALL sqlite3_declare_vtab(sqlite3 *db, const char *zCreateTable){ | |
| 122363 | 122395 | VtabCtx *pCtx; |
| 122364 | 122396 | Parse *pParse; |
| 122365 | 122397 | int rc = SQLITE_OK; |
| 122366 | 122398 | Table *pTab; |
| 122367 | 122399 | char *zErr = 0; |
| @@ -122587,11 +122619,14 @@ | ||
| 122587 | 122619 | if( rc==SQLITE_OK ){ |
| 122588 | 122620 | rc = pModule->xBegin(pVTab->pVtab); |
| 122589 | 122621 | if( rc==SQLITE_OK ){ |
| 122590 | 122622 | int iSvpt = db->nStatement + db->nSavepoint; |
| 122591 | 122623 | addToVTrans(db, pVTab); |
| 122592 | - if( iSvpt ) rc = sqlite3VtabSavepoint(db, SAVEPOINT_BEGIN, iSvpt-1); | |
| 122624 | + if( iSvpt && pModule->xSavepoint ){ | |
| 122625 | + pVTab->iSavepoint = iSvpt; | |
| 122626 | + rc = pModule->xSavepoint(pVTab->pVtab, iSvpt-1); | |
| 122627 | + } | |
| 122593 | 122628 | } |
| 122594 | 122629 | } |
| 122595 | 122630 | } |
| 122596 | 122631 | return rc; |
| 122597 | 122632 | } |
| @@ -122811,11 +122846,11 @@ | ||
| 122811 | 122846 | ** table update operation currently in progress. |
| 122812 | 122847 | ** |
| 122813 | 122848 | ** The results of this routine are undefined unless it is called from |
| 122814 | 122849 | ** within an xUpdate method. |
| 122815 | 122850 | */ |
| 122816 | -SQLITE_API int SQLITE_APICALL sqlite3_vtab_on_conflict(sqlite3 *db){ | |
| 122851 | +SQLITE_API int SQLITE_STDCALL sqlite3_vtab_on_conflict(sqlite3 *db){ | |
| 122817 | 122852 | static const unsigned char aMap[] = { |
| 122818 | 122853 | SQLITE_ROLLBACK, SQLITE_ABORT, SQLITE_FAIL, SQLITE_IGNORE, SQLITE_REPLACE |
| 122819 | 122854 | }; |
| 122820 | 122855 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 122821 | 122856 | if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT; |
| @@ -130601,11 +130636,11 @@ | ||
| 130601 | 130636 | }else{ |
| 130602 | 130637 | pWInfo->nOBSat = pFrom->isOrdered; |
| 130603 | 130638 | pWInfo->revMask = pFrom->revLoop; |
| 130604 | 130639 | if( pWInfo->nOBSat<=0 ){ |
| 130605 | 130640 | pWInfo->nOBSat = 0; |
| 130606 | - if( nLoop>0 ){ | |
| 130641 | + if( nLoop>0 && (pFrom->aLoop[nLoop-1]->wsFlags & WHERE_ONEROW)==0 ){ | |
| 130607 | 130642 | Bitmask m = 0; |
| 130608 | 130643 | int rc = wherePathSatisfiesOrderBy(pWInfo, pWInfo->pOrderBy, pFrom, |
| 130609 | 130644 | WHERE_ORDERBY_LIMIT, nLoop-1, pFrom->aLoop[nLoop-1], &m); |
| 130610 | 130645 | if( rc==pWInfo->pOrderBy->nExpr ){ |
| 130611 | 130646 | pWInfo->bOrderedInnerLoop = 1; |
| @@ -136136,11 +136171,11 @@ | ||
| 136136 | 136171 | ** |
| 136137 | 136172 | ** If we compile with SQLITE_OMIT_TRIGGER, all of the computation needed |
| 136138 | 136173 | ** to recognize the end of a trigger can be omitted. All we have to do |
| 136139 | 136174 | ** is look for a semicolon that is not part of an string or comment. |
| 136140 | 136175 | */ |
| 136141 | -SQLITE_API int SQLITE_APICALL sqlite3_complete(const char *zSql){ | |
| 136176 | +SQLITE_API int SQLITE_STDCALL sqlite3_complete(const char *zSql){ | |
| 136142 | 136177 | u8 state = 0; /* Current state, using numbers defined in header comment */ |
| 136143 | 136178 | u8 token; /* Value of the next token */ |
| 136144 | 136179 | |
| 136145 | 136180 | #ifndef SQLITE_OMIT_TRIGGER |
| 136146 | 136181 | /* A complex statement machine used to detect the end of a CREATE TRIGGER |
| @@ -136301,11 +136336,11 @@ | ||
| 136301 | 136336 | /* |
| 136302 | 136337 | ** This routine is the same as the sqlite3_complete() routine described |
| 136303 | 136338 | ** above, except that the parameter is required to be UTF-16 encoded, not |
| 136304 | 136339 | ** UTF-8. |
| 136305 | 136340 | */ |
| 136306 | -SQLITE_API int SQLITE_APICALL sqlite3_complete16(const void *zSql){ | |
| 136341 | +SQLITE_API int SQLITE_STDCALL sqlite3_complete16(const void *zSql){ | |
| 136307 | 136342 | sqlite3_value *pVal; |
| 136308 | 136343 | char const *zSql8; |
| 136309 | 136344 | int rc; |
| 136310 | 136345 | |
| 136311 | 136346 | #ifndef SQLITE_OMIT_AUTOINIT |
| @@ -136461,28 +136496,28 @@ | ||
| 136461 | 136496 | #endif |
| 136462 | 136497 | |
| 136463 | 136498 | /* IMPLEMENTATION-OF: R-53536-42575 The sqlite3_libversion() function returns |
| 136464 | 136499 | ** a pointer to the to the sqlite3_version[] string constant. |
| 136465 | 136500 | */ |
| 136466 | -SQLITE_API const char *SQLITE_APICALL sqlite3_libversion(void){ return sqlite3_version; } | |
| 136501 | +SQLITE_API const char *SQLITE_STDCALL sqlite3_libversion(void){ return sqlite3_version; } | |
| 136467 | 136502 | |
| 136468 | 136503 | /* IMPLEMENTATION-OF: R-63124-39300 The sqlite3_sourceid() function returns a |
| 136469 | 136504 | ** pointer to a string constant whose value is the same as the |
| 136470 | 136505 | ** SQLITE_SOURCE_ID C preprocessor macro. |
| 136471 | 136506 | */ |
| 136472 | -SQLITE_API const char *SQLITE_APICALL sqlite3_sourceid(void){ return SQLITE_SOURCE_ID; } | |
| 136507 | +SQLITE_API const char *SQLITE_STDCALL sqlite3_sourceid(void){ return SQLITE_SOURCE_ID; } | |
| 136473 | 136508 | |
| 136474 | 136509 | /* IMPLEMENTATION-OF: R-35210-63508 The sqlite3_libversion_number() function |
| 136475 | 136510 | ** returns an integer equal to SQLITE_VERSION_NUMBER. |
| 136476 | 136511 | */ |
| 136477 | -SQLITE_API int SQLITE_APICALL sqlite3_libversion_number(void){ return SQLITE_VERSION_NUMBER; } | |
| 136512 | +SQLITE_API int SQLITE_STDCALL sqlite3_libversion_number(void){ return SQLITE_VERSION_NUMBER; } | |
| 136478 | 136513 | |
| 136479 | 136514 | /* IMPLEMENTATION-OF: R-20790-14025 The sqlite3_threadsafe() function returns |
| 136480 | 136515 | ** zero if and only if SQLite was compiled with mutexing code omitted due to |
| 136481 | 136516 | ** the SQLITE_THREADSAFE compile-time option being set to 0. |
| 136482 | 136517 | */ |
| 136483 | -SQLITE_API int SQLITE_APICALL sqlite3_threadsafe(void){ return SQLITE_THREADSAFE; } | |
| 136518 | +SQLITE_API int SQLITE_STDCALL sqlite3_threadsafe(void){ return SQLITE_THREADSAFE; } | |
| 136484 | 136519 | |
| 136485 | 136520 | /* |
| 136486 | 136521 | ** When compiling the test fixture or with debugging enabled (on Win32), |
| 136487 | 136522 | ** this variable being set to non-zero will cause OSTRACE macros to emit |
| 136488 | 136523 | ** extra diagnostic information. |
| @@ -136551,11 +136586,11 @@ | ||
| 136551 | 136586 | ** call by X completes. |
| 136552 | 136587 | ** |
| 136553 | 136588 | ** * Recursive calls to this routine from thread X return immediately |
| 136554 | 136589 | ** without blocking. |
| 136555 | 136590 | */ |
| 136556 | -SQLITE_API int SQLITE_APICALL sqlite3_initialize(void){ | |
| 136591 | +SQLITE_API int SQLITE_STDCALL sqlite3_initialize(void){ | |
| 136557 | 136592 | MUTEX_LOGIC( sqlite3_mutex *pMaster; ) /* The main static mutex */ |
| 136558 | 136593 | int rc; /* Result code */ |
| 136559 | 136594 | #ifdef SQLITE_EXTRA_INIT |
| 136560 | 136595 | int bRunExtraInit = 0; /* Extra initialization needed */ |
| 136561 | 136596 | #endif |
| @@ -136717,11 +136752,11 @@ | ||
| 136717 | 136752 | ** while any part of SQLite is otherwise in use in any thread. This |
| 136718 | 136753 | ** routine is not threadsafe. But it is safe to invoke this routine |
| 136719 | 136754 | ** on when SQLite is already shut down. If SQLite is already shut down |
| 136720 | 136755 | ** when this routine is invoked, then this routine is a harmless no-op. |
| 136721 | 136756 | */ |
| 136722 | -SQLITE_API int SQLITE_APICALL sqlite3_shutdown(void){ | |
| 136757 | +SQLITE_API int SQLITE_STDCALL sqlite3_shutdown(void){ | |
| 136723 | 136758 | #ifdef SQLITE_OMIT_WSD |
| 136724 | 136759 | int rc = sqlite3_wsd_init(4096, 24); |
| 136725 | 136760 | if( rc!=SQLITE_OK ){ |
| 136726 | 136761 | return rc; |
| 136727 | 136762 | } |
| @@ -137136,11 +137171,11 @@ | ||
| 137136 | 137171 | } |
| 137137 | 137172 | |
| 137138 | 137173 | /* |
| 137139 | 137174 | ** Return the mutex associated with a database connection. |
| 137140 | 137175 | */ |
| 137141 | -SQLITE_API sqlite3_mutex *SQLITE_APICALL sqlite3_db_mutex(sqlite3 *db){ | |
| 137176 | +SQLITE_API sqlite3_mutex *SQLITE_STDCALL sqlite3_db_mutex(sqlite3 *db){ | |
| 137142 | 137177 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 137143 | 137178 | if( !sqlite3SafetyCheckOk(db) ){ |
| 137144 | 137179 | (void)SQLITE_MISUSE_BKPT; |
| 137145 | 137180 | return 0; |
| 137146 | 137181 | } |
| @@ -137150,11 +137185,11 @@ | ||
| 137150 | 137185 | |
| 137151 | 137186 | /* |
| 137152 | 137187 | ** Free up as much memory as we can from the given database |
| 137153 | 137188 | ** connection. |
| 137154 | 137189 | */ |
| 137155 | -SQLITE_API int SQLITE_APICALL sqlite3_db_release_memory(sqlite3 *db){ | |
| 137190 | +SQLITE_API int SQLITE_STDCALL sqlite3_db_release_memory(sqlite3 *db){ | |
| 137156 | 137191 | int i; |
| 137157 | 137192 | |
| 137158 | 137193 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 137159 | 137194 | if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT; |
| 137160 | 137195 | #endif |
| @@ -137174,11 +137209,11 @@ | ||
| 137174 | 137209 | |
| 137175 | 137210 | /* |
| 137176 | 137211 | ** Flush any dirty pages in the pager-cache for any attached database |
| 137177 | 137212 | ** to disk. |
| 137178 | 137213 | */ |
| 137179 | -SQLITE_API int SQLITE_APICALL sqlite3_db_cacheflush(sqlite3 *db){ | |
| 137214 | +SQLITE_API int SQLITE_STDCALL sqlite3_db_cacheflush(sqlite3 *db){ | |
| 137180 | 137215 | int i; |
| 137181 | 137216 | int rc = SQLITE_OK; |
| 137182 | 137217 | int bSeenBusy = 0; |
| 137183 | 137218 | |
| 137184 | 137219 | #ifdef SQLITE_ENABLE_API_ARMOR |
| @@ -137324,11 +137359,11 @@ | ||
| 137324 | 137359 | } |
| 137325 | 137360 | |
| 137326 | 137361 | /* |
| 137327 | 137362 | ** Return the ROWID of the most recent insert |
| 137328 | 137363 | */ |
| 137329 | -SQLITE_API sqlite_int64 SQLITE_APICALL sqlite3_last_insert_rowid(sqlite3 *db){ | |
| 137364 | +SQLITE_API sqlite_int64 SQLITE_STDCALL sqlite3_last_insert_rowid(sqlite3 *db){ | |
| 137330 | 137365 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 137331 | 137366 | if( !sqlite3SafetyCheckOk(db) ){ |
| 137332 | 137367 | (void)SQLITE_MISUSE_BKPT; |
| 137333 | 137368 | return 0; |
| 137334 | 137369 | } |
| @@ -137337,11 +137372,11 @@ | ||
| 137337 | 137372 | } |
| 137338 | 137373 | |
| 137339 | 137374 | /* |
| 137340 | 137375 | ** Return the number of changes in the most recent call to sqlite3_exec(). |
| 137341 | 137376 | */ |
| 137342 | -SQLITE_API int SQLITE_APICALL sqlite3_changes(sqlite3 *db){ | |
| 137377 | +SQLITE_API int SQLITE_STDCALL sqlite3_changes(sqlite3 *db){ | |
| 137343 | 137378 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 137344 | 137379 | if( !sqlite3SafetyCheckOk(db) ){ |
| 137345 | 137380 | (void)SQLITE_MISUSE_BKPT; |
| 137346 | 137381 | return 0; |
| 137347 | 137382 | } |
| @@ -137350,11 +137385,11 @@ | ||
| 137350 | 137385 | } |
| 137351 | 137386 | |
| 137352 | 137387 | /* |
| 137353 | 137388 | ** Return the number of changes since the database handle was opened. |
| 137354 | 137389 | */ |
| 137355 | -SQLITE_API int SQLITE_APICALL sqlite3_total_changes(sqlite3 *db){ | |
| 137390 | +SQLITE_API int SQLITE_STDCALL sqlite3_total_changes(sqlite3 *db){ | |
| 137356 | 137391 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 137357 | 137392 | if( !sqlite3SafetyCheckOk(db) ){ |
| 137358 | 137393 | (void)SQLITE_MISUSE_BKPT; |
| 137359 | 137394 | return 0; |
| 137360 | 137395 | } |
| @@ -137501,12 +137536,12 @@ | ||
| 137501 | 137536 | ** statements or unfinished sqlite3_backups. The sqlite3_close_v2() |
| 137502 | 137537 | ** version forces the connection to become a zombie if there are |
| 137503 | 137538 | ** unclosed resources, and arranges for deallocation when the last |
| 137504 | 137539 | ** prepare statement or sqlite3_backup closes. |
| 137505 | 137540 | */ |
| 137506 | -SQLITE_API int SQLITE_APICALL sqlite3_close(sqlite3 *db){ return sqlite3Close(db,0); } | |
| 137507 | -SQLITE_API int SQLITE_APICALL sqlite3_close_v2(sqlite3 *db){ return sqlite3Close(db,1); } | |
| 137541 | +SQLITE_API int SQLITE_STDCALL sqlite3_close(sqlite3 *db){ return sqlite3Close(db,0); } | |
| 137542 | +SQLITE_API int SQLITE_STDCALL sqlite3_close_v2(sqlite3 *db){ return sqlite3Close(db,1); } | |
| 137508 | 137543 | |
| 137509 | 137544 | |
| 137510 | 137545 | /* |
| 137511 | 137546 | ** Close the mutex on database connection db. |
| 137512 | 137547 | ** |
| @@ -137909,11 +137944,11 @@ | ||
| 137909 | 137944 | |
| 137910 | 137945 | /* |
| 137911 | 137946 | ** This routine sets the busy callback for an Sqlite database to the |
| 137912 | 137947 | ** given callback function with the given argument. |
| 137913 | 137948 | */ |
| 137914 | -SQLITE_API int SQLITE_APICALL sqlite3_busy_handler( | |
| 137949 | +SQLITE_API int SQLITE_STDCALL sqlite3_busy_handler( | |
| 137915 | 137950 | sqlite3 *db, |
| 137916 | 137951 | int (*xBusy)(void*,int), |
| 137917 | 137952 | void *pArg |
| 137918 | 137953 | ){ |
| 137919 | 137954 | #ifdef SQLITE_ENABLE_API_ARMOR |
| @@ -137932,11 +137967,11 @@ | ||
| 137932 | 137967 | /* |
| 137933 | 137968 | ** This routine sets the progress callback for an Sqlite database to the |
| 137934 | 137969 | ** given callback function with the given argument. The progress callback will |
| 137935 | 137970 | ** be invoked every nOps opcodes. |
| 137936 | 137971 | */ |
| 137937 | -SQLITE_API void SQLITE_APICALL sqlite3_progress_handler( | |
| 137972 | +SQLITE_API void SQLITE_STDCALL sqlite3_progress_handler( | |
| 137938 | 137973 | sqlite3 *db, |
| 137939 | 137974 | int nOps, |
| 137940 | 137975 | int (*xProgress)(void*), |
| 137941 | 137976 | void *pArg |
| 137942 | 137977 | ){ |
| @@ -137963,11 +137998,11 @@ | ||
| 137963 | 137998 | |
| 137964 | 137999 | /* |
| 137965 | 138000 | ** This routine installs a default busy handler that waits for the |
| 137966 | 138001 | ** specified number of milliseconds before returning 0. |
| 137967 | 138002 | */ |
| 137968 | -SQLITE_API int SQLITE_APICALL sqlite3_busy_timeout(sqlite3 *db, int ms){ | |
| 138003 | +SQLITE_API int SQLITE_STDCALL sqlite3_busy_timeout(sqlite3 *db, int ms){ | |
| 137969 | 138004 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 137970 | 138005 | if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT; |
| 137971 | 138006 | #endif |
| 137972 | 138007 | if( ms>0 ){ |
| 137973 | 138008 | sqlite3_busy_handler(db, sqliteDefaultBusyCallback, (void*)db); |
| @@ -137979,11 +138014,11 @@ | ||
| 137979 | 138014 | } |
| 137980 | 138015 | |
| 137981 | 138016 | /* |
| 137982 | 138017 | ** Cause any pending operation to stop at its earliest opportunity. |
| 137983 | 138018 | */ |
| 137984 | -SQLITE_API void SQLITE_APICALL sqlite3_interrupt(sqlite3 *db){ | |
| 138019 | +SQLITE_API void SQLITE_STDCALL sqlite3_interrupt(sqlite3 *db){ | |
| 137985 | 138020 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 137986 | 138021 | if( !sqlite3SafetyCheckOk(db) ){ |
| 137987 | 138022 | (void)SQLITE_MISUSE_BKPT; |
| 137988 | 138023 | return; |
| 137989 | 138024 | } |
| @@ -138095,11 +138130,11 @@ | ||
| 138095 | 138130 | } |
| 138096 | 138131 | |
| 138097 | 138132 | /* |
| 138098 | 138133 | ** Create new user functions. |
| 138099 | 138134 | */ |
| 138100 | -SQLITE_API int SQLITE_APICALL sqlite3_create_function( | |
| 138135 | +SQLITE_API int SQLITE_STDCALL sqlite3_create_function( | |
| 138101 | 138136 | sqlite3 *db, |
| 138102 | 138137 | const char *zFunc, |
| 138103 | 138138 | int nArg, |
| 138104 | 138139 | int enc, |
| 138105 | 138140 | void *p, |
| @@ -138109,11 +138144,11 @@ | ||
| 138109 | 138144 | ){ |
| 138110 | 138145 | return sqlite3_create_function_v2(db, zFunc, nArg, enc, p, xSFunc, xStep, |
| 138111 | 138146 | xFinal, 0); |
| 138112 | 138147 | } |
| 138113 | 138148 | |
| 138114 | -SQLITE_API int SQLITE_APICALL sqlite3_create_function_v2( | |
| 138149 | +SQLITE_API int SQLITE_STDCALL sqlite3_create_function_v2( | |
| 138115 | 138150 | sqlite3 *db, |
| 138116 | 138151 | const char *zFunc, |
| 138117 | 138152 | int nArg, |
| 138118 | 138153 | int enc, |
| 138119 | 138154 | void *p, |
| @@ -138152,11 +138187,11 @@ | ||
| 138152 | 138187 | sqlite3_mutex_leave(db->mutex); |
| 138153 | 138188 | return rc; |
| 138154 | 138189 | } |
| 138155 | 138190 | |
| 138156 | 138191 | #ifndef SQLITE_OMIT_UTF16 |
| 138157 | -SQLITE_API int SQLITE_APICALL sqlite3_create_function16( | |
| 138192 | +SQLITE_API int SQLITE_STDCALL sqlite3_create_function16( | |
| 138158 | 138193 | sqlite3 *db, |
| 138159 | 138194 | const void *zFunctionName, |
| 138160 | 138195 | int nArg, |
| 138161 | 138196 | int eTextRep, |
| 138162 | 138197 | void *p, |
| @@ -138192,11 +138227,11 @@ | ||
| 138192 | 138227 | ** When virtual tables intend to provide an overloaded function, they |
| 138193 | 138228 | ** should call this routine to make sure the global function exists. |
| 138194 | 138229 | ** A global function must exist in order for name resolution to work |
| 138195 | 138230 | ** properly. |
| 138196 | 138231 | */ |
| 138197 | -SQLITE_API int SQLITE_APICALL sqlite3_overload_function( | |
| 138232 | +SQLITE_API int SQLITE_STDCALL sqlite3_overload_function( | |
| 138198 | 138233 | sqlite3 *db, |
| 138199 | 138234 | const char *zName, |
| 138200 | 138235 | int nArg |
| 138201 | 138236 | ){ |
| 138202 | 138237 | int rc = SQLITE_OK; |
| @@ -138224,11 +138259,11 @@ | ||
| 138224 | 138259 | ** A NULL trace function means that no tracing is executes. A non-NULL |
| 138225 | 138260 | ** trace is a pointer to a function that is invoked at the start of each |
| 138226 | 138261 | ** SQL statement. |
| 138227 | 138262 | */ |
| 138228 | 138263 | #ifndef SQLITE_OMIT_DEPRECATED |
| 138229 | -SQLITE_API void *SQLITE_APICALL sqlite3_trace(sqlite3 *db, void(*xTrace)(void*,const char*), void *pArg){ | |
| 138264 | +SQLITE_API void *SQLITE_STDCALL sqlite3_trace(sqlite3 *db, void(*xTrace)(void*,const char*), void *pArg){ | |
| 138230 | 138265 | void *pOld; |
| 138231 | 138266 | |
| 138232 | 138267 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 138233 | 138268 | if( !sqlite3SafetyCheckOk(db) ){ |
| 138234 | 138269 | (void)SQLITE_MISUSE_BKPT; |
| @@ -138245,11 +138280,11 @@ | ||
| 138245 | 138280 | } |
| 138246 | 138281 | #endif /* SQLITE_OMIT_DEPRECATED */ |
| 138247 | 138282 | |
| 138248 | 138283 | /* Register a trace callback using the version-2 interface. |
| 138249 | 138284 | */ |
| 138250 | -SQLITE_API int SQLITE_APICALL sqlite3_trace_v2( | |
| 138285 | +SQLITE_API int SQLITE_STDCALL sqlite3_trace_v2( | |
| 138251 | 138286 | sqlite3 *db, /* Trace this connection */ |
| 138252 | 138287 | unsigned mTrace, /* Mask of events to be traced */ |
| 138253 | 138288 | int(*xTrace)(unsigned,void*,void*,void*), /* Callback to invoke */ |
| 138254 | 138289 | void *pArg /* Context */ |
| 138255 | 138290 | ){ |
| @@ -138273,11 +138308,11 @@ | ||
| 138273 | 138308 | ** |
| 138274 | 138309 | ** A NULL profile function means that no profiling is executes. A non-NULL |
| 138275 | 138310 | ** profile is a pointer to a function that is invoked at the conclusion of |
| 138276 | 138311 | ** each SQL statement that is run. |
| 138277 | 138312 | */ |
| 138278 | -SQLITE_API void *SQLITE_APICALL sqlite3_profile( | |
| 138313 | +SQLITE_API void *SQLITE_STDCALL sqlite3_profile( | |
| 138279 | 138314 | sqlite3 *db, |
| 138280 | 138315 | void (*xProfile)(void*,const char*,sqlite_uint64), |
| 138281 | 138316 | void *pArg |
| 138282 | 138317 | ){ |
| 138283 | 138318 | void *pOld; |
| @@ -138301,11 +138336,11 @@ | ||
| 138301 | 138336 | /* |
| 138302 | 138337 | ** Register a function to be invoked when a transaction commits. |
| 138303 | 138338 | ** If the invoked function returns non-zero, then the commit becomes a |
| 138304 | 138339 | ** rollback. |
| 138305 | 138340 | */ |
| 138306 | -SQLITE_API void *SQLITE_APICALL sqlite3_commit_hook( | |
| 138341 | +SQLITE_API void *SQLITE_STDCALL sqlite3_commit_hook( | |
| 138307 | 138342 | sqlite3 *db, /* Attach the hook to this database */ |
| 138308 | 138343 | int (*xCallback)(void*), /* Function to invoke on each commit */ |
| 138309 | 138344 | void *pArg /* Argument to the function */ |
| 138310 | 138345 | ){ |
| 138311 | 138346 | void *pOld; |
| @@ -138326,11 +138361,11 @@ | ||
| 138326 | 138361 | |
| 138327 | 138362 | /* |
| 138328 | 138363 | ** Register a callback to be invoked each time a row is updated, |
| 138329 | 138364 | ** inserted or deleted using this database connection. |
| 138330 | 138365 | */ |
| 138331 | -SQLITE_API void *SQLITE_APICALL sqlite3_update_hook( | |
| 138366 | +SQLITE_API void *SQLITE_STDCALL sqlite3_update_hook( | |
| 138332 | 138367 | sqlite3 *db, /* Attach the hook to this database */ |
| 138333 | 138368 | void (*xCallback)(void*,int,char const *,char const *,sqlite_int64), |
| 138334 | 138369 | void *pArg /* Argument to the function */ |
| 138335 | 138370 | ){ |
| 138336 | 138371 | void *pRet; |
| @@ -138351,11 +138386,11 @@ | ||
| 138351 | 138386 | |
| 138352 | 138387 | /* |
| 138353 | 138388 | ** Register a callback to be invoked each time a transaction is rolled |
| 138354 | 138389 | ** back by this database connection. |
| 138355 | 138390 | */ |
| 138356 | -SQLITE_API void *SQLITE_APICALL sqlite3_rollback_hook( | |
| 138391 | +SQLITE_API void *SQLITE_STDCALL sqlite3_rollback_hook( | |
| 138357 | 138392 | sqlite3 *db, /* Attach the hook to this database */ |
| 138358 | 138393 | void (*xCallback)(void*), /* Callback function */ |
| 138359 | 138394 | void *pArg /* Argument to the function */ |
| 138360 | 138395 | ){ |
| 138361 | 138396 | void *pRet; |
| @@ -138377,11 +138412,11 @@ | ||
| 138377 | 138412 | #ifdef SQLITE_ENABLE_PREUPDATE_HOOK |
| 138378 | 138413 | /* |
| 138379 | 138414 | ** Register a callback to be invoked each time a row is updated, |
| 138380 | 138415 | ** inserted or deleted using this database connection. |
| 138381 | 138416 | */ |
| 138382 | -SQLITE_API void *SQLITE_APICALL sqlite3_preupdate_hook( | |
| 138417 | +SQLITE_API void *SQLITE_STDCALL sqlite3_preupdate_hook( | |
| 138383 | 138418 | sqlite3 *db, /* Attach the hook to this database */ |
| 138384 | 138419 | void(*xCallback)( /* Callback function */ |
| 138385 | 138420 | void*,sqlite3*,int,char const*,char const*,sqlite3_int64,sqlite3_int64), |
| 138386 | 138421 | void *pArg /* First callback argument */ |
| 138387 | 138422 | ){ |
| @@ -138426,11 +138461,11 @@ | ||
| 138426 | 138461 | ** The callback registered by this function replaces any existing callback |
| 138427 | 138462 | ** registered using sqlite3_wal_hook(). Likewise, registering a callback |
| 138428 | 138463 | ** using sqlite3_wal_hook() disables the automatic checkpoint mechanism |
| 138429 | 138464 | ** configured by this function. |
| 138430 | 138465 | */ |
| 138431 | -SQLITE_API int SQLITE_APICALL sqlite3_wal_autocheckpoint(sqlite3 *db, int nFrame){ | |
| 138466 | +SQLITE_API int SQLITE_STDCALL sqlite3_wal_autocheckpoint(sqlite3 *db, int nFrame){ | |
| 138432 | 138467 | #ifdef SQLITE_OMIT_WAL |
| 138433 | 138468 | UNUSED_PARAMETER(db); |
| 138434 | 138469 | UNUSED_PARAMETER(nFrame); |
| 138435 | 138470 | #else |
| 138436 | 138471 | #ifdef SQLITE_ENABLE_API_ARMOR |
| @@ -138447,11 +138482,11 @@ | ||
| 138447 | 138482 | |
| 138448 | 138483 | /* |
| 138449 | 138484 | ** Register a callback to be invoked each time a transaction is written |
| 138450 | 138485 | ** into the write-ahead-log by this database connection. |
| 138451 | 138486 | */ |
| 138452 | -SQLITE_API void *SQLITE_APICALL sqlite3_wal_hook( | |
| 138487 | +SQLITE_API void *SQLITE_STDCALL sqlite3_wal_hook( | |
| 138453 | 138488 | sqlite3 *db, /* Attach the hook to this db handle */ |
| 138454 | 138489 | int(*xCallback)(void *, sqlite3*, const char*, int), |
| 138455 | 138490 | void *pArg /* First argument passed to xCallback() */ |
| 138456 | 138491 | ){ |
| 138457 | 138492 | #ifndef SQLITE_OMIT_WAL |
| @@ -138474,11 +138509,11 @@ | ||
| 138474 | 138509 | } |
| 138475 | 138510 | |
| 138476 | 138511 | /* |
| 138477 | 138512 | ** Checkpoint database zDb. |
| 138478 | 138513 | */ |
| 138479 | -SQLITE_API int SQLITE_APICALL sqlite3_wal_checkpoint_v2( | |
| 138514 | +SQLITE_API int SQLITE_STDCALL sqlite3_wal_checkpoint_v2( | |
| 138480 | 138515 | sqlite3 *db, /* Database handle */ |
| 138481 | 138516 | const char *zDb, /* Name of attached database (or NULL) */ |
| 138482 | 138517 | int eMode, /* SQLITE_CHECKPOINT_* value */ |
| 138483 | 138518 | int *pnLog, /* OUT: Size of WAL log in frames */ |
| 138484 | 138519 | int *pnCkpt /* OUT: Total number of frames checkpointed */ |
| @@ -138529,11 +138564,11 @@ | ||
| 138529 | 138564 | /* |
| 138530 | 138565 | ** Checkpoint database zDb. If zDb is NULL, or if the buffer zDb points |
| 138531 | 138566 | ** to contains a zero-length string, all attached databases are |
| 138532 | 138567 | ** checkpointed. |
| 138533 | 138568 | */ |
| 138534 | -SQLITE_API int SQLITE_APICALL sqlite3_wal_checkpoint(sqlite3 *db, const char *zDb){ | |
| 138569 | +SQLITE_API int SQLITE_STDCALL sqlite3_wal_checkpoint(sqlite3 *db, const char *zDb){ | |
| 138535 | 138570 | /* EVIDENCE-OF: R-41613-20553 The sqlite3_wal_checkpoint(D,X) is equivalent to |
| 138536 | 138571 | ** sqlite3_wal_checkpoint_v2(D,X,SQLITE_CHECKPOINT_PASSIVE,0,0). */ |
| 138537 | 138572 | return sqlite3_wal_checkpoint_v2(db,zDb,SQLITE_CHECKPOINT_PASSIVE,0,0); |
| 138538 | 138573 | } |
| 138539 | 138574 | |
| @@ -138620,11 +138655,11 @@ | ||
| 138620 | 138655 | |
| 138621 | 138656 | /* |
| 138622 | 138657 | ** Return UTF-8 encoded English language explanation of the most recent |
| 138623 | 138658 | ** error. |
| 138624 | 138659 | */ |
| 138625 | -SQLITE_API const char *SQLITE_APICALL sqlite3_errmsg(sqlite3 *db){ | |
| 138660 | +SQLITE_API const char *SQLITE_STDCALL sqlite3_errmsg(sqlite3 *db){ | |
| 138626 | 138661 | const char *z; |
| 138627 | 138662 | if( !db ){ |
| 138628 | 138663 | return sqlite3ErrStr(SQLITE_NOMEM_BKPT); |
| 138629 | 138664 | } |
| 138630 | 138665 | if( !sqlite3SafetyCheckSickOrOk(db) ){ |
| @@ -138648,11 +138683,11 @@ | ||
| 138648 | 138683 | #ifndef SQLITE_OMIT_UTF16 |
| 138649 | 138684 | /* |
| 138650 | 138685 | ** Return UTF-16 encoded English language explanation of the most recent |
| 138651 | 138686 | ** error. |
| 138652 | 138687 | */ |
| 138653 | -SQLITE_API const void *SQLITE_APICALL sqlite3_errmsg16(sqlite3 *db){ | |
| 138688 | +SQLITE_API const void *SQLITE_STDCALL sqlite3_errmsg16(sqlite3 *db){ | |
| 138654 | 138689 | static const u16 outOfMem[] = { |
| 138655 | 138690 | 'o', 'u', 't', ' ', 'o', 'f', ' ', 'm', 'e', 'm', 'o', 'r', 'y', 0 |
| 138656 | 138691 | }; |
| 138657 | 138692 | static const u16 misuse[] = { |
| 138658 | 138693 | 'l', 'i', 'b', 'r', 'a', 'r', 'y', ' ', |
| @@ -138693,38 +138728,38 @@ | ||
| 138693 | 138728 | |
| 138694 | 138729 | /* |
| 138695 | 138730 | ** Return the most recent error code generated by an SQLite routine. If NULL is |
| 138696 | 138731 | ** passed to this function, we assume a malloc() failed during sqlite3_open(). |
| 138697 | 138732 | */ |
| 138698 | -SQLITE_API int SQLITE_APICALL sqlite3_errcode(sqlite3 *db){ | |
| 138733 | +SQLITE_API int SQLITE_STDCALL sqlite3_errcode(sqlite3 *db){ | |
| 138699 | 138734 | if( db && !sqlite3SafetyCheckSickOrOk(db) ){ |
| 138700 | 138735 | return SQLITE_MISUSE_BKPT; |
| 138701 | 138736 | } |
| 138702 | 138737 | if( !db || db->mallocFailed ){ |
| 138703 | 138738 | return SQLITE_NOMEM_BKPT; |
| 138704 | 138739 | } |
| 138705 | 138740 | return db->errCode & db->errMask; |
| 138706 | 138741 | } |
| 138707 | -SQLITE_API int SQLITE_APICALL sqlite3_extended_errcode(sqlite3 *db){ | |
| 138742 | +SQLITE_API int SQLITE_STDCALL sqlite3_extended_errcode(sqlite3 *db){ | |
| 138708 | 138743 | if( db && !sqlite3SafetyCheckSickOrOk(db) ){ |
| 138709 | 138744 | return SQLITE_MISUSE_BKPT; |
| 138710 | 138745 | } |
| 138711 | 138746 | if( !db || db->mallocFailed ){ |
| 138712 | 138747 | return SQLITE_NOMEM_BKPT; |
| 138713 | 138748 | } |
| 138714 | 138749 | return db->errCode; |
| 138715 | 138750 | } |
| 138716 | -SQLITE_API int SQLITE_APICALL sqlite3_system_errno(sqlite3 *db){ | |
| 138751 | +SQLITE_API int SQLITE_STDCALL sqlite3_system_errno(sqlite3 *db){ | |
| 138717 | 138752 | return db ? db->iSysErrno : 0; |
| 138718 | 138753 | } |
| 138719 | 138754 | |
| 138720 | 138755 | /* |
| 138721 | 138756 | ** Return a string that describes the kind of error specified in the |
| 138722 | 138757 | ** argument. For now, this simply calls the internal sqlite3ErrStr() |
| 138723 | 138758 | ** function. |
| 138724 | 138759 | */ |
| 138725 | -SQLITE_API const char *SQLITE_APICALL sqlite3_errstr(int rc){ | |
| 138760 | +SQLITE_API const char *SQLITE_STDCALL sqlite3_errstr(int rc){ | |
| 138726 | 138761 | return sqlite3ErrStr(rc); |
| 138727 | 138762 | } |
| 138728 | 138763 | |
| 138729 | 138764 | /* |
| 138730 | 138765 | ** Create a new collating function for database "db". The name is zName |
| @@ -138868,11 +138903,11 @@ | ||
| 138868 | 138903 | ** |
| 138869 | 138904 | ** A new lower limit does not shrink existing constructs. |
| 138870 | 138905 | ** It merely prevents new constructs that exceed the limit |
| 138871 | 138906 | ** from forming. |
| 138872 | 138907 | */ |
| 138873 | -SQLITE_API int SQLITE_APICALL sqlite3_limit(sqlite3 *db, int limitId, int newLimit){ | |
| 138908 | +SQLITE_API int SQLITE_STDCALL sqlite3_limit(sqlite3 *db, int limitId, int newLimit){ | |
| 138874 | 138909 | int oldLimit; |
| 138875 | 138910 | |
| 138876 | 138911 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 138877 | 138912 | if( !sqlite3SafetyCheckOk(db) ){ |
| 138878 | 138913 | (void)SQLITE_MISUSE_BKPT; |
| @@ -139492,18 +139527,18 @@ | ||
| 139492 | 139527 | } |
| 139493 | 139528 | |
| 139494 | 139529 | /* |
| 139495 | 139530 | ** Open a new database handle. |
| 139496 | 139531 | */ |
| 139497 | -SQLITE_API int SQLITE_APICALL sqlite3_open( | |
| 139532 | +SQLITE_API int SQLITE_STDCALL sqlite3_open( | |
| 139498 | 139533 | const char *zFilename, |
| 139499 | 139534 | sqlite3 **ppDb |
| 139500 | 139535 | ){ |
| 139501 | 139536 | return openDatabase(zFilename, ppDb, |
| 139502 | 139537 | SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, 0); |
| 139503 | 139538 | } |
| 139504 | -SQLITE_API int SQLITE_APICALL sqlite3_open_v2( | |
| 139539 | +SQLITE_API int SQLITE_STDCALL sqlite3_open_v2( | |
| 139505 | 139540 | const char *filename, /* Database filename (UTF-8) */ |
| 139506 | 139541 | sqlite3 **ppDb, /* OUT: SQLite db handle */ |
| 139507 | 139542 | int flags, /* Flags */ |
| 139508 | 139543 | const char *zVfs /* Name of VFS module to use */ |
| 139509 | 139544 | ){ |
| @@ -139512,11 +139547,11 @@ | ||
| 139512 | 139547 | |
| 139513 | 139548 | #ifndef SQLITE_OMIT_UTF16 |
| 139514 | 139549 | /* |
| 139515 | 139550 | ** Open a new database handle. |
| 139516 | 139551 | */ |
| 139517 | -SQLITE_API int SQLITE_APICALL sqlite3_open16( | |
| 139552 | +SQLITE_API int SQLITE_STDCALL sqlite3_open16( | |
| 139518 | 139553 | const void *zFilename, |
| 139519 | 139554 | sqlite3 **ppDb |
| 139520 | 139555 | ){ |
| 139521 | 139556 | char const *zFilename8; /* zFilename encoded in UTF-8 instead of UTF-16 */ |
| 139522 | 139557 | sqlite3_value *pVal; |
| @@ -139551,11 +139586,11 @@ | ||
| 139551 | 139586 | #endif /* SQLITE_OMIT_UTF16 */ |
| 139552 | 139587 | |
| 139553 | 139588 | /* |
| 139554 | 139589 | ** Register a new collation sequence with the database handle db. |
| 139555 | 139590 | */ |
| 139556 | -SQLITE_API int SQLITE_APICALL sqlite3_create_collation( | |
| 139591 | +SQLITE_API int SQLITE_STDCALL sqlite3_create_collation( | |
| 139557 | 139592 | sqlite3* db, |
| 139558 | 139593 | const char *zName, |
| 139559 | 139594 | int enc, |
| 139560 | 139595 | void* pCtx, |
| 139561 | 139596 | int(*xCompare)(void*,int,const void*,int,const void*) |
| @@ -139564,11 +139599,11 @@ | ||
| 139564 | 139599 | } |
| 139565 | 139600 | |
| 139566 | 139601 | /* |
| 139567 | 139602 | ** Register a new collation sequence with the database handle db. |
| 139568 | 139603 | */ |
| 139569 | -SQLITE_API int SQLITE_APICALL sqlite3_create_collation_v2( | |
| 139604 | +SQLITE_API int SQLITE_STDCALL sqlite3_create_collation_v2( | |
| 139570 | 139605 | sqlite3* db, |
| 139571 | 139606 | const char *zName, |
| 139572 | 139607 | int enc, |
| 139573 | 139608 | void* pCtx, |
| 139574 | 139609 | int(*xCompare)(void*,int,const void*,int,const void*), |
| @@ -139589,11 +139624,11 @@ | ||
| 139589 | 139624 | |
| 139590 | 139625 | #ifndef SQLITE_OMIT_UTF16 |
| 139591 | 139626 | /* |
| 139592 | 139627 | ** Register a new collation sequence with the database handle db. |
| 139593 | 139628 | */ |
| 139594 | -SQLITE_API int SQLITE_APICALL sqlite3_create_collation16( | |
| 139629 | +SQLITE_API int SQLITE_STDCALL sqlite3_create_collation16( | |
| 139595 | 139630 | sqlite3* db, |
| 139596 | 139631 | const void *zName, |
| 139597 | 139632 | int enc, |
| 139598 | 139633 | void* pCtx, |
| 139599 | 139634 | int(*xCompare)(void*,int,const void*,int,const void*) |
| @@ -139619,11 +139654,11 @@ | ||
| 139619 | 139654 | |
| 139620 | 139655 | /* |
| 139621 | 139656 | ** Register a collation sequence factory callback with the database handle |
| 139622 | 139657 | ** db. Replace any previously installed collation sequence factory. |
| 139623 | 139658 | */ |
| 139624 | -SQLITE_API int SQLITE_APICALL sqlite3_collation_needed( | |
| 139659 | +SQLITE_API int SQLITE_STDCALL sqlite3_collation_needed( | |
| 139625 | 139660 | sqlite3 *db, |
| 139626 | 139661 | void *pCollNeededArg, |
| 139627 | 139662 | void(*xCollNeeded)(void*,sqlite3*,int eTextRep,const char*) |
| 139628 | 139663 | ){ |
| 139629 | 139664 | #ifdef SQLITE_ENABLE_API_ARMOR |
| @@ -139640,11 +139675,11 @@ | ||
| 139640 | 139675 | #ifndef SQLITE_OMIT_UTF16 |
| 139641 | 139676 | /* |
| 139642 | 139677 | ** Register a collation sequence factory callback with the database handle |
| 139643 | 139678 | ** db. Replace any previously installed collation sequence factory. |
| 139644 | 139679 | */ |
| 139645 | -SQLITE_API int SQLITE_APICALL sqlite3_collation_needed16( | |
| 139680 | +SQLITE_API int SQLITE_STDCALL sqlite3_collation_needed16( | |
| 139646 | 139681 | sqlite3 *db, |
| 139647 | 139682 | void *pCollNeededArg, |
| 139648 | 139683 | void(*xCollNeeded16)(void*,sqlite3*,int eTextRep,const void*) |
| 139649 | 139684 | ){ |
| 139650 | 139685 | #ifdef SQLITE_ENABLE_API_ARMOR |
| @@ -139662,11 +139697,11 @@ | ||
| 139662 | 139697 | #ifndef SQLITE_OMIT_DEPRECATED |
| 139663 | 139698 | /* |
| 139664 | 139699 | ** This function is now an anachronism. It used to be used to recover from a |
| 139665 | 139700 | ** malloc() failure, but SQLite now does this automatically. |
| 139666 | 139701 | */ |
| 139667 | -SQLITE_API int SQLITE_APICALL sqlite3_global_recover(void){ | |
| 139702 | +SQLITE_API int SQLITE_STDCALL sqlite3_global_recover(void){ | |
| 139668 | 139703 | return SQLITE_OK; |
| 139669 | 139704 | } |
| 139670 | 139705 | #endif |
| 139671 | 139706 | |
| 139672 | 139707 | /* |
| @@ -139673,11 +139708,11 @@ | ||
| 139673 | 139708 | ** Test to see whether or not the database connection is in autocommit |
| 139674 | 139709 | ** mode. Return TRUE if it is and FALSE if not. Autocommit mode is on |
| 139675 | 139710 | ** by default. Autocommit is disabled by a BEGIN statement and reenabled |
| 139676 | 139711 | ** by the next COMMIT or ROLLBACK. |
| 139677 | 139712 | */ |
| 139678 | -SQLITE_API int SQLITE_APICALL sqlite3_get_autocommit(sqlite3 *db){ | |
| 139713 | +SQLITE_API int SQLITE_STDCALL sqlite3_get_autocommit(sqlite3 *db){ | |
| 139679 | 139714 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 139680 | 139715 | if( !sqlite3SafetyCheckOk(db) ){ |
| 139681 | 139716 | (void)SQLITE_MISUSE_BKPT; |
| 139682 | 139717 | return 0; |
| 139683 | 139718 | } |
| @@ -139730,19 +139765,19 @@ | ||
| 139730 | 139765 | ** data for this thread has been deallocated. |
| 139731 | 139766 | ** |
| 139732 | 139767 | ** SQLite no longer uses thread-specific data so this routine is now a |
| 139733 | 139768 | ** no-op. It is retained for historical compatibility. |
| 139734 | 139769 | */ |
| 139735 | -SQLITE_API void SQLITE_APICALL sqlite3_thread_cleanup(void){ | |
| 139770 | +SQLITE_API void SQLITE_STDCALL sqlite3_thread_cleanup(void){ | |
| 139736 | 139771 | } |
| 139737 | 139772 | #endif |
| 139738 | 139773 | |
| 139739 | 139774 | /* |
| 139740 | 139775 | ** Return meta information about a specific column of a database table. |
| 139741 | 139776 | ** See comment in sqlite3.h (sqlite.h.in) for details. |
| 139742 | 139777 | */ |
| 139743 | -SQLITE_API int SQLITE_APICALL sqlite3_table_column_metadata( | |
| 139778 | +SQLITE_API int SQLITE_STDCALL sqlite3_table_column_metadata( | |
| 139744 | 139779 | sqlite3 *db, /* Connection handle */ |
| 139745 | 139780 | const char *zDbName, /* Database name or NULL */ |
| 139746 | 139781 | const char *zTableName, /* Table name */ |
| 139747 | 139782 | const char *zColumnName, /* Column name */ |
| 139748 | 139783 | char const **pzDataType, /* OUTPUT: Declared data type */ |
| @@ -139856,11 +139891,11 @@ | ||
| 139856 | 139891 | } |
| 139857 | 139892 | |
| 139858 | 139893 | /* |
| 139859 | 139894 | ** Sleep for a little while. Return the amount of time slept. |
| 139860 | 139895 | */ |
| 139861 | -SQLITE_API int SQLITE_APICALL sqlite3_sleep(int ms){ | |
| 139896 | +SQLITE_API int SQLITE_STDCALL sqlite3_sleep(int ms){ | |
| 139862 | 139897 | sqlite3_vfs *pVfs; |
| 139863 | 139898 | int rc; |
| 139864 | 139899 | pVfs = sqlite3_vfs_find(0); |
| 139865 | 139900 | if( pVfs==0 ) return 0; |
| 139866 | 139901 | |
| @@ -139872,11 +139907,11 @@ | ||
| 139872 | 139907 | } |
| 139873 | 139908 | |
| 139874 | 139909 | /* |
| 139875 | 139910 | ** Enable or disable the extended result codes. |
| 139876 | 139911 | */ |
| 139877 | -SQLITE_API int SQLITE_APICALL sqlite3_extended_result_codes(sqlite3 *db, int onoff){ | |
| 139912 | +SQLITE_API int SQLITE_STDCALL sqlite3_extended_result_codes(sqlite3 *db, int onoff){ | |
| 139878 | 139913 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 139879 | 139914 | if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT; |
| 139880 | 139915 | #endif |
| 139881 | 139916 | sqlite3_mutex_enter(db->mutex); |
| 139882 | 139917 | db->errMask = onoff ? 0xffffffff : 0xff; |
| @@ -139885,11 +139920,11 @@ | ||
| 139885 | 139920 | } |
| 139886 | 139921 | |
| 139887 | 139922 | /* |
| 139888 | 139923 | ** Invoke the xFileControl method on a particular database. |
| 139889 | 139924 | */ |
| 139890 | -SQLITE_API int SQLITE_APICALL sqlite3_file_control(sqlite3 *db, const char *zDbName, int op, void *pArg){ | |
| 139925 | +SQLITE_API int SQLITE_STDCALL sqlite3_file_control(sqlite3 *db, const char *zDbName, int op, void *pArg){ | |
| 139891 | 139926 | int rc = SQLITE_ERROR; |
| 139892 | 139927 | Btree *pBtree; |
| 139893 | 139928 | |
| 139894 | 139929 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 139895 | 139930 | if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT; |
| @@ -140270,11 +140305,11 @@ | ||
| 140270 | 140305 | ** method of a VFS implementation. The zParam argument is the name of the |
| 140271 | 140306 | ** query parameter we seek. This routine returns the value of the zParam |
| 140272 | 140307 | ** parameter if it exists. If the parameter does not exist, this routine |
| 140273 | 140308 | ** returns a NULL pointer. |
| 140274 | 140309 | */ |
| 140275 | -SQLITE_API const char *SQLITE_APICALL sqlite3_uri_parameter(const char *zFilename, const char *zParam){ | |
| 140310 | +SQLITE_API const char *SQLITE_STDCALL sqlite3_uri_parameter(const char *zFilename, const char *zParam){ | |
| 140276 | 140311 | if( zFilename==0 || zParam==0 ) return 0; |
| 140277 | 140312 | zFilename += sqlite3Strlen30(zFilename) + 1; |
| 140278 | 140313 | while( zFilename[0] ){ |
| 140279 | 140314 | int x = strcmp(zFilename, zParam); |
| 140280 | 140315 | zFilename += sqlite3Strlen30(zFilename) + 1; |
| @@ -140285,20 +140320,20 @@ | ||
| 140285 | 140320 | } |
| 140286 | 140321 | |
| 140287 | 140322 | /* |
| 140288 | 140323 | ** Return a boolean value for a query parameter. |
| 140289 | 140324 | */ |
| 140290 | -SQLITE_API int SQLITE_APICALL sqlite3_uri_boolean(const char *zFilename, const char *zParam, int bDflt){ | |
| 140325 | +SQLITE_API int SQLITE_STDCALL sqlite3_uri_boolean(const char *zFilename, const char *zParam, int bDflt){ | |
| 140291 | 140326 | const char *z = sqlite3_uri_parameter(zFilename, zParam); |
| 140292 | 140327 | bDflt = bDflt!=0; |
| 140293 | 140328 | return z ? sqlite3GetBoolean(z, bDflt) : bDflt; |
| 140294 | 140329 | } |
| 140295 | 140330 | |
| 140296 | 140331 | /* |
| 140297 | 140332 | ** Return a 64-bit integer value for a query parameter. |
| 140298 | 140333 | */ |
| 140299 | -SQLITE_API sqlite3_int64 SQLITE_APICALL sqlite3_uri_int64( | |
| 140334 | +SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_uri_int64( | |
| 140300 | 140335 | const char *zFilename, /* Filename as passed to xOpen */ |
| 140301 | 140336 | const char *zParam, /* URI parameter sought */ |
| 140302 | 140337 | sqlite3_int64 bDflt /* return if parameter is missing */ |
| 140303 | 140338 | ){ |
| 140304 | 140339 | const char *z = sqlite3_uri_parameter(zFilename, zParam); |
| @@ -140326,11 +140361,11 @@ | ||
| 140326 | 140361 | |
| 140327 | 140362 | /* |
| 140328 | 140363 | ** Return the filename of the database associated with a database |
| 140329 | 140364 | ** connection. |
| 140330 | 140365 | */ |
| 140331 | -SQLITE_API const char *SQLITE_APICALL sqlite3_db_filename(sqlite3 *db, const char *zDbName){ | |
| 140366 | +SQLITE_API const char *SQLITE_STDCALL sqlite3_db_filename(sqlite3 *db, const char *zDbName){ | |
| 140332 | 140367 | Btree *pBt; |
| 140333 | 140368 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 140334 | 140369 | if( !sqlite3SafetyCheckOk(db) ){ |
| 140335 | 140370 | (void)SQLITE_MISUSE_BKPT; |
| 140336 | 140371 | return 0; |
| @@ -140342,11 +140377,11 @@ | ||
| 140342 | 140377 | |
| 140343 | 140378 | /* |
| 140344 | 140379 | ** Return 1 if database is read-only or 0 if read/write. Return -1 if |
| 140345 | 140380 | ** no such database exists. |
| 140346 | 140381 | */ |
| 140347 | -SQLITE_API int SQLITE_APICALL sqlite3_db_readonly(sqlite3 *db, const char *zDbName){ | |
| 140382 | +SQLITE_API int SQLITE_STDCALL sqlite3_db_readonly(sqlite3 *db, const char *zDbName){ | |
| 140348 | 140383 | Btree *pBt; |
| 140349 | 140384 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 140350 | 140385 | if( !sqlite3SafetyCheckOk(db) ){ |
| 140351 | 140386 | (void)SQLITE_MISUSE_BKPT; |
| 140352 | 140387 | return -1; |
| @@ -140359,11 +140394,11 @@ | ||
| 140359 | 140394 | #ifdef SQLITE_ENABLE_SNAPSHOT |
| 140360 | 140395 | /* |
| 140361 | 140396 | ** Obtain a snapshot handle for the snapshot of database zDb currently |
| 140362 | 140397 | ** being read by handle db. |
| 140363 | 140398 | */ |
| 140364 | -SQLITE_API int SQLITE_APICALL sqlite3_snapshot_get( | |
| 140399 | +SQLITE_API int SQLITE_STDCALL sqlite3_snapshot_get( | |
| 140365 | 140400 | sqlite3 *db, |
| 140366 | 140401 | const char *zDb, |
| 140367 | 140402 | sqlite3_snapshot **ppSnapshot |
| 140368 | 140403 | ){ |
| 140369 | 140404 | int rc = SQLITE_ERROR; |
| @@ -140394,11 +140429,11 @@ | ||
| 140394 | 140429 | } |
| 140395 | 140430 | |
| 140396 | 140431 | /* |
| 140397 | 140432 | ** Open a read-transaction on the snapshot idendified by pSnapshot. |
| 140398 | 140433 | */ |
| 140399 | -SQLITE_API int SQLITE_APICALL sqlite3_snapshot_open( | |
| 140434 | +SQLITE_API int SQLITE_STDCALL sqlite3_snapshot_open( | |
| 140400 | 140435 | sqlite3 *db, |
| 140401 | 140436 | const char *zDb, |
| 140402 | 140437 | sqlite3_snapshot *pSnapshot |
| 140403 | 140438 | ){ |
| 140404 | 140439 | int rc = SQLITE_ERROR; |
| @@ -140431,11 +140466,11 @@ | ||
| 140431 | 140466 | } |
| 140432 | 140467 | |
| 140433 | 140468 | /* |
| 140434 | 140469 | ** Free a snapshot handle obtained from sqlite3_snapshot_get(). |
| 140435 | 140470 | */ |
| 140436 | -SQLITE_API void SQLITE_APICALL sqlite3_snapshot_free(sqlite3_snapshot *pSnapshot){ | |
| 140471 | +SQLITE_API void SQLITE_STDCALL sqlite3_snapshot_free(sqlite3_snapshot *pSnapshot){ | |
| 140437 | 140472 | sqlite3_free(pSnapshot); |
| 140438 | 140473 | } |
| 140439 | 140474 | #endif /* SQLITE_ENABLE_SNAPSHOT */ |
| 140440 | 140475 | |
| 140441 | 140476 | /************** End of main.c ************************************************/ |
| @@ -140585,11 +140620,11 @@ | ||
| 140585 | 140620 | ** |
| 140586 | 140621 | ** Each call to this routine overrides any prior callbacks registered |
| 140587 | 140622 | ** on the same "db". If xNotify==0 then any prior callbacks are immediately |
| 140588 | 140623 | ** cancelled. |
| 140589 | 140624 | */ |
| 140590 | -SQLITE_API int SQLITE_APICALL sqlite3_unlock_notify( | |
| 140625 | +SQLITE_API int SQLITE_STDCALL sqlite3_unlock_notify( | |
| 140591 | 140626 | sqlite3 *db, |
| 140592 | 140627 | void (*xNotify)(void **, int), |
| 140593 | 140628 | void *pArg |
| 140594 | 140629 | ){ |
| 140595 | 140630 | int rc = SQLITE_OK; |
| @@ -147588,11 +147623,11 @@ | ||
| 147588 | 147623 | ** Initialize API pointer table, if required. |
| 147589 | 147624 | */ |
| 147590 | 147625 | #ifdef _WIN32 |
| 147591 | 147626 | __declspec(dllexport) |
| 147592 | 147627 | #endif |
| 147593 | -SQLITE_API int SQLITE_APICALL sqlite3_fts3_init( | |
| 147628 | +SQLITE_API int SQLITE_STDCALL sqlite3_fts3_init( | |
| 147594 | 147629 | sqlite3 *db, |
| 147595 | 147630 | char **pzErrMsg, |
| 147596 | 147631 | const sqlite3_api_routines *pApi |
| 147597 | 147632 | ){ |
| 147598 | 147633 | SQLITE_EXTENSION_INIT2(pApi) |
| @@ -163389,11 +163424,11 @@ | ||
| 163389 | 163424 | } |
| 163390 | 163425 | |
| 163391 | 163426 | /* |
| 163392 | 163427 | ** Register a new geometry function for use with the r-tree MATCH operator. |
| 163393 | 163428 | */ |
| 163394 | -SQLITE_API int SQLITE_APICALL sqlite3_rtree_geometry_callback( | |
| 163429 | +SQLITE_API int SQLITE_STDCALL sqlite3_rtree_geometry_callback( | |
| 163395 | 163430 | sqlite3 *db, /* Register SQL function on this connection */ |
| 163396 | 163431 | const char *zGeom, /* Name of the new SQL function */ |
| 163397 | 163432 | int (*xGeom)(sqlite3_rtree_geometry*,int,RtreeDValue*,int*), /* Callback */ |
| 163398 | 163433 | void *pContext /* Extra data associated with the callback */ |
| 163399 | 163434 | ){ |
| @@ -163413,11 +163448,11 @@ | ||
| 163413 | 163448 | |
| 163414 | 163449 | /* |
| 163415 | 163450 | ** Register a new 2nd-generation geometry function for use with the |
| 163416 | 163451 | ** r-tree MATCH operator. |
| 163417 | 163452 | */ |
| 163418 | -SQLITE_API int SQLITE_APICALL sqlite3_rtree_query_callback( | |
| 163453 | +SQLITE_API int SQLITE_STDCALL sqlite3_rtree_query_callback( | |
| 163419 | 163454 | sqlite3 *db, /* Register SQL function on this connection */ |
| 163420 | 163455 | const char *zQueryFunc, /* Name of new SQL function */ |
| 163421 | 163456 | int (*xQueryFunc)(sqlite3_rtree_query_info*), /* Callback */ |
| 163422 | 163457 | void *pContext, /* Extra data passed into the callback */ |
| 163423 | 163458 | void (*xDestructor)(void*) /* Destructor for the extra data */ |
| @@ -163438,11 +163473,11 @@ | ||
| 163438 | 163473 | |
| 163439 | 163474 | #if !SQLITE_CORE |
| 163440 | 163475 | #ifdef _WIN32 |
| 163441 | 163476 | __declspec(dllexport) |
| 163442 | 163477 | #endif |
| 163443 | -SQLITE_API int SQLITE_APICALL sqlite3_rtree_init( | |
| 163478 | +SQLITE_API int SQLITE_STDCALL sqlite3_rtree_init( | |
| 163444 | 163479 | sqlite3 *db, |
| 163445 | 163480 | char **pzErrMsg, |
| 163446 | 163481 | const sqlite3_api_routines *pApi |
| 163447 | 163482 | ){ |
| 163448 | 163483 | SQLITE_EXTENSION_INIT2(pApi) |
| @@ -163989,11 +164024,11 @@ | ||
| 163989 | 164024 | |
| 163990 | 164025 | #if !SQLITE_CORE |
| 163991 | 164026 | #ifdef _WIN32 |
| 163992 | 164027 | __declspec(dllexport) |
| 163993 | 164028 | #endif |
| 163994 | -SQLITE_API int SQLITE_APICALL sqlite3_icu_init( | |
| 164029 | +SQLITE_API int SQLITE_STDCALL sqlite3_icu_init( | |
| 163995 | 164030 | sqlite3 *db, |
| 163996 | 164031 | char **pzErrMsg, |
| 163997 | 164032 | const sqlite3_api_routines *pApi |
| 163998 | 164033 | ){ |
| 163999 | 164034 | SQLITE_EXTENSION_INIT2(pApi) |
| @@ -164669,11 +164704,11 @@ | ||
| 164669 | 164704 | ** IMPORTANT NOTE FOR ZIPVFS USERS: The RBU extension works with all of |
| 164670 | 164705 | ** SQLite's built-in VFSs, including the multiplexor VFS. However it does |
| 164671 | 164706 | ** not work out of the box with zipvfs. Refer to the comment describing |
| 164672 | 164707 | ** the zipvfs_create_vfs() API below for details on using RBU with zipvfs. |
| 164673 | 164708 | */ |
| 164674 | -SQLITE_API sqlite3rbu *SQLITE_APICALL sqlite3rbu_open( | |
| 164709 | +SQLITE_API sqlite3rbu *SQLITE_STDCALL sqlite3rbu_open( | |
| 164675 | 164710 | const char *zTarget, |
| 164676 | 164711 | const char *zRbu, |
| 164677 | 164712 | const char *zState |
| 164678 | 164713 | ); |
| 164679 | 164714 | |
| @@ -164702,11 +164737,11 @@ | ||
| 164702 | 164737 | ** As with sqlite3rbu_open(), Zipvfs users should rever to the comment |
| 164703 | 164738 | ** describing the sqlite3rbu_create_vfs() API function below for |
| 164704 | 164739 | ** a description of the complications associated with using RBU with |
| 164705 | 164740 | ** zipvfs databases. |
| 164706 | 164741 | */ |
| 164707 | -SQLITE_API sqlite3rbu *SQLITE_APICALL sqlite3rbu_vacuum( | |
| 164742 | +SQLITE_API sqlite3rbu *SQLITE_STDCALL sqlite3rbu_vacuum( | |
| 164708 | 164743 | const char *zTarget, |
| 164709 | 164744 | const char *zState |
| 164710 | 164745 | ); |
| 164711 | 164746 | |
| 164712 | 164747 | /* |
| @@ -164738,11 +164773,11 @@ | ||
| 164738 | 164773 | ** when sqlite3rbu_close() is called. |
| 164739 | 164774 | ** |
| 164740 | 164775 | ** Database handles returned by this function remain valid until the next |
| 164741 | 164776 | ** call to any sqlite3rbu_xxx() function other than sqlite3rbu_db(). |
| 164742 | 164777 | */ |
| 164743 | -SQLITE_API sqlite3 *SQLITE_APICALL sqlite3rbu_db(sqlite3rbu*, int bRbu); | |
| 164778 | +SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3rbu_db(sqlite3rbu*, int bRbu); | |
| 164744 | 164779 | |
| 164745 | 164780 | /* |
| 164746 | 164781 | ** Do some work towards applying the RBU update to the target db. |
| 164747 | 164782 | ** |
| 164748 | 164783 | ** Return SQLITE_DONE if the update has been completely applied, or |
| @@ -164752,11 +164787,11 @@ | ||
| 164752 | 164787 | ** |
| 164753 | 164788 | ** Once a call to sqlite3rbu_step() has returned a value other than |
| 164754 | 164789 | ** SQLITE_OK, all subsequent calls on the same RBU handle are no-ops |
| 164755 | 164790 | ** that immediately return the same value. |
| 164756 | 164791 | */ |
| 164757 | -SQLITE_API int SQLITE_APICALL sqlite3rbu_step(sqlite3rbu *pRbu); | |
| 164792 | +SQLITE_API int SQLITE_STDCALL sqlite3rbu_step(sqlite3rbu *pRbu); | |
| 164758 | 164793 | |
| 164759 | 164794 | /* |
| 164760 | 164795 | ** Force RBU to save its state to disk. |
| 164761 | 164796 | ** |
| 164762 | 164797 | ** If a power failure or application crash occurs during an update, following |
| @@ -164764,11 +164799,11 @@ | ||
| 164764 | 164799 | ** was last saved. In other words, from the most recent successful call to |
| 164765 | 164800 | ** sqlite3rbu_close() or this function. |
| 164766 | 164801 | ** |
| 164767 | 164802 | ** SQLITE_OK is returned if successful, or an SQLite error code otherwise. |
| 164768 | 164803 | */ |
| 164769 | -SQLITE_API int SQLITE_APICALL sqlite3rbu_savestate(sqlite3rbu *pRbu); | |
| 164804 | +SQLITE_API int SQLITE_STDCALL sqlite3rbu_savestate(sqlite3rbu *pRbu); | |
| 164770 | 164805 | |
| 164771 | 164806 | /* |
| 164772 | 164807 | ** Close an RBU handle. |
| 164773 | 164808 | ** |
| 164774 | 164809 | ** If the RBU update has been completely applied, mark the RBU database |
| @@ -164784,18 +164819,18 @@ | ||
| 164784 | 164819 | ** |
| 164785 | 164820 | ** Otherwise, if no error occurs, this function returns SQLITE_OK if the |
| 164786 | 164821 | ** update has been partially applied, or SQLITE_DONE if it has been |
| 164787 | 164822 | ** completely applied. |
| 164788 | 164823 | */ |
| 164789 | -SQLITE_API int SQLITE_APICALL sqlite3rbu_close(sqlite3rbu *pRbu, char **pzErrmsg); | |
| 164824 | +SQLITE_API int SQLITE_STDCALL sqlite3rbu_close(sqlite3rbu *pRbu, char **pzErrmsg); | |
| 164790 | 164825 | |
| 164791 | 164826 | /* |
| 164792 | 164827 | ** Return the total number of key-value operations (inserts, deletes or |
| 164793 | 164828 | ** updates) that have been performed on the target database since the |
| 164794 | 164829 | ** current RBU update was started. |
| 164795 | 164830 | */ |
| 164796 | -SQLITE_API sqlite3_int64 SQLITE_APICALL sqlite3rbu_progress(sqlite3rbu *pRbu); | |
| 164831 | +SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3rbu_progress(sqlite3rbu *pRbu); | |
| 164797 | 164832 | |
| 164798 | 164833 | /* |
| 164799 | 164834 | ** Obtain permyriadage (permyriadage is to 10000 as percentage is to 100) |
| 164800 | 164835 | ** progress indications for the two stages of an RBU update. This API may |
| 164801 | 164836 | ** be useful for driving GUI progress indicators and similar. |
| @@ -164833,11 +164868,11 @@ | ||
| 164833 | 164868 | ** permyriadage progress of the same stage. If the rbu_count table does |
| 164834 | 164869 | ** not exist, then (*pnOne) is set to -1 during stage 1. If the rbu_count |
| 164835 | 164870 | ** table exists but is not correctly populated, the value of the *pnOne |
| 164836 | 164871 | ** output variable during stage 1 is undefined. |
| 164837 | 164872 | */ |
| 164838 | -SQLITE_API void SQLITE_APICALL sqlite3rbu_bp_progress(sqlite3rbu *pRbu, int *pnOne, int *pnTwo); | |
| 164873 | +SQLITE_API void SQLITE_STDCALL sqlite3rbu_bp_progress(sqlite3rbu *pRbu, int *pnOne, int *pnTwo); | |
| 164839 | 164874 | |
| 164840 | 164875 | /* |
| 164841 | 164876 | ** Obtain an indication as to the current stage of an RBU update or vacuum. |
| 164842 | 164877 | ** This function always returns one of the SQLITE_RBU_STATE_XXX constants |
| 164843 | 164878 | ** defined in this file. Return values should be interpreted as follows: |
| @@ -164871,11 +164906,11 @@ | ||
| 164871 | 164906 | #define SQLITE_RBU_STATE_MOVE 2 |
| 164872 | 164907 | #define SQLITE_RBU_STATE_CHECKPOINT 3 |
| 164873 | 164908 | #define SQLITE_RBU_STATE_DONE 4 |
| 164874 | 164909 | #define SQLITE_RBU_STATE_ERROR 5 |
| 164875 | 164910 | |
| 164876 | -SQLITE_API int SQLITE_APICALL sqlite3rbu_state(sqlite3rbu *pRbu); | |
| 164911 | +SQLITE_API int SQLITE_STDCALL sqlite3rbu_state(sqlite3rbu *pRbu); | |
| 164877 | 164912 | |
| 164878 | 164913 | /* |
| 164879 | 164914 | ** Create an RBU VFS named zName that accesses the underlying file-system |
| 164880 | 164915 | ** via existing VFS zParent. Or, if the zParent parameter is passed NULL, |
| 164881 | 164916 | ** then the new RBU VFS uses the default system VFS to access the file-system. |
| @@ -164915,21 +164950,21 @@ | ||
| 164915 | 164950 | ** The overhead of adding the "rbu" VFS to the system is negligible for |
| 164916 | 164951 | ** non-RBU users. There is no harm in an application accessing the |
| 164917 | 164952 | ** file-system via "rbu" all the time, even if it only uses RBU functionality |
| 164918 | 164953 | ** occasionally. |
| 164919 | 164954 | */ |
| 164920 | -SQLITE_API int SQLITE_APICALL sqlite3rbu_create_vfs(const char *zName, const char *zParent); | |
| 164955 | +SQLITE_API int SQLITE_STDCALL sqlite3rbu_create_vfs(const char *zName, const char *zParent); | |
| 164921 | 164956 | |
| 164922 | 164957 | /* |
| 164923 | 164958 | ** Deregister and destroy an RBU vfs created by an earlier call to |
| 164924 | 164959 | ** sqlite3rbu_create_vfs(). |
| 164925 | 164960 | ** |
| 164926 | 164961 | ** VFS objects are not reference counted. If a VFS object is destroyed |
| 164927 | 164962 | ** before all database handles that use it have been closed, the results |
| 164928 | 164963 | ** are undefined. |
| 164929 | 164964 | */ |
| 164930 | -SQLITE_API void SQLITE_APICALL sqlite3rbu_destroy_vfs(const char *zName); | |
| 164965 | +SQLITE_API void SQLITE_STDCALL sqlite3rbu_destroy_vfs(const char *zName); | |
| 164931 | 164966 | |
| 164932 | 164967 | #if 0 |
| 164933 | 164968 | } /* end of the 'extern "C"' block */ |
| 164934 | 164969 | #endif |
| 164935 | 164970 | |
| @@ -168019,11 +168054,11 @@ | ||
| 168019 | 168054 | } |
| 168020 | 168055 | |
| 168021 | 168056 | /* |
| 168022 | 168057 | ** Step the RBU object. |
| 168023 | 168058 | */ |
| 168024 | -SQLITE_API int SQLITE_APICALL sqlite3rbu_step(sqlite3rbu *p){ | |
| 168059 | +SQLITE_API int SQLITE_STDCALL sqlite3rbu_step(sqlite3rbu *p){ | |
| 168025 | 168060 | if( p ){ |
| 168026 | 168061 | switch( p->eStage ){ |
| 168027 | 168062 | case RBU_STAGE_OAL: { |
| 168028 | 168063 | RbuObjIter *pIter = &p->objiter; |
| 168029 | 168064 | |
| @@ -168461,11 +168496,11 @@ | ||
| 168461 | 168496 | } |
| 168462 | 168497 | |
| 168463 | 168498 | /* |
| 168464 | 168499 | ** Open and return a new RBU handle. |
| 168465 | 168500 | */ |
| 168466 | -SQLITE_API sqlite3rbu *SQLITE_APICALL sqlite3rbu_open( | |
| 168501 | +SQLITE_API sqlite3rbu *SQLITE_STDCALL sqlite3rbu_open( | |
| 168467 | 168502 | const char *zTarget, |
| 168468 | 168503 | const char *zRbu, |
| 168469 | 168504 | const char *zState |
| 168470 | 168505 | ){ |
| 168471 | 168506 | /* TODO: Check that zTarget and zRbu are non-NULL */ |
| @@ -168473,11 +168508,11 @@ | ||
| 168473 | 168508 | } |
| 168474 | 168509 | |
| 168475 | 168510 | /* |
| 168476 | 168511 | ** Open a handle to begin or resume an RBU VACUUM operation. |
| 168477 | 168512 | */ |
| 168478 | -SQLITE_API sqlite3rbu *SQLITE_APICALL sqlite3rbu_vacuum( | |
| 168513 | +SQLITE_API sqlite3rbu *SQLITE_STDCALL sqlite3rbu_vacuum( | |
| 168479 | 168514 | const char *zTarget, |
| 168480 | 168515 | const char *zState |
| 168481 | 168516 | ){ |
| 168482 | 168517 | /* TODO: Check that both arguments are non-NULL */ |
| 168483 | 168518 | return openRbuHandle(0, zTarget, zState); |
| @@ -168484,11 +168519,11 @@ | ||
| 168484 | 168519 | } |
| 168485 | 168520 | |
| 168486 | 168521 | /* |
| 168487 | 168522 | ** Return the database handle used by pRbu. |
| 168488 | 168523 | */ |
| 168489 | -SQLITE_API sqlite3 *SQLITE_APICALL sqlite3rbu_db(sqlite3rbu *pRbu, int bRbu){ | |
| 168524 | +SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3rbu_db(sqlite3rbu *pRbu, int bRbu){ | |
| 168490 | 168525 | sqlite3 *db = 0; |
| 168491 | 168526 | if( pRbu ){ |
| 168492 | 168527 | db = (bRbu ? pRbu->dbRbu : pRbu->dbMain); |
| 168493 | 168528 | } |
| 168494 | 168529 | return db; |
| @@ -168516,11 +168551,11 @@ | ||
| 168516 | 168551 | } |
| 168517 | 168552 | |
| 168518 | 168553 | /* |
| 168519 | 168554 | ** Close the RBU handle. |
| 168520 | 168555 | */ |
| 168521 | -SQLITE_API int SQLITE_APICALL sqlite3rbu_close(sqlite3rbu *p, char **pzErrmsg){ | |
| 168556 | +SQLITE_API int SQLITE_STDCALL sqlite3rbu_close(sqlite3rbu *p, char **pzErrmsg){ | |
| 168522 | 168557 | int rc; |
| 168523 | 168558 | if( p ){ |
| 168524 | 168559 | |
| 168525 | 168560 | /* Commit the transaction to the *-oal file. */ |
| 168526 | 168561 | if( p->rc==SQLITE_OK && p->eStage==RBU_STAGE_OAL ){ |
| @@ -168567,19 +168602,19 @@ | ||
| 168567 | 168602 | /* |
| 168568 | 168603 | ** Return the total number of key-value operations (inserts, deletes or |
| 168569 | 168604 | ** updates) that have been performed on the target database since the |
| 168570 | 168605 | ** current RBU update was started. |
| 168571 | 168606 | */ |
| 168572 | -SQLITE_API sqlite3_int64 SQLITE_APICALL sqlite3rbu_progress(sqlite3rbu *pRbu){ | |
| 168607 | +SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3rbu_progress(sqlite3rbu *pRbu){ | |
| 168573 | 168608 | return pRbu->nProgress; |
| 168574 | 168609 | } |
| 168575 | 168610 | |
| 168576 | 168611 | /* |
| 168577 | 168612 | ** Return permyriadage progress indications for the two main stages of |
| 168578 | 168613 | ** an RBU update. |
| 168579 | 168614 | */ |
| 168580 | -SQLITE_API void SQLITE_APICALL sqlite3rbu_bp_progress(sqlite3rbu *p, int *pnOne, int *pnTwo){ | |
| 168615 | +SQLITE_API void SQLITE_STDCALL sqlite3rbu_bp_progress(sqlite3rbu *p, int *pnOne, int *pnTwo){ | |
| 168581 | 168616 | const int MAX_PROGRESS = 10000; |
| 168582 | 168617 | switch( p->eStage ){ |
| 168583 | 168618 | case RBU_STAGE_OAL: |
| 168584 | 168619 | if( p->nPhaseOneStep>0 ){ |
| 168585 | 168620 | *pnOne = (int)(MAX_PROGRESS * (i64)p->nProgress/(i64)p->nPhaseOneStep); |
| @@ -168610,11 +168645,11 @@ | ||
| 168610 | 168645 | } |
| 168611 | 168646 | |
| 168612 | 168647 | /* |
| 168613 | 168648 | ** Return the current state of the RBU vacuum or update operation. |
| 168614 | 168649 | */ |
| 168615 | -SQLITE_API int SQLITE_APICALL sqlite3rbu_state(sqlite3rbu *p){ | |
| 168650 | +SQLITE_API int SQLITE_STDCALL sqlite3rbu_state(sqlite3rbu *p){ | |
| 168616 | 168651 | int aRes[] = { |
| 168617 | 168652 | 0, SQLITE_RBU_STATE_OAL, SQLITE_RBU_STATE_MOVE, |
| 168618 | 168653 | 0, SQLITE_RBU_STATE_CHECKPOINT, SQLITE_RBU_STATE_DONE |
| 168619 | 168654 | }; |
| 168620 | 168655 | |
| @@ -168638,11 +168673,11 @@ | ||
| 168638 | 168673 | ); |
| 168639 | 168674 | return aRes[p->eStage]; |
| 168640 | 168675 | } |
| 168641 | 168676 | } |
| 168642 | 168677 | |
| 168643 | -SQLITE_API int SQLITE_APICALL sqlite3rbu_savestate(sqlite3rbu *p){ | |
| 168678 | +SQLITE_API int SQLITE_STDCALL sqlite3rbu_savestate(sqlite3rbu *p){ | |
| 168644 | 168679 | int rc = p->rc; |
| 168645 | 168680 | if( rc==SQLITE_DONE ) return SQLITE_OK; |
| 168646 | 168681 | |
| 168647 | 168682 | assert( p->eStage>=RBU_STAGE_OAL && p->eStage<=RBU_STAGE_DONE ); |
| 168648 | 168683 | if( p->eStage==RBU_STAGE_OAL ){ |
| @@ -169465,11 +169500,11 @@ | ||
| 169465 | 169500 | |
| 169466 | 169501 | /* |
| 169467 | 169502 | ** Deregister and destroy an RBU vfs created by an earlier call to |
| 169468 | 169503 | ** sqlite3rbu_create_vfs(). |
| 169469 | 169504 | */ |
| 169470 | -SQLITE_API void SQLITE_APICALL sqlite3rbu_destroy_vfs(const char *zName){ | |
| 169505 | +SQLITE_API void SQLITE_STDCALL sqlite3rbu_destroy_vfs(const char *zName){ | |
| 169471 | 169506 | sqlite3_vfs *pVfs = sqlite3_vfs_find(zName); |
| 169472 | 169507 | if( pVfs && pVfs->xOpen==rbuVfsOpen ){ |
| 169473 | 169508 | sqlite3_mutex_free(((rbu_vfs*)pVfs)->mutex); |
| 169474 | 169509 | sqlite3_vfs_unregister(pVfs); |
| 169475 | 169510 | sqlite3_free(pVfs); |
| @@ -169479,11 +169514,11 @@ | ||
| 169479 | 169514 | /* |
| 169480 | 169515 | ** Create an RBU VFS named zName that accesses the underlying file-system |
| 169481 | 169516 | ** via existing VFS zParent. The new object is registered as a non-default |
| 169482 | 169517 | ** VFS with SQLite before returning. |
| 169483 | 169518 | */ |
| 169484 | -SQLITE_API int SQLITE_APICALL sqlite3rbu_create_vfs(const char *zName, const char *zParent){ | |
| 169519 | +SQLITE_API int SQLITE_STDCALL sqlite3rbu_create_vfs(const char *zName, const char *zParent){ | |
| 169485 | 169520 | |
| 169486 | 169521 | /* Template for VFS */ |
| 169487 | 169522 | static sqlite3_vfs vfs_template = { |
| 169488 | 169523 | 1, /* iVersion */ |
| 169489 | 169524 | 0, /* szOsFile */ |
| @@ -171724,11 +171759,11 @@ | ||
| 171724 | 171759 | } |
| 171725 | 171760 | |
| 171726 | 171761 | return rc; |
| 171727 | 171762 | } |
| 171728 | 171763 | |
| 171729 | -SQLITE_API int SQLITE_APICALL sqlite3session_diff( | |
| 171764 | +SQLITE_API int SQLITE_STDCALL sqlite3session_diff( | |
| 171730 | 171765 | sqlite3_session *pSession, |
| 171731 | 171766 | const char *zFrom, |
| 171732 | 171767 | const char *zTbl, |
| 171733 | 171768 | char **pzErrMsg |
| 171734 | 171769 | ){ |
| @@ -171818,11 +171853,11 @@ | ||
| 171818 | 171853 | |
| 171819 | 171854 | /* |
| 171820 | 171855 | ** Create a session object. This session object will record changes to |
| 171821 | 171856 | ** database zDb attached to connection db. |
| 171822 | 171857 | */ |
| 171823 | -SQLITE_API int SQLITE_APICALL sqlite3session_create( | |
| 171858 | +SQLITE_API int SQLITE_STDCALL sqlite3session_create( | |
| 171824 | 171859 | sqlite3 *db, /* Database handle */ |
| 171825 | 171860 | const char *zDb, /* Name of db (e.g. "main") */ |
| 171826 | 171861 | sqlite3_session **ppSession /* OUT: New session object */ |
| 171827 | 171862 | ){ |
| 171828 | 171863 | sqlite3_session *pNew; /* Newly allocated session object */ |
| @@ -171880,11 +171915,11 @@ | ||
| 171880 | 171915 | } |
| 171881 | 171916 | |
| 171882 | 171917 | /* |
| 171883 | 171918 | ** Delete a session object previously allocated using sqlite3session_create(). |
| 171884 | 171919 | */ |
| 171885 | -SQLITE_API void SQLITE_APICALL sqlite3session_delete(sqlite3_session *pSession){ | |
| 171920 | +SQLITE_API void SQLITE_STDCALL sqlite3session_delete(sqlite3_session *pSession){ | |
| 171886 | 171921 | sqlite3 *db = pSession->db; |
| 171887 | 171922 | sqlite3_session *pHead; |
| 171888 | 171923 | sqlite3_session **pp; |
| 171889 | 171924 | |
| 171890 | 171925 | /* Unlink the session from the linked list of sessions attached to the |
| @@ -171909,11 +171944,11 @@ | ||
| 171909 | 171944 | } |
| 171910 | 171945 | |
| 171911 | 171946 | /* |
| 171912 | 171947 | ** Set a table filter on a Session Object. |
| 171913 | 171948 | */ |
| 171914 | -SQLITE_API void SQLITE_APICALL sqlite3session_table_filter( | |
| 171949 | +SQLITE_API void SQLITE_STDCALL sqlite3session_table_filter( | |
| 171915 | 171950 | sqlite3_session *pSession, |
| 171916 | 171951 | int(*xFilter)(void*, const char*), |
| 171917 | 171952 | void *pCtx /* First argument passed to xFilter */ |
| 171918 | 171953 | ){ |
| 171919 | 171954 | pSession->bAutoAttach = 1; |
| @@ -171927,11 +171962,11 @@ | ||
| 171927 | 171962 | ** |
| 171928 | 171963 | ** Only tables that have a PRIMARY KEY defined may be attached. It does |
| 171929 | 171964 | ** not matter if the PRIMARY KEY is an "INTEGER PRIMARY KEY" (rowid alias) |
| 171930 | 171965 | ** or not. |
| 171931 | 171966 | */ |
| 171932 | -SQLITE_API int SQLITE_APICALL sqlite3session_attach( | |
| 171967 | +SQLITE_API int SQLITE_STDCALL sqlite3session_attach( | |
| 171933 | 171968 | sqlite3_session *pSession, /* Session object */ |
| 171934 | 171969 | const char *zName /* Table name */ |
| 171935 | 171970 | ){ |
| 171936 | 171971 | int rc = SQLITE_OK; |
| 171937 | 171972 | sqlite3_mutex_enter(sqlite3_db_mutex(pSession->db)); |
| @@ -172617,11 +172652,11 @@ | ||
| 172617 | 172652 | ** session object passed as the first argument. |
| 172618 | 172653 | ** |
| 172619 | 172654 | ** It is the responsibility of the caller to eventually free the buffer |
| 172620 | 172655 | ** using sqlite3_free(). |
| 172621 | 172656 | */ |
| 172622 | -SQLITE_API int SQLITE_APICALL sqlite3session_changeset( | |
| 172657 | +SQLITE_API int SQLITE_STDCALL sqlite3session_changeset( | |
| 172623 | 172658 | sqlite3_session *pSession, /* Session object */ |
| 172624 | 172659 | int *pnChangeset, /* OUT: Size of buffer at *ppChangeset */ |
| 172625 | 172660 | void **ppChangeset /* OUT: Buffer containing changeset */ |
| 172626 | 172661 | ){ |
| 172627 | 172662 | return sessionGenerateChangeset(pSession, 0, 0, 0, pnChangeset, ppChangeset); |
| @@ -172628,11 +172663,11 @@ | ||
| 172628 | 172663 | } |
| 172629 | 172664 | |
| 172630 | 172665 | /* |
| 172631 | 172666 | ** Streaming version of sqlite3session_changeset(). |
| 172632 | 172667 | */ |
| 172633 | -SQLITE_API int SQLITE_APICALL sqlite3session_changeset_strm( | |
| 172668 | +SQLITE_API int SQLITE_STDCALL sqlite3session_changeset_strm( | |
| 172634 | 172669 | sqlite3_session *pSession, |
| 172635 | 172670 | int (*xOutput)(void *pOut, const void *pData, int nData), |
| 172636 | 172671 | void *pOut |
| 172637 | 172672 | ){ |
| 172638 | 172673 | return sessionGenerateChangeset(pSession, 0, xOutput, pOut, 0, 0); |
| @@ -172639,11 +172674,11 @@ | ||
| 172639 | 172674 | } |
| 172640 | 172675 | |
| 172641 | 172676 | /* |
| 172642 | 172677 | ** Streaming version of sqlite3session_patchset(). |
| 172643 | 172678 | */ |
| 172644 | -SQLITE_API int SQLITE_APICALL sqlite3session_patchset_strm( | |
| 172679 | +SQLITE_API int SQLITE_STDCALL sqlite3session_patchset_strm( | |
| 172645 | 172680 | sqlite3_session *pSession, |
| 172646 | 172681 | int (*xOutput)(void *pOut, const void *pData, int nData), |
| 172647 | 172682 | void *pOut |
| 172648 | 172683 | ){ |
| 172649 | 172684 | return sessionGenerateChangeset(pSession, 1, xOutput, pOut, 0, 0); |
| @@ -172654,11 +172689,11 @@ | ||
| 172654 | 172689 | ** session object passed as the first argument. |
| 172655 | 172690 | ** |
| 172656 | 172691 | ** It is the responsibility of the caller to eventually free the buffer |
| 172657 | 172692 | ** using sqlite3_free(). |
| 172658 | 172693 | */ |
| 172659 | -SQLITE_API int SQLITE_APICALL sqlite3session_patchset( | |
| 172694 | +SQLITE_API int SQLITE_STDCALL sqlite3session_patchset( | |
| 172660 | 172695 | sqlite3_session *pSession, /* Session object */ |
| 172661 | 172696 | int *pnPatchset, /* OUT: Size of buffer at *ppChangeset */ |
| 172662 | 172697 | void **ppPatchset /* OUT: Buffer containing changeset */ |
| 172663 | 172698 | ){ |
| 172664 | 172699 | return sessionGenerateChangeset(pSession, 1, 0, 0, pnPatchset, ppPatchset); |
| @@ -172665,11 +172700,11 @@ | ||
| 172665 | 172700 | } |
| 172666 | 172701 | |
| 172667 | 172702 | /* |
| 172668 | 172703 | ** Enable or disable the session object passed as the first argument. |
| 172669 | 172704 | */ |
| 172670 | -SQLITE_API int SQLITE_APICALL sqlite3session_enable(sqlite3_session *pSession, int bEnable){ | |
| 172705 | +SQLITE_API int SQLITE_STDCALL sqlite3session_enable(sqlite3_session *pSession, int bEnable){ | |
| 172671 | 172706 | int ret; |
| 172672 | 172707 | sqlite3_mutex_enter(sqlite3_db_mutex(pSession->db)); |
| 172673 | 172708 | if( bEnable>=0 ){ |
| 172674 | 172709 | pSession->bEnable = bEnable; |
| 172675 | 172710 | } |
| @@ -172679,11 +172714,11 @@ | ||
| 172679 | 172714 | } |
| 172680 | 172715 | |
| 172681 | 172716 | /* |
| 172682 | 172717 | ** Enable or disable the session object passed as the first argument. |
| 172683 | 172718 | */ |
| 172684 | -SQLITE_API int SQLITE_APICALL sqlite3session_indirect(sqlite3_session *pSession, int bIndirect){ | |
| 172719 | +SQLITE_API int SQLITE_STDCALL sqlite3session_indirect(sqlite3_session *pSession, int bIndirect){ | |
| 172685 | 172720 | int ret; |
| 172686 | 172721 | sqlite3_mutex_enter(sqlite3_db_mutex(pSession->db)); |
| 172687 | 172722 | if( bIndirect>=0 ){ |
| 172688 | 172723 | pSession->bIndirect = bIndirect; |
| 172689 | 172724 | } |
| @@ -172694,11 +172729,11 @@ | ||
| 172694 | 172729 | |
| 172695 | 172730 | /* |
| 172696 | 172731 | ** Return true if there have been no changes to monitored tables recorded |
| 172697 | 172732 | ** by the session object passed as the only argument. |
| 172698 | 172733 | */ |
| 172699 | -SQLITE_API int SQLITE_APICALL sqlite3session_isempty(sqlite3_session *pSession){ | |
| 172734 | +SQLITE_API int SQLITE_STDCALL sqlite3session_isempty(sqlite3_session *pSession){ | |
| 172700 | 172735 | int ret = 0; |
| 172701 | 172736 | SessionTable *pTab; |
| 172702 | 172737 | |
| 172703 | 172738 | sqlite3_mutex_enter(sqlite3_db_mutex(pSession->db)); |
| 172704 | 172739 | for(pTab=pSession->pTable; pTab && ret==0; pTab=pTab->pNext){ |
| @@ -172744,11 +172779,11 @@ | ||
| 172744 | 172779 | } |
| 172745 | 172780 | |
| 172746 | 172781 | /* |
| 172747 | 172782 | ** Create an iterator used to iterate through the contents of a changeset. |
| 172748 | 172783 | */ |
| 172749 | -SQLITE_API int SQLITE_APICALL sqlite3changeset_start( | |
| 172784 | +SQLITE_API int SQLITE_STDCALL sqlite3changeset_start( | |
| 172750 | 172785 | sqlite3_changeset_iter **pp, /* OUT: Changeset iterator handle */ |
| 172751 | 172786 | int nChangeset, /* Size of buffer pChangeset in bytes */ |
| 172752 | 172787 | void *pChangeset /* Pointer to buffer containing changeset */ |
| 172753 | 172788 | ){ |
| 172754 | 172789 | return sessionChangesetStart(pp, 0, 0, nChangeset, pChangeset); |
| @@ -172755,11 +172790,11 @@ | ||
| 172755 | 172790 | } |
| 172756 | 172791 | |
| 172757 | 172792 | /* |
| 172758 | 172793 | ** Streaming version of sqlite3changeset_start(). |
| 172759 | 172794 | */ |
| 172760 | -SQLITE_API int SQLITE_APICALL sqlite3changeset_start_strm( | |
| 172795 | +SQLITE_API int SQLITE_STDCALL sqlite3changeset_start_strm( | |
| 172761 | 172796 | sqlite3_changeset_iter **pp, /* OUT: Changeset iterator handle */ |
| 172762 | 172797 | int (*xInput)(void *pIn, void *pData, int *pnData), |
| 172763 | 172798 | void *pIn |
| 172764 | 172799 | ){ |
| 172765 | 172800 | return sessionChangesetStart(pp, xInput, pIn, 0, 0); |
| @@ -173176,20 +173211,20 @@ | ||
| 173176 | 173211 | ** or SQLITE_CORRUPT. |
| 173177 | 173212 | ** |
| 173178 | 173213 | ** This function may not be called on iterators passed to a conflict handler |
| 173179 | 173214 | ** callback by changeset_apply(). |
| 173180 | 173215 | */ |
| 173181 | -SQLITE_API int SQLITE_APICALL sqlite3changeset_next(sqlite3_changeset_iter *p){ | |
| 173216 | +SQLITE_API int SQLITE_STDCALL sqlite3changeset_next(sqlite3_changeset_iter *p){ | |
| 173182 | 173217 | return sessionChangesetNext(p, 0, 0); |
| 173183 | 173218 | } |
| 173184 | 173219 | |
| 173185 | 173220 | /* |
| 173186 | 173221 | ** The following function extracts information on the current change |
| 173187 | 173222 | ** from a changeset iterator. It may only be called after changeset_next() |
| 173188 | 173223 | ** has returned SQLITE_ROW. |
| 173189 | 173224 | */ |
| 173190 | -SQLITE_API int SQLITE_APICALL sqlite3changeset_op( | |
| 173225 | +SQLITE_API int SQLITE_STDCALL sqlite3changeset_op( | |
| 173191 | 173226 | sqlite3_changeset_iter *pIter, /* Iterator handle */ |
| 173192 | 173227 | const char **pzTab, /* OUT: Pointer to table name */ |
| 173193 | 173228 | int *pnCol, /* OUT: Number of columns in table */ |
| 173194 | 173229 | int *pOp, /* OUT: SQLITE_INSERT, DELETE or UPDATE */ |
| 173195 | 173230 | int *pbIndirect /* OUT: True if change is indirect */ |
| @@ -173205,11 +173240,11 @@ | ||
| 173205 | 173240 | ** Return information regarding the PRIMARY KEY and number of columns in |
| 173206 | 173241 | ** the database table affected by the change that pIter currently points |
| 173207 | 173242 | ** to. This function may only be called after changeset_next() returns |
| 173208 | 173243 | ** SQLITE_ROW. |
| 173209 | 173244 | */ |
| 173210 | -SQLITE_API int SQLITE_APICALL sqlite3changeset_pk( | |
| 173245 | +SQLITE_API int SQLITE_STDCALL sqlite3changeset_pk( | |
| 173211 | 173246 | sqlite3_changeset_iter *pIter, /* Iterator object */ |
| 173212 | 173247 | unsigned char **pabPK, /* OUT: Array of boolean - true for PK cols */ |
| 173213 | 173248 | int *pnCol /* OUT: Number of entries in output array */ |
| 173214 | 173249 | ){ |
| 173215 | 173250 | *pabPK = pIter->abPK; |
| @@ -173228,11 +173263,11 @@ | ||
| 173228 | 173263 | ** was not modified and is not a PK column), set *ppValue to NULL. |
| 173229 | 173264 | ** |
| 173230 | 173265 | ** If value iVal is out-of-range, SQLITE_RANGE is returned and *ppValue is |
| 173231 | 173266 | ** not modified. Otherwise, SQLITE_OK. |
| 173232 | 173267 | */ |
| 173233 | -SQLITE_API int SQLITE_APICALL sqlite3changeset_old( | |
| 173268 | +SQLITE_API int SQLITE_STDCALL sqlite3changeset_old( | |
| 173234 | 173269 | sqlite3_changeset_iter *pIter, /* Changeset iterator */ |
| 173235 | 173270 | int iVal, /* Index of old.* value to retrieve */ |
| 173236 | 173271 | sqlite3_value **ppValue /* OUT: Old value (or NULL pointer) */ |
| 173237 | 173272 | ){ |
| 173238 | 173273 | if( pIter->op!=SQLITE_UPDATE && pIter->op!=SQLITE_DELETE ){ |
| @@ -173256,11 +173291,11 @@ | ||
| 173256 | 173291 | ** was not modified), set *ppValue to NULL. |
| 173257 | 173292 | ** |
| 173258 | 173293 | ** If value iVal is out-of-range, SQLITE_RANGE is returned and *ppValue is |
| 173259 | 173294 | ** not modified. Otherwise, SQLITE_OK. |
| 173260 | 173295 | */ |
| 173261 | -SQLITE_API int SQLITE_APICALL sqlite3changeset_new( | |
| 173296 | +SQLITE_API int SQLITE_STDCALL sqlite3changeset_new( | |
| 173262 | 173297 | sqlite3_changeset_iter *pIter, /* Changeset iterator */ |
| 173263 | 173298 | int iVal, /* Index of new.* value to retrieve */ |
| 173264 | 173299 | sqlite3_value **ppValue /* OUT: New value (or NULL pointer) */ |
| 173265 | 173300 | ){ |
| 173266 | 173301 | if( pIter->op!=SQLITE_UPDATE && pIter->op!=SQLITE_INSERT ){ |
| @@ -173290,11 +173325,11 @@ | ||
| 173290 | 173325 | ** containing the iVal'th value of the conflicting record. |
| 173291 | 173326 | ** |
| 173292 | 173327 | ** If value iVal is out-of-range or some other error occurs, an SQLite error |
| 173293 | 173328 | ** code is returned. Otherwise, SQLITE_OK. |
| 173294 | 173329 | */ |
| 173295 | -SQLITE_API int SQLITE_APICALL sqlite3changeset_conflict( | |
| 173330 | +SQLITE_API int SQLITE_STDCALL sqlite3changeset_conflict( | |
| 173296 | 173331 | sqlite3_changeset_iter *pIter, /* Changeset iterator */ |
| 173297 | 173332 | int iVal, /* Index of conflict record value to fetch */ |
| 173298 | 173333 | sqlite3_value **ppValue /* OUT: Value from conflicting row */ |
| 173299 | 173334 | ){ |
| 173300 | 173335 | if( !pIter->pConflict ){ |
| @@ -173313,11 +173348,11 @@ | ||
| 173313 | 173348 | ** it sets the output variable to the total number of known foreign key |
| 173314 | 173349 | ** violations in the destination database and returns SQLITE_OK. |
| 173315 | 173350 | ** |
| 173316 | 173351 | ** In all other cases this function returns SQLITE_MISUSE. |
| 173317 | 173352 | */ |
| 173318 | -SQLITE_API int SQLITE_APICALL sqlite3changeset_fk_conflicts( | |
| 173353 | +SQLITE_API int SQLITE_STDCALL sqlite3changeset_fk_conflicts( | |
| 173319 | 173354 | sqlite3_changeset_iter *pIter, /* Changeset iterator */ |
| 173320 | 173355 | int *pnOut /* OUT: Number of FK violations */ |
| 173321 | 173356 | ){ |
| 173322 | 173357 | if( pIter->pConflict || pIter->apValue ){ |
| 173323 | 173358 | return SQLITE_MISUSE; |
| @@ -173331,11 +173366,11 @@ | ||
| 173331 | 173366 | ** Finalize an iterator allocated with sqlite3changeset_start(). |
| 173332 | 173367 | ** |
| 173333 | 173368 | ** This function may not be called on iterators passed to a conflict handler |
| 173334 | 173369 | ** callback by changeset_apply(). |
| 173335 | 173370 | */ |
| 173336 | -SQLITE_API int SQLITE_APICALL sqlite3changeset_finalize(sqlite3_changeset_iter *p){ | |
| 173371 | +SQLITE_API int SQLITE_STDCALL sqlite3changeset_finalize(sqlite3_changeset_iter *p){ | |
| 173337 | 173372 | int rc = SQLITE_OK; |
| 173338 | 173373 | if( p ){ |
| 173339 | 173374 | int i; /* Used to iterate through p->apValue[] */ |
| 173340 | 173375 | rc = p->rc; |
| 173341 | 173376 | if( p->apValue ){ |
| @@ -173505,11 +173540,11 @@ | ||
| 173505 | 173540 | |
| 173506 | 173541 | |
| 173507 | 173542 | /* |
| 173508 | 173543 | ** Invert a changeset object. |
| 173509 | 173544 | */ |
| 173510 | -SQLITE_API int SQLITE_APICALL sqlite3changeset_invert( | |
| 173545 | +SQLITE_API int SQLITE_STDCALL sqlite3changeset_invert( | |
| 173511 | 173546 | int nChangeset, /* Number of bytes in input */ |
| 173512 | 173547 | const void *pChangeset, /* Input changeset */ |
| 173513 | 173548 | int *pnInverted, /* OUT: Number of bytes in output changeset */ |
| 173514 | 173549 | void **ppInverted /* OUT: Inverse of pChangeset */ |
| 173515 | 173550 | ){ |
| @@ -173524,11 +173559,11 @@ | ||
| 173524 | 173559 | } |
| 173525 | 173560 | |
| 173526 | 173561 | /* |
| 173527 | 173562 | ** Streaming version of sqlite3changeset_invert(). |
| 173528 | 173563 | */ |
| 173529 | -SQLITE_API int SQLITE_APICALL sqlite3changeset_invert_strm( | |
| 173564 | +SQLITE_API int SQLITE_STDCALL sqlite3changeset_invert_strm( | |
| 173530 | 173565 | int (*xInput)(void *pIn, void *pData, int *pnData), |
| 173531 | 173566 | void *pIn, |
| 173532 | 173567 | int (*xOutput)(void *pOut, const void *pData, int nData), |
| 173533 | 173568 | void *pOut |
| 173534 | 173569 | ){ |
| @@ -174404,11 +174439,11 @@ | ||
| 174404 | 174439 | /* |
| 174405 | 174440 | ** Apply the changeset passed via pChangeset/nChangeset to the main database |
| 174406 | 174441 | ** attached to handle "db". Invoke the supplied conflict handler callback |
| 174407 | 174442 | ** to resolve any conflicts encountered while applying the change. |
| 174408 | 174443 | */ |
| 174409 | -SQLITE_API int SQLITE_APICALL sqlite3changeset_apply( | |
| 174444 | +SQLITE_API int SQLITE_STDCALL sqlite3changeset_apply( | |
| 174410 | 174445 | sqlite3 *db, /* Apply change to "main" db of this handle */ |
| 174411 | 174446 | int nChangeset, /* Size of changeset in bytes */ |
| 174412 | 174447 | void *pChangeset, /* Changeset blob */ |
| 174413 | 174448 | int(*xFilter)( |
| 174414 | 174449 | void *pCtx, /* Copy of sixth arg to _apply() */ |
| @@ -174432,11 +174467,11 @@ | ||
| 174432 | 174467 | /* |
| 174433 | 174468 | ** Apply the changeset passed via xInput/pIn to the main database |
| 174434 | 174469 | ** attached to handle "db". Invoke the supplied conflict handler callback |
| 174435 | 174470 | ** to resolve any conflicts encountered while applying the change. |
| 174436 | 174471 | */ |
| 174437 | -SQLITE_API int SQLITE_APICALL sqlite3changeset_apply_strm( | |
| 174472 | +SQLITE_API int SQLITE_STDCALL sqlite3changeset_apply_strm( | |
| 174438 | 174473 | sqlite3 *db, /* Apply change to "main" db of this handle */ |
| 174439 | 174474 | int (*xInput)(void *pIn, void *pData, int *pnData), /* Input function */ |
| 174440 | 174475 | void *pIn, /* First arg for xInput */ |
| 174441 | 174476 | int(*xFilter)( |
| 174442 | 174477 | void *pCtx, /* Copy of sixth arg to _apply() */ |
| @@ -174767,11 +174802,11 @@ | ||
| 174767 | 174802 | } |
| 174768 | 174803 | |
| 174769 | 174804 | /* |
| 174770 | 174805 | ** Allocate a new, empty, sqlite3_changegroup. |
| 174771 | 174806 | */ |
| 174772 | -SQLITE_API int SQLITE_APICALL sqlite3changegroup_new(sqlite3_changegroup **pp){ | |
| 174807 | +SQLITE_API int SQLITE_STDCALL sqlite3changegroup_new(sqlite3_changegroup **pp){ | |
| 174773 | 174808 | int rc = SQLITE_OK; /* Return code */ |
| 174774 | 174809 | sqlite3_changegroup *p; /* New object */ |
| 174775 | 174810 | p = (sqlite3_changegroup*)sqlite3_malloc(sizeof(sqlite3_changegroup)); |
| 174776 | 174811 | if( p==0 ){ |
| 174777 | 174812 | rc = SQLITE_NOMEM; |
| @@ -174784,11 +174819,11 @@ | ||
| 174784 | 174819 | |
| 174785 | 174820 | /* |
| 174786 | 174821 | ** Add the changeset currently stored in buffer pData, size nData bytes, |
| 174787 | 174822 | ** to changeset-group p. |
| 174788 | 174823 | */ |
| 174789 | -SQLITE_API int SQLITE_APICALL sqlite3changegroup_add(sqlite3_changegroup *pGrp, int nData, void *pData){ | |
| 174824 | +SQLITE_API int SQLITE_STDCALL sqlite3changegroup_add(sqlite3_changegroup *pGrp, int nData, void *pData){ | |
| 174790 | 174825 | sqlite3_changeset_iter *pIter; /* Iterator opened on pData/nData */ |
| 174791 | 174826 | int rc; /* Return code */ |
| 174792 | 174827 | |
| 174793 | 174828 | rc = sqlite3changeset_start(&pIter, nData, pData); |
| 174794 | 174829 | if( rc==SQLITE_OK ){ |
| @@ -174800,11 +174835,11 @@ | ||
| 174800 | 174835 | |
| 174801 | 174836 | /* |
| 174802 | 174837 | ** Obtain a buffer containing a changeset representing the concatenation |
| 174803 | 174838 | ** of all changesets added to the group so far. |
| 174804 | 174839 | */ |
| 174805 | -SQLITE_API int SQLITE_APICALL sqlite3changegroup_output( | |
| 174840 | +SQLITE_API int SQLITE_STDCALL sqlite3changegroup_output( | |
| 174806 | 174841 | sqlite3_changegroup *pGrp, |
| 174807 | 174842 | int *pnData, |
| 174808 | 174843 | void **ppData |
| 174809 | 174844 | ){ |
| 174810 | 174845 | return sessionChangegroupOutput(pGrp, 0, 0, pnData, ppData); |
| @@ -174811,11 +174846,11 @@ | ||
| 174811 | 174846 | } |
| 174812 | 174847 | |
| 174813 | 174848 | /* |
| 174814 | 174849 | ** Streaming versions of changegroup_add(). |
| 174815 | 174850 | */ |
| 174816 | -SQLITE_API int SQLITE_APICALL sqlite3changegroup_add_strm( | |
| 174851 | +SQLITE_API int SQLITE_STDCALL sqlite3changegroup_add_strm( | |
| 174817 | 174852 | sqlite3_changegroup *pGrp, |
| 174818 | 174853 | int (*xInput)(void *pIn, void *pData, int *pnData), |
| 174819 | 174854 | void *pIn |
| 174820 | 174855 | ){ |
| 174821 | 174856 | sqlite3_changeset_iter *pIter; /* Iterator opened on pData/nData */ |
| @@ -174830,11 +174865,11 @@ | ||
| 174830 | 174865 | } |
| 174831 | 174866 | |
| 174832 | 174867 | /* |
| 174833 | 174868 | ** Streaming versions of changegroup_output(). |
| 174834 | 174869 | */ |
| 174835 | -SQLITE_API int SQLITE_APICALL sqlite3changegroup_output_strm( | |
| 174870 | +SQLITE_API int SQLITE_STDCALL sqlite3changegroup_output_strm( | |
| 174836 | 174871 | sqlite3_changegroup *pGrp, |
| 174837 | 174872 | int (*xOutput)(void *pOut, const void *pData, int nData), |
| 174838 | 174873 | void *pOut |
| 174839 | 174874 | ){ |
| 174840 | 174875 | return sessionChangegroupOutput(pGrp, xOutput, pOut, 0, 0); |
| @@ -174841,21 +174876,21 @@ | ||
| 174841 | 174876 | } |
| 174842 | 174877 | |
| 174843 | 174878 | /* |
| 174844 | 174879 | ** Delete a changegroup object. |
| 174845 | 174880 | */ |
| 174846 | -SQLITE_API void SQLITE_APICALL sqlite3changegroup_delete(sqlite3_changegroup *pGrp){ | |
| 174881 | +SQLITE_API void SQLITE_STDCALL sqlite3changegroup_delete(sqlite3_changegroup *pGrp){ | |
| 174847 | 174882 | if( pGrp ){ |
| 174848 | 174883 | sessionDeleteTable(pGrp->pList); |
| 174849 | 174884 | sqlite3_free(pGrp); |
| 174850 | 174885 | } |
| 174851 | 174886 | } |
| 174852 | 174887 | |
| 174853 | 174888 | /* |
| 174854 | 174889 | ** Combine two changesets together. |
| 174855 | 174890 | */ |
| 174856 | -SQLITE_API int SQLITE_APICALL sqlite3changeset_concat( | |
| 174891 | +SQLITE_API int SQLITE_STDCALL sqlite3changeset_concat( | |
| 174857 | 174892 | int nLeft, /* Number of bytes in lhs input */ |
| 174858 | 174893 | void *pLeft, /* Lhs input changeset */ |
| 174859 | 174894 | int nRight /* Number of bytes in rhs input */, |
| 174860 | 174895 | void *pRight, /* Rhs input changeset */ |
| 174861 | 174896 | int *pnOut, /* OUT: Number of bytes in output changeset */ |
| @@ -174880,11 +174915,11 @@ | ||
| 174880 | 174915 | } |
| 174881 | 174916 | |
| 174882 | 174917 | /* |
| 174883 | 174918 | ** Streaming version of sqlite3changeset_concat(). |
| 174884 | 174919 | */ |
| 174885 | -SQLITE_API int SQLITE_APICALL sqlite3changeset_concat_strm( | |
| 174920 | +SQLITE_API int SQLITE_STDCALL sqlite3changeset_concat_strm( | |
| 174886 | 174921 | int (*xInputA)(void *pIn, void *pData, int *pnData), |
| 174887 | 174922 | void *pInA, |
| 174888 | 174923 | int (*xInputB)(void *pIn, void *pData, int *pnData), |
| 174889 | 174924 | void *pInB, |
| 174890 | 174925 | int (*xOutput)(void *pOut, const void *pData, int nData), |
| @@ -177112,11 +177147,11 @@ | ||
| 177112 | 177147 | |
| 177113 | 177148 | #ifndef SQLITE_CORE |
| 177114 | 177149 | #ifdef _WIN32 |
| 177115 | 177150 | __declspec(dllexport) |
| 177116 | 177151 | #endif |
| 177117 | -SQLITE_API int SQLITE_APICALL sqlite3_json_init( | |
| 177152 | +SQLITE_API int SQLITE_STDCALL sqlite3_json_init( | |
| 177118 | 177153 | sqlite3 *db, |
| 177119 | 177154 | char **pzErrMsg, |
| 177120 | 177155 | const sqlite3_api_routines *pApi |
| 177121 | 177156 | ){ |
| 177122 | 177157 | SQLITE_EXTENSION_INIT2(pApi); |
| @@ -193945,11 +193980,11 @@ | ||
| 193945 | 193980 | int nArg, /* Number of args */ |
| 193946 | 193981 | sqlite3_value **apUnused /* Function arguments */ |
| 193947 | 193982 | ){ |
| 193948 | 193983 | assert( nArg==0 ); |
| 193949 | 193984 | UNUSED_PARAM2(nArg, apUnused); |
| 193950 | - sqlite3_result_text(pCtx, "fts5: 2016-08-01 21:17:53 d8ef9f58643f13dd3d16dcde0d829ae08324f04b", -1, SQLITE_TRANSIENT); | |
| 193985 | + sqlite3_result_text(pCtx, "fts5: 2016-08-04 13:23:28 9adda385267d1a0ecff259b42a284913668441a2", -1, SQLITE_TRANSIENT); | |
| 193951 | 193986 | } |
| 193952 | 193987 | |
| 193953 | 193988 | static int fts5Init(sqlite3 *db){ |
| 193954 | 193989 | static const sqlite3_module fts5Mod = { |
| 193955 | 193990 | /* iVersion */ 2, |
| @@ -194033,11 +194068,11 @@ | ||
| 194033 | 194068 | */ |
| 194034 | 194069 | #ifndef SQLITE_CORE |
| 194035 | 194070 | #ifdef _WIN32 |
| 194036 | 194071 | __declspec(dllexport) |
| 194037 | 194072 | #endif |
| 194038 | -SQLITE_API int SQLITE_APICALL sqlite3_fts_init( | |
| 194073 | +SQLITE_API int SQLITE_STDCALL sqlite3_fts_init( | |
| 194039 | 194074 | sqlite3 *db, |
| 194040 | 194075 | char **pzErrMsg, |
| 194041 | 194076 | const sqlite3_api_routines *pApi |
| 194042 | 194077 | ){ |
| 194043 | 194078 | SQLITE_EXTENSION_INIT2(pApi); |
| @@ -194046,11 +194081,11 @@ | ||
| 194046 | 194081 | } |
| 194047 | 194082 | |
| 194048 | 194083 | #ifdef _WIN32 |
| 194049 | 194084 | __declspec(dllexport) |
| 194050 | 194085 | #endif |
| 194051 | -SQLITE_API int SQLITE_APICALL sqlite3_fts5_init( | |
| 194086 | +SQLITE_API int SQLITE_STDCALL sqlite3_fts5_init( | |
| 194052 | 194087 | sqlite3 *db, |
| 194053 | 194088 | char **pzErrMsg, |
| 194054 | 194089 | const sqlite3_api_routines *pApi |
| 194055 | 194090 | ){ |
| 194056 | 194091 | SQLITE_EXTENSION_INIT2(pApi); |
| 194057 | 194092 |
| --- src/sqlite3.c | |
| +++ src/sqlite3.c | |
| @@ -380,11 +380,11 @@ | |
| 380 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 381 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 382 | */ |
| 383 | #define SQLITE_VERSION "3.14.0" |
| 384 | #define SQLITE_VERSION_NUMBER 3014000 |
| 385 | #define SQLITE_SOURCE_ID "2016-08-02 08:45:26 7c38a79cdd42aaa45715aea330d10ca859098837" |
| 386 | |
| 387 | /* |
| 388 | ** CAPI3REF: Run-Time Library Version Numbers |
| 389 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 390 | ** |
| @@ -413,13 +413,13 @@ | |
| 413 | ** [SQLITE_SOURCE_ID] C preprocessor macro. |
| 414 | ** |
| 415 | ** See also: [sqlite_version()] and [sqlite_source_id()]. |
| 416 | */ |
| 417 | SQLITE_API const char sqlite3_version[] = SQLITE_VERSION; |
| 418 | SQLITE_API const char *SQLITE_APICALL sqlite3_libversion(void); |
| 419 | SQLITE_API const char *SQLITE_APICALL sqlite3_sourceid(void); |
| 420 | SQLITE_API int SQLITE_APICALL sqlite3_libversion_number(void); |
| 421 | |
| 422 | /* |
| 423 | ** CAPI3REF: Run-Time Library Compilation Options Diagnostics |
| 424 | ** |
| 425 | ** ^The sqlite3_compileoption_used() function returns 0 or 1 |
| @@ -440,12 +440,12 @@ | |
| 440 | ** |
| 441 | ** See also: SQL functions [sqlite_compileoption_used()] and |
| 442 | ** [sqlite_compileoption_get()] and the [compile_options pragma]. |
| 443 | */ |
| 444 | #ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS |
| 445 | SQLITE_API int SQLITE_APICALL sqlite3_compileoption_used(const char *zOptName); |
| 446 | SQLITE_API const char *SQLITE_APICALL sqlite3_compileoption_get(int N); |
| 447 | #endif |
| 448 | |
| 449 | /* |
| 450 | ** CAPI3REF: Test To See If The Library Is Threadsafe |
| 451 | ** |
| @@ -480,11 +480,11 @@ | |
| 480 | ** sqlite3_config(). In other words, the return value from sqlite3_threadsafe() |
| 481 | ** is unchanged by calls to sqlite3_config().)^ |
| 482 | ** |
| 483 | ** See the [threading mode] documentation for additional information. |
| 484 | */ |
| 485 | SQLITE_API int SQLITE_APICALL sqlite3_threadsafe(void); |
| 486 | |
| 487 | /* |
| 488 | ** CAPI3REF: Database Connection Handle |
| 489 | ** KEYWORDS: {database connection} {database connections} |
| 490 | ** |
| @@ -577,19 +577,19 @@ | |
| 577 | ** from [sqlite3_open()], [sqlite3_open16()], or |
| 578 | ** [sqlite3_open_v2()], and not previously closed. |
| 579 | ** ^Calling sqlite3_close() or sqlite3_close_v2() with a NULL pointer |
| 580 | ** argument is a harmless no-op. |
| 581 | */ |
| 582 | SQLITE_API int SQLITE_APICALL sqlite3_close(sqlite3*); |
| 583 | SQLITE_API int SQLITE_APICALL sqlite3_close_v2(sqlite3*); |
| 584 | |
| 585 | /* |
| 586 | ** The type for a callback function. |
| 587 | ** This is legacy and deprecated. It is included for historical |
| 588 | ** compatibility and is not documented. |
| 589 | */ |
| 590 | typedef int (SQLITE_CALLBACK *sqlite3_callback)(void*,int,char**, char**); |
| 591 | |
| 592 | /* |
| 593 | ** CAPI3REF: One-Step Query Execution Interface |
| 594 | ** METHOD: sqlite3 |
| 595 | ** |
| @@ -649,14 +649,14 @@ | |
| 649 | ** the 1st parameter to sqlite3_exec() while sqlite3_exec() is running. |
| 650 | ** <li> The application must not modify the SQL statement text passed into |
| 651 | ** the 2nd parameter of sqlite3_exec() while sqlite3_exec() is running. |
| 652 | ** </ul> |
| 653 | */ |
| 654 | SQLITE_API int SQLITE_APICALL sqlite3_exec( |
| 655 | sqlite3*, /* An open database */ |
| 656 | const char *sql, /* SQL to be evaluated */ |
| 657 | int (SQLITE_CALLBACK *callback)(void*,int,char**,char**), /* Callback function */ |
| 658 | void *, /* 1st argument to callback */ |
| 659 | char **errmsg /* Error msg written here */ |
| 660 | ); |
| 661 | |
| 662 | /* |
| @@ -1000,30 +1000,30 @@ | |
| 1000 | ** database corruption. |
| 1001 | */ |
| 1002 | typedef struct sqlite3_io_methods sqlite3_io_methods; |
| 1003 | struct sqlite3_io_methods { |
| 1004 | int iVersion; |
| 1005 | int (SQLITE_CALLBACK *xClose)(sqlite3_file*); |
| 1006 | int (SQLITE_CALLBACK *xRead)(sqlite3_file*, void*, int iAmt, sqlite3_int64 iOfst); |
| 1007 | int (SQLITE_CALLBACK *xWrite)(sqlite3_file*, const void*, int iAmt, sqlite3_int64 iOfst); |
| 1008 | int (SQLITE_CALLBACK *xTruncate)(sqlite3_file*, sqlite3_int64 size); |
| 1009 | int (SQLITE_CALLBACK *xSync)(sqlite3_file*, int flags); |
| 1010 | int (SQLITE_CALLBACK *xFileSize)(sqlite3_file*, sqlite3_int64 *pSize); |
| 1011 | int (SQLITE_CALLBACK *xLock)(sqlite3_file*, int); |
| 1012 | int (SQLITE_CALLBACK *xUnlock)(sqlite3_file*, int); |
| 1013 | int (SQLITE_CALLBACK *xCheckReservedLock)(sqlite3_file*, int *pResOut); |
| 1014 | int (SQLITE_CALLBACK *xFileControl)(sqlite3_file*, int op, void *pArg); |
| 1015 | int (SQLITE_CALLBACK *xSectorSize)(sqlite3_file*); |
| 1016 | int (SQLITE_CALLBACK *xDeviceCharacteristics)(sqlite3_file*); |
| 1017 | /* Methods above are valid for version 1 */ |
| 1018 | int (SQLITE_CALLBACK *xShmMap)(sqlite3_file*, int iPg, int pgsz, int, void volatile**); |
| 1019 | int (SQLITE_CALLBACK *xShmLock)(sqlite3_file*, int offset, int n, int flags); |
| 1020 | void (SQLITE_CALLBACK *xShmBarrier)(sqlite3_file*); |
| 1021 | int (SQLITE_CALLBACK *xShmUnmap)(sqlite3_file*, int deleteFlag); |
| 1022 | /* Methods above are valid for version 2 */ |
| 1023 | int (SQLITE_CALLBACK *xFetch)(sqlite3_file*, sqlite3_int64 iOfst, int iAmt, void **pp); |
| 1024 | int (SQLITE_CALLBACK *xUnfetch)(sqlite3_file*, sqlite3_int64 iOfst, void *p); |
| 1025 | /* Methods above are valid for version 3 */ |
| 1026 | /* Additional methods may be added in future releases */ |
| 1027 | }; |
| 1028 | |
| 1029 | /* |
| @@ -1195,11 +1195,11 @@ | |
| 1195 | ** ^The [SQLITE_FCNTL_BUSYHANDLER] |
| 1196 | ** file-control may be invoked by SQLite on the database file handle |
| 1197 | ** shortly after it is opened in order to provide a custom VFS with access |
| 1198 | ** to the connections busy-handler callback. The argument is of type (void **) |
| 1199 | ** - an array of two (void *) values. The first (void *) actually points |
| 1200 | ** to a function of type (int (SQLITE_CALLBACK *)(void *)). In order to invoke the connections |
| 1201 | ** busy-handler, this function should be invoked with the second (void *) in |
| 1202 | ** the array as the only argument. If it returns non-zero, then the operation |
| 1203 | ** should be retried. If it returns zero, the custom VFS should abandon the |
| 1204 | ** current operation. |
| 1205 | ** |
| @@ -1471,43 +1471,43 @@ | |
| 1471 | ** or all of these interfaces to be NULL or for their behavior to change |
| 1472 | ** from one release to the next. Applications must not attempt to access |
| 1473 | ** any of these methods if the iVersion of the VFS is less than 3. |
| 1474 | */ |
| 1475 | typedef struct sqlite3_vfs sqlite3_vfs; |
| 1476 | typedef void (SQLITE_SYSAPI *sqlite3_syscall_ptr)(void); |
| 1477 | struct sqlite3_vfs { |
| 1478 | int iVersion; /* Structure version number (currently 3) */ |
| 1479 | int szOsFile; /* Size of subclassed sqlite3_file */ |
| 1480 | int mxPathname; /* Maximum file pathname length */ |
| 1481 | sqlite3_vfs *pNext; /* Next registered VFS */ |
| 1482 | const char *zName; /* Name of this virtual file system */ |
| 1483 | void *pAppData; /* Pointer to application-specific data */ |
| 1484 | int (SQLITE_CALLBACK *xOpen)(sqlite3_vfs*, const char *zName, sqlite3_file*, |
| 1485 | int flags, int *pOutFlags); |
| 1486 | int (SQLITE_CALLBACK *xDelete)(sqlite3_vfs*, const char *zName, int syncDir); |
| 1487 | int (SQLITE_CALLBACK *xAccess)(sqlite3_vfs*, const char *zName, int flags, int *pResOut); |
| 1488 | int (SQLITE_CALLBACK *xFullPathname)(sqlite3_vfs*, const char *zName, int nOut, char *zOut); |
| 1489 | void *(SQLITE_CALLBACK *xDlOpen)(sqlite3_vfs*, const char *zFilename); |
| 1490 | void (SQLITE_CALLBACK *xDlError)(sqlite3_vfs*, int nByte, char *zErrMsg); |
| 1491 | void (SQLITE_CALLBACK *(*xDlSym)(sqlite3_vfs*,void*, const char *zSymbol))(void); |
| 1492 | void (SQLITE_CALLBACK *xDlClose)(sqlite3_vfs*, void*); |
| 1493 | int (SQLITE_CALLBACK *xRandomness)(sqlite3_vfs*, int nByte, char *zOut); |
| 1494 | int (SQLITE_CALLBACK *xSleep)(sqlite3_vfs*, int microseconds); |
| 1495 | int (SQLITE_CALLBACK *xCurrentTime)(sqlite3_vfs*, double*); |
| 1496 | int (SQLITE_CALLBACK *xGetLastError)(sqlite3_vfs*, int, char *); |
| 1497 | /* |
| 1498 | ** The methods above are in version 1 of the sqlite_vfs object |
| 1499 | ** definition. Those that follow are added in version 2 or later |
| 1500 | */ |
| 1501 | int (SQLITE_CALLBACK *xCurrentTimeInt64)(sqlite3_vfs*, sqlite3_int64*); |
| 1502 | /* |
| 1503 | ** The methods above are in versions 1 and 2 of the sqlite_vfs object. |
| 1504 | ** Those below are for version 3 and greater. |
| 1505 | */ |
| 1506 | int (SQLITE_CALLBACK *xSetSystemCall)(sqlite3_vfs*, const char *zName, sqlite3_syscall_ptr); |
| 1507 | sqlite3_syscall_ptr (SQLITE_CALLBACK *xGetSystemCall)(sqlite3_vfs*, const char *zName); |
| 1508 | const char *(SQLITE_CALLBACK *xNextSystemCall)(sqlite3_vfs*, const char *zName); |
| 1509 | /* |
| 1510 | ** The methods above are in versions 1 through 3 of the sqlite_vfs object. |
| 1511 | ** New fields may be appended in future versions. The iVersion |
| 1512 | ** value will increment whenever this happens. |
| 1513 | */ |
| @@ -1648,14 +1648,14 @@ | |
| 1648 | ** sqlite3_os_init() and sqlite3_os_end(). An application-supplied |
| 1649 | ** implementation of sqlite3_os_init() or sqlite3_os_end() |
| 1650 | ** must return [SQLITE_OK] on success and some other [error code] upon |
| 1651 | ** failure. |
| 1652 | */ |
| 1653 | SQLITE_API int SQLITE_APICALL sqlite3_initialize(void); |
| 1654 | SQLITE_API int SQLITE_APICALL sqlite3_shutdown(void); |
| 1655 | SQLITE_API int SQLITE_APICALL sqlite3_os_init(void); |
| 1656 | SQLITE_API int SQLITE_APICALL sqlite3_os_end(void); |
| 1657 | |
| 1658 | /* |
| 1659 | ** CAPI3REF: Configuring The SQLite Library |
| 1660 | ** |
| 1661 | ** The sqlite3_config() interface is used to make global configuration |
| @@ -1770,17 +1770,17 @@ | |
| 1770 | ** SQLite will never invoke xInit() more than once without an intervening |
| 1771 | ** call to xShutdown(). |
| 1772 | */ |
| 1773 | typedef struct sqlite3_mem_methods sqlite3_mem_methods; |
| 1774 | struct sqlite3_mem_methods { |
| 1775 | void *(SQLITE_CALLBACK *xMalloc)(int); /* Memory allocation function */ |
| 1776 | void (SQLITE_CALLBACK *xFree)(void*); /* Free a prior allocation */ |
| 1777 | void *(SQLITE_CALLBACK *xRealloc)(void*,int); /* Resize an allocation */ |
| 1778 | int (SQLITE_CALLBACK *xSize)(void*); /* Return the size of an allocation */ |
| 1779 | int (SQLITE_CALLBACK *xRoundup)(int); /* Round up request size to allocation size */ |
| 1780 | int (SQLITE_CALLBACK *xInit)(void*); /* Initialize the memory allocator */ |
| 1781 | void (SQLITE_CALLBACK *xShutdown)(void*); /* Deinitialize the memory allocator */ |
| 1782 | void *pAppData; /* Argument to xInit() and xShutdown() */ |
| 1783 | }; |
| 1784 | |
| 1785 | /* |
| 1786 | ** CAPI3REF: Configuration Options |
| @@ -1993,11 +1993,11 @@ | |
| 1993 | ** |
| 1994 | ** [[SQLITE_CONFIG_LOG]] <dt>SQLITE_CONFIG_LOG</dt> |
| 1995 | ** <dd> The SQLITE_CONFIG_LOG option is used to configure the SQLite |
| 1996 | ** global [error log]. |
| 1997 | ** (^The SQLITE_CONFIG_LOG option takes two arguments: a pointer to a |
| 1998 | ** function with a call signature of void(SQLITE_CALLBACK *)(void*,int,const char*), |
| 1999 | ** and a pointer to void. ^If the function pointer is not NULL, it is |
| 2000 | ** invoked by [sqlite3_log()] to process each logging event. ^If the |
| 2001 | ** function pointer is NULL, the [sqlite3_log()] interface becomes a no-op. |
| 2002 | ** ^The void pointer that is the second argument to SQLITE_CONFIG_LOG is |
| 2003 | ** passed through as the first parameter to the application-defined logger |
| @@ -2046,11 +2046,11 @@ | |
| 2046 | ** |
| 2047 | ** [[SQLITE_CONFIG_SQLLOG]] |
| 2048 | ** <dt>SQLITE_CONFIG_SQLLOG |
| 2049 | ** <dd>This option is only available if sqlite is compiled with the |
| 2050 | ** [SQLITE_ENABLE_SQLLOG] pre-processor macro defined. The first argument should |
| 2051 | ** be a pointer to a function of type void(SQLITE_CALLBACK *)(void*,sqlite3*,const char*, int). |
| 2052 | ** The second should be of type (void*). The callback is invoked by the library |
| 2053 | ** in three separate circumstances, identified by the value passed as the |
| 2054 | ** fourth parameter. If the fourth parameter is 0, then the database connection |
| 2055 | ** passed as the second argument has just been opened. The third argument |
| 2056 | ** points to a buffer containing the name of the main database file. If the |
| @@ -2244,11 +2244,11 @@ | |
| 2244 | ** |
| 2245 | ** ^The sqlite3_extended_result_codes() routine enables or disables the |
| 2246 | ** [extended result codes] feature of SQLite. ^The extended result |
| 2247 | ** codes are disabled by default for historical compatibility. |
| 2248 | */ |
| 2249 | SQLITE_API int SQLITE_APICALL sqlite3_extended_result_codes(sqlite3*, int onoff); |
| 2250 | |
| 2251 | /* |
| 2252 | ** CAPI3REF: Last Insert Rowid |
| 2253 | ** METHOD: sqlite3 |
| 2254 | ** |
| @@ -2296,11 +2296,11 @@ | |
| 2296 | ** function is running and thus changes the last insert [rowid], |
| 2297 | ** then the value returned by [sqlite3_last_insert_rowid()] is |
| 2298 | ** unpredictable and might not equal either the old or the new |
| 2299 | ** last insert [rowid]. |
| 2300 | */ |
| 2301 | SQLITE_API sqlite3_int64 SQLITE_APICALL sqlite3_last_insert_rowid(sqlite3*); |
| 2302 | |
| 2303 | /* |
| 2304 | ** CAPI3REF: Count The Number Of Rows Modified |
| 2305 | ** METHOD: sqlite3 |
| 2306 | ** |
| @@ -2349,11 +2349,11 @@ | |
| 2349 | ** |
| 2350 | ** If a separate thread makes changes on the same database connection |
| 2351 | ** while [sqlite3_changes()] is running then the value returned |
| 2352 | ** is unpredictable and not meaningful. |
| 2353 | */ |
| 2354 | SQLITE_API int SQLITE_APICALL sqlite3_changes(sqlite3*); |
| 2355 | |
| 2356 | /* |
| 2357 | ** CAPI3REF: Total Number Of Rows Modified |
| 2358 | ** METHOD: sqlite3 |
| 2359 | ** |
| @@ -2373,11 +2373,11 @@ | |
| 2373 | ** |
| 2374 | ** If a separate thread makes changes on the same database connection |
| 2375 | ** while [sqlite3_total_changes()] is running then the value |
| 2376 | ** returned is unpredictable and not meaningful. |
| 2377 | */ |
| 2378 | SQLITE_API int SQLITE_APICALL sqlite3_total_changes(sqlite3*); |
| 2379 | |
| 2380 | /* |
| 2381 | ** CAPI3REF: Interrupt A Long-Running Query |
| 2382 | ** METHOD: sqlite3 |
| 2383 | ** |
| @@ -2413,11 +2413,11 @@ | |
| 2413 | ** that are started after the sqlite3_interrupt() call returns. |
| 2414 | ** |
| 2415 | ** If the database connection closes while [sqlite3_interrupt()] |
| 2416 | ** is running then bad things will likely happen. |
| 2417 | */ |
| 2418 | SQLITE_API void SQLITE_APICALL sqlite3_interrupt(sqlite3*); |
| 2419 | |
| 2420 | /* |
| 2421 | ** CAPI3REF: Determine If An SQL Statement Is Complete |
| 2422 | ** |
| 2423 | ** These routines are useful during command-line input to determine if the |
| @@ -2448,12 +2448,12 @@ | |
| 2448 | ** UTF-8 string. |
| 2449 | ** |
| 2450 | ** The input to [sqlite3_complete16()] must be a zero-terminated |
| 2451 | ** UTF-16 string in native byte order. |
| 2452 | */ |
| 2453 | SQLITE_API int SQLITE_APICALL sqlite3_complete(const char *sql); |
| 2454 | SQLITE_API int SQLITE_APICALL sqlite3_complete16(const void *sql); |
| 2455 | |
| 2456 | /* |
| 2457 | ** CAPI3REF: Register A Callback To Handle SQLITE_BUSY Errors |
| 2458 | ** KEYWORDS: {busy-handler callback} {busy handler} |
| 2459 | ** METHOD: sqlite3 |
| @@ -2510,11 +2510,11 @@ | |
| 2510 | ** result in undefined behavior. |
| 2511 | ** |
| 2512 | ** A busy handler must not close the database connection |
| 2513 | ** or [prepared statement] that invoked the busy handler. |
| 2514 | */ |
| 2515 | SQLITE_API int SQLITE_APICALL sqlite3_busy_handler(sqlite3*,int(SQLITE_CALLBACK *)(void*,int),void*); |
| 2516 | |
| 2517 | /* |
| 2518 | ** CAPI3REF: Set A Busy Timeout |
| 2519 | ** METHOD: sqlite3 |
| 2520 | ** |
| @@ -2533,11 +2533,11 @@ | |
| 2533 | ** was defined (using [sqlite3_busy_handler()]) prior to calling |
| 2534 | ** this routine, that other busy handler is cleared.)^ |
| 2535 | ** |
| 2536 | ** See also: [PRAGMA busy_timeout] |
| 2537 | */ |
| 2538 | SQLITE_API int SQLITE_APICALL sqlite3_busy_timeout(sqlite3*, int ms); |
| 2539 | |
| 2540 | /* |
| 2541 | ** CAPI3REF: Convenience Routines For Running Queries |
| 2542 | ** METHOD: sqlite3 |
| 2543 | ** |
| @@ -2608,19 +2608,19 @@ | |
| 2608 | ** interface defined here. As a consequence, errors that occur in the |
| 2609 | ** wrapper layer outside of the internal [sqlite3_exec()] call are not |
| 2610 | ** reflected in subsequent calls to [sqlite3_errcode()] or |
| 2611 | ** [sqlite3_errmsg()]. |
| 2612 | */ |
| 2613 | SQLITE_API int SQLITE_APICALL sqlite3_get_table( |
| 2614 | sqlite3 *db, /* An open database */ |
| 2615 | const char *zSql, /* SQL to be evaluated */ |
| 2616 | char ***pazResult, /* Results of the query */ |
| 2617 | int *pnRow, /* Number of result rows written here */ |
| 2618 | int *pnColumn, /* Number of result columns written here */ |
| 2619 | char **pzErrmsg /* Error msg written here */ |
| 2620 | ); |
| 2621 | SQLITE_API void SQLITE_APICALL sqlite3_free_table(char **result); |
| 2622 | |
| 2623 | /* |
| 2624 | ** CAPI3REF: Formatted String Printing Functions |
| 2625 | ** |
| 2626 | ** These routines are work-alikes of the "printf()" family of functions |
| @@ -2723,13 +2723,13 @@ | |
| 2723 | ** ^(The "%z" formatting option works like "%s" but with the |
| 2724 | ** addition that after the string has been read and copied into |
| 2725 | ** the result, [sqlite3_free()] is called on the input string.)^ |
| 2726 | */ |
| 2727 | SQLITE_API char *SQLITE_CDECL sqlite3_mprintf(const char*,...); |
| 2728 | SQLITE_API char *SQLITE_APICALL sqlite3_vmprintf(const char*, va_list); |
| 2729 | SQLITE_API char *SQLITE_CDECL sqlite3_snprintf(int,char*,const char*, ...); |
| 2730 | SQLITE_API char *SQLITE_APICALL sqlite3_vsnprintf(int,char*,const char*, va_list); |
| 2731 | |
| 2732 | /* |
| 2733 | ** CAPI3REF: Memory Allocation Subsystem |
| 2734 | ** |
| 2735 | ** The SQLite core uses these three routines for all of its own |
| @@ -2815,16 +2815,16 @@ | |
| 2815 | ** |
| 2816 | ** The application must not read or write any part of |
| 2817 | ** a block of memory after it has been released using |
| 2818 | ** [sqlite3_free()] or [sqlite3_realloc()]. |
| 2819 | */ |
| 2820 | SQLITE_API void *SQLITE_APICALL sqlite3_malloc(int); |
| 2821 | SQLITE_API void *SQLITE_APICALL sqlite3_malloc64(sqlite3_uint64); |
| 2822 | SQLITE_API void *SQLITE_APICALL sqlite3_realloc(void*, int); |
| 2823 | SQLITE_API void *SQLITE_APICALL sqlite3_realloc64(void*, sqlite3_uint64); |
| 2824 | SQLITE_API void SQLITE_APICALL sqlite3_free(void*); |
| 2825 | SQLITE_API sqlite3_uint64 SQLITE_APICALL sqlite3_msize(void*); |
| 2826 | |
| 2827 | /* |
| 2828 | ** CAPI3REF: Memory Allocator Statistics |
| 2829 | ** |
| 2830 | ** SQLite provides these two interfaces for reporting on the status |
| @@ -2845,12 +2845,12 @@ | |
| 2845 | ** [sqlite3_memory_used()] if and only if the parameter to |
| 2846 | ** [sqlite3_memory_highwater()] is true. ^The value returned |
| 2847 | ** by [sqlite3_memory_highwater(1)] is the high-water mark |
| 2848 | ** prior to the reset. |
| 2849 | */ |
| 2850 | SQLITE_API sqlite3_int64 SQLITE_APICALL sqlite3_memory_used(void); |
| 2851 | SQLITE_API sqlite3_int64 SQLITE_APICALL sqlite3_memory_highwater(int resetFlag); |
| 2852 | |
| 2853 | /* |
| 2854 | ** CAPI3REF: Pseudo-Random Number Generator |
| 2855 | ** |
| 2856 | ** SQLite contains a high-quality pseudo-random number generator (PRNG) used to |
| @@ -2869,11 +2869,11 @@ | |
| 2869 | ** ^If the previous call to this routine had an N of 1 or more and a |
| 2870 | ** non-NULL P then the pseudo-randomness is generated |
| 2871 | ** internally and without recourse to the [sqlite3_vfs] xRandomness |
| 2872 | ** method. |
| 2873 | */ |
| 2874 | SQLITE_API void SQLITE_APICALL sqlite3_randomness(int N, void *P); |
| 2875 | |
| 2876 | /* |
| 2877 | ** CAPI3REF: Compile-Time Authorization Callbacks |
| 2878 | ** METHOD: sqlite3 |
| 2879 | ** |
| @@ -2952,13 +2952,13 @@ | |
| 2952 | ** [sqlite3_prepare()] or its variants. Authorization is not |
| 2953 | ** performed during statement evaluation in [sqlite3_step()], unless |
| 2954 | ** as stated in the previous paragraph, sqlite3_step() invokes |
| 2955 | ** sqlite3_prepare_v2() to reprepare a statement after a schema change. |
| 2956 | */ |
| 2957 | SQLITE_API int SQLITE_APICALL sqlite3_set_authorizer( |
| 2958 | sqlite3*, |
| 2959 | int (SQLITE_CALLBACK *xAuth)(void*,int,const char*,const char*,const char*,const char*), |
| 2960 | void *pUserData |
| 2961 | ); |
| 2962 | |
| 2963 | /* |
| 2964 | ** CAPI3REF: Authorizer Return Codes |
| @@ -3060,14 +3060,14 @@ | |
| 3060 | ** digits in the time are meaningless. Future versions of SQLite |
| 3061 | ** might provide greater resolution on the profiler callback. The |
| 3062 | ** sqlite3_profile() function is considered experimental and is |
| 3063 | ** subject to change in future versions of SQLite. |
| 3064 | */ |
| 3065 | SQLITE_API SQLITE_DEPRECATED void *SQLITE_APICALL sqlite3_trace(sqlite3*, |
| 3066 | void(SQLITE_CALLBACK *xTrace)(void*,const char*), void*); |
| 3067 | SQLITE_API SQLITE_DEPRECATED void *SQLITE_APICALL sqlite3_profile(sqlite3*, |
| 3068 | void(SQLITE_CALLBACK *xProfile)(void*,const char*,sqlite3_uint64), void*); |
| 3069 | |
| 3070 | /* |
| 3071 | ** CAPI3REF: SQL Trace Event Codes |
| 3072 | ** KEYWORDS: SQLITE_TRACE |
| 3073 | ** |
| @@ -3151,14 +3151,14 @@ | |
| 3151 | ** |
| 3152 | ** The sqlite3_trace_v2() interface is intended to replace the legacy |
| 3153 | ** interfaces [sqlite3_trace()] and [sqlite3_profile()], both of which |
| 3154 | ** are deprecated. |
| 3155 | */ |
| 3156 | SQLITE_API int SQLITE_APICALL sqlite3_trace_v2( |
| 3157 | sqlite3*, |
| 3158 | unsigned uMask, |
| 3159 | int(SQLITE_CALLBACK *xCallback)(unsigned,void*,void*,void*), |
| 3160 | void *pCtx |
| 3161 | ); |
| 3162 | |
| 3163 | /* |
| 3164 | ** CAPI3REF: Query Progress Callbacks |
| @@ -3190,11 +3190,11 @@ | |
| 3190 | ** the database connection that invoked the progress handler. |
| 3191 | ** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their |
| 3192 | ** database connections for the meaning of "modify" in this paragraph. |
| 3193 | ** |
| 3194 | */ |
| 3195 | SQLITE_API void SQLITE_APICALL sqlite3_progress_handler(sqlite3*, int, int(SQLITE_CALLBACK *)(void*), void*); |
| 3196 | |
| 3197 | /* |
| 3198 | ** CAPI3REF: Opening A New Database Connection |
| 3199 | ** CONSTRUCTOR: sqlite3 |
| 3200 | ** |
| @@ -3419,19 +3419,19 @@ | |
| 3419 | ** prior to calling sqlite3_open() or sqlite3_open_v2(). Otherwise, various |
| 3420 | ** features that require the use of temporary files may fail. |
| 3421 | ** |
| 3422 | ** See also: [sqlite3_temp_directory] |
| 3423 | */ |
| 3424 | SQLITE_API int SQLITE_APICALL sqlite3_open( |
| 3425 | const char *filename, /* Database filename (UTF-8) */ |
| 3426 | sqlite3 **ppDb /* OUT: SQLite db handle */ |
| 3427 | ); |
| 3428 | SQLITE_API int SQLITE_APICALL sqlite3_open16( |
| 3429 | const void *filename, /* Database filename (UTF-16) */ |
| 3430 | sqlite3 **ppDb /* OUT: SQLite db handle */ |
| 3431 | ); |
| 3432 | SQLITE_API int SQLITE_APICALL sqlite3_open_v2( |
| 3433 | const char *filename, /* Database filename (UTF-8) */ |
| 3434 | sqlite3 **ppDb, /* OUT: SQLite db handle */ |
| 3435 | int flags, /* Flags */ |
| 3436 | const char *zVfs /* Name of VFS module to use */ |
| 3437 | ); |
| @@ -3473,13 +3473,13 @@ | |
| 3473 | ** sqlite3_uri_boolean(F,P,B) returns B. If F is not a NULL pointer and |
| 3474 | ** is not a database file pathname pointer that SQLite passed into the xOpen |
| 3475 | ** VFS method, then the behavior of this routine is undefined and probably |
| 3476 | ** undesirable. |
| 3477 | */ |
| 3478 | SQLITE_API const char *SQLITE_APICALL sqlite3_uri_parameter(const char *zFilename, const char *zParam); |
| 3479 | SQLITE_API int SQLITE_APICALL sqlite3_uri_boolean(const char *zFile, const char *zParam, int bDefault); |
| 3480 | SQLITE_API sqlite3_int64 SQLITE_APICALL sqlite3_uri_int64(const char*, const char*, sqlite3_int64); |
| 3481 | |
| 3482 | |
| 3483 | /* |
| 3484 | ** CAPI3REF: Error Codes And Messages |
| 3485 | ** METHOD: sqlite3 |
| @@ -3519,15 +3519,15 @@ | |
| 3519 | ** |
| 3520 | ** If an interface fails with SQLITE_MISUSE, that means the interface |
| 3521 | ** was invoked incorrectly by the application. In that case, the |
| 3522 | ** error code and message may or may not be set. |
| 3523 | */ |
| 3524 | SQLITE_API int SQLITE_APICALL sqlite3_errcode(sqlite3 *db); |
| 3525 | SQLITE_API int SQLITE_APICALL sqlite3_extended_errcode(sqlite3 *db); |
| 3526 | SQLITE_API const char *SQLITE_APICALL sqlite3_errmsg(sqlite3*); |
| 3527 | SQLITE_API const void *SQLITE_APICALL sqlite3_errmsg16(sqlite3*); |
| 3528 | SQLITE_API const char *SQLITE_APICALL sqlite3_errstr(int); |
| 3529 | |
| 3530 | /* |
| 3531 | ** CAPI3REF: Prepared Statement Object |
| 3532 | ** KEYWORDS: {prepared statement} {prepared statements} |
| 3533 | ** |
| @@ -3591,11 +3591,11 @@ | |
| 3591 | ** created by an untrusted script can be contained using the |
| 3592 | ** [max_page_count] [PRAGMA]. |
| 3593 | ** |
| 3594 | ** New run-time limit categories may be added in future releases. |
| 3595 | */ |
| 3596 | SQLITE_API int SQLITE_APICALL sqlite3_limit(sqlite3*, int id, int newVal); |
| 3597 | |
| 3598 | /* |
| 3599 | ** CAPI3REF: Run-Time Limit Categories |
| 3600 | ** KEYWORDS: {limit category} {*limit categories} |
| 3601 | ** |
| @@ -3743,32 +3743,32 @@ | |
| 3743 | ** or [GLOB] operator or if the parameter is compared to an indexed column |
| 3744 | ** and the [SQLITE_ENABLE_STAT3] compile-time option is enabled. |
| 3745 | ** </li> |
| 3746 | ** </ol> |
| 3747 | */ |
| 3748 | SQLITE_API int SQLITE_APICALL sqlite3_prepare( |
| 3749 | sqlite3 *db, /* Database handle */ |
| 3750 | const char *zSql, /* SQL statement, UTF-8 encoded */ |
| 3751 | int nByte, /* Maximum length of zSql in bytes. */ |
| 3752 | sqlite3_stmt **ppStmt, /* OUT: Statement handle */ |
| 3753 | const char **pzTail /* OUT: Pointer to unused portion of zSql */ |
| 3754 | ); |
| 3755 | SQLITE_API int SQLITE_APICALL sqlite3_prepare_v2( |
| 3756 | sqlite3 *db, /* Database handle */ |
| 3757 | const char *zSql, /* SQL statement, UTF-8 encoded */ |
| 3758 | int nByte, /* Maximum length of zSql in bytes. */ |
| 3759 | sqlite3_stmt **ppStmt, /* OUT: Statement handle */ |
| 3760 | const char **pzTail /* OUT: Pointer to unused portion of zSql */ |
| 3761 | ); |
| 3762 | SQLITE_API int SQLITE_APICALL sqlite3_prepare16( |
| 3763 | sqlite3 *db, /* Database handle */ |
| 3764 | const void *zSql, /* SQL statement, UTF-16 encoded */ |
| 3765 | int nByte, /* Maximum length of zSql in bytes. */ |
| 3766 | sqlite3_stmt **ppStmt, /* OUT: Statement handle */ |
| 3767 | const void **pzTail /* OUT: Pointer to unused portion of zSql */ |
| 3768 | ); |
| 3769 | SQLITE_API int SQLITE_APICALL sqlite3_prepare16_v2( |
| 3770 | sqlite3 *db, /* Database handle */ |
| 3771 | const void *zSql, /* SQL statement, UTF-16 encoded */ |
| 3772 | int nByte, /* Maximum length of zSql in bytes. */ |
| 3773 | sqlite3_stmt **ppStmt, /* OUT: Statement handle */ |
| 3774 | const void **pzTail /* OUT: Pointer to unused portion of zSql */ |
| @@ -3803,12 +3803,12 @@ | |
| 3803 | ** automatically freed when the prepared statement is finalized. |
| 3804 | ** ^The string returned by sqlite3_expanded_sql(P), on the other hand, |
| 3805 | ** is obtained from [sqlite3_malloc()] and must be free by the application |
| 3806 | ** by passing it to [sqlite3_free()]. |
| 3807 | */ |
| 3808 | SQLITE_API const char *SQLITE_APICALL sqlite3_sql(sqlite3_stmt *pStmt); |
| 3809 | SQLITE_API char *SQLITE_APICALL sqlite3_expanded_sql(sqlite3_stmt *pStmt); |
| 3810 | |
| 3811 | /* |
| 3812 | ** CAPI3REF: Determine If An SQL Statement Writes The Database |
| 3813 | ** METHOD: sqlite3_stmt |
| 3814 | ** |
| @@ -3836,11 +3836,11 @@ | |
| 3836 | ** database. ^The [ATTACH] and [DETACH] statements also cause |
| 3837 | ** sqlite3_stmt_readonly() to return true since, while those statements |
| 3838 | ** change the configuration of a database connection, they do not make |
| 3839 | ** changes to the content of the database files on disk. |
| 3840 | */ |
| 3841 | SQLITE_API int SQLITE_APICALL sqlite3_stmt_readonly(sqlite3_stmt *pStmt); |
| 3842 | |
| 3843 | /* |
| 3844 | ** CAPI3REF: Determine If A Prepared Statement Has Been Reset |
| 3845 | ** METHOD: sqlite3_stmt |
| 3846 | ** |
| @@ -3857,11 +3857,11 @@ | |
| 3857 | ** to locate all prepared statements associated with a database |
| 3858 | ** connection that are in need of being reset. This can be used, |
| 3859 | ** for example, in diagnostic routines to search for prepared |
| 3860 | ** statements that are holding a transaction open. |
| 3861 | */ |
| 3862 | SQLITE_API int SQLITE_APICALL sqlite3_stmt_busy(sqlite3_stmt*); |
| 3863 | |
| 3864 | /* |
| 3865 | ** CAPI3REF: Dynamically Typed Value Object |
| 3866 | ** KEYWORDS: {protected sqlite3_value} {unprotected sqlite3_value} |
| 3867 | ** |
| @@ -4021,24 +4021,24 @@ | |
| 4021 | ** index is out of range. ^[SQLITE_NOMEM] is returned if malloc() fails. |
| 4022 | ** |
| 4023 | ** See also: [sqlite3_bind_parameter_count()], |
| 4024 | ** [sqlite3_bind_parameter_name()], and [sqlite3_bind_parameter_index()]. |
| 4025 | */ |
| 4026 | SQLITE_API int SQLITE_APICALL sqlite3_bind_blob(sqlite3_stmt*, int, const void*, int n, void(SQLITE_CALLBACK *)(void*)); |
| 4027 | SQLITE_API int SQLITE_APICALL sqlite3_bind_blob64(sqlite3_stmt*, int, const void*, sqlite3_uint64, |
| 4028 | void(SQLITE_CALLBACK *)(void*)); |
| 4029 | SQLITE_API int SQLITE_APICALL sqlite3_bind_double(sqlite3_stmt*, int, double); |
| 4030 | SQLITE_API int SQLITE_APICALL sqlite3_bind_int(sqlite3_stmt*, int, int); |
| 4031 | SQLITE_API int SQLITE_APICALL sqlite3_bind_int64(sqlite3_stmt*, int, sqlite3_int64); |
| 4032 | SQLITE_API int SQLITE_APICALL sqlite3_bind_null(sqlite3_stmt*, int); |
| 4033 | SQLITE_API int SQLITE_APICALL sqlite3_bind_text(sqlite3_stmt*,int,const char*,int,void(SQLITE_CALLBACK *)(void*)); |
| 4034 | SQLITE_API int SQLITE_APICALL sqlite3_bind_text16(sqlite3_stmt*, int, const void*, int, void(SQLITE_CALLBACK *)(void*)); |
| 4035 | SQLITE_API int SQLITE_APICALL sqlite3_bind_text64(sqlite3_stmt*, int, const char*, sqlite3_uint64, |
| 4036 | void(SQLITE_CALLBACK *)(void*), unsigned char encoding); |
| 4037 | SQLITE_API int SQLITE_APICALL sqlite3_bind_value(sqlite3_stmt*, int, const sqlite3_value*); |
| 4038 | SQLITE_API int SQLITE_APICALL sqlite3_bind_zeroblob(sqlite3_stmt*, int, int n); |
| 4039 | SQLITE_API int SQLITE_APICALL sqlite3_bind_zeroblob64(sqlite3_stmt*, int, sqlite3_uint64); |
| 4040 | |
| 4041 | /* |
| 4042 | ** CAPI3REF: Number Of SQL Parameters |
| 4043 | ** METHOD: sqlite3_stmt |
| 4044 | ** |
| @@ -4055,11 +4055,11 @@ | |
| 4055 | ** |
| 4056 | ** See also: [sqlite3_bind_blob|sqlite3_bind()], |
| 4057 | ** [sqlite3_bind_parameter_name()], and |
| 4058 | ** [sqlite3_bind_parameter_index()]. |
| 4059 | */ |
| 4060 | SQLITE_API int SQLITE_APICALL sqlite3_bind_parameter_count(sqlite3_stmt*); |
| 4061 | |
| 4062 | /* |
| 4063 | ** CAPI3REF: Name Of A Host Parameter |
| 4064 | ** METHOD: sqlite3_stmt |
| 4065 | ** |
| @@ -4083,11 +4083,11 @@ | |
| 4083 | ** |
| 4084 | ** See also: [sqlite3_bind_blob|sqlite3_bind()], |
| 4085 | ** [sqlite3_bind_parameter_count()], and |
| 4086 | ** [sqlite3_bind_parameter_index()]. |
| 4087 | */ |
| 4088 | SQLITE_API const char *SQLITE_APICALL sqlite3_bind_parameter_name(sqlite3_stmt*, int); |
| 4089 | |
| 4090 | /* |
| 4091 | ** CAPI3REF: Index Of A Parameter With A Given Name |
| 4092 | ** METHOD: sqlite3_stmt |
| 4093 | ** |
| @@ -4100,21 +4100,21 @@ | |
| 4100 | ** |
| 4101 | ** See also: [sqlite3_bind_blob|sqlite3_bind()], |
| 4102 | ** [sqlite3_bind_parameter_count()], and |
| 4103 | ** [sqlite3_bind_parameter_name()]. |
| 4104 | */ |
| 4105 | SQLITE_API int SQLITE_APICALL sqlite3_bind_parameter_index(sqlite3_stmt*, const char *zName); |
| 4106 | |
| 4107 | /* |
| 4108 | ** CAPI3REF: Reset All Bindings On A Prepared Statement |
| 4109 | ** METHOD: sqlite3_stmt |
| 4110 | ** |
| 4111 | ** ^Contrary to the intuition of many, [sqlite3_reset()] does not reset |
| 4112 | ** the [sqlite3_bind_blob | bindings] on a [prepared statement]. |
| 4113 | ** ^Use this routine to reset all host parameters to NULL. |
| 4114 | */ |
| 4115 | SQLITE_API int SQLITE_APICALL sqlite3_clear_bindings(sqlite3_stmt*); |
| 4116 | |
| 4117 | /* |
| 4118 | ** CAPI3REF: Number Of Columns In A Result Set |
| 4119 | ** METHOD: sqlite3_stmt |
| 4120 | ** |
| @@ -4122,11 +4122,11 @@ | |
| 4122 | ** [prepared statement]. ^This routine returns 0 if pStmt is an SQL |
| 4123 | ** statement that does not return data (for example an [UPDATE]). |
| 4124 | ** |
| 4125 | ** See also: [sqlite3_data_count()] |
| 4126 | */ |
| 4127 | SQLITE_API int SQLITE_APICALL sqlite3_column_count(sqlite3_stmt *pStmt); |
| 4128 | |
| 4129 | /* |
| 4130 | ** CAPI3REF: Column Names In A Result Set |
| 4131 | ** METHOD: sqlite3_stmt |
| 4132 | ** |
| @@ -4151,12 +4151,12 @@ | |
| 4151 | ** ^The name of a result column is the value of the "AS" clause for |
| 4152 | ** that column, if there is an AS clause. If there is no AS clause |
| 4153 | ** then the name of the column is unspecified and may change from |
| 4154 | ** one release of SQLite to the next. |
| 4155 | */ |
| 4156 | SQLITE_API const char *SQLITE_APICALL sqlite3_column_name(sqlite3_stmt*, int N); |
| 4157 | SQLITE_API const void *SQLITE_APICALL sqlite3_column_name16(sqlite3_stmt*, int N); |
| 4158 | |
| 4159 | /* |
| 4160 | ** CAPI3REF: Source Of Data In A Query Result |
| 4161 | ** METHOD: sqlite3_stmt |
| 4162 | ** |
| @@ -4200,16 +4200,16 @@ | |
| 4200 | ** If two or more threads call one or more |
| 4201 | ** [sqlite3_column_database_name | column metadata interfaces] |
| 4202 | ** for the same [prepared statement] and result column |
| 4203 | ** at the same time then the results are undefined. |
| 4204 | */ |
| 4205 | SQLITE_API const char *SQLITE_APICALL sqlite3_column_database_name(sqlite3_stmt*,int); |
| 4206 | SQLITE_API const void *SQLITE_APICALL sqlite3_column_database_name16(sqlite3_stmt*,int); |
| 4207 | SQLITE_API const char *SQLITE_APICALL sqlite3_column_table_name(sqlite3_stmt*,int); |
| 4208 | SQLITE_API const void *SQLITE_APICALL sqlite3_column_table_name16(sqlite3_stmt*,int); |
| 4209 | SQLITE_API const char *SQLITE_APICALL sqlite3_column_origin_name(sqlite3_stmt*,int); |
| 4210 | SQLITE_API const void *SQLITE_APICALL sqlite3_column_origin_name16(sqlite3_stmt*,int); |
| 4211 | |
| 4212 | /* |
| 4213 | ** CAPI3REF: Declared Datatype Of A Query Result |
| 4214 | ** METHOD: sqlite3_stmt |
| 4215 | ** |
| @@ -4237,12 +4237,12 @@ | |
| 4237 | ** data stored in that column is of the declared type. SQLite is |
| 4238 | ** strongly typed, but the typing is dynamic not static. ^Type |
| 4239 | ** is associated with individual values, not with the containers |
| 4240 | ** used to hold those values. |
| 4241 | */ |
| 4242 | SQLITE_API const char *SQLITE_APICALL sqlite3_column_decltype(sqlite3_stmt*,int); |
| 4243 | SQLITE_API const void *SQLITE_APICALL sqlite3_column_decltype16(sqlite3_stmt*,int); |
| 4244 | |
| 4245 | /* |
| 4246 | ** CAPI3REF: Evaluate An SQL Statement |
| 4247 | ** METHOD: sqlite3_stmt |
| 4248 | ** |
| @@ -4318,11 +4318,11 @@ | |
| 4318 | ** using either [sqlite3_prepare_v2()] or [sqlite3_prepare16_v2()] instead |
| 4319 | ** of the legacy [sqlite3_prepare()] and [sqlite3_prepare16()] interfaces, |
| 4320 | ** then the more specific [error codes] are returned directly |
| 4321 | ** by sqlite3_step(). The use of the "v2" interface is recommended. |
| 4322 | */ |
| 4323 | SQLITE_API int SQLITE_APICALL sqlite3_step(sqlite3_stmt*); |
| 4324 | |
| 4325 | /* |
| 4326 | ** CAPI3REF: Number of columns in a result set |
| 4327 | ** METHOD: sqlite3_stmt |
| 4328 | ** |
| @@ -4339,11 +4339,11 @@ | |
| 4339 | ** where it always returns zero since each step of that multi-step |
| 4340 | ** pragma returns 0 columns of data. |
| 4341 | ** |
| 4342 | ** See also: [sqlite3_column_count()] |
| 4343 | */ |
| 4344 | SQLITE_API int SQLITE_APICALL sqlite3_data_count(sqlite3_stmt *pStmt); |
| 4345 | |
| 4346 | /* |
| 4347 | ** CAPI3REF: Fundamental Datatypes |
| 4348 | ** KEYWORDS: SQLITE_TEXT |
| 4349 | ** |
| @@ -4529,20 +4529,20 @@ | |
| 4529 | ** of these routines, a default value is returned. The default value |
| 4530 | ** is either the integer 0, the floating point number 0.0, or a NULL |
| 4531 | ** pointer. Subsequent calls to [sqlite3_errcode()] will return |
| 4532 | ** [SQLITE_NOMEM].)^ |
| 4533 | */ |
| 4534 | SQLITE_API const void *SQLITE_APICALL sqlite3_column_blob(sqlite3_stmt*, int iCol); |
| 4535 | SQLITE_API int SQLITE_APICALL sqlite3_column_bytes(sqlite3_stmt*, int iCol); |
| 4536 | SQLITE_API int SQLITE_APICALL sqlite3_column_bytes16(sqlite3_stmt*, int iCol); |
| 4537 | SQLITE_API double SQLITE_APICALL sqlite3_column_double(sqlite3_stmt*, int iCol); |
| 4538 | SQLITE_API int SQLITE_APICALL sqlite3_column_int(sqlite3_stmt*, int iCol); |
| 4539 | SQLITE_API sqlite3_int64 SQLITE_APICALL sqlite3_column_int64(sqlite3_stmt*, int iCol); |
| 4540 | SQLITE_API const unsigned char *SQLITE_APICALL sqlite3_column_text(sqlite3_stmt*, int iCol); |
| 4541 | SQLITE_API const void *SQLITE_APICALL sqlite3_column_text16(sqlite3_stmt*, int iCol); |
| 4542 | SQLITE_API int SQLITE_APICALL sqlite3_column_type(sqlite3_stmt*, int iCol); |
| 4543 | SQLITE_API sqlite3_value *SQLITE_APICALL sqlite3_column_value(sqlite3_stmt*, int iCol); |
| 4544 | |
| 4545 | /* |
| 4546 | ** CAPI3REF: Destroy A Prepared Statement Object |
| 4547 | ** DESTRUCTOR: sqlite3_stmt |
| 4548 | ** |
| @@ -4566,11 +4566,11 @@ | |
| 4566 | ** resource leaks. It is a grievous error for the application to try to use |
| 4567 | ** a prepared statement after it has been finalized. Any use of a prepared |
| 4568 | ** statement after it has been finalized can result in undefined and |
| 4569 | ** undesirable behavior such as segfaults and heap corruption. |
| 4570 | */ |
| 4571 | SQLITE_API int SQLITE_APICALL sqlite3_finalize(sqlite3_stmt *pStmt); |
| 4572 | |
| 4573 | /* |
| 4574 | ** CAPI3REF: Reset A Prepared Statement Object |
| 4575 | ** METHOD: sqlite3_stmt |
| 4576 | ** |
| @@ -4593,11 +4593,11 @@ | |
| 4593 | ** [sqlite3_reset(S)] returns an appropriate [error code]. |
| 4594 | ** |
| 4595 | ** ^The [sqlite3_reset(S)] interface does not change the values |
| 4596 | ** of any [sqlite3_bind_blob|bindings] on the [prepared statement] S. |
| 4597 | */ |
| 4598 | SQLITE_API int SQLITE_APICALL sqlite3_reset(sqlite3_stmt *pStmt); |
| 4599 | |
| 4600 | /* |
| 4601 | ** CAPI3REF: Create Or Redefine SQL Functions |
| 4602 | ** KEYWORDS: {function creation routines} |
| 4603 | ** KEYWORDS: {application-defined SQL function} |
| @@ -4693,40 +4693,40 @@ | |
| 4693 | ** ^An application-defined function is permitted to call other |
| 4694 | ** SQLite interfaces. However, such calls must not |
| 4695 | ** close the database connection nor finalize or reset the prepared |
| 4696 | ** statement in which the function is running. |
| 4697 | */ |
| 4698 | SQLITE_API int SQLITE_APICALL sqlite3_create_function( |
| 4699 | sqlite3 *db, |
| 4700 | const char *zFunctionName, |
| 4701 | int nArg, |
| 4702 | int eTextRep, |
| 4703 | void *pApp, |
| 4704 | void (SQLITE_CALLBACK *xFunc)(sqlite3_context*,int,sqlite3_value**), |
| 4705 | void (SQLITE_CALLBACK *xStep)(sqlite3_context*,int,sqlite3_value**), |
| 4706 | void (SQLITE_CALLBACK *xFinal)(sqlite3_context*) |
| 4707 | ); |
| 4708 | SQLITE_API int SQLITE_APICALL sqlite3_create_function16( |
| 4709 | sqlite3 *db, |
| 4710 | const void *zFunctionName, |
| 4711 | int nArg, |
| 4712 | int eTextRep, |
| 4713 | void *pApp, |
| 4714 | void (SQLITE_CALLBACK *xFunc)(sqlite3_context*,int,sqlite3_value**), |
| 4715 | void (SQLITE_CALLBACK *xStep)(sqlite3_context*,int,sqlite3_value**), |
| 4716 | void (SQLITE_CALLBACK *xFinal)(sqlite3_context*) |
| 4717 | ); |
| 4718 | SQLITE_API int SQLITE_APICALL sqlite3_create_function_v2( |
| 4719 | sqlite3 *db, |
| 4720 | const char *zFunctionName, |
| 4721 | int nArg, |
| 4722 | int eTextRep, |
| 4723 | void *pApp, |
| 4724 | void (SQLITE_CALLBACK *xFunc)(sqlite3_context*,int,sqlite3_value**), |
| 4725 | void (SQLITE_CALLBACK *xStep)(sqlite3_context*,int,sqlite3_value**), |
| 4726 | void (SQLITE_CALLBACK *xFinal)(sqlite3_context*), |
| 4727 | void(SQLITE_CALLBACK *xDestroy)(void*) |
| 4728 | ); |
| 4729 | |
| 4730 | /* |
| 4731 | ** CAPI3REF: Text Encodings |
| 4732 | ** |
| @@ -4759,16 +4759,16 @@ | |
| 4759 | ** to be supported. However, new applications should avoid |
| 4760 | ** the use of these functions. To encourage programmers to avoid |
| 4761 | ** these functions, we will not explain what they do. |
| 4762 | */ |
| 4763 | #ifndef SQLITE_OMIT_DEPRECATED |
| 4764 | SQLITE_API SQLITE_DEPRECATED int SQLITE_APICALL sqlite3_aggregate_count(sqlite3_context*); |
| 4765 | SQLITE_API SQLITE_DEPRECATED int SQLITE_APICALL sqlite3_expired(sqlite3_stmt*); |
| 4766 | SQLITE_API SQLITE_DEPRECATED int SQLITE_APICALL sqlite3_transfer_bindings(sqlite3_stmt*, sqlite3_stmt*); |
| 4767 | SQLITE_API SQLITE_DEPRECATED int SQLITE_APICALL sqlite3_global_recover(void); |
| 4768 | SQLITE_API SQLITE_DEPRECATED void SQLITE_APICALL sqlite3_thread_cleanup(void); |
| 4769 | SQLITE_API SQLITE_DEPRECATED int SQLITE_APICALL sqlite3_memory_alarm(void(SQLITE_CALLBACK *)(void*,sqlite3_int64,int), |
| 4770 | void*,sqlite3_int64); |
| 4771 | #endif |
| 4772 | |
| 4773 | /* |
| 4774 | ** CAPI3REF: Obtaining SQL Values |
| @@ -4814,22 +4814,22 @@ | |
| 4814 | ** or [sqlite3_value_text16()]. |
| 4815 | ** |
| 4816 | ** These routines must be called from the same thread as |
| 4817 | ** the SQL function that supplied the [sqlite3_value*] parameters. |
| 4818 | */ |
| 4819 | SQLITE_API const void *SQLITE_APICALL sqlite3_value_blob(sqlite3_value*); |
| 4820 | SQLITE_API int SQLITE_APICALL sqlite3_value_bytes(sqlite3_value*); |
| 4821 | SQLITE_API int SQLITE_APICALL sqlite3_value_bytes16(sqlite3_value*); |
| 4822 | SQLITE_API double SQLITE_APICALL sqlite3_value_double(sqlite3_value*); |
| 4823 | SQLITE_API int SQLITE_APICALL sqlite3_value_int(sqlite3_value*); |
| 4824 | SQLITE_API sqlite3_int64 SQLITE_APICALL sqlite3_value_int64(sqlite3_value*); |
| 4825 | SQLITE_API const unsigned char *SQLITE_APICALL sqlite3_value_text(sqlite3_value*); |
| 4826 | SQLITE_API const void *SQLITE_APICALL sqlite3_value_text16(sqlite3_value*); |
| 4827 | SQLITE_API const void *SQLITE_APICALL sqlite3_value_text16le(sqlite3_value*); |
| 4828 | SQLITE_API const void *SQLITE_APICALL sqlite3_value_text16be(sqlite3_value*); |
| 4829 | SQLITE_API int SQLITE_APICALL sqlite3_value_type(sqlite3_value*); |
| 4830 | SQLITE_API int SQLITE_APICALL sqlite3_value_numeric_type(sqlite3_value*); |
| 4831 | |
| 4832 | /* |
| 4833 | ** CAPI3REF: Finding The Subtype Of SQL Values |
| 4834 | ** METHOD: sqlite3_value |
| 4835 | ** |
| @@ -4841,11 +4841,11 @@ | |
| 4841 | ** |
| 4842 | ** SQLite makes no use of subtype itself. It merely passes the subtype |
| 4843 | ** from the result of one [application-defined SQL function] into the |
| 4844 | ** input of another. |
| 4845 | */ |
| 4846 | SQLITE_API unsigned int SQLITE_APICALL sqlite3_value_subtype(sqlite3_value*); |
| 4847 | |
| 4848 | /* |
| 4849 | ** CAPI3REF: Copy And Free SQL Values |
| 4850 | ** METHOD: sqlite3_value |
| 4851 | ** |
| @@ -4857,12 +4857,12 @@ | |
| 4857 | ** |
| 4858 | ** ^The sqlite3_value_free(V) interface frees an [sqlite3_value] object |
| 4859 | ** previously obtained from [sqlite3_value_dup()]. ^If V is a NULL pointer |
| 4860 | ** then sqlite3_value_free(V) is a harmless no-op. |
| 4861 | */ |
| 4862 | SQLITE_API sqlite3_value *SQLITE_APICALL sqlite3_value_dup(const sqlite3_value*); |
| 4863 | SQLITE_API void SQLITE_APICALL sqlite3_value_free(sqlite3_value*); |
| 4864 | |
| 4865 | /* |
| 4866 | ** CAPI3REF: Obtain Aggregate Function Context |
| 4867 | ** METHOD: sqlite3_context |
| 4868 | ** |
| @@ -4903,11 +4903,11 @@ | |
| 4903 | ** function. |
| 4904 | ** |
| 4905 | ** This routine must be called from the same thread in which |
| 4906 | ** the aggregate SQL function is running. |
| 4907 | */ |
| 4908 | SQLITE_API void *SQLITE_APICALL sqlite3_aggregate_context(sqlite3_context*, int nBytes); |
| 4909 | |
| 4910 | /* |
| 4911 | ** CAPI3REF: User Data For Functions |
| 4912 | ** METHOD: sqlite3_context |
| 4913 | ** |
| @@ -4918,11 +4918,11 @@ | |
| 4918 | ** registered the application defined function. |
| 4919 | ** |
| 4920 | ** This routine must be called from the same thread in which |
| 4921 | ** the application-defined function is running. |
| 4922 | */ |
| 4923 | SQLITE_API void *SQLITE_APICALL sqlite3_user_data(sqlite3_context*); |
| 4924 | |
| 4925 | /* |
| 4926 | ** CAPI3REF: Database Connection For Functions |
| 4927 | ** METHOD: sqlite3_context |
| 4928 | ** |
| @@ -4930,11 +4930,11 @@ | |
| 4930 | ** the pointer to the [database connection] (the 1st parameter) |
| 4931 | ** of the [sqlite3_create_function()] |
| 4932 | ** and [sqlite3_create_function16()] routines that originally |
| 4933 | ** registered the application defined function. |
| 4934 | */ |
| 4935 | SQLITE_API sqlite3 *SQLITE_APICALL sqlite3_context_db_handle(sqlite3_context*); |
| 4936 | |
| 4937 | /* |
| 4938 | ** CAPI3REF: Function Auxiliary Data |
| 4939 | ** METHOD: sqlite3_context |
| 4940 | ** |
| @@ -4962,16 +4962,17 @@ | |
| 4962 | ** NULL if the metadata has been discarded. |
| 4963 | ** ^After each call to sqlite3_set_auxdata(C,N,P,X) where X is not NULL, |
| 4964 | ** SQLite will invoke the destructor function X with parameter P exactly |
| 4965 | ** once, when the metadata is discarded. |
| 4966 | ** SQLite is free to discard the metadata at any time, including: <ul> |
| 4967 | ** <li> when the corresponding function parameter changes, or |
| 4968 | ** <li> when [sqlite3_reset()] or [sqlite3_finalize()] is called for the |
| 4969 | ** SQL statement, or |
| 4970 | ** <li> when sqlite3_set_auxdata() is invoked again on the same parameter, or |
| 4971 | ** <li> during the original sqlite3_set_auxdata() call when a memory |
| 4972 | ** allocation error occurs. </ul>)^ |
| 4973 | ** |
| 4974 | ** Note the last bullet in particular. The destructor X in |
| 4975 | ** sqlite3_set_auxdata(C,N,P,X) might be called immediately, before the |
| 4976 | ** sqlite3_set_auxdata() interface even returns. Hence sqlite3_set_auxdata() |
| 4977 | ** should be called near the end of the function implementation and the |
| @@ -4983,12 +4984,12 @@ | |
| 4983 | ** values and [parameters] and expressions composed from the same.)^ |
| 4984 | ** |
| 4985 | ** These routines must be called from the same thread in which |
| 4986 | ** the SQL function is running. |
| 4987 | */ |
| 4988 | SQLITE_API void *SQLITE_APICALL sqlite3_get_auxdata(sqlite3_context*, int N); |
| 4989 | SQLITE_API void SQLITE_APICALL sqlite3_set_auxdata(sqlite3_context*, int N, void*, void (SQLITE_CALLBACK *)(void*)); |
| 4990 | |
| 4991 | |
| 4992 | /* |
| 4993 | ** CAPI3REF: Constants Defining Special Destructor Behavior |
| 4994 | ** |
| @@ -5001,11 +5002,11 @@ | |
| 5001 | ** the content before returning. |
| 5002 | ** |
| 5003 | ** The typedef is necessary to work around problems in certain |
| 5004 | ** C++ compilers. |
| 5005 | */ |
| 5006 | typedef void (SQLITE_CALLBACK *sqlite3_destructor_type)(void*); |
| 5007 | #define SQLITE_STATIC ((sqlite3_destructor_type)0) |
| 5008 | #define SQLITE_TRANSIENT ((sqlite3_destructor_type)-1) |
| 5009 | |
| 5010 | /* |
| 5011 | ** CAPI3REF: Setting The Result Of An SQL Function |
| @@ -5120,31 +5121,31 @@ | |
| 5120 | ** |
| 5121 | ** If these routines are called from within the different thread |
| 5122 | ** than the one containing the application-defined function that received |
| 5123 | ** the [sqlite3_context] pointer, the results are undefined. |
| 5124 | */ |
| 5125 | SQLITE_API void SQLITE_APICALL sqlite3_result_blob(sqlite3_context*, const void*, int, void(SQLITE_CALLBACK *)(void*)); |
| 5126 | SQLITE_API void SQLITE_APICALL sqlite3_result_blob64(sqlite3_context*,const void*, |
| 5127 | sqlite3_uint64,void(SQLITE_CALLBACK *)(void*)); |
| 5128 | SQLITE_API void SQLITE_APICALL sqlite3_result_double(sqlite3_context*, double); |
| 5129 | SQLITE_API void SQLITE_APICALL sqlite3_result_error(sqlite3_context*, const char*, int); |
| 5130 | SQLITE_API void SQLITE_APICALL sqlite3_result_error16(sqlite3_context*, const void*, int); |
| 5131 | SQLITE_API void SQLITE_APICALL sqlite3_result_error_toobig(sqlite3_context*); |
| 5132 | SQLITE_API void SQLITE_APICALL sqlite3_result_error_nomem(sqlite3_context*); |
| 5133 | SQLITE_API void SQLITE_APICALL sqlite3_result_error_code(sqlite3_context*, int); |
| 5134 | SQLITE_API void SQLITE_APICALL sqlite3_result_int(sqlite3_context*, int); |
| 5135 | SQLITE_API void SQLITE_APICALL sqlite3_result_int64(sqlite3_context*, sqlite3_int64); |
| 5136 | SQLITE_API void SQLITE_APICALL sqlite3_result_null(sqlite3_context*); |
| 5137 | SQLITE_API void SQLITE_APICALL sqlite3_result_text(sqlite3_context*, const char*, int, void(SQLITE_CALLBACK *)(void*)); |
| 5138 | SQLITE_API void SQLITE_APICALL sqlite3_result_text64(sqlite3_context*, const char*,sqlite3_uint64, |
| 5139 | void(SQLITE_CALLBACK *)(void*), unsigned char encoding); |
| 5140 | SQLITE_API void SQLITE_APICALL sqlite3_result_text16(sqlite3_context*, const void*, int, void(SQLITE_CALLBACK *)(void*)); |
| 5141 | SQLITE_API void SQLITE_APICALL sqlite3_result_text16le(sqlite3_context*, const void*, int,void(SQLITE_CALLBACK *)(void*)); |
| 5142 | SQLITE_API void SQLITE_APICALL sqlite3_result_text16be(sqlite3_context*, const void*, int,void(SQLITE_CALLBACK *)(void*)); |
| 5143 | SQLITE_API void SQLITE_APICALL sqlite3_result_value(sqlite3_context*, sqlite3_value*); |
| 5144 | SQLITE_API void SQLITE_APICALL sqlite3_result_zeroblob(sqlite3_context*, int n); |
| 5145 | SQLITE_API int SQLITE_APICALL sqlite3_result_zeroblob64(sqlite3_context*, sqlite3_uint64 n); |
| 5146 | |
| 5147 | |
| 5148 | /* |
| 5149 | ** CAPI3REF: Setting The Subtype Of An SQL Function |
| 5150 | ** METHOD: sqlite3_context |
| @@ -5155,11 +5156,11 @@ | |
| 5155 | ** of the subtype T are preserved in current versions of SQLite; |
| 5156 | ** higher order bits are discarded. |
| 5157 | ** The number of subtype bytes preserved by SQLite might increase |
| 5158 | ** in future releases of SQLite. |
| 5159 | */ |
| 5160 | SQLITE_API void SQLITE_APICALL sqlite3_result_subtype(sqlite3_context*,unsigned int); |
| 5161 | |
| 5162 | /* |
| 5163 | ** CAPI3REF: Define New Collating Sequences |
| 5164 | ** METHOD: sqlite3 |
| 5165 | ** |
| @@ -5237,31 +5238,31 @@ | |
| 5237 | ** is unfortunate but cannot be changed without breaking backwards |
| 5238 | ** compatibility. |
| 5239 | ** |
| 5240 | ** See also: [sqlite3_collation_needed()] and [sqlite3_collation_needed16()]. |
| 5241 | */ |
| 5242 | SQLITE_API int SQLITE_APICALL sqlite3_create_collation( |
| 5243 | sqlite3*, |
| 5244 | const char *zName, |
| 5245 | int eTextRep, |
| 5246 | void *pArg, |
| 5247 | int(SQLITE_CALLBACK *xCompare)(void*,int,const void*,int,const void*) |
| 5248 | ); |
| 5249 | SQLITE_API int SQLITE_APICALL sqlite3_create_collation_v2( |
| 5250 | sqlite3*, |
| 5251 | const char *zName, |
| 5252 | int eTextRep, |
| 5253 | void *pArg, |
| 5254 | int(SQLITE_CALLBACK *xCompare)(void*,int,const void*,int,const void*), |
| 5255 | void(SQLITE_CALLBACK *xDestroy)(void*) |
| 5256 | ); |
| 5257 | SQLITE_API int SQLITE_APICALL sqlite3_create_collation16( |
| 5258 | sqlite3*, |
| 5259 | const void *zName, |
| 5260 | int eTextRep, |
| 5261 | void *pArg, |
| 5262 | int(SQLITE_CALLBACK *xCompare)(void*,int,const void*,int,const void*) |
| 5263 | ); |
| 5264 | |
| 5265 | /* |
| 5266 | ** CAPI3REF: Collation Needed Callbacks |
| 5267 | ** METHOD: sqlite3 |
| @@ -5287,19 +5288,19 @@ | |
| 5287 | ** |
| 5288 | ** The callback function should register the desired collation using |
| 5289 | ** [sqlite3_create_collation()], [sqlite3_create_collation16()], or |
| 5290 | ** [sqlite3_create_collation_v2()]. |
| 5291 | */ |
| 5292 | SQLITE_API int SQLITE_APICALL sqlite3_collation_needed( |
| 5293 | sqlite3*, |
| 5294 | void*, |
| 5295 | void(SQLITE_CALLBACK *)(void*,sqlite3*,int eTextRep,const char*) |
| 5296 | ); |
| 5297 | SQLITE_API int SQLITE_APICALL sqlite3_collation_needed16( |
| 5298 | sqlite3*, |
| 5299 | void*, |
| 5300 | void(SQLITE_CALLBACK *)(void*,sqlite3*,int eTextRep,const void*) |
| 5301 | ); |
| 5302 | |
| 5303 | #ifdef SQLITE_HAS_CODEC |
| 5304 | /* |
| 5305 | ** Specify the key for an encrypted database. This routine should be |
| @@ -5306,15 +5307,15 @@ | |
| 5306 | ** called right after sqlite3_open(). |
| 5307 | ** |
| 5308 | ** The code to implement this API is not available in the public release |
| 5309 | ** of SQLite. |
| 5310 | */ |
| 5311 | SQLITE_API int SQLITE_APICALL sqlite3_key( |
| 5312 | sqlite3 *db, /* Database to be rekeyed */ |
| 5313 | const void *pKey, int nKey /* The key */ |
| 5314 | ); |
| 5315 | SQLITE_API int SQLITE_APICALL sqlite3_key_v2( |
| 5316 | sqlite3 *db, /* Database to be rekeyed */ |
| 5317 | const char *zDbName, /* Name of the database */ |
| 5318 | const void *pKey, int nKey /* The key */ |
| 5319 | ); |
| 5320 | |
| @@ -5324,35 +5325,35 @@ | |
| 5324 | ** database is decrypted. |
| 5325 | ** |
| 5326 | ** The code to implement this API is not available in the public release |
| 5327 | ** of SQLite. |
| 5328 | */ |
| 5329 | SQLITE_API int SQLITE_APICALL sqlite3_rekey( |
| 5330 | sqlite3 *db, /* Database to be rekeyed */ |
| 5331 | const void *pKey, int nKey /* The new key */ |
| 5332 | ); |
| 5333 | SQLITE_API int SQLITE_APICALL sqlite3_rekey_v2( |
| 5334 | sqlite3 *db, /* Database to be rekeyed */ |
| 5335 | const char *zDbName, /* Name of the database */ |
| 5336 | const void *pKey, int nKey /* The new key */ |
| 5337 | ); |
| 5338 | |
| 5339 | /* |
| 5340 | ** Specify the activation key for a SEE database. Unless |
| 5341 | ** activated, none of the SEE routines will work. |
| 5342 | */ |
| 5343 | SQLITE_API void SQLITE_APICALL sqlite3_activate_see( |
| 5344 | const char *zPassPhrase /* Activation phrase */ |
| 5345 | ); |
| 5346 | #endif |
| 5347 | |
| 5348 | #ifdef SQLITE_ENABLE_CEROD |
| 5349 | /* |
| 5350 | ** Specify the activation key for a CEROD database. Unless |
| 5351 | ** activated, none of the CEROD routines will work. |
| 5352 | */ |
| 5353 | SQLITE_API void SQLITE_APICALL sqlite3_activate_cerod( |
| 5354 | const char *zPassPhrase /* Activation phrase */ |
| 5355 | ); |
| 5356 | #endif |
| 5357 | |
| 5358 | /* |
| @@ -5370,11 +5371,11 @@ | |
| 5370 | ** method of the default [sqlite3_vfs] object. If the xSleep() method |
| 5371 | ** of the default VFS is not implemented correctly, or not implemented at |
| 5372 | ** all, then the behavior of sqlite3_sleep() may deviate from the description |
| 5373 | ** in the previous paragraphs. |
| 5374 | */ |
| 5375 | SQLITE_API int SQLITE_APICALL sqlite3_sleep(int); |
| 5376 | |
| 5377 | /* |
| 5378 | ** CAPI3REF: Name Of The Folder Holding Temporary Files |
| 5379 | ** |
| 5380 | ** ^(If this global variable is made to point to a string which is |
| @@ -5489,11 +5490,11 @@ | |
| 5489 | ** |
| 5490 | ** If another thread changes the autocommit status of the database |
| 5491 | ** connection while this routine is running, then the return value |
| 5492 | ** is undefined. |
| 5493 | */ |
| 5494 | SQLITE_API int SQLITE_APICALL sqlite3_get_autocommit(sqlite3*); |
| 5495 | |
| 5496 | /* |
| 5497 | ** CAPI3REF: Find The Database Handle Of A Prepared Statement |
| 5498 | ** METHOD: sqlite3_stmt |
| 5499 | ** |
| @@ -5502,11 +5503,11 @@ | |
| 5502 | ** returned by sqlite3_db_handle is the same [database connection] |
| 5503 | ** that was the first argument |
| 5504 | ** to the [sqlite3_prepare_v2()] call (or its variants) that was used to |
| 5505 | ** create the statement in the first place. |
| 5506 | */ |
| 5507 | SQLITE_API sqlite3 *SQLITE_APICALL sqlite3_db_handle(sqlite3_stmt*); |
| 5508 | |
| 5509 | /* |
| 5510 | ** CAPI3REF: Return The Filename For A Database Connection |
| 5511 | ** METHOD: sqlite3 |
| 5512 | ** |
| @@ -5519,21 +5520,21 @@ | |
| 5519 | ** ^The filename returned by this function is the output of the |
| 5520 | ** xFullPathname method of the [VFS]. ^In other words, the filename |
| 5521 | ** will be an absolute pathname, even if the filename used |
| 5522 | ** to open the database originally was a URI or relative pathname. |
| 5523 | */ |
| 5524 | SQLITE_API const char *SQLITE_APICALL sqlite3_db_filename(sqlite3 *db, const char *zDbName); |
| 5525 | |
| 5526 | /* |
| 5527 | ** CAPI3REF: Determine if a database is read-only |
| 5528 | ** METHOD: sqlite3 |
| 5529 | ** |
| 5530 | ** ^The sqlite3_db_readonly(D,N) interface returns 1 if the database N |
| 5531 | ** of connection D is read-only, 0 if it is read/write, or -1 if N is not |
| 5532 | ** the name of a database on connection D. |
| 5533 | */ |
| 5534 | SQLITE_API int SQLITE_APICALL sqlite3_db_readonly(sqlite3 *db, const char *zDbName); |
| 5535 | |
| 5536 | /* |
| 5537 | ** CAPI3REF: Find the next prepared statement |
| 5538 | ** METHOD: sqlite3 |
| 5539 | ** |
| @@ -5545,11 +5546,11 @@ | |
| 5545 | ** |
| 5546 | ** The [database connection] pointer D in a call to |
| 5547 | ** [sqlite3_next_stmt(D,S)] must refer to an open database |
| 5548 | ** connection and in particular must not be a NULL pointer. |
| 5549 | */ |
| 5550 | SQLITE_API sqlite3_stmt *SQLITE_APICALL sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt); |
| 5551 | |
| 5552 | /* |
| 5553 | ** CAPI3REF: Commit And Rollback Notification Callbacks |
| 5554 | ** METHOD: sqlite3 |
| 5555 | ** |
| @@ -5594,12 +5595,12 @@ | |
| 5594 | ** ^The rollback callback is not invoked if a transaction is |
| 5595 | ** automatically rolled back because the database connection is closed. |
| 5596 | ** |
| 5597 | ** See also the [sqlite3_update_hook()] interface. |
| 5598 | */ |
| 5599 | SQLITE_API void *SQLITE_APICALL sqlite3_commit_hook(sqlite3*, int(SQLITE_CALLBACK *)(void*), void*); |
| 5600 | SQLITE_API void *SQLITE_APICALL sqlite3_rollback_hook(sqlite3*, void(SQLITE_CALLBACK *)(void *), void*); |
| 5601 | |
| 5602 | /* |
| 5603 | ** CAPI3REF: Data Change Notification Callbacks |
| 5604 | ** METHOD: sqlite3 |
| 5605 | ** |
| @@ -5646,13 +5647,13 @@ | |
| 5646 | ** the first call on D. |
| 5647 | ** |
| 5648 | ** See also the [sqlite3_commit_hook()], [sqlite3_rollback_hook()], |
| 5649 | ** and [sqlite3_preupdate_hook()] interfaces. |
| 5650 | */ |
| 5651 | SQLITE_API void *SQLITE_APICALL sqlite3_update_hook( |
| 5652 | sqlite3*, |
| 5653 | void(SQLITE_CALLBACK *)(void *,int ,char const *,char const *,sqlite3_int64), |
| 5654 | void* |
| 5655 | ); |
| 5656 | |
| 5657 | /* |
| 5658 | ** CAPI3REF: Enable Or Disable Shared Pager Cache |
| @@ -5686,11 +5687,11 @@ | |
| 5686 | ** This interface is threadsafe on processors where writing a |
| 5687 | ** 32-bit integer is atomic. |
| 5688 | ** |
| 5689 | ** See Also: [SQLite Shared-Cache Mode] |
| 5690 | */ |
| 5691 | SQLITE_API int SQLITE_APICALL sqlite3_enable_shared_cache(int); |
| 5692 | |
| 5693 | /* |
| 5694 | ** CAPI3REF: Attempt To Free Heap Memory |
| 5695 | ** |
| 5696 | ** ^The sqlite3_release_memory() interface attempts to free N bytes |
| @@ -5702,11 +5703,11 @@ | |
| 5702 | ** ^The sqlite3_release_memory() routine is a no-op returning zero |
| 5703 | ** if SQLite is not compiled with [SQLITE_ENABLE_MEMORY_MANAGEMENT]. |
| 5704 | ** |
| 5705 | ** See also: [sqlite3_db_release_memory()] |
| 5706 | */ |
| 5707 | SQLITE_API int SQLITE_APICALL sqlite3_release_memory(int); |
| 5708 | |
| 5709 | /* |
| 5710 | ** CAPI3REF: Free Memory Used By A Database Connection |
| 5711 | ** METHOD: sqlite3 |
| 5712 | ** |
| @@ -5716,11 +5717,11 @@ | |
| 5716 | ** when the [SQLITE_ENABLE_MEMORY_MANAGEMENT] compile-time option is |
| 5717 | ** omitted. |
| 5718 | ** |
| 5719 | ** See also: [sqlite3_release_memory()] |
| 5720 | */ |
| 5721 | SQLITE_API int SQLITE_APICALL sqlite3_db_release_memory(sqlite3*); |
| 5722 | |
| 5723 | /* |
| 5724 | ** CAPI3REF: Impose A Limit On Heap Size |
| 5725 | ** |
| 5726 | ** ^The sqlite3_soft_heap_limit64() interface sets and/or queries the |
| @@ -5768,11 +5769,11 @@ | |
| 5768 | ** the use of [SQLITE_ENABLE_MEMORY_MANAGEMENT]. |
| 5769 | ** |
| 5770 | ** The circumstances under which SQLite will enforce the soft heap limit may |
| 5771 | ** changes in future releases of SQLite. |
| 5772 | */ |
| 5773 | SQLITE_API sqlite3_int64 SQLITE_APICALL sqlite3_soft_heap_limit64(sqlite3_int64 N); |
| 5774 | |
| 5775 | /* |
| 5776 | ** CAPI3REF: Deprecated Soft Heap Limit Interface |
| 5777 | ** DEPRECATED |
| 5778 | ** |
| @@ -5779,11 +5780,11 @@ | |
| 5779 | ** This is a deprecated version of the [sqlite3_soft_heap_limit64()] |
| 5780 | ** interface. This routine is provided for historical compatibility |
| 5781 | ** only. All new applications should use the |
| 5782 | ** [sqlite3_soft_heap_limit64()] interface rather than this one. |
| 5783 | */ |
| 5784 | SQLITE_API SQLITE_DEPRECATED void SQLITE_APICALL sqlite3_soft_heap_limit(int N); |
| 5785 | |
| 5786 | |
| 5787 | /* |
| 5788 | ** CAPI3REF: Extract Metadata About A Column Of A Table |
| 5789 | ** METHOD: sqlite3 |
| @@ -5849,11 +5850,11 @@ | |
| 5849 | ** |
| 5850 | ** ^This function causes all database schemas to be read from disk and |
| 5851 | ** parsed, if that has not already been done, and returns an error if |
| 5852 | ** any errors are encountered while loading the schema. |
| 5853 | */ |
| 5854 | SQLITE_API int SQLITE_APICALL sqlite3_table_column_metadata( |
| 5855 | sqlite3 *db, /* Connection handle */ |
| 5856 | const char *zDbName, /* Database name or NULL */ |
| 5857 | const char *zTableName, /* Table name */ |
| 5858 | const char *zColumnName, /* Column name */ |
| 5859 | char const **pzDataType, /* OUTPUT: Declared data type */ |
| @@ -5905,11 +5906,11 @@ | |
| 5905 | ** disabled and prevent SQL injections from giving attackers |
| 5906 | ** access to extension loading capabilities. |
| 5907 | ** |
| 5908 | ** See also the [load_extension() SQL function]. |
| 5909 | */ |
| 5910 | SQLITE_API int SQLITE_APICALL sqlite3_load_extension( |
| 5911 | sqlite3 *db, /* Load the extension into this database connection */ |
| 5912 | const char *zFile, /* Name of the shared library containing extension */ |
| 5913 | const char *zProc, /* Entry point. Derived from zFile if 0 */ |
| 5914 | char **pzErrMsg /* Put error message here if not 0 */ |
| 5915 | ); |
| @@ -5928,20 +5929,20 @@ | |
| 5928 | ** to turn extension loading on and call it with onoff==0 to turn |
| 5929 | ** it back off again. |
| 5930 | ** |
| 5931 | ** ^This interface enables or disables both the C-API |
| 5932 | ** [sqlite3_load_extension()] and the SQL function [load_extension()]. |
| 5933 | ** Use [sqlite3_db_config](db,[SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION],..) |
| 5934 | ** to enable or disable only the C-API. |
| 5935 | ** |
| 5936 | ** <b>Security warning:</b> It is recommended that extension loading |
| 5937 | ** be disabled using the [SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION] method |
| 5938 | ** rather than this interface, so the [load_extension()] SQL function |
| 5939 | ** remains disabled. This will prevent SQL injections from giving attackers |
| 5940 | ** access to extension loading capabilities. |
| 5941 | */ |
| 5942 | SQLITE_API int SQLITE_APICALL sqlite3_enable_load_extension(sqlite3 *db, int onoff); |
| 5943 | |
| 5944 | /* |
| 5945 | ** CAPI3REF: Automatically Load Statically Linked Extensions |
| 5946 | ** |
| 5947 | ** ^This interface causes the xEntryPoint() function to be invoked for |
| @@ -5975,11 +5976,11 @@ | |
| 5975 | ** will be called more than once for each database connection that is opened. |
| 5976 | ** |
| 5977 | ** See also: [sqlite3_reset_auto_extension()] |
| 5978 | ** and [sqlite3_cancel_auto_extension()] |
| 5979 | */ |
| 5980 | SQLITE_API int SQLITE_APICALL sqlite3_auto_extension(void(SQLITE_CALLBACK *xEntryPoint)(void)); |
| 5981 | |
| 5982 | /* |
| 5983 | ** CAPI3REF: Cancel Automatic Extension Loading |
| 5984 | ** |
| 5985 | ** ^The [sqlite3_cancel_auto_extension(X)] interface unregisters the |
| @@ -5987,19 +5988,19 @@ | |
| 5987 | ** [sqlite3_auto_extension(X)]. ^The [sqlite3_cancel_auto_extension(X)] |
| 5988 | ** routine returns 1 if initialization routine X was successfully |
| 5989 | ** unregistered and it returns 0 if X was not on the list of initialization |
| 5990 | ** routines. |
| 5991 | */ |
| 5992 | SQLITE_API int SQLITE_APICALL sqlite3_cancel_auto_extension(void(SQLITE_CALLBACK *xEntryPoint)(void)); |
| 5993 | |
| 5994 | /* |
| 5995 | ** CAPI3REF: Reset Automatic Extension Loading |
| 5996 | ** |
| 5997 | ** ^This interface disables all automatic extensions previously |
| 5998 | ** registered using [sqlite3_auto_extension()]. |
| 5999 | */ |
| 6000 | SQLITE_API void SQLITE_APICALL sqlite3_reset_auto_extension(void); |
| 6001 | |
| 6002 | /* |
| 6003 | ** The interface to the virtual-table mechanism is currently considered |
| 6004 | ** to be experimental. The interface might change in incompatible ways. |
| 6005 | ** If this is a problem for you, do not use the interface at this time. |
| @@ -6032,41 +6033,41 @@ | |
| 6032 | ** of this structure must not change while it is registered with |
| 6033 | ** any database connection. |
| 6034 | */ |
| 6035 | struct sqlite3_module { |
| 6036 | int iVersion; |
| 6037 | int (SQLITE_CALLBACK *xCreate)(sqlite3*, void *pAux, |
| 6038 | int argc, const char *const*argv, |
| 6039 | sqlite3_vtab **ppVTab, char**); |
| 6040 | int (SQLITE_CALLBACK *xConnect)(sqlite3*, void *pAux, |
| 6041 | int argc, const char *const*argv, |
| 6042 | sqlite3_vtab **ppVTab, char**); |
| 6043 | int (SQLITE_CALLBACK *xBestIndex)(sqlite3_vtab *pVTab, sqlite3_index_info*); |
| 6044 | int (SQLITE_CALLBACK *xDisconnect)(sqlite3_vtab *pVTab); |
| 6045 | int (SQLITE_CALLBACK *xDestroy)(sqlite3_vtab *pVTab); |
| 6046 | int (SQLITE_CALLBACK *xOpen)(sqlite3_vtab *pVTab, sqlite3_vtab_cursor **ppCursor); |
| 6047 | int (SQLITE_CALLBACK *xClose)(sqlite3_vtab_cursor*); |
| 6048 | int (SQLITE_CALLBACK *xFilter)(sqlite3_vtab_cursor*, int idxNum, const char *idxStr, |
| 6049 | int argc, sqlite3_value **argv); |
| 6050 | int (SQLITE_CALLBACK *xNext)(sqlite3_vtab_cursor*); |
| 6051 | int (SQLITE_CALLBACK *xEof)(sqlite3_vtab_cursor*); |
| 6052 | int (SQLITE_CALLBACK *xColumn)(sqlite3_vtab_cursor*, sqlite3_context*, int); |
| 6053 | int (SQLITE_CALLBACK *xRowid)(sqlite3_vtab_cursor*, sqlite3_int64 *pRowid); |
| 6054 | int (SQLITE_CALLBACK *xUpdate)(sqlite3_vtab *, int, sqlite3_value **, sqlite3_int64 *); |
| 6055 | int (SQLITE_CALLBACK *xBegin)(sqlite3_vtab *pVTab); |
| 6056 | int (SQLITE_CALLBACK *xSync)(sqlite3_vtab *pVTab); |
| 6057 | int (SQLITE_CALLBACK *xCommit)(sqlite3_vtab *pVTab); |
| 6058 | int (SQLITE_CALLBACK *xRollback)(sqlite3_vtab *pVTab); |
| 6059 | int (SQLITE_CALLBACK *xFindFunction)(sqlite3_vtab *pVtab, int nArg, const char *zName, |
| 6060 | void (SQLITE_CALLBACK **pxFunc)(sqlite3_context*,int,sqlite3_value**), |
| 6061 | void **ppArg); |
| 6062 | int (SQLITE_CALLBACK *xRename)(sqlite3_vtab *pVtab, const char *zNew); |
| 6063 | /* The methods above are in version 1 of the sqlite_module object. Those |
| 6064 | ** below are for version 2 and greater. */ |
| 6065 | int (SQLITE_CALLBACK *xSavepoint)(sqlite3_vtab *pVTab, int); |
| 6066 | int (SQLITE_CALLBACK *xRelease)(sqlite3_vtab *pVTab, int); |
| 6067 | int (SQLITE_CALLBACK *xRollbackTo)(sqlite3_vtab *pVTab, int); |
| 6068 | }; |
| 6069 | |
| 6070 | /* |
| 6071 | ** CAPI3REF: Virtual Table Indexing Information |
| 6072 | ** KEYWORDS: sqlite3_index_info |
| @@ -6240,22 +6241,22 @@ | |
| 6240 | ** be invoked if the call to sqlite3_create_module_v2() fails. |
| 6241 | ** ^The sqlite3_create_module() |
| 6242 | ** interface is equivalent to sqlite3_create_module_v2() with a NULL |
| 6243 | ** destructor. |
| 6244 | */ |
| 6245 | SQLITE_API int SQLITE_APICALL sqlite3_create_module( |
| 6246 | sqlite3 *db, /* SQLite connection to register module with */ |
| 6247 | const char *zName, /* Name of the module */ |
| 6248 | const sqlite3_module *p, /* Methods for the module */ |
| 6249 | void *pClientData /* Client data for xCreate/xConnect */ |
| 6250 | ); |
| 6251 | SQLITE_API int SQLITE_APICALL sqlite3_create_module_v2( |
| 6252 | sqlite3 *db, /* SQLite connection to register module with */ |
| 6253 | const char *zName, /* Name of the module */ |
| 6254 | const sqlite3_module *p, /* Methods for the module */ |
| 6255 | void *pClientData, /* Client data for xCreate/xConnect */ |
| 6256 | void(SQLITE_CALLBACK *xDestroy)(void*) /* Module destructor function */ |
| 6257 | ); |
| 6258 | |
| 6259 | /* |
| 6260 | ** CAPI3REF: Virtual Table Instance Object |
| 6261 | ** KEYWORDS: sqlite3_vtab |
| @@ -6309,11 +6310,11 @@ | |
| 6309 | ** ^The [xCreate] and [xConnect] methods of a |
| 6310 | ** [virtual table module] call this interface |
| 6311 | ** to declare the format (the names and datatypes of the columns) of |
| 6312 | ** the virtual tables they implement. |
| 6313 | */ |
| 6314 | SQLITE_API int SQLITE_APICALL sqlite3_declare_vtab(sqlite3*, const char *zSQL); |
| 6315 | |
| 6316 | /* |
| 6317 | ** CAPI3REF: Overload A Function For A Virtual Table |
| 6318 | ** METHOD: sqlite3 |
| 6319 | ** |
| @@ -6328,11 +6329,11 @@ | |
| 6328 | ** of the new function always causes an exception to be thrown. So |
| 6329 | ** the new function is not good for anything by itself. Its only |
| 6330 | ** purpose is to be a placeholder function that can be overloaded |
| 6331 | ** by a [virtual table]. |
| 6332 | */ |
| 6333 | SQLITE_API int SQLITE_APICALL sqlite3_overload_function(sqlite3*, const char *zFuncName, int nArg); |
| 6334 | |
| 6335 | /* |
| 6336 | ** The interface to the virtual-table mechanism defined above (back up |
| 6337 | ** to a comment remarkably similar to this one) is currently considered |
| 6338 | ** to be experimental. The interface might change in incompatible ways. |
| @@ -6427,11 +6428,11 @@ | |
| 6427 | ** zero-filled blob to read or write using the incremental-blob interface. |
| 6428 | ** |
| 6429 | ** To avoid a resource leak, every open [BLOB handle] should eventually |
| 6430 | ** be released by a call to [sqlite3_blob_close()]. |
| 6431 | */ |
| 6432 | SQLITE_API int SQLITE_APICALL sqlite3_blob_open( |
| 6433 | sqlite3*, |
| 6434 | const char *zDb, |
| 6435 | const char *zTable, |
| 6436 | const char *zColumn, |
| 6437 | sqlite3_int64 iRow, |
| @@ -6460,11 +6461,11 @@ | |
| 6460 | ** SQLITE_ABORT. ^Calling [sqlite3_blob_bytes()] on an aborted blob handle |
| 6461 | ** always returns zero. |
| 6462 | ** |
| 6463 | ** ^This function sets the database handle error code and message. |
| 6464 | */ |
| 6465 | SQLITE_API int SQLITE_APICALL sqlite3_blob_reopen(sqlite3_blob *, sqlite3_int64); |
| 6466 | |
| 6467 | /* |
| 6468 | ** CAPI3REF: Close A BLOB Handle |
| 6469 | ** DESTRUCTOR: sqlite3_blob |
| 6470 | ** |
| @@ -6483,11 +6484,11 @@ | |
| 6483 | ** with a null pointer (such as would be returned by a failed call to |
| 6484 | ** [sqlite3_blob_open()]) is a harmless no-op. ^Otherwise, if this function |
| 6485 | ** is passed a valid open blob handle, the values returned by the |
| 6486 | ** sqlite3_errcode() and sqlite3_errmsg() functions are set before returning. |
| 6487 | */ |
| 6488 | SQLITE_API int SQLITE_APICALL sqlite3_blob_close(sqlite3_blob *); |
| 6489 | |
| 6490 | /* |
| 6491 | ** CAPI3REF: Return The Size Of An Open BLOB |
| 6492 | ** METHOD: sqlite3_blob |
| 6493 | ** |
| @@ -6499,11 +6500,11 @@ | |
| 6499 | ** This routine only works on a [BLOB handle] which has been created |
| 6500 | ** by a prior successful call to [sqlite3_blob_open()] and which has not |
| 6501 | ** been closed by [sqlite3_blob_close()]. Passing any other pointer in |
| 6502 | ** to this routine results in undefined and probably undesirable behavior. |
| 6503 | */ |
| 6504 | SQLITE_API int SQLITE_APICALL sqlite3_blob_bytes(sqlite3_blob *); |
| 6505 | |
| 6506 | /* |
| 6507 | ** CAPI3REF: Read Data From A BLOB Incrementally |
| 6508 | ** METHOD: sqlite3_blob |
| 6509 | ** |
| @@ -6528,11 +6529,11 @@ | |
| 6528 | ** been closed by [sqlite3_blob_close()]. Passing any other pointer in |
| 6529 | ** to this routine results in undefined and probably undesirable behavior. |
| 6530 | ** |
| 6531 | ** See also: [sqlite3_blob_write()]. |
| 6532 | */ |
| 6533 | SQLITE_API int SQLITE_APICALL sqlite3_blob_read(sqlite3_blob *, void *Z, int N, int iOffset); |
| 6534 | |
| 6535 | /* |
| 6536 | ** CAPI3REF: Write Data Into A BLOB Incrementally |
| 6537 | ** METHOD: sqlite3_blob |
| 6538 | ** |
| @@ -6570,11 +6571,11 @@ | |
| 6570 | ** been closed by [sqlite3_blob_close()]. Passing any other pointer in |
| 6571 | ** to this routine results in undefined and probably undesirable behavior. |
| 6572 | ** |
| 6573 | ** See also: [sqlite3_blob_read()]. |
| 6574 | */ |
| 6575 | SQLITE_API int SQLITE_APICALL sqlite3_blob_write(sqlite3_blob *, const void *z, int n, int iOffset); |
| 6576 | |
| 6577 | /* |
| 6578 | ** CAPI3REF: Virtual File System Objects |
| 6579 | ** |
| 6580 | ** A virtual filesystem (VFS) is an [sqlite3_vfs] object |
| @@ -6601,13 +6602,13 @@ | |
| 6601 | ** |
| 6602 | ** ^Unregister a VFS with the sqlite3_vfs_unregister() interface. |
| 6603 | ** ^(If the default VFS is unregistered, another VFS is chosen as |
| 6604 | ** the default. The choice for the new VFS is arbitrary.)^ |
| 6605 | */ |
| 6606 | SQLITE_API sqlite3_vfs *SQLITE_APICALL sqlite3_vfs_find(const char *zVfsName); |
| 6607 | SQLITE_API int SQLITE_APICALL sqlite3_vfs_register(sqlite3_vfs*, int makeDflt); |
| 6608 | SQLITE_API int SQLITE_APICALL sqlite3_vfs_unregister(sqlite3_vfs*); |
| 6609 | |
| 6610 | /* |
| 6611 | ** CAPI3REF: Mutexes |
| 6612 | ** |
| 6613 | ** The SQLite core uses these routines for thread |
| @@ -6719,15 +6720,15 @@ | |
| 6719 | ** sqlite3_mutex_leave() is a NULL pointer, then all three routines |
| 6720 | ** behave as no-ops. |
| 6721 | ** |
| 6722 | ** See also: [sqlite3_mutex_held()] and [sqlite3_mutex_notheld()]. |
| 6723 | */ |
| 6724 | SQLITE_API sqlite3_mutex *SQLITE_APICALL sqlite3_mutex_alloc(int); |
| 6725 | SQLITE_API void SQLITE_APICALL sqlite3_mutex_free(sqlite3_mutex*); |
| 6726 | SQLITE_API void SQLITE_APICALL sqlite3_mutex_enter(sqlite3_mutex*); |
| 6727 | SQLITE_API int SQLITE_APICALL sqlite3_mutex_try(sqlite3_mutex*); |
| 6728 | SQLITE_API void SQLITE_APICALL sqlite3_mutex_leave(sqlite3_mutex*); |
| 6729 | |
| 6730 | /* |
| 6731 | ** CAPI3REF: Mutex Methods Object |
| 6732 | ** |
| 6733 | ** An instance of this structure defines the low-level routines |
| @@ -6792,19 +6793,19 @@ | |
| 6792 | ** If xMutexInit fails in any way, it is expected to clean up after itself |
| 6793 | ** prior to returning. |
| 6794 | */ |
| 6795 | typedef struct sqlite3_mutex_methods sqlite3_mutex_methods; |
| 6796 | struct sqlite3_mutex_methods { |
| 6797 | int (SQLITE_CALLBACK *xMutexInit)(void); |
| 6798 | int (SQLITE_CALLBACK *xMutexEnd)(void); |
| 6799 | sqlite3_mutex *(SQLITE_CALLBACK *xMutexAlloc)(int); |
| 6800 | void (SQLITE_CALLBACK *xMutexFree)(sqlite3_mutex *); |
| 6801 | void (SQLITE_CALLBACK *xMutexEnter)(sqlite3_mutex *); |
| 6802 | int (SQLITE_CALLBACK *xMutexTry)(sqlite3_mutex *); |
| 6803 | void (SQLITE_CALLBACK *xMutexLeave)(sqlite3_mutex *); |
| 6804 | int (SQLITE_CALLBACK *xMutexHeld)(sqlite3_mutex *); |
| 6805 | int (SQLITE_CALLBACK *xMutexNotheld)(sqlite3_mutex *); |
| 6806 | }; |
| 6807 | |
| 6808 | /* |
| 6809 | ** CAPI3REF: Mutex Verification Routines |
| 6810 | ** |
| @@ -6833,12 +6834,12 @@ | |
| 6833 | ** call to sqlite3_mutex_held() to fail, so a non-zero return is |
| 6834 | ** the appropriate thing to do. The sqlite3_mutex_notheld() |
| 6835 | ** interface should also return 1 when given a NULL pointer. |
| 6836 | */ |
| 6837 | #ifndef NDEBUG |
| 6838 | SQLITE_API int SQLITE_APICALL sqlite3_mutex_held(sqlite3_mutex*); |
| 6839 | SQLITE_API int SQLITE_APICALL sqlite3_mutex_notheld(sqlite3_mutex*); |
| 6840 | #endif |
| 6841 | |
| 6842 | /* |
| 6843 | ** CAPI3REF: Mutex Types |
| 6844 | ** |
| @@ -6874,11 +6875,11 @@ | |
| 6874 | ** serializes access to the [database connection] given in the argument |
| 6875 | ** when the [threading mode] is Serialized. |
| 6876 | ** ^If the [threading mode] is Single-thread or Multi-thread then this |
| 6877 | ** routine returns a NULL pointer. |
| 6878 | */ |
| 6879 | SQLITE_API sqlite3_mutex *SQLITE_APICALL sqlite3_db_mutex(sqlite3*); |
| 6880 | |
| 6881 | /* |
| 6882 | ** CAPI3REF: Low-Level Control Of Database Files |
| 6883 | ** METHOD: sqlite3 |
| 6884 | ** |
| @@ -6909,11 +6910,11 @@ | |
| 6909 | ** an incorrect zDbName and an SQLITE_ERROR return from the underlying |
| 6910 | ** xFileControl method. |
| 6911 | ** |
| 6912 | ** See also: [SQLITE_FCNTL_LOCKSTATE] |
| 6913 | */ |
| 6914 | SQLITE_API int SQLITE_APICALL sqlite3_file_control(sqlite3*, const char *zDbName, int op, void*); |
| 6915 | |
| 6916 | /* |
| 6917 | ** CAPI3REF: Testing Interface |
| 6918 | ** |
| 6919 | ** ^The sqlite3_test_control() interface is used to read out internal |
| @@ -6991,12 +6992,12 @@ | |
| 6991 | ** be represented by a 32-bit integer, then the values returned by |
| 6992 | ** sqlite3_status() are undefined. |
| 6993 | ** |
| 6994 | ** See also: [sqlite3_db_status()] |
| 6995 | */ |
| 6996 | SQLITE_API int SQLITE_APICALL sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag); |
| 6997 | SQLITE_API int SQLITE_APICALL sqlite3_status64( |
| 6998 | int op, |
| 6999 | sqlite3_int64 *pCurrent, |
| 7000 | sqlite3_int64 *pHighwater, |
| 7001 | int resetFlag |
| 7002 | ); |
| @@ -7117,11 +7118,11 @@ | |
| 7117 | ** ^The sqlite3_db_status() routine returns SQLITE_OK on success and a |
| 7118 | ** non-zero [error code] on failure. |
| 7119 | ** |
| 7120 | ** See also: [sqlite3_status()] and [sqlite3_stmt_status()]. |
| 7121 | */ |
| 7122 | SQLITE_API int SQLITE_APICALL sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int resetFlg); |
| 7123 | |
| 7124 | /* |
| 7125 | ** CAPI3REF: Status Parameters for database connections |
| 7126 | ** KEYWORDS: {SQLITE_DBSTATUS options} |
| 7127 | ** |
| @@ -7260,11 +7261,11 @@ | |
| 7260 | ** ^If the resetFlg is true, then the counter is reset to zero after this |
| 7261 | ** interface call returns. |
| 7262 | ** |
| 7263 | ** See also: [sqlite3_status()] and [sqlite3_db_status()]. |
| 7264 | */ |
| 7265 | SQLITE_API int SQLITE_APICALL sqlite3_stmt_status(sqlite3_stmt*, int op,int resetFlg); |
| 7266 | |
| 7267 | /* |
| 7268 | ** CAPI3REF: Status Parameters for prepared statements |
| 7269 | ** KEYWORDS: {SQLITE_STMTSTATUS counter} {SQLITE_STMTSTATUS counters} |
| 7270 | ** |
| @@ -7496,22 +7497,22 @@ | |
| 7496 | */ |
| 7497 | typedef struct sqlite3_pcache_methods2 sqlite3_pcache_methods2; |
| 7498 | struct sqlite3_pcache_methods2 { |
| 7499 | int iVersion; |
| 7500 | void *pArg; |
| 7501 | int (SQLITE_CALLBACK *xInit)(void*); |
| 7502 | void (SQLITE_CALLBACK *xShutdown)(void*); |
| 7503 | sqlite3_pcache *(SQLITE_CALLBACK *xCreate)(int szPage, int szExtra, int bPurgeable); |
| 7504 | void (SQLITE_CALLBACK *xCachesize)(sqlite3_pcache*, int nCachesize); |
| 7505 | int (SQLITE_CALLBACK *xPagecount)(sqlite3_pcache*); |
| 7506 | sqlite3_pcache_page *(SQLITE_CALLBACK *xFetch)(sqlite3_pcache*, unsigned key, int createFlag); |
| 7507 | void (SQLITE_CALLBACK *xUnpin)(sqlite3_pcache*, sqlite3_pcache_page*, int discard); |
| 7508 | void (SQLITE_CALLBACK *xRekey)(sqlite3_pcache*, sqlite3_pcache_page*, |
| 7509 | unsigned oldKey, unsigned newKey); |
| 7510 | void (SQLITE_CALLBACK *xTruncate)(sqlite3_pcache*, unsigned iLimit); |
| 7511 | void (SQLITE_CALLBACK *xDestroy)(sqlite3_pcache*); |
| 7512 | void (SQLITE_CALLBACK *xShrink)(sqlite3_pcache*); |
| 7513 | }; |
| 7514 | |
| 7515 | /* |
| 7516 | ** This is the obsolete pcache_methods object that has now been replaced |
| 7517 | ** by sqlite3_pcache_methods2. This object is not used by SQLite. It is |
| @@ -7518,20 +7519,20 @@ | |
| 7518 | ** retained in the header file for backwards compatibility only. |
| 7519 | */ |
| 7520 | typedef struct sqlite3_pcache_methods sqlite3_pcache_methods; |
| 7521 | struct sqlite3_pcache_methods { |
| 7522 | void *pArg; |
| 7523 | int (SQLITE_CALLBACK *xInit)(void*); |
| 7524 | void (SQLITE_CALLBACK *xShutdown)(void*); |
| 7525 | sqlite3_pcache *(SQLITE_CALLBACK *xCreate)(int szPage, int bPurgeable); |
| 7526 | void (SQLITE_CALLBACK *xCachesize)(sqlite3_pcache*, int nCachesize); |
| 7527 | int (SQLITE_CALLBACK *xPagecount)(sqlite3_pcache*); |
| 7528 | void *(SQLITE_CALLBACK *xFetch)(sqlite3_pcache*, unsigned key, int createFlag); |
| 7529 | void (SQLITE_CALLBACK *xUnpin)(sqlite3_pcache*, void*, int discard); |
| 7530 | void (SQLITE_CALLBACK *xRekey)(sqlite3_pcache*, void*, unsigned oldKey, unsigned newKey); |
| 7531 | void (SQLITE_CALLBACK *xTruncate)(sqlite3_pcache*, unsigned iLimit); |
| 7532 | void (SQLITE_CALLBACK *xDestroy)(sqlite3_pcache*); |
| 7533 | }; |
| 7534 | |
| 7535 | |
| 7536 | /* |
| 7537 | ** CAPI3REF: Online Backup Object |
| @@ -7729,20 +7730,20 @@ | |
| 7729 | ** However, the sqlite3_backup_remaining() and sqlite3_backup_pagecount() |
| 7730 | ** APIs are not strictly speaking threadsafe. If they are invoked at the |
| 7731 | ** same time as another thread is invoking sqlite3_backup_step() it is |
| 7732 | ** possible that they return invalid values. |
| 7733 | */ |
| 7734 | SQLITE_API sqlite3_backup *SQLITE_APICALL sqlite3_backup_init( |
| 7735 | sqlite3 *pDest, /* Destination database handle */ |
| 7736 | const char *zDestName, /* Destination database name */ |
| 7737 | sqlite3 *pSource, /* Source database handle */ |
| 7738 | const char *zSourceName /* Source database name */ |
| 7739 | ); |
| 7740 | SQLITE_API int SQLITE_APICALL sqlite3_backup_step(sqlite3_backup *p, int nPage); |
| 7741 | SQLITE_API int SQLITE_APICALL sqlite3_backup_finish(sqlite3_backup *p); |
| 7742 | SQLITE_API int SQLITE_APICALL sqlite3_backup_remaining(sqlite3_backup *p); |
| 7743 | SQLITE_API int SQLITE_APICALL sqlite3_backup_pagecount(sqlite3_backup *p); |
| 7744 | |
| 7745 | /* |
| 7746 | ** CAPI3REF: Unlock Notification |
| 7747 | ** METHOD: sqlite3 |
| 7748 | ** |
| @@ -7855,13 +7856,13 @@ | |
| 7855 | ** by an sqlite3_step() call. ^(If there is a blocking connection, then the |
| 7856 | ** extended error code is set to SQLITE_LOCKED_SHAREDCACHE. Otherwise, in |
| 7857 | ** the special "DROP TABLE/INDEX" case, the extended error code is just |
| 7858 | ** SQLITE_LOCKED.)^ |
| 7859 | */ |
| 7860 | SQLITE_API int SQLITE_APICALL sqlite3_unlock_notify( |
| 7861 | sqlite3 *pBlocked, /* Waiting connection */ |
| 7862 | void (SQLITE_CALLBACK *xNotify)(void **apArg, int nArg), /* Callback function to invoke */ |
| 7863 | void *pNotifyArg /* Argument to pass to xNotify */ |
| 7864 | ); |
| 7865 | |
| 7866 | |
| 7867 | /* |
| @@ -7870,12 +7871,12 @@ | |
| 7870 | ** ^The [sqlite3_stricmp()] and [sqlite3_strnicmp()] APIs allow applications |
| 7871 | ** and extensions to compare the contents of two buffers containing UTF-8 |
| 7872 | ** strings in a case-independent fashion, using the same definition of "case |
| 7873 | ** independence" that SQLite uses internally when comparing identifiers. |
| 7874 | */ |
| 7875 | SQLITE_API int SQLITE_APICALL sqlite3_stricmp(const char *, const char *); |
| 7876 | SQLITE_API int SQLITE_APICALL sqlite3_strnicmp(const char *, const char *, int); |
| 7877 | |
| 7878 | /* |
| 7879 | ** CAPI3REF: String Globbing |
| 7880 | * |
| 7881 | ** ^The [sqlite3_strglob(P,X)] interface returns zero if and only if |
| @@ -7888,11 +7889,11 @@ | |
| 7888 | ** Note that this routine returns zero on a match and non-zero if the strings |
| 7889 | ** do not match, the same as [sqlite3_stricmp()] and [sqlite3_strnicmp()]. |
| 7890 | ** |
| 7891 | ** See also: [sqlite3_strlike()]. |
| 7892 | */ |
| 7893 | SQLITE_API int SQLITE_APICALL sqlite3_strglob(const char *zGlob, const char *zStr); |
| 7894 | |
| 7895 | /* |
| 7896 | ** CAPI3REF: String LIKE Matching |
| 7897 | * |
| 7898 | ** ^The [sqlite3_strlike(P,X,E)] interface returns zero if and only if |
| @@ -7911,11 +7912,11 @@ | |
| 7911 | ** Note that this routine returns zero on a match and non-zero if the strings |
| 7912 | ** do not match, the same as [sqlite3_stricmp()] and [sqlite3_strnicmp()]. |
| 7913 | ** |
| 7914 | ** See also: [sqlite3_strglob()]. |
| 7915 | */ |
| 7916 | SQLITE_API int SQLITE_APICALL sqlite3_strlike(const char *zGlob, const char *zStr, unsigned int cEsc); |
| 7917 | |
| 7918 | /* |
| 7919 | ** CAPI3REF: Error Logging Interface |
| 7920 | ** |
| 7921 | ** ^The [sqlite3_log()] interface writes a message into the [error log] |
| @@ -7970,13 +7971,13 @@ | |
| 7970 | ** previously registered write-ahead log callback. ^Note that the |
| 7971 | ** [sqlite3_wal_autocheckpoint()] interface and the |
| 7972 | ** [wal_autocheckpoint pragma] both invoke [sqlite3_wal_hook()] and will |
| 7973 | ** overwrite any prior [sqlite3_wal_hook()] settings. |
| 7974 | */ |
| 7975 | SQLITE_API void *SQLITE_APICALL sqlite3_wal_hook( |
| 7976 | sqlite3*, |
| 7977 | int(SQLITE_CALLBACK *)(void *,sqlite3*,const char*,int), |
| 7978 | void* |
| 7979 | ); |
| 7980 | |
| 7981 | /* |
| 7982 | ** CAPI3REF: Configure an auto-checkpoint |
| @@ -8005,11 +8006,11 @@ | |
| 8005 | ** enabled with a threshold of 1000 or [SQLITE_DEFAULT_WAL_AUTOCHECKPOINT] |
| 8006 | ** pages. The use of this interface |
| 8007 | ** is only necessary if the default setting is found to be suboptimal |
| 8008 | ** for a particular application. |
| 8009 | */ |
| 8010 | SQLITE_API int SQLITE_APICALL sqlite3_wal_autocheckpoint(sqlite3 *db, int N); |
| 8011 | |
| 8012 | /* |
| 8013 | ** CAPI3REF: Checkpoint a database |
| 8014 | ** METHOD: sqlite3 |
| 8015 | ** |
| @@ -8027,11 +8028,11 @@ | |
| 8027 | ** interface was added. This interface is retained for backwards |
| 8028 | ** compatibility and as a convenience for applications that need to manually |
| 8029 | ** start a callback but which do not need the full power (and corresponding |
| 8030 | ** complication) of [sqlite3_wal_checkpoint_v2()]. |
| 8031 | */ |
| 8032 | SQLITE_API int SQLITE_APICALL sqlite3_wal_checkpoint(sqlite3 *db, const char *zDb); |
| 8033 | |
| 8034 | /* |
| 8035 | ** CAPI3REF: Checkpoint a database |
| 8036 | ** METHOD: sqlite3 |
| 8037 | ** |
| @@ -8121,11 +8122,11 @@ | |
| 8121 | ** [sqlite3_errcode()] and [sqlite3_errmsg()]. |
| 8122 | ** |
| 8123 | ** ^The [PRAGMA wal_checkpoint] command can be used to invoke this interface |
| 8124 | ** from SQL. |
| 8125 | */ |
| 8126 | SQLITE_API int SQLITE_APICALL sqlite3_wal_checkpoint_v2( |
| 8127 | sqlite3 *db, /* Database handle */ |
| 8128 | const char *zDb, /* Name of attached database (or NULL) */ |
| 8129 | int eMode, /* SQLITE_CHECKPOINT_* value */ |
| 8130 | int *pnLog, /* OUT: Size of WAL log in frames */ |
| 8131 | int *pnCkpt /* OUT: Total number of frames checkpointed */ |
| @@ -8210,11 +8211,11 @@ | |
| 8210 | ** value returned is one of [SQLITE_ROLLBACK], [SQLITE_IGNORE], [SQLITE_FAIL], |
| 8211 | ** [SQLITE_ABORT], or [SQLITE_REPLACE], according to the [ON CONFLICT] mode |
| 8212 | ** of the SQL statement that triggered the call to the [xUpdate] method of the |
| 8213 | ** [virtual table]. |
| 8214 | */ |
| 8215 | SQLITE_API int SQLITE_APICALL sqlite3_vtab_on_conflict(sqlite3 *); |
| 8216 | |
| 8217 | /* |
| 8218 | ** CAPI3REF: Conflict resolution modes |
| 8219 | ** KEYWORDS: {conflict resolution mode} |
| 8220 | ** |
| @@ -8315,11 +8316,11 @@ | |
| 8315 | ** as if the loop did not exist - it returns non-zero and leave the variable |
| 8316 | ** that pOut points to unchanged. |
| 8317 | ** |
| 8318 | ** See also: [sqlite3_stmt_scanstatus_reset()] |
| 8319 | */ |
| 8320 | SQLITE_API int SQLITE_APICALL sqlite3_stmt_scanstatus( |
| 8321 | sqlite3_stmt *pStmt, /* Prepared statement for which info desired */ |
| 8322 | int idx, /* Index of loop to report on */ |
| 8323 | int iScanStatusOp, /* Information desired. SQLITE_SCANSTAT_* */ |
| 8324 | void *pOut /* Result written here */ |
| 8325 | ); |
| @@ -8331,11 +8332,11 @@ | |
| 8331 | ** ^Zero all [sqlite3_stmt_scanstatus()] related event counters. |
| 8332 | ** |
| 8333 | ** This API is only available if the library is built with pre-processor |
| 8334 | ** symbol [SQLITE_ENABLE_STMT_SCANSTATUS] defined. |
| 8335 | */ |
| 8336 | SQLITE_API void SQLITE_APICALL sqlite3_stmt_scanstatus_reset(sqlite3_stmt*); |
| 8337 | |
| 8338 | /* |
| 8339 | ** CAPI3REF: Flush caches to disk mid-transaction |
| 8340 | ** |
| 8341 | ** ^If a write-transaction is open on [database connection] D when the |
| @@ -8363,11 +8364,11 @@ | |
| 8363 | ** ^Otherwise, if no error occurs, [sqlite3_db_cacheflush()] returns SQLITE_OK. |
| 8364 | ** |
| 8365 | ** ^This function does not set the database handle error code or message |
| 8366 | ** returned by the [sqlite3_errcode()] and [sqlite3_errmsg()] functions. |
| 8367 | */ |
| 8368 | SQLITE_API int SQLITE_APICALL sqlite3_db_cacheflush(sqlite3*); |
| 8369 | |
| 8370 | /* |
| 8371 | ** CAPI3REF: The pre-update hook. |
| 8372 | ** |
| 8373 | ** ^These interfaces are only available if SQLite is compiled using the |
| @@ -8443,13 +8444,13 @@ | |
| 8443 | ** triggers; or 2 for changes resulting from triggers called by top-level |
| 8444 | ** triggers; and so forth. |
| 8445 | ** |
| 8446 | ** See also: [sqlite3_update_hook()] |
| 8447 | */ |
| 8448 | SQLITE_API SQLITE_EXPERIMENTAL void *SQLITE_APICALL sqlite3_preupdate_hook( |
| 8449 | sqlite3 *db, |
| 8450 | void(SQLITE_CALLBACK *xPreUpdate)( |
| 8451 | void *pCtx, /* Copy of third arg to preupdate_hook() */ |
| 8452 | sqlite3 *db, /* Database handle */ |
| 8453 | int op, /* SQLITE_UPDATE, DELETE or INSERT */ |
| 8454 | char const *zDb, /* Database name */ |
| 8455 | char const *zName, /* Table name */ |
| @@ -8456,14 +8457,14 @@ | |
| 8456 | sqlite3_int64 iKey1, /* Rowid of row about to be deleted/updated */ |
| 8457 | sqlite3_int64 iKey2 /* New rowid value (for a rowid UPDATE) */ |
| 8458 | ), |
| 8459 | void* |
| 8460 | ); |
| 8461 | SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_APICALL sqlite3_preupdate_old(sqlite3 *, int, sqlite3_value **); |
| 8462 | SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_APICALL sqlite3_preupdate_count(sqlite3 *); |
| 8463 | SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_APICALL sqlite3_preupdate_depth(sqlite3 *); |
| 8464 | SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_APICALL sqlite3_preupdate_new(sqlite3 *, int, sqlite3_value **); |
| 8465 | |
| 8466 | /* |
| 8467 | ** CAPI3REF: Low-level system error code |
| 8468 | ** |
| 8469 | ** ^Attempt to return the underlying operating system error code or error |
| @@ -8471,11 +8472,11 @@ | |
| 8471 | ** The return value is OS-dependent. For example, on unix systems, after |
| 8472 | ** [sqlite3_open_v2()] returns [SQLITE_CANTOPEN], this interface could be |
| 8473 | ** called to get back the underlying "errno" that caused the problem, such |
| 8474 | ** as ENOSPC, EAUTH, EISDIR, and so forth. |
| 8475 | */ |
| 8476 | SQLITE_API int SQLITE_APICALL sqlite3_system_errno(sqlite3*); |
| 8477 | |
| 8478 | /* |
| 8479 | ** CAPI3REF: Database Snapshot |
| 8480 | ** KEYWORDS: {snapshot} |
| 8481 | ** EXPERIMENTAL |
| @@ -8521,11 +8522,11 @@ | |
| 8521 | ** to avoid a memory leak. |
| 8522 | ** |
| 8523 | ** The [sqlite3_snapshot_get()] interface is only available when the |
| 8524 | ** SQLITE_ENABLE_SNAPSHOT compile-time option is used. |
| 8525 | */ |
| 8526 | SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_APICALL sqlite3_snapshot_get( |
| 8527 | sqlite3 *db, |
| 8528 | const char *zSchema, |
| 8529 | sqlite3_snapshot **ppSnapshot |
| 8530 | ); |
| 8531 | |
| @@ -8559,11 +8560,11 @@ | |
| 8559 | ** database connection in order to make it ready to use snapshots.) |
| 8560 | ** |
| 8561 | ** The [sqlite3_snapshot_open()] interface is only available when the |
| 8562 | ** SQLITE_ENABLE_SNAPSHOT compile-time option is used. |
| 8563 | */ |
| 8564 | SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_APICALL sqlite3_snapshot_open( |
| 8565 | sqlite3 *db, |
| 8566 | const char *zSchema, |
| 8567 | sqlite3_snapshot *pSnapshot |
| 8568 | ); |
| 8569 | |
| @@ -8576,11 +8577,11 @@ | |
| 8576 | ** using this routine to avoid a memory leak. |
| 8577 | ** |
| 8578 | ** The [sqlite3_snapshot_free()] interface is only available when the |
| 8579 | ** SQLITE_ENABLE_SNAPSHOT compile-time option is used. |
| 8580 | */ |
| 8581 | SQLITE_API SQLITE_EXPERIMENTAL void SQLITE_APICALL sqlite3_snapshot_free(sqlite3_snapshot*); |
| 8582 | |
| 8583 | /* |
| 8584 | ** CAPI3REF: Compare the ages of two snapshot handles. |
| 8585 | ** EXPERIMENTAL |
| 8586 | ** |
| @@ -8600,11 +8601,11 @@ | |
| 8600 | ** |
| 8601 | ** Otherwise, this API returns a negative value if P1 refers to an older |
| 8602 | ** snapshot than P2, zero if the two handles refer to the same database |
| 8603 | ** snapshot, and a positive value if P1 is a newer snapshot than P2. |
| 8604 | */ |
| 8605 | SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_APICALL sqlite3_snapshot_cmp( |
| 8606 | sqlite3_snapshot *p1, |
| 8607 | sqlite3_snapshot *p2 |
| 8608 | ); |
| 8609 | |
| 8610 | /* |
| @@ -8658,14 +8659,14 @@ | |
| 8658 | ** Register a geometry callback named zGeom that can be used as part of an |
| 8659 | ** R-Tree geometry query as follows: |
| 8660 | ** |
| 8661 | ** SELECT ... FROM <rtree> WHERE <rtree col> MATCH $zGeom(... params ...) |
| 8662 | */ |
| 8663 | SQLITE_API int SQLITE_APICALL sqlite3_rtree_geometry_callback( |
| 8664 | sqlite3 *db, |
| 8665 | const char *zGeom, |
| 8666 | int (SQLITE_CALLBACK *xGeom)(sqlite3_rtree_geometry*, int, sqlite3_rtree_dbl*,int*), |
| 8667 | void *pContext |
| 8668 | ); |
| 8669 | |
| 8670 | |
| 8671 | /* |
| @@ -8675,25 +8676,25 @@ | |
| 8675 | struct sqlite3_rtree_geometry { |
| 8676 | void *pContext; /* Copy of pContext passed to s_r_g_c() */ |
| 8677 | int nParam; /* Size of array aParam[] */ |
| 8678 | sqlite3_rtree_dbl *aParam; /* Parameters passed to SQL geom function */ |
| 8679 | void *pUser; /* Callback implementation user data */ |
| 8680 | void (SQLITE_CALLBACK *xDelUser)(void *); /* Called by SQLite to clean up pUser */ |
| 8681 | }; |
| 8682 | |
| 8683 | /* |
| 8684 | ** Register a 2nd-generation geometry callback named zScore that can be |
| 8685 | ** used as part of an R-Tree geometry query as follows: |
| 8686 | ** |
| 8687 | ** SELECT ... FROM <rtree> WHERE <rtree col> MATCH $zQueryFunc(... params ...) |
| 8688 | */ |
| 8689 | SQLITE_API int SQLITE_APICALL sqlite3_rtree_query_callback( |
| 8690 | sqlite3 *db, |
| 8691 | const char *zQueryFunc, |
| 8692 | int (SQLITE_CALLBACK *xQueryFunc)(sqlite3_rtree_query_info*), |
| 8693 | void *pContext, |
| 8694 | void (SQLITE_CALLBACK *xDestructor)(void*) |
| 8695 | ); |
| 8696 | |
| 8697 | |
| 8698 | /* |
| 8699 | ** A pointer to a structure of the following type is passed as the |
| @@ -8707,11 +8708,11 @@ | |
| 8707 | struct sqlite3_rtree_query_info { |
| 8708 | void *pContext; /* pContext from when function registered */ |
| 8709 | int nParam; /* Number of function parameters */ |
| 8710 | sqlite3_rtree_dbl *aParam; /* value of function parameters */ |
| 8711 | void *pUser; /* callback can use this, if desired */ |
| 8712 | void (SQLITE_CALLBACK *xDelUser)(void*); /* function to free pUser */ |
| 8713 | sqlite3_rtree_dbl *aCoord; /* Coordinates of node or entry to check */ |
| 8714 | unsigned int *anQueue; /* Number of pending entries in the queue */ |
| 8715 | int nCoord; /* Number of coordinates */ |
| 8716 | int iLevel; /* Level of current node or entry */ |
| 8717 | int mxLevel; /* The largest iLevel value in the tree */ |
| @@ -8903,11 +8904,11 @@ | |
| 8903 | ** If xFilter returns 0, changes is not tracked. Note that once a table is |
| 8904 | ** attached, xFilter will not be called again. |
| 8905 | */ |
| 8906 | void sqlite3session_table_filter( |
| 8907 | sqlite3_session *pSession, /* Session object */ |
| 8908 | int(SQLITE_CALLBACK *xFilter)( |
| 8909 | void *pCtx, /* Copy of third arg to _filter_table() */ |
| 8910 | const char *zTab /* Table name */ |
| 8911 | ), |
| 8912 | void *pCtx /* First argument passed to xFilter */ |
| 8913 | ); |
| @@ -9478,11 +9479,11 @@ | |
| 9478 | ** An sqlite3_changegroup object is used to combine two or more changesets |
| 9479 | ** (or patchsets) into a single changeset (or patchset). A single changegroup |
| 9480 | ** object may combine changesets or patchsets, but not both. The output is |
| 9481 | ** always in the same format as the input. |
| 9482 | ** |
| 9483 | ** If successful, this function returns SQLITE_OK and populates (SQLITE_CALLBACK *pp) with |
| 9484 | ** a pointer to a new sqlite3_changegroup object before returning. The caller |
| 9485 | ** should eventually free the returned object using a call to |
| 9486 | ** sqlite3changegroup_delete(). If an error occurs, an SQLite error code |
| 9487 | ** (i.e. SQLITE_NOMEM) is returned and *pp is set to NULL. |
| 9488 | ** |
| @@ -9598,11 +9599,11 @@ | |
| 9598 | ** changes for tables that do not appear in the first changeset, they are |
| 9599 | ** appended onto the end of the output changeset, again in the order in |
| 9600 | ** which they are first encountered. |
| 9601 | ** |
| 9602 | ** If an error occurs, an SQLite error code is returned and the output |
| 9603 | ** variables (SQLITE_CALLBACK *pnData) and (*ppData) are set to 0. Otherwise, SQLITE_OK |
| 9604 | ** is returned and the output variables are set to the size of and a |
| 9605 | ** pointer to the output buffer, respectively. In this case it is the |
| 9606 | ** responsibility of the caller to eventually free the buffer using a |
| 9607 | ** call to sqlite3_free(). |
| 9608 | */ |
| @@ -9755,15 +9756,15 @@ | |
| 9755 | */ |
| 9756 | int sqlite3changeset_apply( |
| 9757 | sqlite3 *db, /* Apply change to "main" db of this handle */ |
| 9758 | int nChangeset, /* Size of changeset in bytes */ |
| 9759 | void *pChangeset, /* Changeset blob */ |
| 9760 | int(SQLITE_CALLBACK *xFilter)( |
| 9761 | void *pCtx, /* Copy of sixth arg to _apply() */ |
| 9762 | const char *zTab /* Table name */ |
| 9763 | ), |
| 9764 | int(SQLITE_CALLBACK *xConflict)( |
| 9765 | void *pCtx, /* Copy of sixth arg to _apply() */ |
| 9766 | int eConflict, /* DATA, MISSING, CONFLICT, CONSTRAINT */ |
| 9767 | sqlite3_changeset_iter *p /* Handle describing change and conflict */ |
| 9768 | ), |
| 9769 | void *pCtx /* First argument passed to xConflict */ |
| @@ -9900,20 +9901,20 @@ | |
| 9900 | ** </pre> |
| 9901 | ** |
| 9902 | ** Is replaced by: |
| 9903 | ** |
| 9904 | ** <pre> |
| 9905 | ** int (SQLITE_CALLBACK *xInput)(void *pIn, void *pData, int *pnData), |
| 9906 | ** void *pIn, |
| 9907 | ** </pre> |
| 9908 | ** |
| 9909 | ** Each time the xInput callback is invoked by the sessions module, the first |
| 9910 | ** argument passed is a copy of the supplied pIn context pointer. The second |
| 9911 | ** argument, pData, points to a buffer (SQLITE_CALLBACK *pnData) bytes in size. Assuming no |
| 9912 | ** error occurs the xInput method should copy up to (SQLITE_CALLBACK *pnData) bytes of data |
| 9913 | ** into the buffer and set (SQLITE_CALLBACK *pnData) to the actual number of bytes copied |
| 9914 | ** before returning SQLITE_OK. If the input is completely exhausted, (SQLITE_CALLBACK *pnData) |
| 9915 | ** should be set to zero to indicate this. Or, if an error occurs, an SQLite |
| 9916 | ** error code should be returned. In all cases, if an xInput callback returns |
| 9917 | ** an error, all processing is abandoned and the streaming API function |
| 9918 | ** returns a copy of the error code to the caller. |
| 9919 | ** |
| @@ -9934,11 +9935,11 @@ | |
| 9934 | ** </pre> |
| 9935 | ** |
| 9936 | ** Is replaced by: |
| 9937 | ** |
| 9938 | ** <pre> |
| 9939 | ** int (SQLITE_CALLBACK *xOutput)(void *pOut, const void *pData, int nData), |
| 9940 | ** void *pOut |
| 9941 | ** </pre> |
| 9942 | ** |
| 9943 | ** The xOutput callback is invoked zero or more times to return data to |
| 9944 | ** the application. The first parameter passed to each call is a copy of the |
| @@ -9954,58 +9955,58 @@ | |
| 9954 | ** parameter set to a value less than or equal to zero. Other than this, |
| 9955 | ** no guarantees are made as to the size of the chunks of data returned. |
| 9956 | */ |
| 9957 | int sqlite3changeset_apply_strm( |
| 9958 | sqlite3 *db, /* Apply change to "main" db of this handle */ |
| 9959 | int (SQLITE_CALLBACK *xInput)(void *pIn, void *pData, int *pnData), /* Input function */ |
| 9960 | void *pIn, /* First arg for xInput */ |
| 9961 | int(SQLITE_CALLBACK *xFilter)( |
| 9962 | void *pCtx, /* Copy of sixth arg to _apply() */ |
| 9963 | const char *zTab /* Table name */ |
| 9964 | ), |
| 9965 | int(SQLITE_CALLBACK *xConflict)( |
| 9966 | void *pCtx, /* Copy of sixth arg to _apply() */ |
| 9967 | int eConflict, /* DATA, MISSING, CONFLICT, CONSTRAINT */ |
| 9968 | sqlite3_changeset_iter *p /* Handle describing change and conflict */ |
| 9969 | ), |
| 9970 | void *pCtx /* First argument passed to xConflict */ |
| 9971 | ); |
| 9972 | int sqlite3changeset_concat_strm( |
| 9973 | int (SQLITE_CALLBACK *xInputA)(void *pIn, void *pData, int *pnData), |
| 9974 | void *pInA, |
| 9975 | int (SQLITE_CALLBACK *xInputB)(void *pIn, void *pData, int *pnData), |
| 9976 | void *pInB, |
| 9977 | int (SQLITE_CALLBACK *xOutput)(void *pOut, const void *pData, int nData), |
| 9978 | void *pOut |
| 9979 | ); |
| 9980 | int sqlite3changeset_invert_strm( |
| 9981 | int (SQLITE_CALLBACK *xInput)(void *pIn, void *pData, int *pnData), |
| 9982 | void *pIn, |
| 9983 | int (SQLITE_CALLBACK *xOutput)(void *pOut, const void *pData, int nData), |
| 9984 | void *pOut |
| 9985 | ); |
| 9986 | int sqlite3changeset_start_strm( |
| 9987 | sqlite3_changeset_iter **pp, |
| 9988 | int (SQLITE_CALLBACK *xInput)(void *pIn, void *pData, int *pnData), |
| 9989 | void *pIn |
| 9990 | ); |
| 9991 | int sqlite3session_changeset_strm( |
| 9992 | sqlite3_session *pSession, |
| 9993 | int (SQLITE_CALLBACK *xOutput)(void *pOut, const void *pData, int nData), |
| 9994 | void *pOut |
| 9995 | ); |
| 9996 | int sqlite3session_patchset_strm( |
| 9997 | sqlite3_session *pSession, |
| 9998 | int (SQLITE_CALLBACK *xOutput)(void *pOut, const void *pData, int nData), |
| 9999 | void *pOut |
| 10000 | ); |
| 10001 | int sqlite3changegroup_add_strm(sqlite3_changegroup*, |
| 10002 | int (SQLITE_CALLBACK *xInput)(void *pIn, void *pData, int *pnData), |
| 10003 | void *pIn |
| 10004 | ); |
| 10005 | int sqlite3changegroup_output_strm(sqlite3_changegroup*, |
| 10006 | int (SQLITE_CALLBACK *xOutput)(void *pOut, const void *pData, int nData), |
| 10007 | void *pOut |
| 10008 | ); |
| 10009 | |
| 10010 | |
| 10011 | /* |
| @@ -10056,11 +10057,11 @@ | |
| 10056 | |
| 10057 | typedef struct Fts5ExtensionApi Fts5ExtensionApi; |
| 10058 | typedef struct Fts5Context Fts5Context; |
| 10059 | typedef struct Fts5PhraseIter Fts5PhraseIter; |
| 10060 | |
| 10061 | typedef void (SQLITE_CALLBACK *fts5_extension_function)( |
| 10062 | const Fts5ExtensionApi *pApi, /* API offered by current FTS version */ |
| 10063 | Fts5Context *pFts, /* First arg to pass to pApi functions */ |
| 10064 | sqlite3_context *pCtx, /* Context for returning result/error */ |
| 10065 | int nVal, /* Number of values in apVal[] array */ |
| 10066 | sqlite3_value **apVal /* Array of trailing arguments */ |
| @@ -10107,15 +10108,15 @@ | |
| 10107 | ** This function may be quite inefficient if used with an FTS5 table |
| 10108 | ** created with the "columnsize=0" option. |
| 10109 | ** |
| 10110 | ** xColumnText: |
| 10111 | ** This function attempts to retrieve the text of column iCol of the |
| 10112 | ** current document. If successful, (SQLITE_CALLBACK *pz) is set to point to a buffer |
| 10113 | ** containing the text in utf-8 encoding, (SQLITE_CALLBACK *pn) is set to the size in bytes |
| 10114 | ** (not characters) of the buffer and SQLITE_OK is returned. Otherwise, |
| 10115 | ** if an error occurs, an SQLite error code is returned and the final values |
| 10116 | ** of (SQLITE_CALLBACK *pz) and (*pn) are undefined. |
| 10117 | ** |
| 10118 | ** xPhraseCount: |
| 10119 | ** Returns the number of phrases in the current query expression. |
| 10120 | ** |
| 10121 | ** xPhraseSize: |
| @@ -10220,11 +10221,11 @@ | |
| 10220 | ** xRowCount(pFts5, pnRow) |
| 10221 | ** |
| 10222 | ** This function is used to retrieve the total number of rows in the table. |
| 10223 | ** In other words, the same value that would be returned by: |
| 10224 | ** |
| 10225 | ** SELECT count(SQLITE_CALLBACK *) FROM ftstable; |
| 10226 | ** |
| 10227 | ** xPhraseFirst() |
| 10228 | ** This function is used, along with type Fts5PhraseIter and the xPhraseNext |
| 10229 | ** method, to iterate through all instances of a single query phrase within |
| 10230 | ** the current row. This is the same information as is accessible via the |
| @@ -10287,43 +10288,43 @@ | |
| 10287 | ** See xPhraseFirstColumn above. |
| 10288 | */ |
| 10289 | struct Fts5ExtensionApi { |
| 10290 | int iVersion; /* Currently always set to 3 */ |
| 10291 | |
| 10292 | void *(SQLITE_CALLBACK *xUserData)(Fts5Context*); |
| 10293 | |
| 10294 | int (SQLITE_CALLBACK *xColumnCount)(Fts5Context*); |
| 10295 | int (SQLITE_CALLBACK *xRowCount)(Fts5Context*, sqlite3_int64 *pnRow); |
| 10296 | int (SQLITE_CALLBACK *xColumnTotalSize)(Fts5Context*, int iCol, sqlite3_int64 *pnToken); |
| 10297 | |
| 10298 | int (SQLITE_CALLBACK *xTokenize)(Fts5Context*, |
| 10299 | const char *pText, int nText, /* Text to tokenize */ |
| 10300 | void *pCtx, /* Context passed to xToken() */ |
| 10301 | int (SQLITE_CALLBACK *xToken)(void*, int, const char*, int, int, int) /* Callback */ |
| 10302 | ); |
| 10303 | |
| 10304 | int (SQLITE_CALLBACK *xPhraseCount)(Fts5Context*); |
| 10305 | int (SQLITE_CALLBACK *xPhraseSize)(Fts5Context*, int iPhrase); |
| 10306 | |
| 10307 | int (SQLITE_CALLBACK *xInstCount)(Fts5Context*, int *pnInst); |
| 10308 | int (SQLITE_CALLBACK *xInst)(Fts5Context*, int iIdx, int *piPhrase, int *piCol, int *piOff); |
| 10309 | |
| 10310 | sqlite3_int64 (SQLITE_CALLBACK *xRowid)(Fts5Context*); |
| 10311 | int (SQLITE_CALLBACK *xColumnText)(Fts5Context*, int iCol, const char **pz, int *pn); |
| 10312 | int (SQLITE_CALLBACK *xColumnSize)(Fts5Context*, int iCol, int *pnToken); |
| 10313 | |
| 10314 | int (SQLITE_CALLBACK *xQueryPhrase)(Fts5Context*, int iPhrase, void *pUserData, |
| 10315 | int(SQLITE_CALLBACK *)(const Fts5ExtensionApi*,Fts5Context*,void*) |
| 10316 | ); |
| 10317 | int (SQLITE_CALLBACK *xSetAuxdata)(Fts5Context*, void *pAux, void(*xDelete)(void*)); |
| 10318 | void *(SQLITE_CALLBACK *xGetAuxdata)(Fts5Context*, int bClear); |
| 10319 | |
| 10320 | int (SQLITE_CALLBACK *xPhraseFirst)(Fts5Context*, int iPhrase, Fts5PhraseIter*, int*, int*); |
| 10321 | void (SQLITE_CALLBACK *xPhraseNext)(Fts5Context*, Fts5PhraseIter*, int *piCol, int *piOff); |
| 10322 | |
| 10323 | int (SQLITE_CALLBACK *xPhraseFirstColumn)(Fts5Context*, int iPhrase, Fts5PhraseIter*, int*); |
| 10324 | void (SQLITE_CALLBACK *xPhraseNextColumn)(Fts5Context*, Fts5PhraseIter*, int *piCol); |
| 10325 | }; |
| 10326 | |
| 10327 | /* |
| 10328 | ** CUSTOM AUXILIARY FUNCTIONS |
| 10329 | *************************************************************************/ |
| @@ -10347,11 +10348,11 @@ | |
| 10347 | ** The second and third arguments are an array of nul-terminated strings |
| 10348 | ** containing the tokenizer arguments, if any, specified following the |
| 10349 | ** tokenizer name as part of the CREATE VIRTUAL TABLE statement used |
| 10350 | ** to create the FTS5 table. |
| 10351 | ** |
| 10352 | ** The final argument is an output variable. If successful, (SQLITE_CALLBACK *ppOut) |
| 10353 | ** should be set to point to the new tokenizer handle and SQLITE_OK |
| 10354 | ** returned. If an error occurs, some value other than SQLITE_OK should |
| 10355 | ** be returned. In this case, fts5 assumes that the final value of *ppOut |
| 10356 | ** is undefined. |
| 10357 | ** |
| @@ -10521,17 +10522,17 @@ | |
| 10521 | ** inefficient. |
| 10522 | */ |
| 10523 | typedef struct Fts5Tokenizer Fts5Tokenizer; |
| 10524 | typedef struct fts5_tokenizer fts5_tokenizer; |
| 10525 | struct fts5_tokenizer { |
| 10526 | int (SQLITE_CALLBACK *xCreate)(void*, const char **azArg, int nArg, Fts5Tokenizer **ppOut); |
| 10527 | void (SQLITE_CALLBACK *xDelete)(Fts5Tokenizer*); |
| 10528 | int (SQLITE_CALLBACK *xTokenize)(Fts5Tokenizer*, |
| 10529 | void *pCtx, |
| 10530 | int flags, /* Mask of FTS5_TOKENIZE_* flags */ |
| 10531 | const char *pText, int nText, |
| 10532 | int (SQLITE_CALLBACK *xToken)( |
| 10533 | void *pCtx, /* Copy of 2nd argument to xTokenize() */ |
| 10534 | int tflags, /* Mask of FTS5_TOKEN_* flags */ |
| 10535 | const char *pToken, /* Pointer to buffer containing token */ |
| 10536 | int nToken, /* Size of token in bytes */ |
| 10537 | int iStart, /* Byte offset of token within input text */ |
| @@ -10560,33 +10561,33 @@ | |
| 10560 | typedef struct fts5_api fts5_api; |
| 10561 | struct fts5_api { |
| 10562 | int iVersion; /* Currently always set to 2 */ |
| 10563 | |
| 10564 | /* Create a new tokenizer */ |
| 10565 | int (SQLITE_CALLBACK *xCreateTokenizer)( |
| 10566 | fts5_api *pApi, |
| 10567 | const char *zName, |
| 10568 | void *pContext, |
| 10569 | fts5_tokenizer *pTokenizer, |
| 10570 | void (SQLITE_CALLBACK *xDestroy)(void*) |
| 10571 | ); |
| 10572 | |
| 10573 | /* Find an existing tokenizer */ |
| 10574 | int (SQLITE_CALLBACK *xFindTokenizer)( |
| 10575 | fts5_api *pApi, |
| 10576 | const char *zName, |
| 10577 | void **ppContext, |
| 10578 | fts5_tokenizer *pTokenizer |
| 10579 | ); |
| 10580 | |
| 10581 | /* Create a new auxiliary function */ |
| 10582 | int (SQLITE_CALLBACK *xCreateFunction)( |
| 10583 | fts5_api *pApi, |
| 10584 | const char *zName, |
| 10585 | void *pContext, |
| 10586 | fts5_extension_function xFunction, |
| 10587 | void (SQLITE_CALLBACK *xDestroy)(void*) |
| 10588 | ); |
| 10589 | }; |
| 10590 | |
| 10591 | /* |
| 10592 | ** END OF REGISTRATION API |
| @@ -11900,12 +11901,12 @@ | |
| 11900 | */ |
| 11901 | #ifdef SQLITE_OMIT_WSD |
| 11902 | #define SQLITE_WSD const |
| 11903 | #define GLOBAL(t,v) (*(t*)sqlite3_wsd_find((void*)&(v), sizeof(v))) |
| 11904 | #define sqlite3GlobalConfig GLOBAL(struct Sqlite3Config, sqlite3Config) |
| 11905 | SQLITE_API int SQLITE_APICALL sqlite3_wsd_init(int N, int J); |
| 11906 | SQLITE_API void *SQLITE_APICALL sqlite3_wsd_find(void *K, int L); |
| 11907 | #else |
| 11908 | #define SQLITE_WSD |
| 11909 | #define GLOBAL(t,v) v |
| 11910 | #define sqlite3GlobalConfig sqlite3Config |
| 11911 | #endif |
| @@ -17560,11 +17561,11 @@ | |
| 17560 | ** was used and false if not. |
| 17561 | ** |
| 17562 | ** The name can optionally begin with "SQLITE_" but the "SQLITE_" prefix |
| 17563 | ** is not required for a match. |
| 17564 | */ |
| 17565 | SQLITE_API int SQLITE_APICALL sqlite3_compileoption_used(const char *zOptName){ |
| 17566 | int i, n; |
| 17567 | |
| 17568 | #if SQLITE_ENABLE_API_ARMOR |
| 17569 | if( zOptName==0 ){ |
| 17570 | (void)SQLITE_MISUSE_BKPT; |
| @@ -17588,11 +17589,11 @@ | |
| 17588 | |
| 17589 | /* |
| 17590 | ** Return the N-th compile-time option string. If N is out of range, |
| 17591 | ** return a NULL pointer. |
| 17592 | */ |
| 17593 | SQLITE_API const char *SQLITE_APICALL sqlite3_compileoption_get(int N){ |
| 17594 | if( N>=0 && N<ArraySize(azCompileOpt) ){ |
| 17595 | return azCompileOpt[N]; |
| 17596 | } |
| 17597 | return 0; |
| 17598 | } |
| @@ -18298,11 +18299,11 @@ | |
| 18298 | } |
| 18299 | |
| 18300 | /* |
| 18301 | ** Query status information. |
| 18302 | */ |
| 18303 | SQLITE_API int SQLITE_APICALL sqlite3_status64( |
| 18304 | int op, |
| 18305 | sqlite3_int64 *pCurrent, |
| 18306 | sqlite3_int64 *pHighwater, |
| 18307 | int resetFlag |
| 18308 | ){ |
| @@ -18323,11 +18324,11 @@ | |
| 18323 | } |
| 18324 | sqlite3_mutex_leave(pMutex); |
| 18325 | (void)pMutex; /* Prevent warning when SQLITE_THREADSAFE=0 */ |
| 18326 | return SQLITE_OK; |
| 18327 | } |
| 18328 | SQLITE_API int SQLITE_APICALL sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag){ |
| 18329 | sqlite3_int64 iCur = 0, iHwtr = 0; |
| 18330 | int rc; |
| 18331 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 18332 | if( pCurrent==0 || pHighwater==0 ) return SQLITE_MISUSE_BKPT; |
| 18333 | #endif |
| @@ -18340,11 +18341,11 @@ | |
| 18340 | } |
| 18341 | |
| 18342 | /* |
| 18343 | ** Query status information for a single database connection |
| 18344 | */ |
| 18345 | SQLITE_API int SQLITE_APICALL sqlite3_db_status( |
| 18346 | sqlite3 *db, /* The database connection whose status is desired */ |
| 18347 | int op, /* Status verb */ |
| 18348 | int *pCurrent, /* Write current value here */ |
| 18349 | int *pHighwater, /* Write high-water mark here */ |
| 18350 | int resetFlag /* Reset high-water mark if true */ |
| @@ -19632,11 +19633,10 @@ | |
| 19632 | int argc, |
| 19633 | sqlite3_value **argv |
| 19634 | ){ |
| 19635 | time_t t; |
| 19636 | char *zFormat = (char *)sqlite3_user_data(context); |
| 19637 | sqlite3 *db; |
| 19638 | sqlite3_int64 iT; |
| 19639 | struct tm *pTm; |
| 19640 | struct tm sNow; |
| 19641 | char zBuf[20]; |
| 19642 | |
| @@ -20018,11 +20018,11 @@ | |
| 20018 | |
| 20019 | /* |
| 20020 | ** Locate a VFS by name. If no name is given, simply return the |
| 20021 | ** first VFS on the list. |
| 20022 | */ |
| 20023 | SQLITE_API sqlite3_vfs *SQLITE_APICALL sqlite3_vfs_find(const char *zVfs){ |
| 20024 | sqlite3_vfs *pVfs = 0; |
| 20025 | #if SQLITE_THREADSAFE |
| 20026 | sqlite3_mutex *mutex; |
| 20027 | #endif |
| 20028 | #ifndef SQLITE_OMIT_AUTOINIT |
| @@ -20064,11 +20064,11 @@ | |
| 20064 | /* |
| 20065 | ** Register a VFS with the system. It is harmless to register the same |
| 20066 | ** VFS multiple times. The new VFS becomes the default if makeDflt is |
| 20067 | ** true. |
| 20068 | */ |
| 20069 | SQLITE_API int SQLITE_APICALL sqlite3_vfs_register(sqlite3_vfs *pVfs, int makeDflt){ |
| 20070 | MUTEX_LOGIC(sqlite3_mutex *mutex;) |
| 20071 | #ifndef SQLITE_OMIT_AUTOINIT |
| 20072 | int rc = sqlite3_initialize(); |
| 20073 | if( rc ) return rc; |
| 20074 | #endif |
| @@ -20092,11 +20092,11 @@ | |
| 20092 | } |
| 20093 | |
| 20094 | /* |
| 20095 | ** Unregister a VFS so that it is no longer accessible. |
| 20096 | */ |
| 20097 | SQLITE_API int SQLITE_APICALL sqlite3_vfs_unregister(sqlite3_vfs *pVfs){ |
| 20098 | #if SQLITE_THREADSAFE |
| 20099 | sqlite3_mutex *mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER); |
| 20100 | #endif |
| 20101 | sqlite3_mutex_enter(mutex); |
| 20102 | vfsUnlink(pVfs); |
| @@ -22443,11 +22443,11 @@ | |
| 22443 | } |
| 22444 | |
| 22445 | /* |
| 22446 | ** Retrieve a pointer to a static mutex or allocate a new dynamic one. |
| 22447 | */ |
| 22448 | SQLITE_API sqlite3_mutex *SQLITE_APICALL sqlite3_mutex_alloc(int id){ |
| 22449 | #ifndef SQLITE_OMIT_AUTOINIT |
| 22450 | if( id<=SQLITE_MUTEX_RECURSIVE && sqlite3_initialize() ) return 0; |
| 22451 | if( id>SQLITE_MUTEX_RECURSIVE && sqlite3MutexInit() ) return 0; |
| 22452 | #endif |
| 22453 | assert( sqlite3GlobalConfig.mutex.xMutexAlloc ); |
| @@ -22464,11 +22464,11 @@ | |
| 22464 | } |
| 22465 | |
| 22466 | /* |
| 22467 | ** Free a dynamic mutex. |
| 22468 | */ |
| 22469 | SQLITE_API void SQLITE_APICALL sqlite3_mutex_free(sqlite3_mutex *p){ |
| 22470 | if( p ){ |
| 22471 | assert( sqlite3GlobalConfig.mutex.xMutexFree ); |
| 22472 | sqlite3GlobalConfig.mutex.xMutexFree(p); |
| 22473 | } |
| 22474 | } |
| @@ -22475,11 +22475,11 @@ | |
| 22475 | |
| 22476 | /* |
| 22477 | ** Obtain the mutex p. If some other thread already has the mutex, block |
| 22478 | ** until it can be obtained. |
| 22479 | */ |
| 22480 | SQLITE_API void SQLITE_APICALL sqlite3_mutex_enter(sqlite3_mutex *p){ |
| 22481 | if( p ){ |
| 22482 | assert( sqlite3GlobalConfig.mutex.xMutexEnter ); |
| 22483 | sqlite3GlobalConfig.mutex.xMutexEnter(p); |
| 22484 | } |
| 22485 | } |
| @@ -22486,11 +22486,11 @@ | |
| 22486 | |
| 22487 | /* |
| 22488 | ** Obtain the mutex p. If successful, return SQLITE_OK. Otherwise, if another |
| 22489 | ** thread holds the mutex and it cannot be obtained, return SQLITE_BUSY. |
| 22490 | */ |
| 22491 | SQLITE_API int SQLITE_APICALL sqlite3_mutex_try(sqlite3_mutex *p){ |
| 22492 | int rc = SQLITE_OK; |
| 22493 | if( p ){ |
| 22494 | assert( sqlite3GlobalConfig.mutex.xMutexTry ); |
| 22495 | return sqlite3GlobalConfig.mutex.xMutexTry(p); |
| 22496 | } |
| @@ -22501,11 +22501,11 @@ | |
| 22501 | ** The sqlite3_mutex_leave() routine exits a mutex that was previously |
| 22502 | ** entered by the same thread. The behavior is undefined if the mutex |
| 22503 | ** is not currently entered. If a NULL pointer is passed as an argument |
| 22504 | ** this function is a no-op. |
| 22505 | */ |
| 22506 | SQLITE_API void SQLITE_APICALL sqlite3_mutex_leave(sqlite3_mutex *p){ |
| 22507 | if( p ){ |
| 22508 | assert( sqlite3GlobalConfig.mutex.xMutexLeave ); |
| 22509 | sqlite3GlobalConfig.mutex.xMutexLeave(p); |
| 22510 | } |
| 22511 | } |
| @@ -22513,15 +22513,15 @@ | |
| 22513 | #ifndef NDEBUG |
| 22514 | /* |
| 22515 | ** The sqlite3_mutex_held() and sqlite3_mutex_notheld() routine are |
| 22516 | ** intended for use inside assert() statements. |
| 22517 | */ |
| 22518 | SQLITE_API int SQLITE_APICALL sqlite3_mutex_held(sqlite3_mutex *p){ |
| 22519 | assert( p==0 || sqlite3GlobalConfig.mutex.xMutexHeld ); |
| 22520 | return p==0 || sqlite3GlobalConfig.mutex.xMutexHeld(p); |
| 22521 | } |
| 22522 | SQLITE_API int SQLITE_APICALL sqlite3_mutex_notheld(sqlite3_mutex *p){ |
| 22523 | assert( p==0 || sqlite3GlobalConfig.mutex.xMutexNotheld ); |
| 22524 | return p==0 || sqlite3GlobalConfig.mutex.xMutexNotheld(p); |
| 22525 | } |
| 22526 | #endif |
| 22527 | |
| @@ -23549,12 +23549,12 @@ | |
| 23549 | ** of the sqlite3_initialize() and sqlite3_shutdown() processing, the |
| 23550 | ** "interlocked" magic used here is probably not strictly necessary. |
| 23551 | */ |
| 23552 | static LONG SQLITE_WIN32_VOLATILE winMutex_lock = 0; |
| 23553 | |
| 23554 | SQLITE_API int SQLITE_APICALL sqlite3_win32_is_nt(void); /* os_win.c */ |
| 23555 | SQLITE_API void SQLITE_APICALL sqlite3_win32_sleep(DWORD milliseconds); /* os_win.c */ |
| 23556 | |
| 23557 | static int winMutexInit(void){ |
| 23558 | /* The first to increment to 1 does actual initialization */ |
| 23559 | if( InterlockedCompareExchange(&winMutex_lock, 1, 0)==0 ){ |
| 23560 | int i; |
| @@ -23850,11 +23850,11 @@ | |
| 23850 | /* |
| 23851 | ** Attempt to release up to n bytes of non-essential memory currently |
| 23852 | ** held by SQLite. An example of non-essential memory is memory used to |
| 23853 | ** cache database pages that are not currently in use. |
| 23854 | */ |
| 23855 | SQLITE_API int SQLITE_APICALL sqlite3_release_memory(int n){ |
| 23856 | #ifdef SQLITE_ENABLE_MEMORY_MANAGEMENT |
| 23857 | return sqlite3PcacheReleaseMemory(n); |
| 23858 | #else |
| 23859 | /* IMPLEMENTATION-OF: R-34391-24921 The sqlite3_release_memory() routine |
| 23860 | ** is a no-op returning zero if SQLite is not compiled with |
| @@ -23909,11 +23909,11 @@ | |
| 23909 | /* |
| 23910 | ** Deprecated external interface. It used to set an alarm callback |
| 23911 | ** that was invoked when memory usage grew too large. Now it is a |
| 23912 | ** no-op. |
| 23913 | */ |
| 23914 | SQLITE_API int SQLITE_APICALL sqlite3_memory_alarm( |
| 23915 | void(*xCallback)(void *pArg, sqlite3_int64 used,int N), |
| 23916 | void *pArg, |
| 23917 | sqlite3_int64 iThreshold |
| 23918 | ){ |
| 23919 | (void)xCallback; |
| @@ -23925,11 +23925,11 @@ | |
| 23925 | |
| 23926 | /* |
| 23927 | ** Set the soft heap-size limit for the library. Passing a zero or |
| 23928 | ** negative value indicates no limit. |
| 23929 | */ |
| 23930 | SQLITE_API sqlite3_int64 SQLITE_APICALL sqlite3_soft_heap_limit64(sqlite3_int64 n){ |
| 23931 | sqlite3_int64 priorLimit; |
| 23932 | sqlite3_int64 excess; |
| 23933 | sqlite3_int64 nUsed; |
| 23934 | #ifndef SQLITE_OMIT_AUTOINIT |
| 23935 | int rc = sqlite3_initialize(); |
| @@ -23947,11 +23947,11 @@ | |
| 23947 | sqlite3_mutex_leave(mem0.mutex); |
| 23948 | excess = sqlite3_memory_used() - n; |
| 23949 | if( excess>0 ) sqlite3_release_memory((int)(excess & 0x7fffffff)); |
| 23950 | return priorLimit; |
| 23951 | } |
| 23952 | SQLITE_API void SQLITE_APICALL sqlite3_soft_heap_limit(int n){ |
| 23953 | if( n<0 ) n = 0; |
| 23954 | sqlite3_soft_heap_limit64(n); |
| 23955 | } |
| 23956 | |
| 23957 | /* |
| @@ -24016,11 +24016,11 @@ | |
| 24016 | } |
| 24017 | |
| 24018 | /* |
| 24019 | ** Return the amount of memory currently checked out. |
| 24020 | */ |
| 24021 | SQLITE_API sqlite3_int64 SQLITE_APICALL sqlite3_memory_used(void){ |
| 24022 | sqlite3_int64 res, mx; |
| 24023 | sqlite3_status64(SQLITE_STATUS_MEMORY_USED, &res, &mx, 0); |
| 24024 | return res; |
| 24025 | } |
| 24026 | |
| @@ -24027,11 +24027,11 @@ | |
| 24027 | /* |
| 24028 | ** Return the maximum amount of memory that has ever been |
| 24029 | ** checked out since either the beginning of this process |
| 24030 | ** or since the most recent reset. |
| 24031 | */ |
| 24032 | SQLITE_API sqlite3_int64 SQLITE_APICALL sqlite3_memory_highwater(int resetFlag){ |
| 24033 | sqlite3_int64 res, mx; |
| 24034 | sqlite3_status64(SQLITE_STATUS_MEMORY_USED, &res, &mx, resetFlag); |
| 24035 | return mx; |
| 24036 | } |
| 24037 | |
| @@ -24107,17 +24107,17 @@ | |
| 24107 | /* |
| 24108 | ** This version of the memory allocation is for use by the application. |
| 24109 | ** First make sure the memory subsystem is initialized, then do the |
| 24110 | ** allocation. |
| 24111 | */ |
| 24112 | SQLITE_API void *SQLITE_APICALL sqlite3_malloc(int n){ |
| 24113 | #ifndef SQLITE_OMIT_AUTOINIT |
| 24114 | if( sqlite3_initialize() ) return 0; |
| 24115 | #endif |
| 24116 | return n<=0 ? 0 : sqlite3Malloc(n); |
| 24117 | } |
| 24118 | SQLITE_API void *SQLITE_APICALL sqlite3_malloc64(sqlite3_uint64 n){ |
| 24119 | #ifndef SQLITE_OMIT_AUTOINIT |
| 24120 | if( sqlite3_initialize() ) return 0; |
| 24121 | #endif |
| 24122 | return sqlite3Malloc(n); |
| 24123 | } |
| @@ -24256,20 +24256,20 @@ | |
| 24256 | }else{ |
| 24257 | assert( sqlite3_mutex_held(db->mutex) ); |
| 24258 | return db->lookaside.sz; |
| 24259 | } |
| 24260 | } |
| 24261 | SQLITE_API sqlite3_uint64 SQLITE_APICALL sqlite3_msize(void *p){ |
| 24262 | assert( sqlite3MemdebugNoType(p, (u8)~MEMTYPE_HEAP) ); |
| 24263 | assert( sqlite3MemdebugHasType(p, MEMTYPE_HEAP) ); |
| 24264 | return p ? sqlite3GlobalConfig.m.xSize(p) : 0; |
| 24265 | } |
| 24266 | |
| 24267 | /* |
| 24268 | ** Free memory previously obtained from sqlite3Malloc(). |
| 24269 | */ |
| 24270 | SQLITE_API void SQLITE_APICALL sqlite3_free(void *p){ |
| 24271 | if( p==0 ) return; /* IMP: R-49053-54554 */ |
| 24272 | assert( sqlite3MemdebugHasType(p, MEMTYPE_HEAP) ); |
| 24273 | assert( sqlite3MemdebugNoType(p, (u8)~MEMTYPE_HEAP) ); |
| 24274 | if( sqlite3GlobalConfig.bMemstat ){ |
| 24275 | sqlite3_mutex_enter(mem0.mutex); |
| @@ -24374,18 +24374,18 @@ | |
| 24374 | |
| 24375 | /* |
| 24376 | ** The public interface to sqlite3Realloc. Make sure that the memory |
| 24377 | ** subsystem is initialized prior to invoking sqliteRealloc. |
| 24378 | */ |
| 24379 | SQLITE_API void *SQLITE_APICALL sqlite3_realloc(void *pOld, int n){ |
| 24380 | #ifndef SQLITE_OMIT_AUTOINIT |
| 24381 | if( sqlite3_initialize() ) return 0; |
| 24382 | #endif |
| 24383 | if( n<0 ) n = 0; /* IMP: R-26507-47431 */ |
| 24384 | return sqlite3Realloc(pOld, n); |
| 24385 | } |
| 24386 | SQLITE_API void *SQLITE_APICALL sqlite3_realloc64(void *pOld, sqlite3_uint64 n){ |
| 24387 | #ifndef SQLITE_OMIT_AUTOINIT |
| 24388 | if( sqlite3_initialize() ) return 0; |
| 24389 | #endif |
| 24390 | return sqlite3Realloc(pOld, n); |
| 24391 | } |
| @@ -25608,11 +25608,11 @@ | |
| 25608 | |
| 25609 | /* |
| 25610 | ** Print into memory obtained from sqlite3_malloc(). Omit the internal |
| 25611 | ** %-conversion extensions. |
| 25612 | */ |
| 25613 | SQLITE_API char *SQLITE_APICALL sqlite3_vmprintf(const char *zFormat, va_list ap){ |
| 25614 | char *z; |
| 25615 | char zBase[SQLITE_PRINT_BUF_SIZE]; |
| 25616 | StrAccum acc; |
| 25617 | |
| 25618 | #ifdef SQLITE_ENABLE_API_ARMOR |
| @@ -25657,11 +25657,11 @@ | |
| 25657 | ** this without breaking compatibility, so we just have to live with the |
| 25658 | ** mistake. |
| 25659 | ** |
| 25660 | ** sqlite3_vsnprintf() is the varargs version. |
| 25661 | */ |
| 25662 | SQLITE_API char *SQLITE_APICALL sqlite3_vsnprintf(int n, char *zBuf, const char *zFormat, va_list ap){ |
| 25663 | StrAccum acc; |
| 25664 | if( n<=0 ) return zBuf; |
| 25665 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 25666 | if( zBuf==0 || zFormat==0 ) { |
| 25667 | (void)SQLITE_MISUSE_BKPT; |
| @@ -26284,11 +26284,11 @@ | |
| 26284 | } sqlite3Prng; |
| 26285 | |
| 26286 | /* |
| 26287 | ** Return N random bytes. |
| 26288 | */ |
| 26289 | SQLITE_API void SQLITE_APICALL sqlite3_randomness(int N, void *pBuf){ |
| 26290 | unsigned char t; |
| 26291 | unsigned char *zBuf = pBuf; |
| 26292 | |
| 26293 | /* The "wsdPrng" macro will resolve to the pseudo-random number generator |
| 26294 | ** state vector. If writable static data is unsupported on the target, |
| @@ -27487,11 +27487,11 @@ | |
| 27487 | ** sqlite3_strnicmp() APIs allow applications and extensions to compare |
| 27488 | ** the contents of two buffers containing UTF-8 strings in a |
| 27489 | ** case-independent fashion, using the same definition of "case |
| 27490 | ** independence" that SQLite uses internally when comparing identifiers. |
| 27491 | */ |
| 27492 | SQLITE_API int SQLITE_APICALL sqlite3_stricmp(const char *zLeft, const char *zRight){ |
| 27493 | if( zLeft==0 ){ |
| 27494 | return zRight ? -1 : 0; |
| 27495 | }else if( zRight==0 ){ |
| 27496 | return 1; |
| 27497 | } |
| @@ -27508,11 +27508,11 @@ | |
| 27508 | a++; |
| 27509 | b++; |
| 27510 | } |
| 27511 | return c; |
| 27512 | } |
| 27513 | SQLITE_API int SQLITE_APICALL sqlite3_strnicmp(const char *zLeft, const char *zRight, int N){ |
| 27514 | register unsigned char *a, *b; |
| 27515 | if( zLeft==0 ){ |
| 27516 | return zRight ? -1 : 0; |
| 27517 | }else if( zRight==0 ){ |
| 27518 | return 1; |
| @@ -36807,11 +36807,11 @@ | |
| 36807 | ** This routine is called once during SQLite initialization and by a |
| 36808 | ** single thread. The memory allocation and mutex subsystems have not |
| 36809 | ** necessarily been initialized when this routine is called, and so they |
| 36810 | ** should not be used. |
| 36811 | */ |
| 36812 | SQLITE_API int SQLITE_APICALL sqlite3_os_init(void){ |
| 36813 | /* |
| 36814 | ** The following macro defines an initializer for an sqlite3_vfs object. |
| 36815 | ** The name of the VFS is NAME. The pAppData is a pointer to a pointer |
| 36816 | ** to the "finder" function. (pAppData is a pointer to a pointer because |
| 36817 | ** silly C90 rules prohibit a void* from being cast to a function pointer |
| @@ -36906,11 +36906,11 @@ | |
| 36906 | ** |
| 36907 | ** Some operating systems might need to do some cleanup in this routine, |
| 36908 | ** to release dynamically allocated objects. But not on unix. |
| 36909 | ** This routine is a no-op for unix. |
| 36910 | */ |
| 36911 | SQLITE_API int SQLITE_APICALL sqlite3_os_end(void){ |
| 36912 | return SQLITE_OK; |
| 36913 | } |
| 36914 | |
| 36915 | #endif /* SQLITE_OS_UNIX */ |
| 36916 | |
| @@ -38341,11 +38341,11 @@ | |
| 38341 | ** compact it. Upon success, SQLITE_OK will be returned. Upon failure, one |
| 38342 | ** of SQLITE_NOMEM, SQLITE_ERROR, or SQLITE_NOTFOUND will be returned. The |
| 38343 | ** "pnLargest" argument, if non-zero, will be used to return the size of the |
| 38344 | ** largest committed free block in the heap, in bytes. |
| 38345 | */ |
| 38346 | SQLITE_API int SQLITE_APICALL sqlite3_win32_compact_heap(LPUINT pnLargest){ |
| 38347 | int rc = SQLITE_OK; |
| 38348 | UINT nLargest = 0; |
| 38349 | HANDLE hHeap; |
| 38350 | |
| 38351 | winMemAssertMagic(); |
| @@ -38381,11 +38381,11 @@ | |
| 38381 | ** If a Win32 native heap has been configured, this function will attempt to |
| 38382 | ** destroy and recreate it. If the Win32 native heap is not isolated and/or |
| 38383 | ** the sqlite3_memory_used() function does not return zero, SQLITE_BUSY will |
| 38384 | ** be returned and no changes will be made to the Win32 native heap. |
| 38385 | */ |
| 38386 | SQLITE_API int SQLITE_APICALL sqlite3_win32_reset_heap(){ |
| 38387 | int rc; |
| 38388 | MUTEX_LOGIC( sqlite3_mutex *pMaster; ) /* The main static mutex */ |
| 38389 | MUTEX_LOGIC( sqlite3_mutex *pMem; ) /* The memsys static mutex */ |
| 38390 | MUTEX_LOGIC( pMaster = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER); ) |
| 38391 | MUTEX_LOGIC( pMem = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MEM); ) |
| @@ -38426,11 +38426,11 @@ | |
| 38426 | /* |
| 38427 | ** This function outputs the specified (ANSI) string to the Win32 debugger |
| 38428 | ** (if available). |
| 38429 | */ |
| 38430 | |
| 38431 | SQLITE_API void SQLITE_APICALL sqlite3_win32_write_debug(const char *zBuf, int nBuf){ |
| 38432 | char zDbgBuf[SQLITE_WIN32_DBG_BUF_SIZE]; |
| 38433 | int nMin = MIN(nBuf, (SQLITE_WIN32_DBG_BUF_SIZE - 1)); /* may be negative. */ |
| 38434 | if( nMin<-1 ) nMin = -1; /* all negative values become -1. */ |
| 38435 | assert( nMin==-1 || nMin==0 || nMin<SQLITE_WIN32_DBG_BUF_SIZE ); |
| 38436 | #ifdef SQLITE_ENABLE_API_ARMOR |
| @@ -38472,11 +38472,11 @@ | |
| 38472 | */ |
| 38473 | #if SQLITE_OS_WINRT |
| 38474 | static HANDLE sleepObj = NULL; |
| 38475 | #endif |
| 38476 | |
| 38477 | SQLITE_API void SQLITE_APICALL sqlite3_win32_sleep(DWORD milliseconds){ |
| 38478 | #if SQLITE_OS_WINRT |
| 38479 | if ( sleepObj==NULL ){ |
| 38480 | sleepObj = osCreateEventExW(NULL, NULL, CREATE_EVENT_MANUAL_RESET, |
| 38481 | SYNCHRONIZE); |
| 38482 | } |
| @@ -38521,11 +38521,11 @@ | |
| 38521 | |
| 38522 | /* |
| 38523 | ** This function determines if the machine is running a version of Windows |
| 38524 | ** based on the NT kernel. |
| 38525 | */ |
| 38526 | SQLITE_API int SQLITE_APICALL sqlite3_win32_is_nt(void){ |
| 38527 | #if SQLITE_OS_WINRT |
| 38528 | /* |
| 38529 | ** NOTE: The WinRT sub-platform is always assumed to be based on the NT |
| 38530 | ** kernel. |
| 38531 | */ |
| @@ -38909,11 +38909,11 @@ | |
| 38909 | } |
| 38910 | |
| 38911 | /* |
| 38912 | ** This is a public wrapper for the winUtf8ToUnicode() function. |
| 38913 | */ |
| 38914 | SQLITE_API LPWSTR SQLITE_APICALL sqlite3_win32_utf8_to_unicode(const char *zText){ |
| 38915 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 38916 | if( !zText ){ |
| 38917 | (void)SQLITE_MISUSE_BKPT; |
| 38918 | return 0; |
| 38919 | } |
| @@ -38925,11 +38925,11 @@ | |
| 38925 | } |
| 38926 | |
| 38927 | /* |
| 38928 | ** This is a public wrapper for the winUnicodeToUtf8() function. |
| 38929 | */ |
| 38930 | SQLITE_API char *SQLITE_APICALL sqlite3_win32_unicode_to_utf8(LPCWSTR zWideText){ |
| 38931 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 38932 | if( !zWideText ){ |
| 38933 | (void)SQLITE_MISUSE_BKPT; |
| 38934 | return 0; |
| 38935 | } |
| @@ -38941,11 +38941,11 @@ | |
| 38941 | } |
| 38942 | |
| 38943 | /* |
| 38944 | ** This is a public wrapper for the winMbcsToUtf8() function. |
| 38945 | */ |
| 38946 | SQLITE_API char *SQLITE_APICALL sqlite3_win32_mbcs_to_utf8(const char *zText){ |
| 38947 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 38948 | if( !zText ){ |
| 38949 | (void)SQLITE_MISUSE_BKPT; |
| 38950 | return 0; |
| 38951 | } |
| @@ -38957,11 +38957,11 @@ | |
| 38957 | } |
| 38958 | |
| 38959 | /* |
| 38960 | ** This is a public wrapper for the winMbcsToUtf8() function. |
| 38961 | */ |
| 38962 | SQLITE_API char *SQLITE_APICALL sqlite3_win32_mbcs_to_utf8_v2(const char *zText, int useAnsi){ |
| 38963 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 38964 | if( !zText ){ |
| 38965 | (void)SQLITE_MISUSE_BKPT; |
| 38966 | return 0; |
| 38967 | } |
| @@ -38973,11 +38973,11 @@ | |
| 38973 | } |
| 38974 | |
| 38975 | /* |
| 38976 | ** This is a public wrapper for the winUtf8ToMbcs() function. |
| 38977 | */ |
| 38978 | SQLITE_API char *SQLITE_APICALL sqlite3_win32_utf8_to_mbcs(const char *zText){ |
| 38979 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 38980 | if( !zText ){ |
| 38981 | (void)SQLITE_MISUSE_BKPT; |
| 38982 | return 0; |
| 38983 | } |
| @@ -38989,11 +38989,11 @@ | |
| 38989 | } |
| 38990 | |
| 38991 | /* |
| 38992 | ** This is a public wrapper for the winUtf8ToMbcs() function. |
| 38993 | */ |
| 38994 | SQLITE_API char *SQLITE_APICALL sqlite3_win32_utf8_to_mbcs_v2(const char *zText, int useAnsi){ |
| 38995 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 38996 | if( !zText ){ |
| 38997 | (void)SQLITE_MISUSE_BKPT; |
| 38998 | return 0; |
| 38999 | } |
| @@ -39009,11 +39009,11 @@ | |
| 39009 | ** the provided arguments. The type argument must be 1 in order to set the |
| 39010 | ** data directory or 2 in order to set the temporary directory. The zValue |
| 39011 | ** argument is the name of the directory to use. The return value will be |
| 39012 | ** SQLITE_OK if successful. |
| 39013 | */ |
| 39014 | SQLITE_API int SQLITE_APICALL sqlite3_win32_set_directory(DWORD type, LPCWSTR zValue){ |
| 39015 | char **ppDirectory = 0; |
| 39016 | #ifndef SQLITE_OMIT_AUTOINIT |
| 39017 | int rc = sqlite3_initialize(); |
| 39018 | if( rc ) return rc; |
| 39019 | #endif |
| @@ -42927,11 +42927,11 @@ | |
| 42927 | } |
| 42928 | |
| 42929 | /* |
| 42930 | ** Initialize and deinitialize the operating system interface. |
| 42931 | */ |
| 42932 | SQLITE_API int SQLITE_APICALL sqlite3_os_init(void){ |
| 42933 | static sqlite3_vfs winVfs = { |
| 42934 | 3, /* iVersion */ |
| 42935 | sizeof(winFile), /* szOsFile */ |
| 42936 | SQLITE_WIN32_MAX_PATH_BYTES, /* mxPathname */ |
| 42937 | 0, /* pNext */ |
| @@ -43058,11 +43058,11 @@ | |
| 43058 | #endif |
| 43059 | |
| 43060 | return SQLITE_OK; |
| 43061 | } |
| 43062 | |
| 43063 | SQLITE_API int SQLITE_APICALL sqlite3_os_end(void){ |
| 43064 | #if SQLITE_OS_WINRT |
| 43065 | if( sleepObj!=NULL ){ |
| 43066 | osCloseHandle(sleepObj); |
| 43067 | sleepObj = NULL; |
| 43068 | } |
| @@ -57053,11 +57053,11 @@ | |
| 57053 | |
| 57054 | /* |
| 57055 | ** Return a +ve value if snapshot p1 is newer than p2. A -ve value if |
| 57056 | ** p1 is older than p2 and zero if p1 and p2 are the same snapshot. |
| 57057 | */ |
| 57058 | SQLITE_API int SQLITE_APICALL sqlite3_snapshot_cmp(sqlite3_snapshot *p1, sqlite3_snapshot *p2){ |
| 57059 | WalIndexHdr *pHdr1 = (WalIndexHdr*)p1; |
| 57060 | WalIndexHdr *pHdr2 = (WalIndexHdr*)p2; |
| 57061 | |
| 57062 | /* aSalt[0] is a copy of the value stored in the wal file header. It |
| 57063 | ** is incremented each time the wal file is restarted. */ |
| @@ -58190,11 +58190,11 @@ | |
| 58190 | ** |
| 58191 | ** This routine has no effect on existing database connections. |
| 58192 | ** The shared cache setting effects only future calls to |
| 58193 | ** sqlite3_open(), sqlite3_open16(), or sqlite3_open_v2(). |
| 58194 | */ |
| 58195 | SQLITE_API int SQLITE_APICALL sqlite3_enable_shared_cache(int enable){ |
| 58196 | sqlite3GlobalConfig.sharedCacheEnabled = enable; |
| 58197 | return SQLITE_OK; |
| 58198 | } |
| 58199 | #endif |
| 58200 | |
| @@ -64489,11 +64489,11 @@ | |
| 64489 | } |
| 64490 | } |
| 64491 | |
| 64492 | /* |
| 64493 | ** A CellArray object contains a cache of pointers and sizes for a |
| 64494 | ** consecutive sequence of cells that might be held multiple pages. |
| 64495 | */ |
| 64496 | typedef struct CellArray CellArray; |
| 64497 | struct CellArray { |
| 64498 | int nCell; /* Number of cells in apCell[] */ |
| 64499 | MemPage *pRef; /* Reference page */ |
| @@ -67963,11 +67963,11 @@ | |
| 67963 | ** a pointer to the new sqlite3_backup object. |
| 67964 | ** |
| 67965 | ** If an error occurs, NULL is returned and an error code and error message |
| 67966 | ** stored in database handle pDestDb. |
| 67967 | */ |
| 67968 | SQLITE_API sqlite3_backup *SQLITE_APICALL sqlite3_backup_init( |
| 67969 | sqlite3* pDestDb, /* Database to write to */ |
| 67970 | const char *zDestDb, /* Name of database within pDestDb */ |
| 67971 | sqlite3* pSrcDb, /* Database connection to read from */ |
| 67972 | const char *zSrcDb /* Name of database within pSrcDb */ |
| 67973 | ){ |
| @@ -68171,11 +68171,11 @@ | |
| 68171 | } |
| 68172 | |
| 68173 | /* |
| 68174 | ** Copy nPage pages from the source b-tree to the destination. |
| 68175 | */ |
| 68176 | SQLITE_API int SQLITE_APICALL sqlite3_backup_step(sqlite3_backup *p, int nPage){ |
| 68177 | int rc; |
| 68178 | int destMode; /* Destination journal mode */ |
| 68179 | int pgszSrc = 0; /* Source page size */ |
| 68180 | int pgszDest = 0; /* Destination page size */ |
| 68181 | |
| @@ -68415,11 +68415,11 @@ | |
| 68415 | } |
| 68416 | |
| 68417 | /* |
| 68418 | ** Release all resources associated with an sqlite3_backup* handle. |
| 68419 | */ |
| 68420 | SQLITE_API int SQLITE_APICALL sqlite3_backup_finish(sqlite3_backup *p){ |
| 68421 | sqlite3_backup **pp; /* Ptr to head of pagers backup list */ |
| 68422 | sqlite3 *pSrcDb; /* Source database connection */ |
| 68423 | int rc; /* Value to return */ |
| 68424 | |
| 68425 | /* Enter the mutexes */ |
| @@ -68467,11 +68467,11 @@ | |
| 68467 | |
| 68468 | /* |
| 68469 | ** Return the number of pages still to be backed up as of the most recent |
| 68470 | ** call to sqlite3_backup_step(). |
| 68471 | */ |
| 68472 | SQLITE_API int SQLITE_APICALL sqlite3_backup_remaining(sqlite3_backup *p){ |
| 68473 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 68474 | if( p==0 ){ |
| 68475 | (void)SQLITE_MISUSE_BKPT; |
| 68476 | return 0; |
| 68477 | } |
| @@ -68481,11 +68481,11 @@ | |
| 68481 | |
| 68482 | /* |
| 68483 | ** Return the total number of pages in the source database as of the most |
| 68484 | ** recent call to sqlite3_backup_step(). |
| 68485 | */ |
| 68486 | SQLITE_API int SQLITE_APICALL sqlite3_backup_pagecount(sqlite3_backup *p){ |
| 68487 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 68488 | if( p==0 ){ |
| 68489 | (void)SQLITE_MISUSE_BKPT; |
| 68490 | return 0; |
| 68491 | } |
| @@ -74935,11 +74935,11 @@ | |
| 74935 | ** execution environment changes in a way that would alter the program |
| 74936 | ** that sqlite3_prepare() generates. For example, if new functions or |
| 74937 | ** collating sequences are registered or if an authorizer function is |
| 74938 | ** added or changed. |
| 74939 | */ |
| 74940 | SQLITE_API int SQLITE_APICALL sqlite3_expired(sqlite3_stmt *pStmt){ |
| 74941 | Vdbe *p = (Vdbe*)pStmt; |
| 74942 | return p==0 || p->expired; |
| 74943 | } |
| 74944 | #endif |
| 74945 | |
| @@ -75004,11 +75004,11 @@ | |
| 75004 | ** machine. |
| 75005 | ** |
| 75006 | ** This routine sets the error code and string returned by |
| 75007 | ** sqlite3_errcode(), sqlite3_errmsg() and sqlite3_errmsg16(). |
| 75008 | */ |
| 75009 | SQLITE_API int SQLITE_APICALL sqlite3_finalize(sqlite3_stmt *pStmt){ |
| 75010 | int rc; |
| 75011 | if( pStmt==0 ){ |
| 75012 | /* IMPLEMENTATION-OF: R-57228-12904 Invoking sqlite3_finalize() on a NULL |
| 75013 | ** pointer is a harmless no-op. */ |
| 75014 | rc = SQLITE_OK; |
| @@ -75031,11 +75031,11 @@ | |
| 75031 | ** the prior execution is returned. |
| 75032 | ** |
| 75033 | ** This routine sets the error code and string returned by |
| 75034 | ** sqlite3_errcode(), sqlite3_errmsg() and sqlite3_errmsg16(). |
| 75035 | */ |
| 75036 | SQLITE_API int SQLITE_APICALL sqlite3_reset(sqlite3_stmt *pStmt){ |
| 75037 | int rc; |
| 75038 | if( pStmt==0 ){ |
| 75039 | rc = SQLITE_OK; |
| 75040 | }else{ |
| 75041 | Vdbe *v = (Vdbe*)pStmt; |
| @@ -75052,11 +75052,11 @@ | |
| 75052 | } |
| 75053 | |
| 75054 | /* |
| 75055 | ** Set all the parameters in the compiled SQL statement to NULL. |
| 75056 | */ |
| 75057 | SQLITE_API int SQLITE_APICALL sqlite3_clear_bindings(sqlite3_stmt *pStmt){ |
| 75058 | int i; |
| 75059 | int rc = SQLITE_OK; |
| 75060 | Vdbe *p = (Vdbe*)pStmt; |
| 75061 | #if SQLITE_THREADSAFE |
| 75062 | sqlite3_mutex *mutex = ((Vdbe*)pStmt)->db->mutex; |
| @@ -75076,11 +75076,11 @@ | |
| 75076 | |
| 75077 | /**************************** sqlite3_value_ ******************************* |
| 75078 | ** The following routines extract information from a Mem or sqlite3_value |
| 75079 | ** structure. |
| 75080 | */ |
| 75081 | SQLITE_API const void *SQLITE_APICALL sqlite3_value_blob(sqlite3_value *pVal){ |
| 75082 | Mem *p = (Mem*)pVal; |
| 75083 | if( p->flags & (MEM_Blob|MEM_Str) ){ |
| 75084 | if( sqlite3VdbeMemExpandBlob(p)!=SQLITE_OK ){ |
| 75085 | assert( p->flags==MEM_Null && p->z==0 ); |
| 75086 | return 0; |
| @@ -75089,48 +75089,48 @@ | |
| 75089 | return p->n ? p->z : 0; |
| 75090 | }else{ |
| 75091 | return sqlite3_value_text(pVal); |
| 75092 | } |
| 75093 | } |
| 75094 | SQLITE_API int SQLITE_APICALL sqlite3_value_bytes(sqlite3_value *pVal){ |
| 75095 | return sqlite3ValueBytes(pVal, SQLITE_UTF8); |
| 75096 | } |
| 75097 | SQLITE_API int SQLITE_APICALL sqlite3_value_bytes16(sqlite3_value *pVal){ |
| 75098 | return sqlite3ValueBytes(pVal, SQLITE_UTF16NATIVE); |
| 75099 | } |
| 75100 | SQLITE_API double SQLITE_APICALL sqlite3_value_double(sqlite3_value *pVal){ |
| 75101 | return sqlite3VdbeRealValue((Mem*)pVal); |
| 75102 | } |
| 75103 | SQLITE_API int SQLITE_APICALL sqlite3_value_int(sqlite3_value *pVal){ |
| 75104 | return (int)sqlite3VdbeIntValue((Mem*)pVal); |
| 75105 | } |
| 75106 | SQLITE_API sqlite_int64 SQLITE_APICALL sqlite3_value_int64(sqlite3_value *pVal){ |
| 75107 | return sqlite3VdbeIntValue((Mem*)pVal); |
| 75108 | } |
| 75109 | SQLITE_API unsigned int SQLITE_APICALL sqlite3_value_subtype(sqlite3_value *pVal){ |
| 75110 | Mem *pMem = (Mem*)pVal; |
| 75111 | return ((pMem->flags & MEM_Subtype) ? pMem->eSubtype : 0); |
| 75112 | } |
| 75113 | SQLITE_API const unsigned char *SQLITE_APICALL sqlite3_value_text(sqlite3_value *pVal){ |
| 75114 | return (const unsigned char *)sqlite3ValueText(pVal, SQLITE_UTF8); |
| 75115 | } |
| 75116 | #ifndef SQLITE_OMIT_UTF16 |
| 75117 | SQLITE_API const void *SQLITE_APICALL sqlite3_value_text16(sqlite3_value* pVal){ |
| 75118 | return sqlite3ValueText(pVal, SQLITE_UTF16NATIVE); |
| 75119 | } |
| 75120 | SQLITE_API const void *SQLITE_APICALL sqlite3_value_text16be(sqlite3_value *pVal){ |
| 75121 | return sqlite3ValueText(pVal, SQLITE_UTF16BE); |
| 75122 | } |
| 75123 | SQLITE_API const void *SQLITE_APICALL sqlite3_value_text16le(sqlite3_value *pVal){ |
| 75124 | return sqlite3ValueText(pVal, SQLITE_UTF16LE); |
| 75125 | } |
| 75126 | #endif /* SQLITE_OMIT_UTF16 */ |
| 75127 | /* EVIDENCE-OF: R-12793-43283 Every value in SQLite has one of five |
| 75128 | ** fundamental datatypes: 64-bit signed integer 64-bit IEEE floating |
| 75129 | ** point number string BLOB NULL |
| 75130 | */ |
| 75131 | SQLITE_API int SQLITE_APICALL sqlite3_value_type(sqlite3_value* pVal){ |
| 75132 | static const u8 aType[] = { |
| 75133 | SQLITE_BLOB, /* 0x00 */ |
| 75134 | SQLITE_NULL, /* 0x01 */ |
| 75135 | SQLITE_TEXT, /* 0x02 */ |
| 75136 | SQLITE_NULL, /* 0x03 */ |
| @@ -75166,11 +75166,11 @@ | |
| 75166 | return aType[pVal->flags&MEM_AffMask]; |
| 75167 | } |
| 75168 | |
| 75169 | /* Make a copy of an sqlite3_value object |
| 75170 | */ |
| 75171 | SQLITE_API sqlite3_value *SQLITE_APICALL sqlite3_value_dup(const sqlite3_value *pOrig){ |
| 75172 | sqlite3_value *pNew; |
| 75173 | if( pOrig==0 ) return 0; |
| 75174 | pNew = sqlite3_malloc( sizeof(*pNew) ); |
| 75175 | if( pNew==0 ) return 0; |
| 75176 | memset(pNew, 0, sizeof(*pNew)); |
| @@ -75189,11 +75189,11 @@ | |
| 75189 | } |
| 75190 | |
| 75191 | /* Destroy an sqlite3_value object previously obtained from |
| 75192 | ** sqlite3_value_dup(). |
| 75193 | */ |
| 75194 | SQLITE_API void SQLITE_APICALL sqlite3_value_free(sqlite3_value *pOld){ |
| 75195 | sqlite3ValueFree(pOld); |
| 75196 | } |
| 75197 | |
| 75198 | |
| 75199 | /**************************** sqlite3_result_ ******************************* |
| @@ -75232,21 +75232,21 @@ | |
| 75232 | xDel((void*)p); |
| 75233 | } |
| 75234 | if( pCtx ) sqlite3_result_error_toobig(pCtx); |
| 75235 | return SQLITE_TOOBIG; |
| 75236 | } |
| 75237 | SQLITE_API void SQLITE_APICALL sqlite3_result_blob( |
| 75238 | sqlite3_context *pCtx, |
| 75239 | const void *z, |
| 75240 | int n, |
| 75241 | void (*xDel)(void *) |
| 75242 | ){ |
| 75243 | assert( n>=0 ); |
| 75244 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75245 | setResultStrOrError(pCtx, z, n, 0, xDel); |
| 75246 | } |
| 75247 | SQLITE_API void SQLITE_APICALL sqlite3_result_blob64( |
| 75248 | sqlite3_context *pCtx, |
| 75249 | const void *z, |
| 75250 | sqlite3_uint64 n, |
| 75251 | void (*xDel)(void *) |
| 75252 | ){ |
| @@ -75256,56 +75256,56 @@ | |
| 75256 | (void)invokeValueDestructor(z, xDel, pCtx); |
| 75257 | }else{ |
| 75258 | setResultStrOrError(pCtx, z, (int)n, 0, xDel); |
| 75259 | } |
| 75260 | } |
| 75261 | SQLITE_API void SQLITE_APICALL sqlite3_result_double(sqlite3_context *pCtx, double rVal){ |
| 75262 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75263 | sqlite3VdbeMemSetDouble(pCtx->pOut, rVal); |
| 75264 | } |
| 75265 | SQLITE_API void SQLITE_APICALL sqlite3_result_error(sqlite3_context *pCtx, const char *z, int n){ |
| 75266 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75267 | pCtx->isError = SQLITE_ERROR; |
| 75268 | pCtx->fErrorOrAux = 1; |
| 75269 | sqlite3VdbeMemSetStr(pCtx->pOut, z, n, SQLITE_UTF8, SQLITE_TRANSIENT); |
| 75270 | } |
| 75271 | #ifndef SQLITE_OMIT_UTF16 |
| 75272 | SQLITE_API void SQLITE_APICALL sqlite3_result_error16(sqlite3_context *pCtx, const void *z, int n){ |
| 75273 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75274 | pCtx->isError = SQLITE_ERROR; |
| 75275 | pCtx->fErrorOrAux = 1; |
| 75276 | sqlite3VdbeMemSetStr(pCtx->pOut, z, n, SQLITE_UTF16NATIVE, SQLITE_TRANSIENT); |
| 75277 | } |
| 75278 | #endif |
| 75279 | SQLITE_API void SQLITE_APICALL sqlite3_result_int(sqlite3_context *pCtx, int iVal){ |
| 75280 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75281 | sqlite3VdbeMemSetInt64(pCtx->pOut, (i64)iVal); |
| 75282 | } |
| 75283 | SQLITE_API void SQLITE_APICALL sqlite3_result_int64(sqlite3_context *pCtx, i64 iVal){ |
| 75284 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75285 | sqlite3VdbeMemSetInt64(pCtx->pOut, iVal); |
| 75286 | } |
| 75287 | SQLITE_API void SQLITE_APICALL sqlite3_result_null(sqlite3_context *pCtx){ |
| 75288 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75289 | sqlite3VdbeMemSetNull(pCtx->pOut); |
| 75290 | } |
| 75291 | SQLITE_API void SQLITE_APICALL sqlite3_result_subtype(sqlite3_context *pCtx, unsigned int eSubtype){ |
| 75292 | Mem *pOut = pCtx->pOut; |
| 75293 | assert( sqlite3_mutex_held(pOut->db->mutex) ); |
| 75294 | pOut->eSubtype = eSubtype & 0xff; |
| 75295 | pOut->flags |= MEM_Subtype; |
| 75296 | } |
| 75297 | SQLITE_API void SQLITE_APICALL sqlite3_result_text( |
| 75298 | sqlite3_context *pCtx, |
| 75299 | const char *z, |
| 75300 | int n, |
| 75301 | void (*xDel)(void *) |
| 75302 | ){ |
| 75303 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75304 | setResultStrOrError(pCtx, z, n, SQLITE_UTF8, xDel); |
| 75305 | } |
| 75306 | SQLITE_API void SQLITE_APICALL sqlite3_result_text64( |
| 75307 | sqlite3_context *pCtx, |
| 75308 | const char *z, |
| 75309 | sqlite3_uint64 n, |
| 75310 | void (*xDel)(void *), |
| 75311 | unsigned char enc |
| @@ -75318,56 +75318,56 @@ | |
| 75318 | }else{ |
| 75319 | setResultStrOrError(pCtx, z, (int)n, enc, xDel); |
| 75320 | } |
| 75321 | } |
| 75322 | #ifndef SQLITE_OMIT_UTF16 |
| 75323 | SQLITE_API void SQLITE_APICALL sqlite3_result_text16( |
| 75324 | sqlite3_context *pCtx, |
| 75325 | const void *z, |
| 75326 | int n, |
| 75327 | void (*xDel)(void *) |
| 75328 | ){ |
| 75329 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75330 | setResultStrOrError(pCtx, z, n, SQLITE_UTF16NATIVE, xDel); |
| 75331 | } |
| 75332 | SQLITE_API void SQLITE_APICALL sqlite3_result_text16be( |
| 75333 | sqlite3_context *pCtx, |
| 75334 | const void *z, |
| 75335 | int n, |
| 75336 | void (*xDel)(void *) |
| 75337 | ){ |
| 75338 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75339 | setResultStrOrError(pCtx, z, n, SQLITE_UTF16BE, xDel); |
| 75340 | } |
| 75341 | SQLITE_API void SQLITE_APICALL sqlite3_result_text16le( |
| 75342 | sqlite3_context *pCtx, |
| 75343 | const void *z, |
| 75344 | int n, |
| 75345 | void (*xDel)(void *) |
| 75346 | ){ |
| 75347 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75348 | setResultStrOrError(pCtx, z, n, SQLITE_UTF16LE, xDel); |
| 75349 | } |
| 75350 | #endif /* SQLITE_OMIT_UTF16 */ |
| 75351 | SQLITE_API void SQLITE_APICALL sqlite3_result_value(sqlite3_context *pCtx, sqlite3_value *pValue){ |
| 75352 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75353 | sqlite3VdbeMemCopy(pCtx->pOut, pValue); |
| 75354 | } |
| 75355 | SQLITE_API void SQLITE_APICALL sqlite3_result_zeroblob(sqlite3_context *pCtx, int n){ |
| 75356 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75357 | sqlite3VdbeMemSetZeroBlob(pCtx->pOut, n); |
| 75358 | } |
| 75359 | SQLITE_API int SQLITE_APICALL sqlite3_result_zeroblob64(sqlite3_context *pCtx, u64 n){ |
| 75360 | Mem *pOut = pCtx->pOut; |
| 75361 | assert( sqlite3_mutex_held(pOut->db->mutex) ); |
| 75362 | if( n>(u64)pOut->db->aLimit[SQLITE_LIMIT_LENGTH] ){ |
| 75363 | return SQLITE_TOOBIG; |
| 75364 | } |
| 75365 | sqlite3VdbeMemSetZeroBlob(pCtx->pOut, (int)n); |
| 75366 | return SQLITE_OK; |
| 75367 | } |
| 75368 | SQLITE_API void SQLITE_APICALL sqlite3_result_error_code(sqlite3_context *pCtx, int errCode){ |
| 75369 | pCtx->isError = errCode; |
| 75370 | pCtx->fErrorOrAux = 1; |
| 75371 | #ifdef SQLITE_DEBUG |
| 75372 | if( pCtx->pVdbe ) pCtx->pVdbe->rcApp = errCode; |
| 75373 | #endif |
| @@ -75376,20 +75376,20 @@ | |
| 75376 | SQLITE_UTF8, SQLITE_STATIC); |
| 75377 | } |
| 75378 | } |
| 75379 | |
| 75380 | /* Force an SQLITE_TOOBIG error. */ |
| 75381 | SQLITE_API void SQLITE_APICALL sqlite3_result_error_toobig(sqlite3_context *pCtx){ |
| 75382 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75383 | pCtx->isError = SQLITE_TOOBIG; |
| 75384 | pCtx->fErrorOrAux = 1; |
| 75385 | sqlite3VdbeMemSetStr(pCtx->pOut, "string or blob too big", -1, |
| 75386 | SQLITE_UTF8, SQLITE_STATIC); |
| 75387 | } |
| 75388 | |
| 75389 | /* An SQLITE_NOMEM error. */ |
| 75390 | SQLITE_API void SQLITE_APICALL sqlite3_result_error_nomem(sqlite3_context *pCtx){ |
| 75391 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75392 | sqlite3VdbeMemSetNull(pCtx->pOut); |
| 75393 | pCtx->isError = SQLITE_NOMEM_BKPT; |
| 75394 | pCtx->fErrorOrAux = 1; |
| 75395 | sqlite3OomFault(pCtx->pOut->db); |
| @@ -75557,11 +75557,11 @@ | |
| 75557 | /* |
| 75558 | ** This is the top-level implementation of sqlite3_step(). Call |
| 75559 | ** sqlite3Step() to do most of the work. If a schema error occurs, |
| 75560 | ** call sqlite3Reprepare() and try again. |
| 75561 | */ |
| 75562 | SQLITE_API int SQLITE_APICALL sqlite3_step(sqlite3_stmt *pStmt){ |
| 75563 | int rc = SQLITE_OK; /* Result from sqlite3Step() */ |
| 75564 | int rc2 = SQLITE_OK; /* Result from sqlite3Reprepare() */ |
| 75565 | Vdbe *v = (Vdbe*)pStmt; /* the prepared statement */ |
| 75566 | int cnt = 0; /* Counter to prevent infinite loop of reprepares */ |
| 75567 | sqlite3 *db; /* The database connection */ |
| @@ -75608,11 +75608,11 @@ | |
| 75608 | |
| 75609 | /* |
| 75610 | ** Extract the user data from a sqlite3_context structure and return a |
| 75611 | ** pointer to it. |
| 75612 | */ |
| 75613 | SQLITE_API void *SQLITE_APICALL sqlite3_user_data(sqlite3_context *p){ |
| 75614 | assert( p && p->pFunc ); |
| 75615 | return p->pFunc->pUserData; |
| 75616 | } |
| 75617 | |
| 75618 | /* |
| @@ -75623,11 +75623,11 @@ | |
| 75623 | ** returns a copy of the pointer to the database connection (the 1st |
| 75624 | ** parameter) of the sqlite3_create_function() and |
| 75625 | ** sqlite3_create_function16() routines that originally registered the |
| 75626 | ** application defined function. |
| 75627 | */ |
| 75628 | SQLITE_API sqlite3 *SQLITE_APICALL sqlite3_context_db_handle(sqlite3_context *p){ |
| 75629 | assert( p && p->pOut ); |
| 75630 | return p->pOut->db; |
| 75631 | } |
| 75632 | |
| 75633 | /* |
| @@ -75699,11 +75699,11 @@ | |
| 75699 | /* |
| 75700 | ** Allocate or return the aggregate context for a user function. A new |
| 75701 | ** context is allocated on the first call. Subsequent calls return the |
| 75702 | ** same context that was returned on prior calls. |
| 75703 | */ |
| 75704 | SQLITE_API void *SQLITE_APICALL sqlite3_aggregate_context(sqlite3_context *p, int nByte){ |
| 75705 | assert( p && p->pFunc && p->pFunc->xFinalize ); |
| 75706 | assert( sqlite3_mutex_held(p->pOut->db->mutex) ); |
| 75707 | testcase( nByte<0 ); |
| 75708 | if( (p->pMem->flags & MEM_Agg)==0 ){ |
| 75709 | return createAggContext(p, nByte); |
| @@ -75714,11 +75714,11 @@ | |
| 75714 | |
| 75715 | /* |
| 75716 | ** Return the auxiliary data pointer, if any, for the iArg'th argument to |
| 75717 | ** the user-function defined by pCtx. |
| 75718 | */ |
| 75719 | SQLITE_API void *SQLITE_APICALL sqlite3_get_auxdata(sqlite3_context *pCtx, int iArg){ |
| 75720 | AuxData *pAuxData; |
| 75721 | |
| 75722 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75723 | #if SQLITE_ENABLE_STAT3_OR_STAT4 |
| 75724 | if( pCtx->pVdbe==0 ) return 0; |
| @@ -75735,11 +75735,11 @@ | |
| 75735 | /* |
| 75736 | ** Set the auxiliary data pointer and delete function, for the iArg'th |
| 75737 | ** argument to the user-function defined by pCtx. Any previous value is |
| 75738 | ** deleted by calling the delete function specified when it was set. |
| 75739 | */ |
| 75740 | SQLITE_API void SQLITE_APICALL sqlite3_set_auxdata( |
| 75741 | sqlite3_context *pCtx, |
| 75742 | int iArg, |
| 75743 | void *pAux, |
| 75744 | void (*xDelete)(void*) |
| 75745 | ){ |
| @@ -75790,29 +75790,29 @@ | |
| 75790 | ** This function is deprecated. Do not use it for new code. It is |
| 75791 | ** provide only to avoid breaking legacy code. New aggregate function |
| 75792 | ** implementations should keep their own counts within their aggregate |
| 75793 | ** context. |
| 75794 | */ |
| 75795 | SQLITE_API int SQLITE_APICALL sqlite3_aggregate_count(sqlite3_context *p){ |
| 75796 | assert( p && p->pMem && p->pFunc && p->pFunc->xFinalize ); |
| 75797 | return p->pMem->n; |
| 75798 | } |
| 75799 | #endif |
| 75800 | |
| 75801 | /* |
| 75802 | ** Return the number of columns in the result set for the statement pStmt. |
| 75803 | */ |
| 75804 | SQLITE_API int SQLITE_APICALL sqlite3_column_count(sqlite3_stmt *pStmt){ |
| 75805 | Vdbe *pVm = (Vdbe *)pStmt; |
| 75806 | return pVm ? pVm->nResColumn : 0; |
| 75807 | } |
| 75808 | |
| 75809 | /* |
| 75810 | ** Return the number of values available from the current row of the |
| 75811 | ** currently executing statement pStmt. |
| 75812 | */ |
| 75813 | SQLITE_API int SQLITE_APICALL sqlite3_data_count(sqlite3_stmt *pStmt){ |
| 75814 | Vdbe *pVm = (Vdbe *)pStmt; |
| 75815 | if( pVm==0 || pVm->pResultSet==0 ) return 0; |
| 75816 | return pVm->nResColumn; |
| 75817 | } |
| 75818 | |
| @@ -75911,67 +75911,67 @@ | |
| 75911 | |
| 75912 | /**************************** sqlite3_column_ ******************************* |
| 75913 | ** The following routines are used to access elements of the current row |
| 75914 | ** in the result set. |
| 75915 | */ |
| 75916 | SQLITE_API const void *SQLITE_APICALL sqlite3_column_blob(sqlite3_stmt *pStmt, int i){ |
| 75917 | const void *val; |
| 75918 | val = sqlite3_value_blob( columnMem(pStmt,i) ); |
| 75919 | /* Even though there is no encoding conversion, value_blob() might |
| 75920 | ** need to call malloc() to expand the result of a zeroblob() |
| 75921 | ** expression. |
| 75922 | */ |
| 75923 | columnMallocFailure(pStmt); |
| 75924 | return val; |
| 75925 | } |
| 75926 | SQLITE_API int SQLITE_APICALL sqlite3_column_bytes(sqlite3_stmt *pStmt, int i){ |
| 75927 | int val = sqlite3_value_bytes( columnMem(pStmt,i) ); |
| 75928 | columnMallocFailure(pStmt); |
| 75929 | return val; |
| 75930 | } |
| 75931 | SQLITE_API int SQLITE_APICALL sqlite3_column_bytes16(sqlite3_stmt *pStmt, int i){ |
| 75932 | int val = sqlite3_value_bytes16( columnMem(pStmt,i) ); |
| 75933 | columnMallocFailure(pStmt); |
| 75934 | return val; |
| 75935 | } |
| 75936 | SQLITE_API double SQLITE_APICALL sqlite3_column_double(sqlite3_stmt *pStmt, int i){ |
| 75937 | double val = sqlite3_value_double( columnMem(pStmt,i) ); |
| 75938 | columnMallocFailure(pStmt); |
| 75939 | return val; |
| 75940 | } |
| 75941 | SQLITE_API int SQLITE_APICALL sqlite3_column_int(sqlite3_stmt *pStmt, int i){ |
| 75942 | int val = sqlite3_value_int( columnMem(pStmt,i) ); |
| 75943 | columnMallocFailure(pStmt); |
| 75944 | return val; |
| 75945 | } |
| 75946 | SQLITE_API sqlite_int64 SQLITE_APICALL sqlite3_column_int64(sqlite3_stmt *pStmt, int i){ |
| 75947 | sqlite_int64 val = sqlite3_value_int64( columnMem(pStmt,i) ); |
| 75948 | columnMallocFailure(pStmt); |
| 75949 | return val; |
| 75950 | } |
| 75951 | SQLITE_API const unsigned char *SQLITE_APICALL sqlite3_column_text(sqlite3_stmt *pStmt, int i){ |
| 75952 | const unsigned char *val = sqlite3_value_text( columnMem(pStmt,i) ); |
| 75953 | columnMallocFailure(pStmt); |
| 75954 | return val; |
| 75955 | } |
| 75956 | SQLITE_API sqlite3_value *SQLITE_APICALL sqlite3_column_value(sqlite3_stmt *pStmt, int i){ |
| 75957 | Mem *pOut = columnMem(pStmt, i); |
| 75958 | if( pOut->flags&MEM_Static ){ |
| 75959 | pOut->flags &= ~MEM_Static; |
| 75960 | pOut->flags |= MEM_Ephem; |
| 75961 | } |
| 75962 | columnMallocFailure(pStmt); |
| 75963 | return (sqlite3_value *)pOut; |
| 75964 | } |
| 75965 | #ifndef SQLITE_OMIT_UTF16 |
| 75966 | SQLITE_API const void *SQLITE_APICALL sqlite3_column_text16(sqlite3_stmt *pStmt, int i){ |
| 75967 | const void *val = sqlite3_value_text16( columnMem(pStmt,i) ); |
| 75968 | columnMallocFailure(pStmt); |
| 75969 | return val; |
| 75970 | } |
| 75971 | #endif /* SQLITE_OMIT_UTF16 */ |
| 75972 | SQLITE_API int SQLITE_APICALL sqlite3_column_type(sqlite3_stmt *pStmt, int i){ |
| 75973 | int iType = sqlite3_value_type( columnMem(pStmt,i) ); |
| 75974 | columnMallocFailure(pStmt); |
| 75975 | return iType; |
| 75976 | } |
| 75977 | |
| @@ -76031,16 +76031,16 @@ | |
| 76031 | |
| 76032 | /* |
| 76033 | ** Return the name of the Nth column of the result set returned by SQL |
| 76034 | ** statement pStmt. |
| 76035 | */ |
| 76036 | SQLITE_API const char *SQLITE_APICALL sqlite3_column_name(sqlite3_stmt *pStmt, int N){ |
| 76037 | return columnName( |
| 76038 | pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_NAME); |
| 76039 | } |
| 76040 | #ifndef SQLITE_OMIT_UTF16 |
| 76041 | SQLITE_API const void *SQLITE_APICALL sqlite3_column_name16(sqlite3_stmt *pStmt, int N){ |
| 76042 | return columnName( |
| 76043 | pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_NAME); |
| 76044 | } |
| 76045 | #endif |
| 76046 | |
| @@ -76056,16 +76056,16 @@ | |
| 76056 | #ifndef SQLITE_OMIT_DECLTYPE |
| 76057 | /* |
| 76058 | ** Return the column declaration type (if applicable) of the 'i'th column |
| 76059 | ** of the result set of SQL statement pStmt. |
| 76060 | */ |
| 76061 | SQLITE_API const char *SQLITE_APICALL sqlite3_column_decltype(sqlite3_stmt *pStmt, int N){ |
| 76062 | return columnName( |
| 76063 | pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_DECLTYPE); |
| 76064 | } |
| 76065 | #ifndef SQLITE_OMIT_UTF16 |
| 76066 | SQLITE_API const void *SQLITE_APICALL sqlite3_column_decltype16(sqlite3_stmt *pStmt, int N){ |
| 76067 | return columnName( |
| 76068 | pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_DECLTYPE); |
| 76069 | } |
| 76070 | #endif /* SQLITE_OMIT_UTF16 */ |
| 76071 | #endif /* SQLITE_OMIT_DECLTYPE */ |
| @@ -76074,16 +76074,16 @@ | |
| 76074 | /* |
| 76075 | ** Return the name of the database from which a result column derives. |
| 76076 | ** NULL is returned if the result column is an expression or constant or |
| 76077 | ** anything else which is not an unambiguous reference to a database column. |
| 76078 | */ |
| 76079 | SQLITE_API const char *SQLITE_APICALL sqlite3_column_database_name(sqlite3_stmt *pStmt, int N){ |
| 76080 | return columnName( |
| 76081 | pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_DATABASE); |
| 76082 | } |
| 76083 | #ifndef SQLITE_OMIT_UTF16 |
| 76084 | SQLITE_API const void *SQLITE_APICALL sqlite3_column_database_name16(sqlite3_stmt *pStmt, int N){ |
| 76085 | return columnName( |
| 76086 | pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_DATABASE); |
| 76087 | } |
| 76088 | #endif /* SQLITE_OMIT_UTF16 */ |
| 76089 | |
| @@ -76090,16 +76090,16 @@ | |
| 76090 | /* |
| 76091 | ** Return the name of the table from which a result column derives. |
| 76092 | ** NULL is returned if the result column is an expression or constant or |
| 76093 | ** anything else which is not an unambiguous reference to a database column. |
| 76094 | */ |
| 76095 | SQLITE_API const char *SQLITE_APICALL sqlite3_column_table_name(sqlite3_stmt *pStmt, int N){ |
| 76096 | return columnName( |
| 76097 | pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_TABLE); |
| 76098 | } |
| 76099 | #ifndef SQLITE_OMIT_UTF16 |
| 76100 | SQLITE_API const void *SQLITE_APICALL sqlite3_column_table_name16(sqlite3_stmt *pStmt, int N){ |
| 76101 | return columnName( |
| 76102 | pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_TABLE); |
| 76103 | } |
| 76104 | #endif /* SQLITE_OMIT_UTF16 */ |
| 76105 | |
| @@ -76106,16 +76106,16 @@ | |
| 76106 | /* |
| 76107 | ** Return the name of the table column from which a result column derives. |
| 76108 | ** NULL is returned if the result column is an expression or constant or |
| 76109 | ** anything else which is not an unambiguous reference to a database column. |
| 76110 | */ |
| 76111 | SQLITE_API const char *SQLITE_APICALL sqlite3_column_origin_name(sqlite3_stmt *pStmt, int N){ |
| 76112 | return columnName( |
| 76113 | pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_COLUMN); |
| 76114 | } |
| 76115 | #ifndef SQLITE_OMIT_UTF16 |
| 76116 | SQLITE_API const void *SQLITE_APICALL sqlite3_column_origin_name16(sqlite3_stmt *pStmt, int N){ |
| 76117 | return columnName( |
| 76118 | pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_COLUMN); |
| 76119 | } |
| 76120 | #endif /* SQLITE_OMIT_UTF16 */ |
| 76121 | #endif /* SQLITE_ENABLE_COLUMN_METADATA */ |
| @@ -76212,11 +76212,11 @@ | |
| 76212 | |
| 76213 | |
| 76214 | /* |
| 76215 | ** Bind a blob value to an SQL statement variable. |
| 76216 | */ |
| 76217 | SQLITE_API int SQLITE_APICALL sqlite3_bind_blob( |
| 76218 | sqlite3_stmt *pStmt, |
| 76219 | int i, |
| 76220 | const void *zData, |
| 76221 | int nData, |
| 76222 | void (*xDel)(void*) |
| @@ -76224,11 +76224,11 @@ | |
| 76224 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 76225 | if( nData<0 ) return SQLITE_MISUSE_BKPT; |
| 76226 | #endif |
| 76227 | return bindText(pStmt, i, zData, nData, xDel, 0); |
| 76228 | } |
| 76229 | SQLITE_API int SQLITE_APICALL sqlite3_bind_blob64( |
| 76230 | sqlite3_stmt *pStmt, |
| 76231 | int i, |
| 76232 | const void *zData, |
| 76233 | sqlite3_uint64 nData, |
| 76234 | void (*xDel)(void*) |
| @@ -76238,52 +76238,52 @@ | |
| 76238 | return invokeValueDestructor(zData, xDel, 0); |
| 76239 | }else{ |
| 76240 | return bindText(pStmt, i, zData, (int)nData, xDel, 0); |
| 76241 | } |
| 76242 | } |
| 76243 | SQLITE_API int SQLITE_APICALL sqlite3_bind_double(sqlite3_stmt *pStmt, int i, double rValue){ |
| 76244 | int rc; |
| 76245 | Vdbe *p = (Vdbe *)pStmt; |
| 76246 | rc = vdbeUnbind(p, i); |
| 76247 | if( rc==SQLITE_OK ){ |
| 76248 | sqlite3VdbeMemSetDouble(&p->aVar[i-1], rValue); |
| 76249 | sqlite3_mutex_leave(p->db->mutex); |
| 76250 | } |
| 76251 | return rc; |
| 76252 | } |
| 76253 | SQLITE_API int SQLITE_APICALL sqlite3_bind_int(sqlite3_stmt *p, int i, int iValue){ |
| 76254 | return sqlite3_bind_int64(p, i, (i64)iValue); |
| 76255 | } |
| 76256 | SQLITE_API int SQLITE_APICALL sqlite3_bind_int64(sqlite3_stmt *pStmt, int i, sqlite_int64 iValue){ |
| 76257 | int rc; |
| 76258 | Vdbe *p = (Vdbe *)pStmt; |
| 76259 | rc = vdbeUnbind(p, i); |
| 76260 | if( rc==SQLITE_OK ){ |
| 76261 | sqlite3VdbeMemSetInt64(&p->aVar[i-1], iValue); |
| 76262 | sqlite3_mutex_leave(p->db->mutex); |
| 76263 | } |
| 76264 | return rc; |
| 76265 | } |
| 76266 | SQLITE_API int SQLITE_APICALL sqlite3_bind_null(sqlite3_stmt *pStmt, int i){ |
| 76267 | int rc; |
| 76268 | Vdbe *p = (Vdbe*)pStmt; |
| 76269 | rc = vdbeUnbind(p, i); |
| 76270 | if( rc==SQLITE_OK ){ |
| 76271 | sqlite3_mutex_leave(p->db->mutex); |
| 76272 | } |
| 76273 | return rc; |
| 76274 | } |
| 76275 | SQLITE_API int SQLITE_APICALL sqlite3_bind_text( |
| 76276 | sqlite3_stmt *pStmt, |
| 76277 | int i, |
| 76278 | const char *zData, |
| 76279 | int nData, |
| 76280 | void (*xDel)(void*) |
| 76281 | ){ |
| 76282 | return bindText(pStmt, i, zData, nData, xDel, SQLITE_UTF8); |
| 76283 | } |
| 76284 | SQLITE_API int SQLITE_APICALL sqlite3_bind_text64( |
| 76285 | sqlite3_stmt *pStmt, |
| 76286 | int i, |
| 76287 | const char *zData, |
| 76288 | sqlite3_uint64 nData, |
| 76289 | void (*xDel)(void*), |
| @@ -76296,21 +76296,21 @@ | |
| 76296 | if( enc==SQLITE_UTF16 ) enc = SQLITE_UTF16NATIVE; |
| 76297 | return bindText(pStmt, i, zData, (int)nData, xDel, enc); |
| 76298 | } |
| 76299 | } |
| 76300 | #ifndef SQLITE_OMIT_UTF16 |
| 76301 | SQLITE_API int SQLITE_APICALL sqlite3_bind_text16( |
| 76302 | sqlite3_stmt *pStmt, |
| 76303 | int i, |
| 76304 | const void *zData, |
| 76305 | int nData, |
| 76306 | void (*xDel)(void*) |
| 76307 | ){ |
| 76308 | return bindText(pStmt, i, zData, nData, xDel, SQLITE_UTF16NATIVE); |
| 76309 | } |
| 76310 | #endif /* SQLITE_OMIT_UTF16 */ |
| 76311 | SQLITE_API int SQLITE_APICALL sqlite3_bind_value(sqlite3_stmt *pStmt, int i, const sqlite3_value *pValue){ |
| 76312 | int rc; |
| 76313 | switch( sqlite3_value_type((sqlite3_value*)pValue) ){ |
| 76314 | case SQLITE_INTEGER: { |
| 76315 | rc = sqlite3_bind_int64(pStmt, i, pValue->u.i); |
| 76316 | break; |
| @@ -76337,21 +76337,21 @@ | |
| 76337 | break; |
| 76338 | } |
| 76339 | } |
| 76340 | return rc; |
| 76341 | } |
| 76342 | SQLITE_API int SQLITE_APICALL sqlite3_bind_zeroblob(sqlite3_stmt *pStmt, int i, int n){ |
| 76343 | int rc; |
| 76344 | Vdbe *p = (Vdbe *)pStmt; |
| 76345 | rc = vdbeUnbind(p, i); |
| 76346 | if( rc==SQLITE_OK ){ |
| 76347 | sqlite3VdbeMemSetZeroBlob(&p->aVar[i-1], n); |
| 76348 | sqlite3_mutex_leave(p->db->mutex); |
| 76349 | } |
| 76350 | return rc; |
| 76351 | } |
| 76352 | SQLITE_API int SQLITE_APICALL sqlite3_bind_zeroblob64(sqlite3_stmt *pStmt, int i, sqlite3_uint64 n){ |
| 76353 | int rc; |
| 76354 | Vdbe *p = (Vdbe *)pStmt; |
| 76355 | sqlite3_mutex_enter(p->db->mutex); |
| 76356 | if( n>(u64)p->db->aLimit[SQLITE_LIMIT_LENGTH] ){ |
| 76357 | rc = SQLITE_TOOBIG; |
| @@ -76366,11 +76366,11 @@ | |
| 76366 | |
| 76367 | /* |
| 76368 | ** Return the number of wildcards that can be potentially bound to. |
| 76369 | ** This routine is added to support DBD::SQLite. |
| 76370 | */ |
| 76371 | SQLITE_API int SQLITE_APICALL sqlite3_bind_parameter_count(sqlite3_stmt *pStmt){ |
| 76372 | Vdbe *p = (Vdbe*)pStmt; |
| 76373 | return p ? p->nVar : 0; |
| 76374 | } |
| 76375 | |
| 76376 | /* |
| @@ -76377,11 +76377,11 @@ | |
| 76377 | ** Return the name of a wildcard parameter. Return NULL if the index |
| 76378 | ** is out of range or if the wildcard is unnamed. |
| 76379 | ** |
| 76380 | ** The result is always UTF-8. |
| 76381 | */ |
| 76382 | SQLITE_API const char *SQLITE_APICALL sqlite3_bind_parameter_name(sqlite3_stmt *pStmt, int i){ |
| 76383 | Vdbe *p = (Vdbe*)pStmt; |
| 76384 | if( p==0 || i<1 || i>p->nzVar ){ |
| 76385 | return 0; |
| 76386 | } |
| 76387 | return p->azVar[i-1]; |
| @@ -76405,11 +76405,11 @@ | |
| 76405 | } |
| 76406 | } |
| 76407 | } |
| 76408 | return 0; |
| 76409 | } |
| 76410 | SQLITE_API int SQLITE_APICALL sqlite3_bind_parameter_index(sqlite3_stmt *pStmt, const char *zName){ |
| 76411 | return sqlite3VdbeParameterIndex((Vdbe*)pStmt, zName, sqlite3Strlen30(zName)); |
| 76412 | } |
| 76413 | |
| 76414 | /* |
| 76415 | ** Transfer all bindings from the first statement over to the second. |
| @@ -76439,11 +76439,11 @@ | |
| 76439 | ** |
| 76440 | ** If the two statements contain a different number of bindings, then |
| 76441 | ** an SQLITE_ERROR is returned. Nothing else can go wrong, so otherwise |
| 76442 | ** SQLITE_OK is returned. |
| 76443 | */ |
| 76444 | SQLITE_API int SQLITE_APICALL sqlite3_transfer_bindings(sqlite3_stmt *pFromStmt, sqlite3_stmt *pToStmt){ |
| 76445 | Vdbe *pFrom = (Vdbe*)pFromStmt; |
| 76446 | Vdbe *pTo = (Vdbe*)pToStmt; |
| 76447 | if( pFrom->nVar!=pTo->nVar ){ |
| 76448 | return SQLITE_ERROR; |
| 76449 | } |
| @@ -76461,26 +76461,26 @@ | |
| 76461 | ** Return the sqlite3* database handle to which the prepared statement given |
| 76462 | ** in the argument belongs. This is the same database handle that was |
| 76463 | ** the first argument to the sqlite3_prepare() that was used to create |
| 76464 | ** the statement in the first place. |
| 76465 | */ |
| 76466 | SQLITE_API sqlite3 *SQLITE_APICALL sqlite3_db_handle(sqlite3_stmt *pStmt){ |
| 76467 | return pStmt ? ((Vdbe*)pStmt)->db : 0; |
| 76468 | } |
| 76469 | |
| 76470 | /* |
| 76471 | ** Return true if the prepared statement is guaranteed to not modify the |
| 76472 | ** database. |
| 76473 | */ |
| 76474 | SQLITE_API int SQLITE_APICALL sqlite3_stmt_readonly(sqlite3_stmt *pStmt){ |
| 76475 | return pStmt ? ((Vdbe*)pStmt)->readOnly : 1; |
| 76476 | } |
| 76477 | |
| 76478 | /* |
| 76479 | ** Return true if the prepared statement is in need of being reset. |
| 76480 | */ |
| 76481 | SQLITE_API int SQLITE_APICALL sqlite3_stmt_busy(sqlite3_stmt *pStmt){ |
| 76482 | Vdbe *v = (Vdbe*)pStmt; |
| 76483 | return v!=0 && v->pc>=0 && v->magic==VDBE_MAGIC_RUN; |
| 76484 | } |
| 76485 | |
| 76486 | /* |
| @@ -76487,11 +76487,11 @@ | |
| 76487 | ** Return a pointer to the next prepared statement after pStmt associated |
| 76488 | ** with database connection pDb. If pStmt is NULL, return the first |
| 76489 | ** prepared statement for the database connection. Return NULL if there |
| 76490 | ** are no more. |
| 76491 | */ |
| 76492 | SQLITE_API sqlite3_stmt *SQLITE_APICALL sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt){ |
| 76493 | sqlite3_stmt *pNext; |
| 76494 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 76495 | if( !sqlite3SafetyCheckOk(pDb) ){ |
| 76496 | (void)SQLITE_MISUSE_BKPT; |
| 76497 | return 0; |
| @@ -76508,11 +76508,11 @@ | |
| 76508 | } |
| 76509 | |
| 76510 | /* |
| 76511 | ** Return the value of a status counter for a prepared statement |
| 76512 | */ |
| 76513 | SQLITE_API int SQLITE_APICALL sqlite3_stmt_status(sqlite3_stmt *pStmt, int op, int resetFlag){ |
| 76514 | Vdbe *pVdbe = (Vdbe*)pStmt; |
| 76515 | u32 v; |
| 76516 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 76517 | if( !pStmt ){ |
| 76518 | (void)SQLITE_MISUSE_BKPT; |
| @@ -76525,11 +76525,11 @@ | |
| 76525 | } |
| 76526 | |
| 76527 | /* |
| 76528 | ** Return the SQL associated with a prepared statement |
| 76529 | */ |
| 76530 | SQLITE_API const char *SQLITE_APICALL sqlite3_sql(sqlite3_stmt *pStmt){ |
| 76531 | Vdbe *p = (Vdbe *)pStmt; |
| 76532 | return p ? p->zSql : 0; |
| 76533 | } |
| 76534 | |
| 76535 | /* |
| @@ -76539,11 +76539,11 @@ | |
| 76539 | ** freeing the returned string by passing it to sqlite3_free(). |
| 76540 | ** |
| 76541 | ** The SQLITE_TRACE_SIZE_LIMIT puts an upper bound on the size of |
| 76542 | ** expanded bound parameters. |
| 76543 | */ |
| 76544 | SQLITE_API char *SQLITE_APICALL sqlite3_expanded_sql(sqlite3_stmt *pStmt){ |
| 76545 | #ifdef SQLITE_OMIT_TRACE |
| 76546 | return 0; |
| 76547 | #else |
| 76548 | char *z = 0; |
| 76549 | const char *zSql = sqlite3_sql(pStmt); |
| @@ -76581,11 +76581,11 @@ | |
| 76581 | |
| 76582 | /* |
| 76583 | ** This function is called from within a pre-update callback to retrieve |
| 76584 | ** a field of the row currently being updated or deleted. |
| 76585 | */ |
| 76586 | SQLITE_API int SQLITE_APICALL sqlite3_preupdate_old(sqlite3 *db, int iIdx, sqlite3_value **ppValue){ |
| 76587 | PreUpdate *p = db->pPreUpdate; |
| 76588 | int rc = SQLITE_OK; |
| 76589 | |
| 76590 | /* Test that this call is being made from within an SQLITE_DELETE or |
| 76591 | ** SQLITE_UPDATE pre-update callback, and that iIdx is within range. */ |
| @@ -76636,11 +76636,11 @@ | |
| 76636 | #ifdef SQLITE_ENABLE_PREUPDATE_HOOK |
| 76637 | /* |
| 76638 | ** This function is called from within a pre-update callback to retrieve |
| 76639 | ** the number of columns in the row being updated, deleted or inserted. |
| 76640 | */ |
| 76641 | SQLITE_API int SQLITE_APICALL sqlite3_preupdate_count(sqlite3 *db){ |
| 76642 | PreUpdate *p = db->pPreUpdate; |
| 76643 | return (p ? p->keyinfo.nField : 0); |
| 76644 | } |
| 76645 | #endif /* SQLITE_ENABLE_PREUPDATE_HOOK */ |
| 76646 | |
| @@ -76654,11 +76654,11 @@ | |
| 76654 | ** top-level trigger etc.). |
| 76655 | ** |
| 76656 | ** For the purposes of the previous paragraph, a foreign key CASCADE, SET NULL |
| 76657 | ** or SET DEFAULT action is considered a trigger. |
| 76658 | */ |
| 76659 | SQLITE_API int SQLITE_APICALL sqlite3_preupdate_depth(sqlite3 *db){ |
| 76660 | PreUpdate *p = db->pPreUpdate; |
| 76661 | return (p ? p->v->nFrame : 0); |
| 76662 | } |
| 76663 | #endif /* SQLITE_ENABLE_PREUPDATE_HOOK */ |
| 76664 | |
| @@ -76665,11 +76665,11 @@ | |
| 76665 | #ifdef SQLITE_ENABLE_PREUPDATE_HOOK |
| 76666 | /* |
| 76667 | ** This function is called from within a pre-update callback to retrieve |
| 76668 | ** a field of the row currently being updated or inserted. |
| 76669 | */ |
| 76670 | SQLITE_API int SQLITE_APICALL sqlite3_preupdate_new(sqlite3 *db, int iIdx, sqlite3_value **ppValue){ |
| 76671 | PreUpdate *p = db->pPreUpdate; |
| 76672 | int rc = SQLITE_OK; |
| 76673 | Mem *pMem; |
| 76674 | |
| 76675 | if( !p || p->op==SQLITE_DELETE ){ |
| @@ -76739,11 +76739,11 @@ | |
| 76739 | |
| 76740 | #ifdef SQLITE_ENABLE_STMT_SCANSTATUS |
| 76741 | /* |
| 76742 | ** Return status data for a single loop within query pStmt. |
| 76743 | */ |
| 76744 | SQLITE_API int SQLITE_APICALL sqlite3_stmt_scanstatus( |
| 76745 | sqlite3_stmt *pStmt, /* Prepared statement being queried */ |
| 76746 | int idx, /* Index of loop to report on */ |
| 76747 | int iScanStatusOp, /* Which metric to return */ |
| 76748 | void *pOut /* OUT: Write the answer here */ |
| 76749 | ){ |
| @@ -76798,11 +76798,11 @@ | |
| 76798 | } |
| 76799 | |
| 76800 | /* |
| 76801 | ** Zero all counters associated with the sqlite3_stmt_scanstatus() data. |
| 76802 | */ |
| 76803 | SQLITE_API void SQLITE_APICALL sqlite3_stmt_scanstatus_reset(sqlite3_stmt *pStmt){ |
| 76804 | Vdbe *p = (Vdbe*)pStmt; |
| 76805 | memset(p->anExec, 0, p->nOp * sizeof(i64)); |
| 76806 | } |
| 76807 | #endif /* SQLITE_ENABLE_STMT_SCANSTATUS */ |
| 76808 | |
| @@ -77325,11 +77325,11 @@ | |
| 77325 | ** Try to convert the type of a function argument or a result column |
| 77326 | ** into a numeric representation. Use either INTEGER or REAL whichever |
| 77327 | ** is appropriate. But only do the conversion if it is possible without |
| 77328 | ** loss of information and return the revised type of the argument. |
| 77329 | */ |
| 77330 | SQLITE_API int SQLITE_APICALL sqlite3_value_numeric_type(sqlite3_value *pVal){ |
| 77331 | int eType = sqlite3_value_type(pVal); |
| 77332 | if( eType==SQLITE_TEXT ){ |
| 77333 | Mem *pMem = (Mem*)pVal; |
| 77334 | applyNumericAffinity(pMem, 0); |
| 77335 | eType = sqlite3_value_type(pVal); |
| @@ -84177,11 +84177,11 @@ | |
| 84177 | } |
| 84178 | |
| 84179 | /* |
| 84180 | ** Open a blob handle. |
| 84181 | */ |
| 84182 | SQLITE_API int SQLITE_APICALL sqlite3_blob_open( |
| 84183 | sqlite3* db, /* The database connection */ |
| 84184 | const char *zDb, /* The attached database containing the blob */ |
| 84185 | const char *zTable, /* The table containing the blob */ |
| 84186 | const char *zColumn, /* The column containing the blob */ |
| 84187 | sqlite_int64 iRow, /* The row containing the glob */ |
| @@ -84418,11 +84418,11 @@ | |
| 84418 | |
| 84419 | /* |
| 84420 | ** Close a blob handle that was previously created using |
| 84421 | ** sqlite3_blob_open(). |
| 84422 | */ |
| 84423 | SQLITE_API int SQLITE_APICALL sqlite3_blob_close(sqlite3_blob *pBlob){ |
| 84424 | Incrblob *p = (Incrblob *)pBlob; |
| 84425 | int rc; |
| 84426 | sqlite3 *db; |
| 84427 | |
| 84428 | if( p ){ |
| @@ -84511,28 +84511,28 @@ | |
| 84511 | } |
| 84512 | |
| 84513 | /* |
| 84514 | ** Read data from a blob handle. |
| 84515 | */ |
| 84516 | SQLITE_API int SQLITE_APICALL sqlite3_blob_read(sqlite3_blob *pBlob, void *z, int n, int iOffset){ |
| 84517 | return blobReadWrite(pBlob, z, n, iOffset, sqlite3BtreeData); |
| 84518 | } |
| 84519 | |
| 84520 | /* |
| 84521 | ** Write data to a blob handle. |
| 84522 | */ |
| 84523 | SQLITE_API int SQLITE_APICALL sqlite3_blob_write(sqlite3_blob *pBlob, const void *z, int n, int iOffset){ |
| 84524 | return blobReadWrite(pBlob, (void *)z, n, iOffset, sqlite3BtreePutData); |
| 84525 | } |
| 84526 | |
| 84527 | /* |
| 84528 | ** Query a blob handle for the size of the data. |
| 84529 | ** |
| 84530 | ** The Incrblob.nByte field is fixed for the lifetime of the Incrblob |
| 84531 | ** so no mutex is required for access. |
| 84532 | */ |
| 84533 | SQLITE_API int SQLITE_APICALL sqlite3_blob_bytes(sqlite3_blob *pBlob){ |
| 84534 | Incrblob *p = (Incrblob *)pBlob; |
| 84535 | return (p && p->pStmt) ? p->nByte : 0; |
| 84536 | } |
| 84537 | |
| 84538 | /* |
| @@ -84543,11 +84543,11 @@ | |
| 84543 | ** contain a blob or text value, then an error code is returned and the |
| 84544 | ** database handle error code and message set. If this happens, then all |
| 84545 | ** subsequent calls to sqlite3_blob_xxx() functions (except blob_close()) |
| 84546 | ** immediately return SQLITE_ABORT. |
| 84547 | */ |
| 84548 | SQLITE_API int SQLITE_APICALL sqlite3_blob_reopen(sqlite3_blob *pBlob, sqlite3_int64 iRow){ |
| 84549 | int rc; |
| 84550 | Incrblob *p = (Incrblob *)pBlob; |
| 84551 | sqlite3 *db; |
| 84552 | |
| 84553 | if( p==0 ) return SQLITE_MISUSE_BKPT; |
| @@ -88640,11 +88640,15 @@ | |
| 88640 | } |
| 88641 | if( is_agg && (pNC->ncFlags & NC_AllowAgg)==0 ){ |
| 88642 | sqlite3ErrorMsg(pParse, "misuse of aggregate function %.*s()", nId,zId); |
| 88643 | pNC->nErr++; |
| 88644 | is_agg = 0; |
| 88645 | }else if( no_such_func && pParse->db->init.busy==0 ){ |
| 88646 | sqlite3ErrorMsg(pParse, "no such function: %.*s", nId, zId); |
| 88647 | pNC->nErr++; |
| 88648 | }else if( wrong_num_args ){ |
| 88649 | sqlite3ErrorMsg(pParse,"wrong number of arguments to function %.*s()", |
| 88650 | nId, zId); |
| @@ -92365,10 +92369,15 @@ | |
| 92365 | } |
| 92366 | nFarg = pFarg ? pFarg->nExpr : 0; |
| 92367 | assert( !ExprHasProperty(pExpr, EP_IntValue) ); |
| 92368 | zId = pExpr->u.zToken; |
| 92369 | pDef = sqlite3FindFunction(db, zId, nFarg, enc, 0); |
| 92370 | if( pDef==0 || pDef->xFinalize!=0 ){ |
| 92371 | sqlite3ErrorMsg(pParse, "unknown function: %s()", zId); |
| 92372 | break; |
| 92373 | } |
| 92374 | |
| @@ -97147,11 +97156,11 @@ | |
| 97147 | ** and attempts to write the column will be ignored. |
| 97148 | ** |
| 97149 | ** Setting the auth function to NULL disables this hook. The default |
| 97150 | ** setting of the auth function is NULL. |
| 97151 | */ |
| 97152 | SQLITE_API int SQLITE_APICALL sqlite3_set_authorizer( |
| 97153 | sqlite3 *db, |
| 97154 | int (*xAuth)(void*,int,const char*,const char*,const char*,const char*), |
| 97155 | void *pArg |
| 97156 | ){ |
| 97157 | #ifdef SQLITE_ENABLE_API_ARMOR |
| @@ -103910,18 +103919,18 @@ | |
| 103910 | } |
| 103911 | |
| 103912 | /* |
| 103913 | ** The sqlite3_strglob() interface. |
| 103914 | */ |
| 103915 | SQLITE_API int SQLITE_APICALL sqlite3_strglob(const char *zGlobPattern, const char *zString){ |
| 103916 | return patternCompare((u8*)zGlobPattern, (u8*)zString, &globInfo, '[')==0; |
| 103917 | } |
| 103918 | |
| 103919 | /* |
| 103920 | ** The sqlite3_strlike() interface. |
| 103921 | */ |
| 103922 | SQLITE_API int SQLITE_APICALL sqlite3_strlike(const char *zPattern, const char *zStr, unsigned int esc){ |
| 103923 | return patternCompare((u8*)zPattern, (u8*)zStr, &likeInfoNorm, esc)==0; |
| 103924 | } |
| 103925 | |
| 103926 | /* |
| 103927 | ** Count the number of times that the LIKE operator (or GLOB which is |
| @@ -104473,10 +104482,30 @@ | |
| 104473 | } |
| 104474 | } |
| 104475 | sqlite3_result_text(context, (char*)zIn, nIn, SQLITE_TRANSIENT); |
| 104476 | } |
| 104477 | |
| 104478 | |
| 104479 | /* IMP: R-25361-16150 This function is omitted from SQLite by default. It |
| 104480 | ** is only available if the SQLITE_SOUNDEX compile-time option is used |
| 104481 | ** when SQLite is built. |
| 104482 | */ |
| @@ -104944,17 +104973,20 @@ | |
| 104944 | AGGREGATE(count, 1, 0, 0, countStep, countFinalize ), |
| 104945 | AGGREGATE(group_concat, 1, 0, 0, groupConcatStep, groupConcatFinalize), |
| 104946 | AGGREGATE(group_concat, 2, 0, 0, groupConcatStep, groupConcatFinalize), |
| 104947 | |
| 104948 | LIKEFUNC(glob, 2, &globInfo, SQLITE_FUNC_LIKE|SQLITE_FUNC_CASE), |
| 104949 | #ifdef SQLITE_CASE_SENSITIVE_LIKE |
| 104950 | LIKEFUNC(like, 2, &likeInfoAlt, SQLITE_FUNC_LIKE|SQLITE_FUNC_CASE), |
| 104951 | LIKEFUNC(like, 3, &likeInfoAlt, SQLITE_FUNC_LIKE|SQLITE_FUNC_CASE), |
| 104952 | #else |
| 104953 | LIKEFUNC(like, 2, &likeInfoNorm, SQLITE_FUNC_LIKE), |
| 104954 | LIKEFUNC(like, 3, &likeInfoNorm, SQLITE_FUNC_LIKE), |
| 104955 | #endif |
| 104956 | FUNCTION(coalesce, 1, 0, 0, 0 ), |
| 104957 | FUNCTION(coalesce, 0, 0, 0, 0 ), |
| 104958 | FUNCTION2(coalesce, -1, 0, 0, noopFunc, SQLITE_FUNC_COALESCE), |
| 104959 | }; |
| 104960 | #ifndef SQLITE_OMIT_ALTERTABLE |
| @@ -108613,11 +108645,11 @@ | |
| 108613 | ** If the SQL is a query, then for each row in the query result |
| 108614 | ** the xCallback() function is called. pArg becomes the first |
| 108615 | ** argument to xCallback(). If xCallback=NULL then no callback |
| 108616 | ** is invoked, even for queries. |
| 108617 | */ |
| 108618 | SQLITE_API int SQLITE_APICALL sqlite3_exec( |
| 108619 | sqlite3 *db, /* The database on which the SQL executes */ |
| 108620 | const char *zSql, /* The SQL to be executed */ |
| 108621 | sqlite3_callback xCallback, /* Invoke this callback routine */ |
| 108622 | void *pArg, /* First argument to xCallback() */ |
| 108623 | char **pzErrMsg /* Write error messages here */ |
| @@ -109875,11 +109907,11 @@ | |
| 109875 | db->aExtension = aHandle; |
| 109876 | |
| 109877 | db->aExtension[db->nExtension++] = handle; |
| 109878 | return SQLITE_OK; |
| 109879 | } |
| 109880 | SQLITE_API int SQLITE_APICALL sqlite3_load_extension( |
| 109881 | sqlite3 *db, /* Load the extension into this database connection */ |
| 109882 | const char *zFile, /* Name of the shared library containing extension */ |
| 109883 | const char *zProc, /* Entry point. Use "sqlite3_extension_init" if 0 */ |
| 109884 | char **pzErrMsg /* Put error message here if not 0 */ |
| 109885 | ){ |
| @@ -109906,11 +109938,11 @@ | |
| 109906 | |
| 109907 | /* |
| 109908 | ** Enable or disable extension loading. Extension loading is disabled by |
| 109909 | ** default so as not to open security holes in older applications. |
| 109910 | */ |
| 109911 | SQLITE_API int SQLITE_APICALL sqlite3_enable_load_extension(sqlite3 *db, int onoff){ |
| 109912 | sqlite3_mutex_enter(db->mutex); |
| 109913 | if( onoff ){ |
| 109914 | db->flags |= SQLITE_LoadExtension|SQLITE_LoadExtFunc; |
| 109915 | }else{ |
| 109916 | db->flags &= ~(SQLITE_LoadExtension|SQLITE_LoadExtFunc); |
| @@ -109963,11 +109995,11 @@ | |
| 109963 | |
| 109964 | /* |
| 109965 | ** Register a statically linked extension that is automatically |
| 109966 | ** loaded by every new database connection. |
| 109967 | */ |
| 109968 | SQLITE_API int SQLITE_APICALL sqlite3_auto_extension( |
| 109969 | void (*xInit)(void) |
| 109970 | ){ |
| 109971 | int rc = SQLITE_OK; |
| 109972 | #ifndef SQLITE_OMIT_AUTOINIT |
| 109973 | rc = sqlite3_initialize(); |
| @@ -110010,11 +110042,11 @@ | |
| 110010 | ** routine is a no-op. |
| 110011 | ** |
| 110012 | ** Return 1 if xInit was found on the list and removed. Return 0 if xInit |
| 110013 | ** was not on the list. |
| 110014 | */ |
| 110015 | SQLITE_API int SQLITE_APICALL sqlite3_cancel_auto_extension( |
| 110016 | void (*xInit)(void) |
| 110017 | ){ |
| 110018 | #if SQLITE_THREADSAFE |
| 110019 | sqlite3_mutex *mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER); |
| 110020 | #endif |
| @@ -110035,11 +110067,11 @@ | |
| 110035 | } |
| 110036 | |
| 110037 | /* |
| 110038 | ** Reset the automatic extension loading mechanism. |
| 110039 | */ |
| 110040 | SQLITE_API void SQLITE_APICALL sqlite3_reset_auto_extension(void){ |
| 110041 | #ifndef SQLITE_OMIT_AUTOINIT |
| 110042 | if( sqlite3_initialize()==SQLITE_OK ) |
| 110043 | #endif |
| 110044 | { |
| 110045 | #if SQLITE_THREADSAFE |
| @@ -113296,11 +113328,11 @@ | |
| 113296 | ** and so if a schema change occurs, SQLITE_SCHEMA is returned by |
| 113297 | ** sqlite3_step(). In the new version, the original SQL text is retained |
| 113298 | ** and the statement is automatically recompiled if an schema change |
| 113299 | ** occurs. |
| 113300 | */ |
| 113301 | SQLITE_API int SQLITE_APICALL sqlite3_prepare( |
| 113302 | sqlite3 *db, /* Database handle. */ |
| 113303 | const char *zSql, /* UTF-8 encoded SQL statement. */ |
| 113304 | int nBytes, /* Length of zSql in bytes. */ |
| 113305 | sqlite3_stmt **ppStmt, /* OUT: A pointer to the prepared statement */ |
| 113306 | const char **pzTail /* OUT: End of parsed string */ |
| @@ -113308,11 +113340,11 @@ | |
| 113308 | int rc; |
| 113309 | rc = sqlite3LockAndPrepare(db,zSql,nBytes,0,0,ppStmt,pzTail); |
| 113310 | assert( rc==SQLITE_OK || ppStmt==0 || *ppStmt==0 ); /* VERIFY: F13021 */ |
| 113311 | return rc; |
| 113312 | } |
| 113313 | SQLITE_API int SQLITE_APICALL sqlite3_prepare_v2( |
| 113314 | sqlite3 *db, /* Database handle. */ |
| 113315 | const char *zSql, /* UTF-8 encoded SQL statement. */ |
| 113316 | int nBytes, /* Length of zSql in bytes. */ |
| 113317 | sqlite3_stmt **ppStmt, /* OUT: A pointer to the prepared statement */ |
| 113318 | const char **pzTail /* OUT: End of parsed string */ |
| @@ -113384,11 +113416,11 @@ | |
| 113384 | ** and so if a schema change occurs, SQLITE_SCHEMA is returned by |
| 113385 | ** sqlite3_step(). In the new version, the original SQL text is retained |
| 113386 | ** and the statement is automatically recompiled if an schema change |
| 113387 | ** occurs. |
| 113388 | */ |
| 113389 | SQLITE_API int SQLITE_APICALL sqlite3_prepare16( |
| 113390 | sqlite3 *db, /* Database handle. */ |
| 113391 | const void *zSql, /* UTF-16 encoded SQL statement. */ |
| 113392 | int nBytes, /* Length of zSql in bytes. */ |
| 113393 | sqlite3_stmt **ppStmt, /* OUT: A pointer to the prepared statement */ |
| 113394 | const void **pzTail /* OUT: End of parsed string */ |
| @@ -113396,11 +113428,11 @@ | |
| 113396 | int rc; |
| 113397 | rc = sqlite3Prepare16(db,zSql,nBytes,0,ppStmt,pzTail); |
| 113398 | assert( rc==SQLITE_OK || ppStmt==0 || *ppStmt==0 ); /* VERIFY: F13021 */ |
| 113399 | return rc; |
| 113400 | } |
| 113401 | SQLITE_API int SQLITE_APICALL sqlite3_prepare16_v2( |
| 113402 | sqlite3 *db, /* Database handle. */ |
| 113403 | const void *zSql, /* UTF-16 encoded SQL statement. */ |
| 113404 | int nBytes, /* Length of zSql in bytes. */ |
| 113405 | sqlite3_stmt **ppStmt, /* OUT: A pointer to the prepared statement */ |
| 113406 | const void **pzTail /* OUT: End of parsed string */ |
| @@ -119239,11 +119271,11 @@ | |
| 119239 | ** The result that is written to ***pazResult is held in memory obtained |
| 119240 | ** from malloc(). But the caller cannot free this memory directly. |
| 119241 | ** Instead, the entire table should be passed to sqlite3_free_table() when |
| 119242 | ** the calling procedure is finished using it. |
| 119243 | */ |
| 119244 | SQLITE_API int SQLITE_APICALL sqlite3_get_table( |
| 119245 | sqlite3 *db, /* The database on which the SQL executes */ |
| 119246 | const char *zSql, /* The SQL to be executed */ |
| 119247 | char ***pazResult, /* Write the result table here */ |
| 119248 | int *pnRow, /* Write the number of rows in the result here */ |
| 119249 | int *pnColumn, /* Write the number of columns of result here */ |
| @@ -119308,11 +119340,11 @@ | |
| 119308 | } |
| 119309 | |
| 119310 | /* |
| 119311 | ** This routine frees the space the sqlite3_get_table() malloced. |
| 119312 | */ |
| 119313 | SQLITE_API void SQLITE_APICALL sqlite3_free_table( |
| 119314 | char **azResult /* Result returned from sqlite3_get_table() */ |
| 119315 | ){ |
| 119316 | if( azResult ){ |
| 119317 | int i, n; |
| 119318 | azResult--; |
| @@ -121718,11 +121750,11 @@ | |
| 121718 | |
| 121719 | |
| 121720 | /* |
| 121721 | ** External API function used to create a new virtual-table module. |
| 121722 | */ |
| 121723 | SQLITE_API int SQLITE_APICALL sqlite3_create_module( |
| 121724 | sqlite3 *db, /* Database in which module is registered */ |
| 121725 | const char *zName, /* Name assigned to this module */ |
| 121726 | const sqlite3_module *pModule, /* The definition of the module */ |
| 121727 | void *pAux /* Context pointer for xCreate/xConnect */ |
| 121728 | ){ |
| @@ -121733,11 +121765,11 @@ | |
| 121733 | } |
| 121734 | |
| 121735 | /* |
| 121736 | ** External API function used to create a new virtual-table module. |
| 121737 | */ |
| 121738 | SQLITE_API int SQLITE_APICALL sqlite3_create_module_v2( |
| 121739 | sqlite3 *db, /* Database in which module is registered */ |
| 121740 | const char *zName, /* Name assigned to this module */ |
| 121741 | const sqlite3_module *pModule, /* The definition of the module */ |
| 121742 | void *pAux, /* Context pointer for xCreate/xConnect */ |
| 121743 | void (*xDestroy)(void *) /* Module destructor function */ |
| @@ -122357,11 +122389,11 @@ | |
| 122357 | /* |
| 122358 | ** This function is used to set the schema of a virtual table. It is only |
| 122359 | ** valid to call this function from within the xCreate() or xConnect() of a |
| 122360 | ** virtual table module. |
| 122361 | */ |
| 122362 | SQLITE_API int SQLITE_APICALL sqlite3_declare_vtab(sqlite3 *db, const char *zCreateTable){ |
| 122363 | VtabCtx *pCtx; |
| 122364 | Parse *pParse; |
| 122365 | int rc = SQLITE_OK; |
| 122366 | Table *pTab; |
| 122367 | char *zErr = 0; |
| @@ -122587,11 +122619,14 @@ | |
| 122587 | if( rc==SQLITE_OK ){ |
| 122588 | rc = pModule->xBegin(pVTab->pVtab); |
| 122589 | if( rc==SQLITE_OK ){ |
| 122590 | int iSvpt = db->nStatement + db->nSavepoint; |
| 122591 | addToVTrans(db, pVTab); |
| 122592 | if( iSvpt ) rc = sqlite3VtabSavepoint(db, SAVEPOINT_BEGIN, iSvpt-1); |
| 122593 | } |
| 122594 | } |
| 122595 | } |
| 122596 | return rc; |
| 122597 | } |
| @@ -122811,11 +122846,11 @@ | |
| 122811 | ** table update operation currently in progress. |
| 122812 | ** |
| 122813 | ** The results of this routine are undefined unless it is called from |
| 122814 | ** within an xUpdate method. |
| 122815 | */ |
| 122816 | SQLITE_API int SQLITE_APICALL sqlite3_vtab_on_conflict(sqlite3 *db){ |
| 122817 | static const unsigned char aMap[] = { |
| 122818 | SQLITE_ROLLBACK, SQLITE_ABORT, SQLITE_FAIL, SQLITE_IGNORE, SQLITE_REPLACE |
| 122819 | }; |
| 122820 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 122821 | if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT; |
| @@ -130601,11 +130636,11 @@ | |
| 130601 | }else{ |
| 130602 | pWInfo->nOBSat = pFrom->isOrdered; |
| 130603 | pWInfo->revMask = pFrom->revLoop; |
| 130604 | if( pWInfo->nOBSat<=0 ){ |
| 130605 | pWInfo->nOBSat = 0; |
| 130606 | if( nLoop>0 ){ |
| 130607 | Bitmask m = 0; |
| 130608 | int rc = wherePathSatisfiesOrderBy(pWInfo, pWInfo->pOrderBy, pFrom, |
| 130609 | WHERE_ORDERBY_LIMIT, nLoop-1, pFrom->aLoop[nLoop-1], &m); |
| 130610 | if( rc==pWInfo->pOrderBy->nExpr ){ |
| 130611 | pWInfo->bOrderedInnerLoop = 1; |
| @@ -136136,11 +136171,11 @@ | |
| 136136 | ** |
| 136137 | ** If we compile with SQLITE_OMIT_TRIGGER, all of the computation needed |
| 136138 | ** to recognize the end of a trigger can be omitted. All we have to do |
| 136139 | ** is look for a semicolon that is not part of an string or comment. |
| 136140 | */ |
| 136141 | SQLITE_API int SQLITE_APICALL sqlite3_complete(const char *zSql){ |
| 136142 | u8 state = 0; /* Current state, using numbers defined in header comment */ |
| 136143 | u8 token; /* Value of the next token */ |
| 136144 | |
| 136145 | #ifndef SQLITE_OMIT_TRIGGER |
| 136146 | /* A complex statement machine used to detect the end of a CREATE TRIGGER |
| @@ -136301,11 +136336,11 @@ | |
| 136301 | /* |
| 136302 | ** This routine is the same as the sqlite3_complete() routine described |
| 136303 | ** above, except that the parameter is required to be UTF-16 encoded, not |
| 136304 | ** UTF-8. |
| 136305 | */ |
| 136306 | SQLITE_API int SQLITE_APICALL sqlite3_complete16(const void *zSql){ |
| 136307 | sqlite3_value *pVal; |
| 136308 | char const *zSql8; |
| 136309 | int rc; |
| 136310 | |
| 136311 | #ifndef SQLITE_OMIT_AUTOINIT |
| @@ -136461,28 +136496,28 @@ | |
| 136461 | #endif |
| 136462 | |
| 136463 | /* IMPLEMENTATION-OF: R-53536-42575 The sqlite3_libversion() function returns |
| 136464 | ** a pointer to the to the sqlite3_version[] string constant. |
| 136465 | */ |
| 136466 | SQLITE_API const char *SQLITE_APICALL sqlite3_libversion(void){ return sqlite3_version; } |
| 136467 | |
| 136468 | /* IMPLEMENTATION-OF: R-63124-39300 The sqlite3_sourceid() function returns a |
| 136469 | ** pointer to a string constant whose value is the same as the |
| 136470 | ** SQLITE_SOURCE_ID C preprocessor macro. |
| 136471 | */ |
| 136472 | SQLITE_API const char *SQLITE_APICALL sqlite3_sourceid(void){ return SQLITE_SOURCE_ID; } |
| 136473 | |
| 136474 | /* IMPLEMENTATION-OF: R-35210-63508 The sqlite3_libversion_number() function |
| 136475 | ** returns an integer equal to SQLITE_VERSION_NUMBER. |
| 136476 | */ |
| 136477 | SQLITE_API int SQLITE_APICALL sqlite3_libversion_number(void){ return SQLITE_VERSION_NUMBER; } |
| 136478 | |
| 136479 | /* IMPLEMENTATION-OF: R-20790-14025 The sqlite3_threadsafe() function returns |
| 136480 | ** zero if and only if SQLite was compiled with mutexing code omitted due to |
| 136481 | ** the SQLITE_THREADSAFE compile-time option being set to 0. |
| 136482 | */ |
| 136483 | SQLITE_API int SQLITE_APICALL sqlite3_threadsafe(void){ return SQLITE_THREADSAFE; } |
| 136484 | |
| 136485 | /* |
| 136486 | ** When compiling the test fixture or with debugging enabled (on Win32), |
| 136487 | ** this variable being set to non-zero will cause OSTRACE macros to emit |
| 136488 | ** extra diagnostic information. |
| @@ -136551,11 +136586,11 @@ | |
| 136551 | ** call by X completes. |
| 136552 | ** |
| 136553 | ** * Recursive calls to this routine from thread X return immediately |
| 136554 | ** without blocking. |
| 136555 | */ |
| 136556 | SQLITE_API int SQLITE_APICALL sqlite3_initialize(void){ |
| 136557 | MUTEX_LOGIC( sqlite3_mutex *pMaster; ) /* The main static mutex */ |
| 136558 | int rc; /* Result code */ |
| 136559 | #ifdef SQLITE_EXTRA_INIT |
| 136560 | int bRunExtraInit = 0; /* Extra initialization needed */ |
| 136561 | #endif |
| @@ -136717,11 +136752,11 @@ | |
| 136717 | ** while any part of SQLite is otherwise in use in any thread. This |
| 136718 | ** routine is not threadsafe. But it is safe to invoke this routine |
| 136719 | ** on when SQLite is already shut down. If SQLite is already shut down |
| 136720 | ** when this routine is invoked, then this routine is a harmless no-op. |
| 136721 | */ |
| 136722 | SQLITE_API int SQLITE_APICALL sqlite3_shutdown(void){ |
| 136723 | #ifdef SQLITE_OMIT_WSD |
| 136724 | int rc = sqlite3_wsd_init(4096, 24); |
| 136725 | if( rc!=SQLITE_OK ){ |
| 136726 | return rc; |
| 136727 | } |
| @@ -137136,11 +137171,11 @@ | |
| 137136 | } |
| 137137 | |
| 137138 | /* |
| 137139 | ** Return the mutex associated with a database connection. |
| 137140 | */ |
| 137141 | SQLITE_API sqlite3_mutex *SQLITE_APICALL sqlite3_db_mutex(sqlite3 *db){ |
| 137142 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 137143 | if( !sqlite3SafetyCheckOk(db) ){ |
| 137144 | (void)SQLITE_MISUSE_BKPT; |
| 137145 | return 0; |
| 137146 | } |
| @@ -137150,11 +137185,11 @@ | |
| 137150 | |
| 137151 | /* |
| 137152 | ** Free up as much memory as we can from the given database |
| 137153 | ** connection. |
| 137154 | */ |
| 137155 | SQLITE_API int SQLITE_APICALL sqlite3_db_release_memory(sqlite3 *db){ |
| 137156 | int i; |
| 137157 | |
| 137158 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 137159 | if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT; |
| 137160 | #endif |
| @@ -137174,11 +137209,11 @@ | |
| 137174 | |
| 137175 | /* |
| 137176 | ** Flush any dirty pages in the pager-cache for any attached database |
| 137177 | ** to disk. |
| 137178 | */ |
| 137179 | SQLITE_API int SQLITE_APICALL sqlite3_db_cacheflush(sqlite3 *db){ |
| 137180 | int i; |
| 137181 | int rc = SQLITE_OK; |
| 137182 | int bSeenBusy = 0; |
| 137183 | |
| 137184 | #ifdef SQLITE_ENABLE_API_ARMOR |
| @@ -137324,11 +137359,11 @@ | |
| 137324 | } |
| 137325 | |
| 137326 | /* |
| 137327 | ** Return the ROWID of the most recent insert |
| 137328 | */ |
| 137329 | SQLITE_API sqlite_int64 SQLITE_APICALL sqlite3_last_insert_rowid(sqlite3 *db){ |
| 137330 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 137331 | if( !sqlite3SafetyCheckOk(db) ){ |
| 137332 | (void)SQLITE_MISUSE_BKPT; |
| 137333 | return 0; |
| 137334 | } |
| @@ -137337,11 +137372,11 @@ | |
| 137337 | } |
| 137338 | |
| 137339 | /* |
| 137340 | ** Return the number of changes in the most recent call to sqlite3_exec(). |
| 137341 | */ |
| 137342 | SQLITE_API int SQLITE_APICALL sqlite3_changes(sqlite3 *db){ |
| 137343 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 137344 | if( !sqlite3SafetyCheckOk(db) ){ |
| 137345 | (void)SQLITE_MISUSE_BKPT; |
| 137346 | return 0; |
| 137347 | } |
| @@ -137350,11 +137385,11 @@ | |
| 137350 | } |
| 137351 | |
| 137352 | /* |
| 137353 | ** Return the number of changes since the database handle was opened. |
| 137354 | */ |
| 137355 | SQLITE_API int SQLITE_APICALL sqlite3_total_changes(sqlite3 *db){ |
| 137356 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 137357 | if( !sqlite3SafetyCheckOk(db) ){ |
| 137358 | (void)SQLITE_MISUSE_BKPT; |
| 137359 | return 0; |
| 137360 | } |
| @@ -137501,12 +137536,12 @@ | |
| 137501 | ** statements or unfinished sqlite3_backups. The sqlite3_close_v2() |
| 137502 | ** version forces the connection to become a zombie if there are |
| 137503 | ** unclosed resources, and arranges for deallocation when the last |
| 137504 | ** prepare statement or sqlite3_backup closes. |
| 137505 | */ |
| 137506 | SQLITE_API int SQLITE_APICALL sqlite3_close(sqlite3 *db){ return sqlite3Close(db,0); } |
| 137507 | SQLITE_API int SQLITE_APICALL sqlite3_close_v2(sqlite3 *db){ return sqlite3Close(db,1); } |
| 137508 | |
| 137509 | |
| 137510 | /* |
| 137511 | ** Close the mutex on database connection db. |
| 137512 | ** |
| @@ -137909,11 +137944,11 @@ | |
| 137909 | |
| 137910 | /* |
| 137911 | ** This routine sets the busy callback for an Sqlite database to the |
| 137912 | ** given callback function with the given argument. |
| 137913 | */ |
| 137914 | SQLITE_API int SQLITE_APICALL sqlite3_busy_handler( |
| 137915 | sqlite3 *db, |
| 137916 | int (*xBusy)(void*,int), |
| 137917 | void *pArg |
| 137918 | ){ |
| 137919 | #ifdef SQLITE_ENABLE_API_ARMOR |
| @@ -137932,11 +137967,11 @@ | |
| 137932 | /* |
| 137933 | ** This routine sets the progress callback for an Sqlite database to the |
| 137934 | ** given callback function with the given argument. The progress callback will |
| 137935 | ** be invoked every nOps opcodes. |
| 137936 | */ |
| 137937 | SQLITE_API void SQLITE_APICALL sqlite3_progress_handler( |
| 137938 | sqlite3 *db, |
| 137939 | int nOps, |
| 137940 | int (*xProgress)(void*), |
| 137941 | void *pArg |
| 137942 | ){ |
| @@ -137963,11 +137998,11 @@ | |
| 137963 | |
| 137964 | /* |
| 137965 | ** This routine installs a default busy handler that waits for the |
| 137966 | ** specified number of milliseconds before returning 0. |
| 137967 | */ |
| 137968 | SQLITE_API int SQLITE_APICALL sqlite3_busy_timeout(sqlite3 *db, int ms){ |
| 137969 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 137970 | if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT; |
| 137971 | #endif |
| 137972 | if( ms>0 ){ |
| 137973 | sqlite3_busy_handler(db, sqliteDefaultBusyCallback, (void*)db); |
| @@ -137979,11 +138014,11 @@ | |
| 137979 | } |
| 137980 | |
| 137981 | /* |
| 137982 | ** Cause any pending operation to stop at its earliest opportunity. |
| 137983 | */ |
| 137984 | SQLITE_API void SQLITE_APICALL sqlite3_interrupt(sqlite3 *db){ |
| 137985 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 137986 | if( !sqlite3SafetyCheckOk(db) ){ |
| 137987 | (void)SQLITE_MISUSE_BKPT; |
| 137988 | return; |
| 137989 | } |
| @@ -138095,11 +138130,11 @@ | |
| 138095 | } |
| 138096 | |
| 138097 | /* |
| 138098 | ** Create new user functions. |
| 138099 | */ |
| 138100 | SQLITE_API int SQLITE_APICALL sqlite3_create_function( |
| 138101 | sqlite3 *db, |
| 138102 | const char *zFunc, |
| 138103 | int nArg, |
| 138104 | int enc, |
| 138105 | void *p, |
| @@ -138109,11 +138144,11 @@ | |
| 138109 | ){ |
| 138110 | return sqlite3_create_function_v2(db, zFunc, nArg, enc, p, xSFunc, xStep, |
| 138111 | xFinal, 0); |
| 138112 | } |
| 138113 | |
| 138114 | SQLITE_API int SQLITE_APICALL sqlite3_create_function_v2( |
| 138115 | sqlite3 *db, |
| 138116 | const char *zFunc, |
| 138117 | int nArg, |
| 138118 | int enc, |
| 138119 | void *p, |
| @@ -138152,11 +138187,11 @@ | |
| 138152 | sqlite3_mutex_leave(db->mutex); |
| 138153 | return rc; |
| 138154 | } |
| 138155 | |
| 138156 | #ifndef SQLITE_OMIT_UTF16 |
| 138157 | SQLITE_API int SQLITE_APICALL sqlite3_create_function16( |
| 138158 | sqlite3 *db, |
| 138159 | const void *zFunctionName, |
| 138160 | int nArg, |
| 138161 | int eTextRep, |
| 138162 | void *p, |
| @@ -138192,11 +138227,11 @@ | |
| 138192 | ** When virtual tables intend to provide an overloaded function, they |
| 138193 | ** should call this routine to make sure the global function exists. |
| 138194 | ** A global function must exist in order for name resolution to work |
| 138195 | ** properly. |
| 138196 | */ |
| 138197 | SQLITE_API int SQLITE_APICALL sqlite3_overload_function( |
| 138198 | sqlite3 *db, |
| 138199 | const char *zName, |
| 138200 | int nArg |
| 138201 | ){ |
| 138202 | int rc = SQLITE_OK; |
| @@ -138224,11 +138259,11 @@ | |
| 138224 | ** A NULL trace function means that no tracing is executes. A non-NULL |
| 138225 | ** trace is a pointer to a function that is invoked at the start of each |
| 138226 | ** SQL statement. |
| 138227 | */ |
| 138228 | #ifndef SQLITE_OMIT_DEPRECATED |
| 138229 | SQLITE_API void *SQLITE_APICALL sqlite3_trace(sqlite3 *db, void(*xTrace)(void*,const char*), void *pArg){ |
| 138230 | void *pOld; |
| 138231 | |
| 138232 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 138233 | if( !sqlite3SafetyCheckOk(db) ){ |
| 138234 | (void)SQLITE_MISUSE_BKPT; |
| @@ -138245,11 +138280,11 @@ | |
| 138245 | } |
| 138246 | #endif /* SQLITE_OMIT_DEPRECATED */ |
| 138247 | |
| 138248 | /* Register a trace callback using the version-2 interface. |
| 138249 | */ |
| 138250 | SQLITE_API int SQLITE_APICALL sqlite3_trace_v2( |
| 138251 | sqlite3 *db, /* Trace this connection */ |
| 138252 | unsigned mTrace, /* Mask of events to be traced */ |
| 138253 | int(*xTrace)(unsigned,void*,void*,void*), /* Callback to invoke */ |
| 138254 | void *pArg /* Context */ |
| 138255 | ){ |
| @@ -138273,11 +138308,11 @@ | |
| 138273 | ** |
| 138274 | ** A NULL profile function means that no profiling is executes. A non-NULL |
| 138275 | ** profile is a pointer to a function that is invoked at the conclusion of |
| 138276 | ** each SQL statement that is run. |
| 138277 | */ |
| 138278 | SQLITE_API void *SQLITE_APICALL sqlite3_profile( |
| 138279 | sqlite3 *db, |
| 138280 | void (*xProfile)(void*,const char*,sqlite_uint64), |
| 138281 | void *pArg |
| 138282 | ){ |
| 138283 | void *pOld; |
| @@ -138301,11 +138336,11 @@ | |
| 138301 | /* |
| 138302 | ** Register a function to be invoked when a transaction commits. |
| 138303 | ** If the invoked function returns non-zero, then the commit becomes a |
| 138304 | ** rollback. |
| 138305 | */ |
| 138306 | SQLITE_API void *SQLITE_APICALL sqlite3_commit_hook( |
| 138307 | sqlite3 *db, /* Attach the hook to this database */ |
| 138308 | int (*xCallback)(void*), /* Function to invoke on each commit */ |
| 138309 | void *pArg /* Argument to the function */ |
| 138310 | ){ |
| 138311 | void *pOld; |
| @@ -138326,11 +138361,11 @@ | |
| 138326 | |
| 138327 | /* |
| 138328 | ** Register a callback to be invoked each time a row is updated, |
| 138329 | ** inserted or deleted using this database connection. |
| 138330 | */ |
| 138331 | SQLITE_API void *SQLITE_APICALL sqlite3_update_hook( |
| 138332 | sqlite3 *db, /* Attach the hook to this database */ |
| 138333 | void (*xCallback)(void*,int,char const *,char const *,sqlite_int64), |
| 138334 | void *pArg /* Argument to the function */ |
| 138335 | ){ |
| 138336 | void *pRet; |
| @@ -138351,11 +138386,11 @@ | |
| 138351 | |
| 138352 | /* |
| 138353 | ** Register a callback to be invoked each time a transaction is rolled |
| 138354 | ** back by this database connection. |
| 138355 | */ |
| 138356 | SQLITE_API void *SQLITE_APICALL sqlite3_rollback_hook( |
| 138357 | sqlite3 *db, /* Attach the hook to this database */ |
| 138358 | void (*xCallback)(void*), /* Callback function */ |
| 138359 | void *pArg /* Argument to the function */ |
| 138360 | ){ |
| 138361 | void *pRet; |
| @@ -138377,11 +138412,11 @@ | |
| 138377 | #ifdef SQLITE_ENABLE_PREUPDATE_HOOK |
| 138378 | /* |
| 138379 | ** Register a callback to be invoked each time a row is updated, |
| 138380 | ** inserted or deleted using this database connection. |
| 138381 | */ |
| 138382 | SQLITE_API void *SQLITE_APICALL sqlite3_preupdate_hook( |
| 138383 | sqlite3 *db, /* Attach the hook to this database */ |
| 138384 | void(*xCallback)( /* Callback function */ |
| 138385 | void*,sqlite3*,int,char const*,char const*,sqlite3_int64,sqlite3_int64), |
| 138386 | void *pArg /* First callback argument */ |
| 138387 | ){ |
| @@ -138426,11 +138461,11 @@ | |
| 138426 | ** The callback registered by this function replaces any existing callback |
| 138427 | ** registered using sqlite3_wal_hook(). Likewise, registering a callback |
| 138428 | ** using sqlite3_wal_hook() disables the automatic checkpoint mechanism |
| 138429 | ** configured by this function. |
| 138430 | */ |
| 138431 | SQLITE_API int SQLITE_APICALL sqlite3_wal_autocheckpoint(sqlite3 *db, int nFrame){ |
| 138432 | #ifdef SQLITE_OMIT_WAL |
| 138433 | UNUSED_PARAMETER(db); |
| 138434 | UNUSED_PARAMETER(nFrame); |
| 138435 | #else |
| 138436 | #ifdef SQLITE_ENABLE_API_ARMOR |
| @@ -138447,11 +138482,11 @@ | |
| 138447 | |
| 138448 | /* |
| 138449 | ** Register a callback to be invoked each time a transaction is written |
| 138450 | ** into the write-ahead-log by this database connection. |
| 138451 | */ |
| 138452 | SQLITE_API void *SQLITE_APICALL sqlite3_wal_hook( |
| 138453 | sqlite3 *db, /* Attach the hook to this db handle */ |
| 138454 | int(*xCallback)(void *, sqlite3*, const char*, int), |
| 138455 | void *pArg /* First argument passed to xCallback() */ |
| 138456 | ){ |
| 138457 | #ifndef SQLITE_OMIT_WAL |
| @@ -138474,11 +138509,11 @@ | |
| 138474 | } |
| 138475 | |
| 138476 | /* |
| 138477 | ** Checkpoint database zDb. |
| 138478 | */ |
| 138479 | SQLITE_API int SQLITE_APICALL sqlite3_wal_checkpoint_v2( |
| 138480 | sqlite3 *db, /* Database handle */ |
| 138481 | const char *zDb, /* Name of attached database (or NULL) */ |
| 138482 | int eMode, /* SQLITE_CHECKPOINT_* value */ |
| 138483 | int *pnLog, /* OUT: Size of WAL log in frames */ |
| 138484 | int *pnCkpt /* OUT: Total number of frames checkpointed */ |
| @@ -138529,11 +138564,11 @@ | |
| 138529 | /* |
| 138530 | ** Checkpoint database zDb. If zDb is NULL, or if the buffer zDb points |
| 138531 | ** to contains a zero-length string, all attached databases are |
| 138532 | ** checkpointed. |
| 138533 | */ |
| 138534 | SQLITE_API int SQLITE_APICALL sqlite3_wal_checkpoint(sqlite3 *db, const char *zDb){ |
| 138535 | /* EVIDENCE-OF: R-41613-20553 The sqlite3_wal_checkpoint(D,X) is equivalent to |
| 138536 | ** sqlite3_wal_checkpoint_v2(D,X,SQLITE_CHECKPOINT_PASSIVE,0,0). */ |
| 138537 | return sqlite3_wal_checkpoint_v2(db,zDb,SQLITE_CHECKPOINT_PASSIVE,0,0); |
| 138538 | } |
| 138539 | |
| @@ -138620,11 +138655,11 @@ | |
| 138620 | |
| 138621 | /* |
| 138622 | ** Return UTF-8 encoded English language explanation of the most recent |
| 138623 | ** error. |
| 138624 | */ |
| 138625 | SQLITE_API const char *SQLITE_APICALL sqlite3_errmsg(sqlite3 *db){ |
| 138626 | const char *z; |
| 138627 | if( !db ){ |
| 138628 | return sqlite3ErrStr(SQLITE_NOMEM_BKPT); |
| 138629 | } |
| 138630 | if( !sqlite3SafetyCheckSickOrOk(db) ){ |
| @@ -138648,11 +138683,11 @@ | |
| 138648 | #ifndef SQLITE_OMIT_UTF16 |
| 138649 | /* |
| 138650 | ** Return UTF-16 encoded English language explanation of the most recent |
| 138651 | ** error. |
| 138652 | */ |
| 138653 | SQLITE_API const void *SQLITE_APICALL sqlite3_errmsg16(sqlite3 *db){ |
| 138654 | static const u16 outOfMem[] = { |
| 138655 | 'o', 'u', 't', ' ', 'o', 'f', ' ', 'm', 'e', 'm', 'o', 'r', 'y', 0 |
| 138656 | }; |
| 138657 | static const u16 misuse[] = { |
| 138658 | 'l', 'i', 'b', 'r', 'a', 'r', 'y', ' ', |
| @@ -138693,38 +138728,38 @@ | |
| 138693 | |
| 138694 | /* |
| 138695 | ** Return the most recent error code generated by an SQLite routine. If NULL is |
| 138696 | ** passed to this function, we assume a malloc() failed during sqlite3_open(). |
| 138697 | */ |
| 138698 | SQLITE_API int SQLITE_APICALL sqlite3_errcode(sqlite3 *db){ |
| 138699 | if( db && !sqlite3SafetyCheckSickOrOk(db) ){ |
| 138700 | return SQLITE_MISUSE_BKPT; |
| 138701 | } |
| 138702 | if( !db || db->mallocFailed ){ |
| 138703 | return SQLITE_NOMEM_BKPT; |
| 138704 | } |
| 138705 | return db->errCode & db->errMask; |
| 138706 | } |
| 138707 | SQLITE_API int SQLITE_APICALL sqlite3_extended_errcode(sqlite3 *db){ |
| 138708 | if( db && !sqlite3SafetyCheckSickOrOk(db) ){ |
| 138709 | return SQLITE_MISUSE_BKPT; |
| 138710 | } |
| 138711 | if( !db || db->mallocFailed ){ |
| 138712 | return SQLITE_NOMEM_BKPT; |
| 138713 | } |
| 138714 | return db->errCode; |
| 138715 | } |
| 138716 | SQLITE_API int SQLITE_APICALL sqlite3_system_errno(sqlite3 *db){ |
| 138717 | return db ? db->iSysErrno : 0; |
| 138718 | } |
| 138719 | |
| 138720 | /* |
| 138721 | ** Return a string that describes the kind of error specified in the |
| 138722 | ** argument. For now, this simply calls the internal sqlite3ErrStr() |
| 138723 | ** function. |
| 138724 | */ |
| 138725 | SQLITE_API const char *SQLITE_APICALL sqlite3_errstr(int rc){ |
| 138726 | return sqlite3ErrStr(rc); |
| 138727 | } |
| 138728 | |
| 138729 | /* |
| 138730 | ** Create a new collating function for database "db". The name is zName |
| @@ -138868,11 +138903,11 @@ | |
| 138868 | ** |
| 138869 | ** A new lower limit does not shrink existing constructs. |
| 138870 | ** It merely prevents new constructs that exceed the limit |
| 138871 | ** from forming. |
| 138872 | */ |
| 138873 | SQLITE_API int SQLITE_APICALL sqlite3_limit(sqlite3 *db, int limitId, int newLimit){ |
| 138874 | int oldLimit; |
| 138875 | |
| 138876 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 138877 | if( !sqlite3SafetyCheckOk(db) ){ |
| 138878 | (void)SQLITE_MISUSE_BKPT; |
| @@ -139492,18 +139527,18 @@ | |
| 139492 | } |
| 139493 | |
| 139494 | /* |
| 139495 | ** Open a new database handle. |
| 139496 | */ |
| 139497 | SQLITE_API int SQLITE_APICALL sqlite3_open( |
| 139498 | const char *zFilename, |
| 139499 | sqlite3 **ppDb |
| 139500 | ){ |
| 139501 | return openDatabase(zFilename, ppDb, |
| 139502 | SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, 0); |
| 139503 | } |
| 139504 | SQLITE_API int SQLITE_APICALL sqlite3_open_v2( |
| 139505 | const char *filename, /* Database filename (UTF-8) */ |
| 139506 | sqlite3 **ppDb, /* OUT: SQLite db handle */ |
| 139507 | int flags, /* Flags */ |
| 139508 | const char *zVfs /* Name of VFS module to use */ |
| 139509 | ){ |
| @@ -139512,11 +139547,11 @@ | |
| 139512 | |
| 139513 | #ifndef SQLITE_OMIT_UTF16 |
| 139514 | /* |
| 139515 | ** Open a new database handle. |
| 139516 | */ |
| 139517 | SQLITE_API int SQLITE_APICALL sqlite3_open16( |
| 139518 | const void *zFilename, |
| 139519 | sqlite3 **ppDb |
| 139520 | ){ |
| 139521 | char const *zFilename8; /* zFilename encoded in UTF-8 instead of UTF-16 */ |
| 139522 | sqlite3_value *pVal; |
| @@ -139551,11 +139586,11 @@ | |
| 139551 | #endif /* SQLITE_OMIT_UTF16 */ |
| 139552 | |
| 139553 | /* |
| 139554 | ** Register a new collation sequence with the database handle db. |
| 139555 | */ |
| 139556 | SQLITE_API int SQLITE_APICALL sqlite3_create_collation( |
| 139557 | sqlite3* db, |
| 139558 | const char *zName, |
| 139559 | int enc, |
| 139560 | void* pCtx, |
| 139561 | int(*xCompare)(void*,int,const void*,int,const void*) |
| @@ -139564,11 +139599,11 @@ | |
| 139564 | } |
| 139565 | |
| 139566 | /* |
| 139567 | ** Register a new collation sequence with the database handle db. |
| 139568 | */ |
| 139569 | SQLITE_API int SQLITE_APICALL sqlite3_create_collation_v2( |
| 139570 | sqlite3* db, |
| 139571 | const char *zName, |
| 139572 | int enc, |
| 139573 | void* pCtx, |
| 139574 | int(*xCompare)(void*,int,const void*,int,const void*), |
| @@ -139589,11 +139624,11 @@ | |
| 139589 | |
| 139590 | #ifndef SQLITE_OMIT_UTF16 |
| 139591 | /* |
| 139592 | ** Register a new collation sequence with the database handle db. |
| 139593 | */ |
| 139594 | SQLITE_API int SQLITE_APICALL sqlite3_create_collation16( |
| 139595 | sqlite3* db, |
| 139596 | const void *zName, |
| 139597 | int enc, |
| 139598 | void* pCtx, |
| 139599 | int(*xCompare)(void*,int,const void*,int,const void*) |
| @@ -139619,11 +139654,11 @@ | |
| 139619 | |
| 139620 | /* |
| 139621 | ** Register a collation sequence factory callback with the database handle |
| 139622 | ** db. Replace any previously installed collation sequence factory. |
| 139623 | */ |
| 139624 | SQLITE_API int SQLITE_APICALL sqlite3_collation_needed( |
| 139625 | sqlite3 *db, |
| 139626 | void *pCollNeededArg, |
| 139627 | void(*xCollNeeded)(void*,sqlite3*,int eTextRep,const char*) |
| 139628 | ){ |
| 139629 | #ifdef SQLITE_ENABLE_API_ARMOR |
| @@ -139640,11 +139675,11 @@ | |
| 139640 | #ifndef SQLITE_OMIT_UTF16 |
| 139641 | /* |
| 139642 | ** Register a collation sequence factory callback with the database handle |
| 139643 | ** db. Replace any previously installed collation sequence factory. |
| 139644 | */ |
| 139645 | SQLITE_API int SQLITE_APICALL sqlite3_collation_needed16( |
| 139646 | sqlite3 *db, |
| 139647 | void *pCollNeededArg, |
| 139648 | void(*xCollNeeded16)(void*,sqlite3*,int eTextRep,const void*) |
| 139649 | ){ |
| 139650 | #ifdef SQLITE_ENABLE_API_ARMOR |
| @@ -139662,11 +139697,11 @@ | |
| 139662 | #ifndef SQLITE_OMIT_DEPRECATED |
| 139663 | /* |
| 139664 | ** This function is now an anachronism. It used to be used to recover from a |
| 139665 | ** malloc() failure, but SQLite now does this automatically. |
| 139666 | */ |
| 139667 | SQLITE_API int SQLITE_APICALL sqlite3_global_recover(void){ |
| 139668 | return SQLITE_OK; |
| 139669 | } |
| 139670 | #endif |
| 139671 | |
| 139672 | /* |
| @@ -139673,11 +139708,11 @@ | |
| 139673 | ** Test to see whether or not the database connection is in autocommit |
| 139674 | ** mode. Return TRUE if it is and FALSE if not. Autocommit mode is on |
| 139675 | ** by default. Autocommit is disabled by a BEGIN statement and reenabled |
| 139676 | ** by the next COMMIT or ROLLBACK. |
| 139677 | */ |
| 139678 | SQLITE_API int SQLITE_APICALL sqlite3_get_autocommit(sqlite3 *db){ |
| 139679 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 139680 | if( !sqlite3SafetyCheckOk(db) ){ |
| 139681 | (void)SQLITE_MISUSE_BKPT; |
| 139682 | return 0; |
| 139683 | } |
| @@ -139730,19 +139765,19 @@ | |
| 139730 | ** data for this thread has been deallocated. |
| 139731 | ** |
| 139732 | ** SQLite no longer uses thread-specific data so this routine is now a |
| 139733 | ** no-op. It is retained for historical compatibility. |
| 139734 | */ |
| 139735 | SQLITE_API void SQLITE_APICALL sqlite3_thread_cleanup(void){ |
| 139736 | } |
| 139737 | #endif |
| 139738 | |
| 139739 | /* |
| 139740 | ** Return meta information about a specific column of a database table. |
| 139741 | ** See comment in sqlite3.h (sqlite.h.in) for details. |
| 139742 | */ |
| 139743 | SQLITE_API int SQLITE_APICALL sqlite3_table_column_metadata( |
| 139744 | sqlite3 *db, /* Connection handle */ |
| 139745 | const char *zDbName, /* Database name or NULL */ |
| 139746 | const char *zTableName, /* Table name */ |
| 139747 | const char *zColumnName, /* Column name */ |
| 139748 | char const **pzDataType, /* OUTPUT: Declared data type */ |
| @@ -139856,11 +139891,11 @@ | |
| 139856 | } |
| 139857 | |
| 139858 | /* |
| 139859 | ** Sleep for a little while. Return the amount of time slept. |
| 139860 | */ |
| 139861 | SQLITE_API int SQLITE_APICALL sqlite3_sleep(int ms){ |
| 139862 | sqlite3_vfs *pVfs; |
| 139863 | int rc; |
| 139864 | pVfs = sqlite3_vfs_find(0); |
| 139865 | if( pVfs==0 ) return 0; |
| 139866 | |
| @@ -139872,11 +139907,11 @@ | |
| 139872 | } |
| 139873 | |
| 139874 | /* |
| 139875 | ** Enable or disable the extended result codes. |
| 139876 | */ |
| 139877 | SQLITE_API int SQLITE_APICALL sqlite3_extended_result_codes(sqlite3 *db, int onoff){ |
| 139878 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 139879 | if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT; |
| 139880 | #endif |
| 139881 | sqlite3_mutex_enter(db->mutex); |
| 139882 | db->errMask = onoff ? 0xffffffff : 0xff; |
| @@ -139885,11 +139920,11 @@ | |
| 139885 | } |
| 139886 | |
| 139887 | /* |
| 139888 | ** Invoke the xFileControl method on a particular database. |
| 139889 | */ |
| 139890 | SQLITE_API int SQLITE_APICALL sqlite3_file_control(sqlite3 *db, const char *zDbName, int op, void *pArg){ |
| 139891 | int rc = SQLITE_ERROR; |
| 139892 | Btree *pBtree; |
| 139893 | |
| 139894 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 139895 | if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT; |
| @@ -140270,11 +140305,11 @@ | |
| 140270 | ** method of a VFS implementation. The zParam argument is the name of the |
| 140271 | ** query parameter we seek. This routine returns the value of the zParam |
| 140272 | ** parameter if it exists. If the parameter does not exist, this routine |
| 140273 | ** returns a NULL pointer. |
| 140274 | */ |
| 140275 | SQLITE_API const char *SQLITE_APICALL sqlite3_uri_parameter(const char *zFilename, const char *zParam){ |
| 140276 | if( zFilename==0 || zParam==0 ) return 0; |
| 140277 | zFilename += sqlite3Strlen30(zFilename) + 1; |
| 140278 | while( zFilename[0] ){ |
| 140279 | int x = strcmp(zFilename, zParam); |
| 140280 | zFilename += sqlite3Strlen30(zFilename) + 1; |
| @@ -140285,20 +140320,20 @@ | |
| 140285 | } |
| 140286 | |
| 140287 | /* |
| 140288 | ** Return a boolean value for a query parameter. |
| 140289 | */ |
| 140290 | SQLITE_API int SQLITE_APICALL sqlite3_uri_boolean(const char *zFilename, const char *zParam, int bDflt){ |
| 140291 | const char *z = sqlite3_uri_parameter(zFilename, zParam); |
| 140292 | bDflt = bDflt!=0; |
| 140293 | return z ? sqlite3GetBoolean(z, bDflt) : bDflt; |
| 140294 | } |
| 140295 | |
| 140296 | /* |
| 140297 | ** Return a 64-bit integer value for a query parameter. |
| 140298 | */ |
| 140299 | SQLITE_API sqlite3_int64 SQLITE_APICALL sqlite3_uri_int64( |
| 140300 | const char *zFilename, /* Filename as passed to xOpen */ |
| 140301 | const char *zParam, /* URI parameter sought */ |
| 140302 | sqlite3_int64 bDflt /* return if parameter is missing */ |
| 140303 | ){ |
| 140304 | const char *z = sqlite3_uri_parameter(zFilename, zParam); |
| @@ -140326,11 +140361,11 @@ | |
| 140326 | |
| 140327 | /* |
| 140328 | ** Return the filename of the database associated with a database |
| 140329 | ** connection. |
| 140330 | */ |
| 140331 | SQLITE_API const char *SQLITE_APICALL sqlite3_db_filename(sqlite3 *db, const char *zDbName){ |
| 140332 | Btree *pBt; |
| 140333 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 140334 | if( !sqlite3SafetyCheckOk(db) ){ |
| 140335 | (void)SQLITE_MISUSE_BKPT; |
| 140336 | return 0; |
| @@ -140342,11 +140377,11 @@ | |
| 140342 | |
| 140343 | /* |
| 140344 | ** Return 1 if database is read-only or 0 if read/write. Return -1 if |
| 140345 | ** no such database exists. |
| 140346 | */ |
| 140347 | SQLITE_API int SQLITE_APICALL sqlite3_db_readonly(sqlite3 *db, const char *zDbName){ |
| 140348 | Btree *pBt; |
| 140349 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 140350 | if( !sqlite3SafetyCheckOk(db) ){ |
| 140351 | (void)SQLITE_MISUSE_BKPT; |
| 140352 | return -1; |
| @@ -140359,11 +140394,11 @@ | |
| 140359 | #ifdef SQLITE_ENABLE_SNAPSHOT |
| 140360 | /* |
| 140361 | ** Obtain a snapshot handle for the snapshot of database zDb currently |
| 140362 | ** being read by handle db. |
| 140363 | */ |
| 140364 | SQLITE_API int SQLITE_APICALL sqlite3_snapshot_get( |
| 140365 | sqlite3 *db, |
| 140366 | const char *zDb, |
| 140367 | sqlite3_snapshot **ppSnapshot |
| 140368 | ){ |
| 140369 | int rc = SQLITE_ERROR; |
| @@ -140394,11 +140429,11 @@ | |
| 140394 | } |
| 140395 | |
| 140396 | /* |
| 140397 | ** Open a read-transaction on the snapshot idendified by pSnapshot. |
| 140398 | */ |
| 140399 | SQLITE_API int SQLITE_APICALL sqlite3_snapshot_open( |
| 140400 | sqlite3 *db, |
| 140401 | const char *zDb, |
| 140402 | sqlite3_snapshot *pSnapshot |
| 140403 | ){ |
| 140404 | int rc = SQLITE_ERROR; |
| @@ -140431,11 +140466,11 @@ | |
| 140431 | } |
| 140432 | |
| 140433 | /* |
| 140434 | ** Free a snapshot handle obtained from sqlite3_snapshot_get(). |
| 140435 | */ |
| 140436 | SQLITE_API void SQLITE_APICALL sqlite3_snapshot_free(sqlite3_snapshot *pSnapshot){ |
| 140437 | sqlite3_free(pSnapshot); |
| 140438 | } |
| 140439 | #endif /* SQLITE_ENABLE_SNAPSHOT */ |
| 140440 | |
| 140441 | /************** End of main.c ************************************************/ |
| @@ -140585,11 +140620,11 @@ | |
| 140585 | ** |
| 140586 | ** Each call to this routine overrides any prior callbacks registered |
| 140587 | ** on the same "db". If xNotify==0 then any prior callbacks are immediately |
| 140588 | ** cancelled. |
| 140589 | */ |
| 140590 | SQLITE_API int SQLITE_APICALL sqlite3_unlock_notify( |
| 140591 | sqlite3 *db, |
| 140592 | void (*xNotify)(void **, int), |
| 140593 | void *pArg |
| 140594 | ){ |
| 140595 | int rc = SQLITE_OK; |
| @@ -147588,11 +147623,11 @@ | |
| 147588 | ** Initialize API pointer table, if required. |
| 147589 | */ |
| 147590 | #ifdef _WIN32 |
| 147591 | __declspec(dllexport) |
| 147592 | #endif |
| 147593 | SQLITE_API int SQLITE_APICALL sqlite3_fts3_init( |
| 147594 | sqlite3 *db, |
| 147595 | char **pzErrMsg, |
| 147596 | const sqlite3_api_routines *pApi |
| 147597 | ){ |
| 147598 | SQLITE_EXTENSION_INIT2(pApi) |
| @@ -163389,11 +163424,11 @@ | |
| 163389 | } |
| 163390 | |
| 163391 | /* |
| 163392 | ** Register a new geometry function for use with the r-tree MATCH operator. |
| 163393 | */ |
| 163394 | SQLITE_API int SQLITE_APICALL sqlite3_rtree_geometry_callback( |
| 163395 | sqlite3 *db, /* Register SQL function on this connection */ |
| 163396 | const char *zGeom, /* Name of the new SQL function */ |
| 163397 | int (*xGeom)(sqlite3_rtree_geometry*,int,RtreeDValue*,int*), /* Callback */ |
| 163398 | void *pContext /* Extra data associated with the callback */ |
| 163399 | ){ |
| @@ -163413,11 +163448,11 @@ | |
| 163413 | |
| 163414 | /* |
| 163415 | ** Register a new 2nd-generation geometry function for use with the |
| 163416 | ** r-tree MATCH operator. |
| 163417 | */ |
| 163418 | SQLITE_API int SQLITE_APICALL sqlite3_rtree_query_callback( |
| 163419 | sqlite3 *db, /* Register SQL function on this connection */ |
| 163420 | const char *zQueryFunc, /* Name of new SQL function */ |
| 163421 | int (*xQueryFunc)(sqlite3_rtree_query_info*), /* Callback */ |
| 163422 | void *pContext, /* Extra data passed into the callback */ |
| 163423 | void (*xDestructor)(void*) /* Destructor for the extra data */ |
| @@ -163438,11 +163473,11 @@ | |
| 163438 | |
| 163439 | #if !SQLITE_CORE |
| 163440 | #ifdef _WIN32 |
| 163441 | __declspec(dllexport) |
| 163442 | #endif |
| 163443 | SQLITE_API int SQLITE_APICALL sqlite3_rtree_init( |
| 163444 | sqlite3 *db, |
| 163445 | char **pzErrMsg, |
| 163446 | const sqlite3_api_routines *pApi |
| 163447 | ){ |
| 163448 | SQLITE_EXTENSION_INIT2(pApi) |
| @@ -163989,11 +164024,11 @@ | |
| 163989 | |
| 163990 | #if !SQLITE_CORE |
| 163991 | #ifdef _WIN32 |
| 163992 | __declspec(dllexport) |
| 163993 | #endif |
| 163994 | SQLITE_API int SQLITE_APICALL sqlite3_icu_init( |
| 163995 | sqlite3 *db, |
| 163996 | char **pzErrMsg, |
| 163997 | const sqlite3_api_routines *pApi |
| 163998 | ){ |
| 163999 | SQLITE_EXTENSION_INIT2(pApi) |
| @@ -164669,11 +164704,11 @@ | |
| 164669 | ** IMPORTANT NOTE FOR ZIPVFS USERS: The RBU extension works with all of |
| 164670 | ** SQLite's built-in VFSs, including the multiplexor VFS. However it does |
| 164671 | ** not work out of the box with zipvfs. Refer to the comment describing |
| 164672 | ** the zipvfs_create_vfs() API below for details on using RBU with zipvfs. |
| 164673 | */ |
| 164674 | SQLITE_API sqlite3rbu *SQLITE_APICALL sqlite3rbu_open( |
| 164675 | const char *zTarget, |
| 164676 | const char *zRbu, |
| 164677 | const char *zState |
| 164678 | ); |
| 164679 | |
| @@ -164702,11 +164737,11 @@ | |
| 164702 | ** As with sqlite3rbu_open(), Zipvfs users should rever to the comment |
| 164703 | ** describing the sqlite3rbu_create_vfs() API function below for |
| 164704 | ** a description of the complications associated with using RBU with |
| 164705 | ** zipvfs databases. |
| 164706 | */ |
| 164707 | SQLITE_API sqlite3rbu *SQLITE_APICALL sqlite3rbu_vacuum( |
| 164708 | const char *zTarget, |
| 164709 | const char *zState |
| 164710 | ); |
| 164711 | |
| 164712 | /* |
| @@ -164738,11 +164773,11 @@ | |
| 164738 | ** when sqlite3rbu_close() is called. |
| 164739 | ** |
| 164740 | ** Database handles returned by this function remain valid until the next |
| 164741 | ** call to any sqlite3rbu_xxx() function other than sqlite3rbu_db(). |
| 164742 | */ |
| 164743 | SQLITE_API sqlite3 *SQLITE_APICALL sqlite3rbu_db(sqlite3rbu*, int bRbu); |
| 164744 | |
| 164745 | /* |
| 164746 | ** Do some work towards applying the RBU update to the target db. |
| 164747 | ** |
| 164748 | ** Return SQLITE_DONE if the update has been completely applied, or |
| @@ -164752,11 +164787,11 @@ | |
| 164752 | ** |
| 164753 | ** Once a call to sqlite3rbu_step() has returned a value other than |
| 164754 | ** SQLITE_OK, all subsequent calls on the same RBU handle are no-ops |
| 164755 | ** that immediately return the same value. |
| 164756 | */ |
| 164757 | SQLITE_API int SQLITE_APICALL sqlite3rbu_step(sqlite3rbu *pRbu); |
| 164758 | |
| 164759 | /* |
| 164760 | ** Force RBU to save its state to disk. |
| 164761 | ** |
| 164762 | ** If a power failure or application crash occurs during an update, following |
| @@ -164764,11 +164799,11 @@ | |
| 164764 | ** was last saved. In other words, from the most recent successful call to |
| 164765 | ** sqlite3rbu_close() or this function. |
| 164766 | ** |
| 164767 | ** SQLITE_OK is returned if successful, or an SQLite error code otherwise. |
| 164768 | */ |
| 164769 | SQLITE_API int SQLITE_APICALL sqlite3rbu_savestate(sqlite3rbu *pRbu); |
| 164770 | |
| 164771 | /* |
| 164772 | ** Close an RBU handle. |
| 164773 | ** |
| 164774 | ** If the RBU update has been completely applied, mark the RBU database |
| @@ -164784,18 +164819,18 @@ | |
| 164784 | ** |
| 164785 | ** Otherwise, if no error occurs, this function returns SQLITE_OK if the |
| 164786 | ** update has been partially applied, or SQLITE_DONE if it has been |
| 164787 | ** completely applied. |
| 164788 | */ |
| 164789 | SQLITE_API int SQLITE_APICALL sqlite3rbu_close(sqlite3rbu *pRbu, char **pzErrmsg); |
| 164790 | |
| 164791 | /* |
| 164792 | ** Return the total number of key-value operations (inserts, deletes or |
| 164793 | ** updates) that have been performed on the target database since the |
| 164794 | ** current RBU update was started. |
| 164795 | */ |
| 164796 | SQLITE_API sqlite3_int64 SQLITE_APICALL sqlite3rbu_progress(sqlite3rbu *pRbu); |
| 164797 | |
| 164798 | /* |
| 164799 | ** Obtain permyriadage (permyriadage is to 10000 as percentage is to 100) |
| 164800 | ** progress indications for the two stages of an RBU update. This API may |
| 164801 | ** be useful for driving GUI progress indicators and similar. |
| @@ -164833,11 +164868,11 @@ | |
| 164833 | ** permyriadage progress of the same stage. If the rbu_count table does |
| 164834 | ** not exist, then (*pnOne) is set to -1 during stage 1. If the rbu_count |
| 164835 | ** table exists but is not correctly populated, the value of the *pnOne |
| 164836 | ** output variable during stage 1 is undefined. |
| 164837 | */ |
| 164838 | SQLITE_API void SQLITE_APICALL sqlite3rbu_bp_progress(sqlite3rbu *pRbu, int *pnOne, int *pnTwo); |
| 164839 | |
| 164840 | /* |
| 164841 | ** Obtain an indication as to the current stage of an RBU update or vacuum. |
| 164842 | ** This function always returns one of the SQLITE_RBU_STATE_XXX constants |
| 164843 | ** defined in this file. Return values should be interpreted as follows: |
| @@ -164871,11 +164906,11 @@ | |
| 164871 | #define SQLITE_RBU_STATE_MOVE 2 |
| 164872 | #define SQLITE_RBU_STATE_CHECKPOINT 3 |
| 164873 | #define SQLITE_RBU_STATE_DONE 4 |
| 164874 | #define SQLITE_RBU_STATE_ERROR 5 |
| 164875 | |
| 164876 | SQLITE_API int SQLITE_APICALL sqlite3rbu_state(sqlite3rbu *pRbu); |
| 164877 | |
| 164878 | /* |
| 164879 | ** Create an RBU VFS named zName that accesses the underlying file-system |
| 164880 | ** via existing VFS zParent. Or, if the zParent parameter is passed NULL, |
| 164881 | ** then the new RBU VFS uses the default system VFS to access the file-system. |
| @@ -164915,21 +164950,21 @@ | |
| 164915 | ** The overhead of adding the "rbu" VFS to the system is negligible for |
| 164916 | ** non-RBU users. There is no harm in an application accessing the |
| 164917 | ** file-system via "rbu" all the time, even if it only uses RBU functionality |
| 164918 | ** occasionally. |
| 164919 | */ |
| 164920 | SQLITE_API int SQLITE_APICALL sqlite3rbu_create_vfs(const char *zName, const char *zParent); |
| 164921 | |
| 164922 | /* |
| 164923 | ** Deregister and destroy an RBU vfs created by an earlier call to |
| 164924 | ** sqlite3rbu_create_vfs(). |
| 164925 | ** |
| 164926 | ** VFS objects are not reference counted. If a VFS object is destroyed |
| 164927 | ** before all database handles that use it have been closed, the results |
| 164928 | ** are undefined. |
| 164929 | */ |
| 164930 | SQLITE_API void SQLITE_APICALL sqlite3rbu_destroy_vfs(const char *zName); |
| 164931 | |
| 164932 | #if 0 |
| 164933 | } /* end of the 'extern "C"' block */ |
| 164934 | #endif |
| 164935 | |
| @@ -168019,11 +168054,11 @@ | |
| 168019 | } |
| 168020 | |
| 168021 | /* |
| 168022 | ** Step the RBU object. |
| 168023 | */ |
| 168024 | SQLITE_API int SQLITE_APICALL sqlite3rbu_step(sqlite3rbu *p){ |
| 168025 | if( p ){ |
| 168026 | switch( p->eStage ){ |
| 168027 | case RBU_STAGE_OAL: { |
| 168028 | RbuObjIter *pIter = &p->objiter; |
| 168029 | |
| @@ -168461,11 +168496,11 @@ | |
| 168461 | } |
| 168462 | |
| 168463 | /* |
| 168464 | ** Open and return a new RBU handle. |
| 168465 | */ |
| 168466 | SQLITE_API sqlite3rbu *SQLITE_APICALL sqlite3rbu_open( |
| 168467 | const char *zTarget, |
| 168468 | const char *zRbu, |
| 168469 | const char *zState |
| 168470 | ){ |
| 168471 | /* TODO: Check that zTarget and zRbu are non-NULL */ |
| @@ -168473,11 +168508,11 @@ | |
| 168473 | } |
| 168474 | |
| 168475 | /* |
| 168476 | ** Open a handle to begin or resume an RBU VACUUM operation. |
| 168477 | */ |
| 168478 | SQLITE_API sqlite3rbu *SQLITE_APICALL sqlite3rbu_vacuum( |
| 168479 | const char *zTarget, |
| 168480 | const char *zState |
| 168481 | ){ |
| 168482 | /* TODO: Check that both arguments are non-NULL */ |
| 168483 | return openRbuHandle(0, zTarget, zState); |
| @@ -168484,11 +168519,11 @@ | |
| 168484 | } |
| 168485 | |
| 168486 | /* |
| 168487 | ** Return the database handle used by pRbu. |
| 168488 | */ |
| 168489 | SQLITE_API sqlite3 *SQLITE_APICALL sqlite3rbu_db(sqlite3rbu *pRbu, int bRbu){ |
| 168490 | sqlite3 *db = 0; |
| 168491 | if( pRbu ){ |
| 168492 | db = (bRbu ? pRbu->dbRbu : pRbu->dbMain); |
| 168493 | } |
| 168494 | return db; |
| @@ -168516,11 +168551,11 @@ | |
| 168516 | } |
| 168517 | |
| 168518 | /* |
| 168519 | ** Close the RBU handle. |
| 168520 | */ |
| 168521 | SQLITE_API int SQLITE_APICALL sqlite3rbu_close(sqlite3rbu *p, char **pzErrmsg){ |
| 168522 | int rc; |
| 168523 | if( p ){ |
| 168524 | |
| 168525 | /* Commit the transaction to the *-oal file. */ |
| 168526 | if( p->rc==SQLITE_OK && p->eStage==RBU_STAGE_OAL ){ |
| @@ -168567,19 +168602,19 @@ | |
| 168567 | /* |
| 168568 | ** Return the total number of key-value operations (inserts, deletes or |
| 168569 | ** updates) that have been performed on the target database since the |
| 168570 | ** current RBU update was started. |
| 168571 | */ |
| 168572 | SQLITE_API sqlite3_int64 SQLITE_APICALL sqlite3rbu_progress(sqlite3rbu *pRbu){ |
| 168573 | return pRbu->nProgress; |
| 168574 | } |
| 168575 | |
| 168576 | /* |
| 168577 | ** Return permyriadage progress indications for the two main stages of |
| 168578 | ** an RBU update. |
| 168579 | */ |
| 168580 | SQLITE_API void SQLITE_APICALL sqlite3rbu_bp_progress(sqlite3rbu *p, int *pnOne, int *pnTwo){ |
| 168581 | const int MAX_PROGRESS = 10000; |
| 168582 | switch( p->eStage ){ |
| 168583 | case RBU_STAGE_OAL: |
| 168584 | if( p->nPhaseOneStep>0 ){ |
| 168585 | *pnOne = (int)(MAX_PROGRESS * (i64)p->nProgress/(i64)p->nPhaseOneStep); |
| @@ -168610,11 +168645,11 @@ | |
| 168610 | } |
| 168611 | |
| 168612 | /* |
| 168613 | ** Return the current state of the RBU vacuum or update operation. |
| 168614 | */ |
| 168615 | SQLITE_API int SQLITE_APICALL sqlite3rbu_state(sqlite3rbu *p){ |
| 168616 | int aRes[] = { |
| 168617 | 0, SQLITE_RBU_STATE_OAL, SQLITE_RBU_STATE_MOVE, |
| 168618 | 0, SQLITE_RBU_STATE_CHECKPOINT, SQLITE_RBU_STATE_DONE |
| 168619 | }; |
| 168620 | |
| @@ -168638,11 +168673,11 @@ | |
| 168638 | ); |
| 168639 | return aRes[p->eStage]; |
| 168640 | } |
| 168641 | } |
| 168642 | |
| 168643 | SQLITE_API int SQLITE_APICALL sqlite3rbu_savestate(sqlite3rbu *p){ |
| 168644 | int rc = p->rc; |
| 168645 | if( rc==SQLITE_DONE ) return SQLITE_OK; |
| 168646 | |
| 168647 | assert( p->eStage>=RBU_STAGE_OAL && p->eStage<=RBU_STAGE_DONE ); |
| 168648 | if( p->eStage==RBU_STAGE_OAL ){ |
| @@ -169465,11 +169500,11 @@ | |
| 169465 | |
| 169466 | /* |
| 169467 | ** Deregister and destroy an RBU vfs created by an earlier call to |
| 169468 | ** sqlite3rbu_create_vfs(). |
| 169469 | */ |
| 169470 | SQLITE_API void SQLITE_APICALL sqlite3rbu_destroy_vfs(const char *zName){ |
| 169471 | sqlite3_vfs *pVfs = sqlite3_vfs_find(zName); |
| 169472 | if( pVfs && pVfs->xOpen==rbuVfsOpen ){ |
| 169473 | sqlite3_mutex_free(((rbu_vfs*)pVfs)->mutex); |
| 169474 | sqlite3_vfs_unregister(pVfs); |
| 169475 | sqlite3_free(pVfs); |
| @@ -169479,11 +169514,11 @@ | |
| 169479 | /* |
| 169480 | ** Create an RBU VFS named zName that accesses the underlying file-system |
| 169481 | ** via existing VFS zParent. The new object is registered as a non-default |
| 169482 | ** VFS with SQLite before returning. |
| 169483 | */ |
| 169484 | SQLITE_API int SQLITE_APICALL sqlite3rbu_create_vfs(const char *zName, const char *zParent){ |
| 169485 | |
| 169486 | /* Template for VFS */ |
| 169487 | static sqlite3_vfs vfs_template = { |
| 169488 | 1, /* iVersion */ |
| 169489 | 0, /* szOsFile */ |
| @@ -171724,11 +171759,11 @@ | |
| 171724 | } |
| 171725 | |
| 171726 | return rc; |
| 171727 | } |
| 171728 | |
| 171729 | SQLITE_API int SQLITE_APICALL sqlite3session_diff( |
| 171730 | sqlite3_session *pSession, |
| 171731 | const char *zFrom, |
| 171732 | const char *zTbl, |
| 171733 | char **pzErrMsg |
| 171734 | ){ |
| @@ -171818,11 +171853,11 @@ | |
| 171818 | |
| 171819 | /* |
| 171820 | ** Create a session object. This session object will record changes to |
| 171821 | ** database zDb attached to connection db. |
| 171822 | */ |
| 171823 | SQLITE_API int SQLITE_APICALL sqlite3session_create( |
| 171824 | sqlite3 *db, /* Database handle */ |
| 171825 | const char *zDb, /* Name of db (e.g. "main") */ |
| 171826 | sqlite3_session **ppSession /* OUT: New session object */ |
| 171827 | ){ |
| 171828 | sqlite3_session *pNew; /* Newly allocated session object */ |
| @@ -171880,11 +171915,11 @@ | |
| 171880 | } |
| 171881 | |
| 171882 | /* |
| 171883 | ** Delete a session object previously allocated using sqlite3session_create(). |
| 171884 | */ |
| 171885 | SQLITE_API void SQLITE_APICALL sqlite3session_delete(sqlite3_session *pSession){ |
| 171886 | sqlite3 *db = pSession->db; |
| 171887 | sqlite3_session *pHead; |
| 171888 | sqlite3_session **pp; |
| 171889 | |
| 171890 | /* Unlink the session from the linked list of sessions attached to the |
| @@ -171909,11 +171944,11 @@ | |
| 171909 | } |
| 171910 | |
| 171911 | /* |
| 171912 | ** Set a table filter on a Session Object. |
| 171913 | */ |
| 171914 | SQLITE_API void SQLITE_APICALL sqlite3session_table_filter( |
| 171915 | sqlite3_session *pSession, |
| 171916 | int(*xFilter)(void*, const char*), |
| 171917 | void *pCtx /* First argument passed to xFilter */ |
| 171918 | ){ |
| 171919 | pSession->bAutoAttach = 1; |
| @@ -171927,11 +171962,11 @@ | |
| 171927 | ** |
| 171928 | ** Only tables that have a PRIMARY KEY defined may be attached. It does |
| 171929 | ** not matter if the PRIMARY KEY is an "INTEGER PRIMARY KEY" (rowid alias) |
| 171930 | ** or not. |
| 171931 | */ |
| 171932 | SQLITE_API int SQLITE_APICALL sqlite3session_attach( |
| 171933 | sqlite3_session *pSession, /* Session object */ |
| 171934 | const char *zName /* Table name */ |
| 171935 | ){ |
| 171936 | int rc = SQLITE_OK; |
| 171937 | sqlite3_mutex_enter(sqlite3_db_mutex(pSession->db)); |
| @@ -172617,11 +172652,11 @@ | |
| 172617 | ** session object passed as the first argument. |
| 172618 | ** |
| 172619 | ** It is the responsibility of the caller to eventually free the buffer |
| 172620 | ** using sqlite3_free(). |
| 172621 | */ |
| 172622 | SQLITE_API int SQLITE_APICALL sqlite3session_changeset( |
| 172623 | sqlite3_session *pSession, /* Session object */ |
| 172624 | int *pnChangeset, /* OUT: Size of buffer at *ppChangeset */ |
| 172625 | void **ppChangeset /* OUT: Buffer containing changeset */ |
| 172626 | ){ |
| 172627 | return sessionGenerateChangeset(pSession, 0, 0, 0, pnChangeset, ppChangeset); |
| @@ -172628,11 +172663,11 @@ | |
| 172628 | } |
| 172629 | |
| 172630 | /* |
| 172631 | ** Streaming version of sqlite3session_changeset(). |
| 172632 | */ |
| 172633 | SQLITE_API int SQLITE_APICALL sqlite3session_changeset_strm( |
| 172634 | sqlite3_session *pSession, |
| 172635 | int (*xOutput)(void *pOut, const void *pData, int nData), |
| 172636 | void *pOut |
| 172637 | ){ |
| 172638 | return sessionGenerateChangeset(pSession, 0, xOutput, pOut, 0, 0); |
| @@ -172639,11 +172674,11 @@ | |
| 172639 | } |
| 172640 | |
| 172641 | /* |
| 172642 | ** Streaming version of sqlite3session_patchset(). |
| 172643 | */ |
| 172644 | SQLITE_API int SQLITE_APICALL sqlite3session_patchset_strm( |
| 172645 | sqlite3_session *pSession, |
| 172646 | int (*xOutput)(void *pOut, const void *pData, int nData), |
| 172647 | void *pOut |
| 172648 | ){ |
| 172649 | return sessionGenerateChangeset(pSession, 1, xOutput, pOut, 0, 0); |
| @@ -172654,11 +172689,11 @@ | |
| 172654 | ** session object passed as the first argument. |
| 172655 | ** |
| 172656 | ** It is the responsibility of the caller to eventually free the buffer |
| 172657 | ** using sqlite3_free(). |
| 172658 | */ |
| 172659 | SQLITE_API int SQLITE_APICALL sqlite3session_patchset( |
| 172660 | sqlite3_session *pSession, /* Session object */ |
| 172661 | int *pnPatchset, /* OUT: Size of buffer at *ppChangeset */ |
| 172662 | void **ppPatchset /* OUT: Buffer containing changeset */ |
| 172663 | ){ |
| 172664 | return sessionGenerateChangeset(pSession, 1, 0, 0, pnPatchset, ppPatchset); |
| @@ -172665,11 +172700,11 @@ | |
| 172665 | } |
| 172666 | |
| 172667 | /* |
| 172668 | ** Enable or disable the session object passed as the first argument. |
| 172669 | */ |
| 172670 | SQLITE_API int SQLITE_APICALL sqlite3session_enable(sqlite3_session *pSession, int bEnable){ |
| 172671 | int ret; |
| 172672 | sqlite3_mutex_enter(sqlite3_db_mutex(pSession->db)); |
| 172673 | if( bEnable>=0 ){ |
| 172674 | pSession->bEnable = bEnable; |
| 172675 | } |
| @@ -172679,11 +172714,11 @@ | |
| 172679 | } |
| 172680 | |
| 172681 | /* |
| 172682 | ** Enable or disable the session object passed as the first argument. |
| 172683 | */ |
| 172684 | SQLITE_API int SQLITE_APICALL sqlite3session_indirect(sqlite3_session *pSession, int bIndirect){ |
| 172685 | int ret; |
| 172686 | sqlite3_mutex_enter(sqlite3_db_mutex(pSession->db)); |
| 172687 | if( bIndirect>=0 ){ |
| 172688 | pSession->bIndirect = bIndirect; |
| 172689 | } |
| @@ -172694,11 +172729,11 @@ | |
| 172694 | |
| 172695 | /* |
| 172696 | ** Return true if there have been no changes to monitored tables recorded |
| 172697 | ** by the session object passed as the only argument. |
| 172698 | */ |
| 172699 | SQLITE_API int SQLITE_APICALL sqlite3session_isempty(sqlite3_session *pSession){ |
| 172700 | int ret = 0; |
| 172701 | SessionTable *pTab; |
| 172702 | |
| 172703 | sqlite3_mutex_enter(sqlite3_db_mutex(pSession->db)); |
| 172704 | for(pTab=pSession->pTable; pTab && ret==0; pTab=pTab->pNext){ |
| @@ -172744,11 +172779,11 @@ | |
| 172744 | } |
| 172745 | |
| 172746 | /* |
| 172747 | ** Create an iterator used to iterate through the contents of a changeset. |
| 172748 | */ |
| 172749 | SQLITE_API int SQLITE_APICALL sqlite3changeset_start( |
| 172750 | sqlite3_changeset_iter **pp, /* OUT: Changeset iterator handle */ |
| 172751 | int nChangeset, /* Size of buffer pChangeset in bytes */ |
| 172752 | void *pChangeset /* Pointer to buffer containing changeset */ |
| 172753 | ){ |
| 172754 | return sessionChangesetStart(pp, 0, 0, nChangeset, pChangeset); |
| @@ -172755,11 +172790,11 @@ | |
| 172755 | } |
| 172756 | |
| 172757 | /* |
| 172758 | ** Streaming version of sqlite3changeset_start(). |
| 172759 | */ |
| 172760 | SQLITE_API int SQLITE_APICALL sqlite3changeset_start_strm( |
| 172761 | sqlite3_changeset_iter **pp, /* OUT: Changeset iterator handle */ |
| 172762 | int (*xInput)(void *pIn, void *pData, int *pnData), |
| 172763 | void *pIn |
| 172764 | ){ |
| 172765 | return sessionChangesetStart(pp, xInput, pIn, 0, 0); |
| @@ -173176,20 +173211,20 @@ | |
| 173176 | ** or SQLITE_CORRUPT. |
| 173177 | ** |
| 173178 | ** This function may not be called on iterators passed to a conflict handler |
| 173179 | ** callback by changeset_apply(). |
| 173180 | */ |
| 173181 | SQLITE_API int SQLITE_APICALL sqlite3changeset_next(sqlite3_changeset_iter *p){ |
| 173182 | return sessionChangesetNext(p, 0, 0); |
| 173183 | } |
| 173184 | |
| 173185 | /* |
| 173186 | ** The following function extracts information on the current change |
| 173187 | ** from a changeset iterator. It may only be called after changeset_next() |
| 173188 | ** has returned SQLITE_ROW. |
| 173189 | */ |
| 173190 | SQLITE_API int SQLITE_APICALL sqlite3changeset_op( |
| 173191 | sqlite3_changeset_iter *pIter, /* Iterator handle */ |
| 173192 | const char **pzTab, /* OUT: Pointer to table name */ |
| 173193 | int *pnCol, /* OUT: Number of columns in table */ |
| 173194 | int *pOp, /* OUT: SQLITE_INSERT, DELETE or UPDATE */ |
| 173195 | int *pbIndirect /* OUT: True if change is indirect */ |
| @@ -173205,11 +173240,11 @@ | |
| 173205 | ** Return information regarding the PRIMARY KEY and number of columns in |
| 173206 | ** the database table affected by the change that pIter currently points |
| 173207 | ** to. This function may only be called after changeset_next() returns |
| 173208 | ** SQLITE_ROW. |
| 173209 | */ |
| 173210 | SQLITE_API int SQLITE_APICALL sqlite3changeset_pk( |
| 173211 | sqlite3_changeset_iter *pIter, /* Iterator object */ |
| 173212 | unsigned char **pabPK, /* OUT: Array of boolean - true for PK cols */ |
| 173213 | int *pnCol /* OUT: Number of entries in output array */ |
| 173214 | ){ |
| 173215 | *pabPK = pIter->abPK; |
| @@ -173228,11 +173263,11 @@ | |
| 173228 | ** was not modified and is not a PK column), set *ppValue to NULL. |
| 173229 | ** |
| 173230 | ** If value iVal is out-of-range, SQLITE_RANGE is returned and *ppValue is |
| 173231 | ** not modified. Otherwise, SQLITE_OK. |
| 173232 | */ |
| 173233 | SQLITE_API int SQLITE_APICALL sqlite3changeset_old( |
| 173234 | sqlite3_changeset_iter *pIter, /* Changeset iterator */ |
| 173235 | int iVal, /* Index of old.* value to retrieve */ |
| 173236 | sqlite3_value **ppValue /* OUT: Old value (or NULL pointer) */ |
| 173237 | ){ |
| 173238 | if( pIter->op!=SQLITE_UPDATE && pIter->op!=SQLITE_DELETE ){ |
| @@ -173256,11 +173291,11 @@ | |
| 173256 | ** was not modified), set *ppValue to NULL. |
| 173257 | ** |
| 173258 | ** If value iVal is out-of-range, SQLITE_RANGE is returned and *ppValue is |
| 173259 | ** not modified. Otherwise, SQLITE_OK. |
| 173260 | */ |
| 173261 | SQLITE_API int SQLITE_APICALL sqlite3changeset_new( |
| 173262 | sqlite3_changeset_iter *pIter, /* Changeset iterator */ |
| 173263 | int iVal, /* Index of new.* value to retrieve */ |
| 173264 | sqlite3_value **ppValue /* OUT: New value (or NULL pointer) */ |
| 173265 | ){ |
| 173266 | if( pIter->op!=SQLITE_UPDATE && pIter->op!=SQLITE_INSERT ){ |
| @@ -173290,11 +173325,11 @@ | |
| 173290 | ** containing the iVal'th value of the conflicting record. |
| 173291 | ** |
| 173292 | ** If value iVal is out-of-range or some other error occurs, an SQLite error |
| 173293 | ** code is returned. Otherwise, SQLITE_OK. |
| 173294 | */ |
| 173295 | SQLITE_API int SQLITE_APICALL sqlite3changeset_conflict( |
| 173296 | sqlite3_changeset_iter *pIter, /* Changeset iterator */ |
| 173297 | int iVal, /* Index of conflict record value to fetch */ |
| 173298 | sqlite3_value **ppValue /* OUT: Value from conflicting row */ |
| 173299 | ){ |
| 173300 | if( !pIter->pConflict ){ |
| @@ -173313,11 +173348,11 @@ | |
| 173313 | ** it sets the output variable to the total number of known foreign key |
| 173314 | ** violations in the destination database and returns SQLITE_OK. |
| 173315 | ** |
| 173316 | ** In all other cases this function returns SQLITE_MISUSE. |
| 173317 | */ |
| 173318 | SQLITE_API int SQLITE_APICALL sqlite3changeset_fk_conflicts( |
| 173319 | sqlite3_changeset_iter *pIter, /* Changeset iterator */ |
| 173320 | int *pnOut /* OUT: Number of FK violations */ |
| 173321 | ){ |
| 173322 | if( pIter->pConflict || pIter->apValue ){ |
| 173323 | return SQLITE_MISUSE; |
| @@ -173331,11 +173366,11 @@ | |
| 173331 | ** Finalize an iterator allocated with sqlite3changeset_start(). |
| 173332 | ** |
| 173333 | ** This function may not be called on iterators passed to a conflict handler |
| 173334 | ** callback by changeset_apply(). |
| 173335 | */ |
| 173336 | SQLITE_API int SQLITE_APICALL sqlite3changeset_finalize(sqlite3_changeset_iter *p){ |
| 173337 | int rc = SQLITE_OK; |
| 173338 | if( p ){ |
| 173339 | int i; /* Used to iterate through p->apValue[] */ |
| 173340 | rc = p->rc; |
| 173341 | if( p->apValue ){ |
| @@ -173505,11 +173540,11 @@ | |
| 173505 | |
| 173506 | |
| 173507 | /* |
| 173508 | ** Invert a changeset object. |
| 173509 | */ |
| 173510 | SQLITE_API int SQLITE_APICALL sqlite3changeset_invert( |
| 173511 | int nChangeset, /* Number of bytes in input */ |
| 173512 | const void *pChangeset, /* Input changeset */ |
| 173513 | int *pnInverted, /* OUT: Number of bytes in output changeset */ |
| 173514 | void **ppInverted /* OUT: Inverse of pChangeset */ |
| 173515 | ){ |
| @@ -173524,11 +173559,11 @@ | |
| 173524 | } |
| 173525 | |
| 173526 | /* |
| 173527 | ** Streaming version of sqlite3changeset_invert(). |
| 173528 | */ |
| 173529 | SQLITE_API int SQLITE_APICALL sqlite3changeset_invert_strm( |
| 173530 | int (*xInput)(void *pIn, void *pData, int *pnData), |
| 173531 | void *pIn, |
| 173532 | int (*xOutput)(void *pOut, const void *pData, int nData), |
| 173533 | void *pOut |
| 173534 | ){ |
| @@ -174404,11 +174439,11 @@ | |
| 174404 | /* |
| 174405 | ** Apply the changeset passed via pChangeset/nChangeset to the main database |
| 174406 | ** attached to handle "db". Invoke the supplied conflict handler callback |
| 174407 | ** to resolve any conflicts encountered while applying the change. |
| 174408 | */ |
| 174409 | SQLITE_API int SQLITE_APICALL sqlite3changeset_apply( |
| 174410 | sqlite3 *db, /* Apply change to "main" db of this handle */ |
| 174411 | int nChangeset, /* Size of changeset in bytes */ |
| 174412 | void *pChangeset, /* Changeset blob */ |
| 174413 | int(*xFilter)( |
| 174414 | void *pCtx, /* Copy of sixth arg to _apply() */ |
| @@ -174432,11 +174467,11 @@ | |
| 174432 | /* |
| 174433 | ** Apply the changeset passed via xInput/pIn to the main database |
| 174434 | ** attached to handle "db". Invoke the supplied conflict handler callback |
| 174435 | ** to resolve any conflicts encountered while applying the change. |
| 174436 | */ |
| 174437 | SQLITE_API int SQLITE_APICALL sqlite3changeset_apply_strm( |
| 174438 | sqlite3 *db, /* Apply change to "main" db of this handle */ |
| 174439 | int (*xInput)(void *pIn, void *pData, int *pnData), /* Input function */ |
| 174440 | void *pIn, /* First arg for xInput */ |
| 174441 | int(*xFilter)( |
| 174442 | void *pCtx, /* Copy of sixth arg to _apply() */ |
| @@ -174767,11 +174802,11 @@ | |
| 174767 | } |
| 174768 | |
| 174769 | /* |
| 174770 | ** Allocate a new, empty, sqlite3_changegroup. |
| 174771 | */ |
| 174772 | SQLITE_API int SQLITE_APICALL sqlite3changegroup_new(sqlite3_changegroup **pp){ |
| 174773 | int rc = SQLITE_OK; /* Return code */ |
| 174774 | sqlite3_changegroup *p; /* New object */ |
| 174775 | p = (sqlite3_changegroup*)sqlite3_malloc(sizeof(sqlite3_changegroup)); |
| 174776 | if( p==0 ){ |
| 174777 | rc = SQLITE_NOMEM; |
| @@ -174784,11 +174819,11 @@ | |
| 174784 | |
| 174785 | /* |
| 174786 | ** Add the changeset currently stored in buffer pData, size nData bytes, |
| 174787 | ** to changeset-group p. |
| 174788 | */ |
| 174789 | SQLITE_API int SQLITE_APICALL sqlite3changegroup_add(sqlite3_changegroup *pGrp, int nData, void *pData){ |
| 174790 | sqlite3_changeset_iter *pIter; /* Iterator opened on pData/nData */ |
| 174791 | int rc; /* Return code */ |
| 174792 | |
| 174793 | rc = sqlite3changeset_start(&pIter, nData, pData); |
| 174794 | if( rc==SQLITE_OK ){ |
| @@ -174800,11 +174835,11 @@ | |
| 174800 | |
| 174801 | /* |
| 174802 | ** Obtain a buffer containing a changeset representing the concatenation |
| 174803 | ** of all changesets added to the group so far. |
| 174804 | */ |
| 174805 | SQLITE_API int SQLITE_APICALL sqlite3changegroup_output( |
| 174806 | sqlite3_changegroup *pGrp, |
| 174807 | int *pnData, |
| 174808 | void **ppData |
| 174809 | ){ |
| 174810 | return sessionChangegroupOutput(pGrp, 0, 0, pnData, ppData); |
| @@ -174811,11 +174846,11 @@ | |
| 174811 | } |
| 174812 | |
| 174813 | /* |
| 174814 | ** Streaming versions of changegroup_add(). |
| 174815 | */ |
| 174816 | SQLITE_API int SQLITE_APICALL sqlite3changegroup_add_strm( |
| 174817 | sqlite3_changegroup *pGrp, |
| 174818 | int (*xInput)(void *pIn, void *pData, int *pnData), |
| 174819 | void *pIn |
| 174820 | ){ |
| 174821 | sqlite3_changeset_iter *pIter; /* Iterator opened on pData/nData */ |
| @@ -174830,11 +174865,11 @@ | |
| 174830 | } |
| 174831 | |
| 174832 | /* |
| 174833 | ** Streaming versions of changegroup_output(). |
| 174834 | */ |
| 174835 | SQLITE_API int SQLITE_APICALL sqlite3changegroup_output_strm( |
| 174836 | sqlite3_changegroup *pGrp, |
| 174837 | int (*xOutput)(void *pOut, const void *pData, int nData), |
| 174838 | void *pOut |
| 174839 | ){ |
| 174840 | return sessionChangegroupOutput(pGrp, xOutput, pOut, 0, 0); |
| @@ -174841,21 +174876,21 @@ | |
| 174841 | } |
| 174842 | |
| 174843 | /* |
| 174844 | ** Delete a changegroup object. |
| 174845 | */ |
| 174846 | SQLITE_API void SQLITE_APICALL sqlite3changegroup_delete(sqlite3_changegroup *pGrp){ |
| 174847 | if( pGrp ){ |
| 174848 | sessionDeleteTable(pGrp->pList); |
| 174849 | sqlite3_free(pGrp); |
| 174850 | } |
| 174851 | } |
| 174852 | |
| 174853 | /* |
| 174854 | ** Combine two changesets together. |
| 174855 | */ |
| 174856 | SQLITE_API int SQLITE_APICALL sqlite3changeset_concat( |
| 174857 | int nLeft, /* Number of bytes in lhs input */ |
| 174858 | void *pLeft, /* Lhs input changeset */ |
| 174859 | int nRight /* Number of bytes in rhs input */, |
| 174860 | void *pRight, /* Rhs input changeset */ |
| 174861 | int *pnOut, /* OUT: Number of bytes in output changeset */ |
| @@ -174880,11 +174915,11 @@ | |
| 174880 | } |
| 174881 | |
| 174882 | /* |
| 174883 | ** Streaming version of sqlite3changeset_concat(). |
| 174884 | */ |
| 174885 | SQLITE_API int SQLITE_APICALL sqlite3changeset_concat_strm( |
| 174886 | int (*xInputA)(void *pIn, void *pData, int *pnData), |
| 174887 | void *pInA, |
| 174888 | int (*xInputB)(void *pIn, void *pData, int *pnData), |
| 174889 | void *pInB, |
| 174890 | int (*xOutput)(void *pOut, const void *pData, int nData), |
| @@ -177112,11 +177147,11 @@ | |
| 177112 | |
| 177113 | #ifndef SQLITE_CORE |
| 177114 | #ifdef _WIN32 |
| 177115 | __declspec(dllexport) |
| 177116 | #endif |
| 177117 | SQLITE_API int SQLITE_APICALL sqlite3_json_init( |
| 177118 | sqlite3 *db, |
| 177119 | char **pzErrMsg, |
| 177120 | const sqlite3_api_routines *pApi |
| 177121 | ){ |
| 177122 | SQLITE_EXTENSION_INIT2(pApi); |
| @@ -193945,11 +193980,11 @@ | |
| 193945 | int nArg, /* Number of args */ |
| 193946 | sqlite3_value **apUnused /* Function arguments */ |
| 193947 | ){ |
| 193948 | assert( nArg==0 ); |
| 193949 | UNUSED_PARAM2(nArg, apUnused); |
| 193950 | sqlite3_result_text(pCtx, "fts5: 2016-08-01 21:17:53 d8ef9f58643f13dd3d16dcde0d829ae08324f04b", -1, SQLITE_TRANSIENT); |
| 193951 | } |
| 193952 | |
| 193953 | static int fts5Init(sqlite3 *db){ |
| 193954 | static const sqlite3_module fts5Mod = { |
| 193955 | /* iVersion */ 2, |
| @@ -194033,11 +194068,11 @@ | |
| 194033 | */ |
| 194034 | #ifndef SQLITE_CORE |
| 194035 | #ifdef _WIN32 |
| 194036 | __declspec(dllexport) |
| 194037 | #endif |
| 194038 | SQLITE_API int SQLITE_APICALL sqlite3_fts_init( |
| 194039 | sqlite3 *db, |
| 194040 | char **pzErrMsg, |
| 194041 | const sqlite3_api_routines *pApi |
| 194042 | ){ |
| 194043 | SQLITE_EXTENSION_INIT2(pApi); |
| @@ -194046,11 +194081,11 @@ | |
| 194046 | } |
| 194047 | |
| 194048 | #ifdef _WIN32 |
| 194049 | __declspec(dllexport) |
| 194050 | #endif |
| 194051 | SQLITE_API int SQLITE_APICALL sqlite3_fts5_init( |
| 194052 | sqlite3 *db, |
| 194053 | char **pzErrMsg, |
| 194054 | const sqlite3_api_routines *pApi |
| 194055 | ){ |
| 194056 | SQLITE_EXTENSION_INIT2(pApi); |
| 194057 |
| --- src/sqlite3.c | |
| +++ src/sqlite3.c | |
| @@ -380,11 +380,11 @@ | |
| 380 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 381 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 382 | */ |
| 383 | #define SQLITE_VERSION "3.14.0" |
| 384 | #define SQLITE_VERSION_NUMBER 3014000 |
| 385 | #define SQLITE_SOURCE_ID "2016-08-04 13:23:28 9adda385267d1a0ecff259b42a284913668441a2" |
| 386 | |
| 387 | /* |
| 388 | ** CAPI3REF: Run-Time Library Version Numbers |
| 389 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 390 | ** |
| @@ -413,13 +413,13 @@ | |
| 413 | ** [SQLITE_SOURCE_ID] C preprocessor macro. |
| 414 | ** |
| 415 | ** See also: [sqlite_version()] and [sqlite_source_id()]. |
| 416 | */ |
| 417 | SQLITE_API const char sqlite3_version[] = SQLITE_VERSION; |
| 418 | SQLITE_API const char *SQLITE_STDCALL sqlite3_libversion(void); |
| 419 | SQLITE_API const char *SQLITE_STDCALL sqlite3_sourceid(void); |
| 420 | SQLITE_API int SQLITE_STDCALL sqlite3_libversion_number(void); |
| 421 | |
| 422 | /* |
| 423 | ** CAPI3REF: Run-Time Library Compilation Options Diagnostics |
| 424 | ** |
| 425 | ** ^The sqlite3_compileoption_used() function returns 0 or 1 |
| @@ -440,12 +440,12 @@ | |
| 440 | ** |
| 441 | ** See also: SQL functions [sqlite_compileoption_used()] and |
| 442 | ** [sqlite_compileoption_get()] and the [compile_options pragma]. |
| 443 | */ |
| 444 | #ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS |
| 445 | SQLITE_API int SQLITE_STDCALL sqlite3_compileoption_used(const char *zOptName); |
| 446 | SQLITE_API const char *SQLITE_STDCALL sqlite3_compileoption_get(int N); |
| 447 | #endif |
| 448 | |
| 449 | /* |
| 450 | ** CAPI3REF: Test To See If The Library Is Threadsafe |
| 451 | ** |
| @@ -480,11 +480,11 @@ | |
| 480 | ** sqlite3_config(). In other words, the return value from sqlite3_threadsafe() |
| 481 | ** is unchanged by calls to sqlite3_config().)^ |
| 482 | ** |
| 483 | ** See the [threading mode] documentation for additional information. |
| 484 | */ |
| 485 | SQLITE_API int SQLITE_STDCALL sqlite3_threadsafe(void); |
| 486 | |
| 487 | /* |
| 488 | ** CAPI3REF: Database Connection Handle |
| 489 | ** KEYWORDS: {database connection} {database connections} |
| 490 | ** |
| @@ -577,19 +577,19 @@ | |
| 577 | ** from [sqlite3_open()], [sqlite3_open16()], or |
| 578 | ** [sqlite3_open_v2()], and not previously closed. |
| 579 | ** ^Calling sqlite3_close() or sqlite3_close_v2() with a NULL pointer |
| 580 | ** argument is a harmless no-op. |
| 581 | */ |
| 582 | SQLITE_API int SQLITE_STDCALL sqlite3_close(sqlite3*); |
| 583 | SQLITE_API int SQLITE_STDCALL sqlite3_close_v2(sqlite3*); |
| 584 | |
| 585 | /* |
| 586 | ** The type for a callback function. |
| 587 | ** This is legacy and deprecated. It is included for historical |
| 588 | ** compatibility and is not documented. |
| 589 | */ |
| 590 | typedef int (*sqlite3_callback)(void*,int,char**, char**); |
| 591 | |
| 592 | /* |
| 593 | ** CAPI3REF: One-Step Query Execution Interface |
| 594 | ** METHOD: sqlite3 |
| 595 | ** |
| @@ -649,14 +649,14 @@ | |
| 649 | ** the 1st parameter to sqlite3_exec() while sqlite3_exec() is running. |
| 650 | ** <li> The application must not modify the SQL statement text passed into |
| 651 | ** the 2nd parameter of sqlite3_exec() while sqlite3_exec() is running. |
| 652 | ** </ul> |
| 653 | */ |
| 654 | SQLITE_API int SQLITE_STDCALL sqlite3_exec( |
| 655 | sqlite3*, /* An open database */ |
| 656 | const char *sql, /* SQL to be evaluated */ |
| 657 | int (*callback)(void*,int,char**,char**), /* Callback function */ |
| 658 | void *, /* 1st argument to callback */ |
| 659 | char **errmsg /* Error msg written here */ |
| 660 | ); |
| 661 | |
| 662 | /* |
| @@ -1000,30 +1000,30 @@ | |
| 1000 | ** database corruption. |
| 1001 | */ |
| 1002 | typedef struct sqlite3_io_methods sqlite3_io_methods; |
| 1003 | struct sqlite3_io_methods { |
| 1004 | int iVersion; |
| 1005 | int (*xClose)(sqlite3_file*); |
| 1006 | int (*xRead)(sqlite3_file*, void*, int iAmt, sqlite3_int64 iOfst); |
| 1007 | int (*xWrite)(sqlite3_file*, const void*, int iAmt, sqlite3_int64 iOfst); |
| 1008 | int (*xTruncate)(sqlite3_file*, sqlite3_int64 size); |
| 1009 | int (*xSync)(sqlite3_file*, int flags); |
| 1010 | int (*xFileSize)(sqlite3_file*, sqlite3_int64 *pSize); |
| 1011 | int (*xLock)(sqlite3_file*, int); |
| 1012 | int (*xUnlock)(sqlite3_file*, int); |
| 1013 | int (*xCheckReservedLock)(sqlite3_file*, int *pResOut); |
| 1014 | int (*xFileControl)(sqlite3_file*, int op, void *pArg); |
| 1015 | int (*xSectorSize)(sqlite3_file*); |
| 1016 | int (*xDeviceCharacteristics)(sqlite3_file*); |
| 1017 | /* Methods above are valid for version 1 */ |
| 1018 | int (*xShmMap)(sqlite3_file*, int iPg, int pgsz, int, void volatile**); |
| 1019 | int (*xShmLock)(sqlite3_file*, int offset, int n, int flags); |
| 1020 | void (*xShmBarrier)(sqlite3_file*); |
| 1021 | int (*xShmUnmap)(sqlite3_file*, int deleteFlag); |
| 1022 | /* Methods above are valid for version 2 */ |
| 1023 | int (*xFetch)(sqlite3_file*, sqlite3_int64 iOfst, int iAmt, void **pp); |
| 1024 | int (*xUnfetch)(sqlite3_file*, sqlite3_int64 iOfst, void *p); |
| 1025 | /* Methods above are valid for version 3 */ |
| 1026 | /* Additional methods may be added in future releases */ |
| 1027 | }; |
| 1028 | |
| 1029 | /* |
| @@ -1195,11 +1195,11 @@ | |
| 1195 | ** ^The [SQLITE_FCNTL_BUSYHANDLER] |
| 1196 | ** file-control may be invoked by SQLite on the database file handle |
| 1197 | ** shortly after it is opened in order to provide a custom VFS with access |
| 1198 | ** to the connections busy-handler callback. The argument is of type (void **) |
| 1199 | ** - an array of two (void *) values. The first (void *) actually points |
| 1200 | ** to a function of type (int (*)(void *)). In order to invoke the connections |
| 1201 | ** busy-handler, this function should be invoked with the second (void *) in |
| 1202 | ** the array as the only argument. If it returns non-zero, then the operation |
| 1203 | ** should be retried. If it returns zero, the custom VFS should abandon the |
| 1204 | ** current operation. |
| 1205 | ** |
| @@ -1471,43 +1471,43 @@ | |
| 1471 | ** or all of these interfaces to be NULL or for their behavior to change |
| 1472 | ** from one release to the next. Applications must not attempt to access |
| 1473 | ** any of these methods if the iVersion of the VFS is less than 3. |
| 1474 | */ |
| 1475 | typedef struct sqlite3_vfs sqlite3_vfs; |
| 1476 | typedef void (*sqlite3_syscall_ptr)(void); |
| 1477 | struct sqlite3_vfs { |
| 1478 | int iVersion; /* Structure version number (currently 3) */ |
| 1479 | int szOsFile; /* Size of subclassed sqlite3_file */ |
| 1480 | int mxPathname; /* Maximum file pathname length */ |
| 1481 | sqlite3_vfs *pNext; /* Next registered VFS */ |
| 1482 | const char *zName; /* Name of this virtual file system */ |
| 1483 | void *pAppData; /* Pointer to application-specific data */ |
| 1484 | int (*xOpen)(sqlite3_vfs*, const char *zName, sqlite3_file*, |
| 1485 | int flags, int *pOutFlags); |
| 1486 | int (*xDelete)(sqlite3_vfs*, const char *zName, int syncDir); |
| 1487 | int (*xAccess)(sqlite3_vfs*, const char *zName, int flags, int *pResOut); |
| 1488 | int (*xFullPathname)(sqlite3_vfs*, const char *zName, int nOut, char *zOut); |
| 1489 | void *(*xDlOpen)(sqlite3_vfs*, const char *zFilename); |
| 1490 | void (*xDlError)(sqlite3_vfs*, int nByte, char *zErrMsg); |
| 1491 | void (*(*xDlSym)(sqlite3_vfs*,void*, const char *zSymbol))(void); |
| 1492 | void (*xDlClose)(sqlite3_vfs*, void*); |
| 1493 | int (*xRandomness)(sqlite3_vfs*, int nByte, char *zOut); |
| 1494 | int (*xSleep)(sqlite3_vfs*, int microseconds); |
| 1495 | int (*xCurrentTime)(sqlite3_vfs*, double*); |
| 1496 | int (*xGetLastError)(sqlite3_vfs*, int, char *); |
| 1497 | /* |
| 1498 | ** The methods above are in version 1 of the sqlite_vfs object |
| 1499 | ** definition. Those that follow are added in version 2 or later |
| 1500 | */ |
| 1501 | int (*xCurrentTimeInt64)(sqlite3_vfs*, sqlite3_int64*); |
| 1502 | /* |
| 1503 | ** The methods above are in versions 1 and 2 of the sqlite_vfs object. |
| 1504 | ** Those below are for version 3 and greater. |
| 1505 | */ |
| 1506 | int (*xSetSystemCall)(sqlite3_vfs*, const char *zName, sqlite3_syscall_ptr); |
| 1507 | sqlite3_syscall_ptr (*xGetSystemCall)(sqlite3_vfs*, const char *zName); |
| 1508 | const char *(*xNextSystemCall)(sqlite3_vfs*, const char *zName); |
| 1509 | /* |
| 1510 | ** The methods above are in versions 1 through 3 of the sqlite_vfs object. |
| 1511 | ** New fields may be appended in future versions. The iVersion |
| 1512 | ** value will increment whenever this happens. |
| 1513 | */ |
| @@ -1648,14 +1648,14 @@ | |
| 1648 | ** sqlite3_os_init() and sqlite3_os_end(). An application-supplied |
| 1649 | ** implementation of sqlite3_os_init() or sqlite3_os_end() |
| 1650 | ** must return [SQLITE_OK] on success and some other [error code] upon |
| 1651 | ** failure. |
| 1652 | */ |
| 1653 | SQLITE_API int SQLITE_STDCALL sqlite3_initialize(void); |
| 1654 | SQLITE_API int SQLITE_STDCALL sqlite3_shutdown(void); |
| 1655 | SQLITE_API int SQLITE_STDCALL sqlite3_os_init(void); |
| 1656 | SQLITE_API int SQLITE_STDCALL sqlite3_os_end(void); |
| 1657 | |
| 1658 | /* |
| 1659 | ** CAPI3REF: Configuring The SQLite Library |
| 1660 | ** |
| 1661 | ** The sqlite3_config() interface is used to make global configuration |
| @@ -1770,17 +1770,17 @@ | |
| 1770 | ** SQLite will never invoke xInit() more than once without an intervening |
| 1771 | ** call to xShutdown(). |
| 1772 | */ |
| 1773 | typedef struct sqlite3_mem_methods sqlite3_mem_methods; |
| 1774 | struct sqlite3_mem_methods { |
| 1775 | void *(*xMalloc)(int); /* Memory allocation function */ |
| 1776 | void (*xFree)(void*); /* Free a prior allocation */ |
| 1777 | void *(*xRealloc)(void*,int); /* Resize an allocation */ |
| 1778 | int (*xSize)(void*); /* Return the size of an allocation */ |
| 1779 | int (*xRoundup)(int); /* Round up request size to allocation size */ |
| 1780 | int (*xInit)(void*); /* Initialize the memory allocator */ |
| 1781 | void (*xShutdown)(void*); /* Deinitialize the memory allocator */ |
| 1782 | void *pAppData; /* Argument to xInit() and xShutdown() */ |
| 1783 | }; |
| 1784 | |
| 1785 | /* |
| 1786 | ** CAPI3REF: Configuration Options |
| @@ -1993,11 +1993,11 @@ | |
| 1993 | ** |
| 1994 | ** [[SQLITE_CONFIG_LOG]] <dt>SQLITE_CONFIG_LOG</dt> |
| 1995 | ** <dd> The SQLITE_CONFIG_LOG option is used to configure the SQLite |
| 1996 | ** global [error log]. |
| 1997 | ** (^The SQLITE_CONFIG_LOG option takes two arguments: a pointer to a |
| 1998 | ** function with a call signature of void(*)(void*,int,const char*), |
| 1999 | ** and a pointer to void. ^If the function pointer is not NULL, it is |
| 2000 | ** invoked by [sqlite3_log()] to process each logging event. ^If the |
| 2001 | ** function pointer is NULL, the [sqlite3_log()] interface becomes a no-op. |
| 2002 | ** ^The void pointer that is the second argument to SQLITE_CONFIG_LOG is |
| 2003 | ** passed through as the first parameter to the application-defined logger |
| @@ -2046,11 +2046,11 @@ | |
| 2046 | ** |
| 2047 | ** [[SQLITE_CONFIG_SQLLOG]] |
| 2048 | ** <dt>SQLITE_CONFIG_SQLLOG |
| 2049 | ** <dd>This option is only available if sqlite is compiled with the |
| 2050 | ** [SQLITE_ENABLE_SQLLOG] pre-processor macro defined. The first argument should |
| 2051 | ** be a pointer to a function of type void(*)(void*,sqlite3*,const char*, int). |
| 2052 | ** The second should be of type (void*). The callback is invoked by the library |
| 2053 | ** in three separate circumstances, identified by the value passed as the |
| 2054 | ** fourth parameter. If the fourth parameter is 0, then the database connection |
| 2055 | ** passed as the second argument has just been opened. The third argument |
| 2056 | ** points to a buffer containing the name of the main database file. If the |
| @@ -2244,11 +2244,11 @@ | |
| 2244 | ** |
| 2245 | ** ^The sqlite3_extended_result_codes() routine enables or disables the |
| 2246 | ** [extended result codes] feature of SQLite. ^The extended result |
| 2247 | ** codes are disabled by default for historical compatibility. |
| 2248 | */ |
| 2249 | SQLITE_API int SQLITE_STDCALL sqlite3_extended_result_codes(sqlite3*, int onoff); |
| 2250 | |
| 2251 | /* |
| 2252 | ** CAPI3REF: Last Insert Rowid |
| 2253 | ** METHOD: sqlite3 |
| 2254 | ** |
| @@ -2296,11 +2296,11 @@ | |
| 2296 | ** function is running and thus changes the last insert [rowid], |
| 2297 | ** then the value returned by [sqlite3_last_insert_rowid()] is |
| 2298 | ** unpredictable and might not equal either the old or the new |
| 2299 | ** last insert [rowid]. |
| 2300 | */ |
| 2301 | SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_last_insert_rowid(sqlite3*); |
| 2302 | |
| 2303 | /* |
| 2304 | ** CAPI3REF: Count The Number Of Rows Modified |
| 2305 | ** METHOD: sqlite3 |
| 2306 | ** |
| @@ -2349,11 +2349,11 @@ | |
| 2349 | ** |
| 2350 | ** If a separate thread makes changes on the same database connection |
| 2351 | ** while [sqlite3_changes()] is running then the value returned |
| 2352 | ** is unpredictable and not meaningful. |
| 2353 | */ |
| 2354 | SQLITE_API int SQLITE_STDCALL sqlite3_changes(sqlite3*); |
| 2355 | |
| 2356 | /* |
| 2357 | ** CAPI3REF: Total Number Of Rows Modified |
| 2358 | ** METHOD: sqlite3 |
| 2359 | ** |
| @@ -2373,11 +2373,11 @@ | |
| 2373 | ** |
| 2374 | ** If a separate thread makes changes on the same database connection |
| 2375 | ** while [sqlite3_total_changes()] is running then the value |
| 2376 | ** returned is unpredictable and not meaningful. |
| 2377 | */ |
| 2378 | SQLITE_API int SQLITE_STDCALL sqlite3_total_changes(sqlite3*); |
| 2379 | |
| 2380 | /* |
| 2381 | ** CAPI3REF: Interrupt A Long-Running Query |
| 2382 | ** METHOD: sqlite3 |
| 2383 | ** |
| @@ -2413,11 +2413,11 @@ | |
| 2413 | ** that are started after the sqlite3_interrupt() call returns. |
| 2414 | ** |
| 2415 | ** If the database connection closes while [sqlite3_interrupt()] |
| 2416 | ** is running then bad things will likely happen. |
| 2417 | */ |
| 2418 | SQLITE_API void SQLITE_STDCALL sqlite3_interrupt(sqlite3*); |
| 2419 | |
| 2420 | /* |
| 2421 | ** CAPI3REF: Determine If An SQL Statement Is Complete |
| 2422 | ** |
| 2423 | ** These routines are useful during command-line input to determine if the |
| @@ -2448,12 +2448,12 @@ | |
| 2448 | ** UTF-8 string. |
| 2449 | ** |
| 2450 | ** The input to [sqlite3_complete16()] must be a zero-terminated |
| 2451 | ** UTF-16 string in native byte order. |
| 2452 | */ |
| 2453 | SQLITE_API int SQLITE_STDCALL sqlite3_complete(const char *sql); |
| 2454 | SQLITE_API int SQLITE_STDCALL sqlite3_complete16(const void *sql); |
| 2455 | |
| 2456 | /* |
| 2457 | ** CAPI3REF: Register A Callback To Handle SQLITE_BUSY Errors |
| 2458 | ** KEYWORDS: {busy-handler callback} {busy handler} |
| 2459 | ** METHOD: sqlite3 |
| @@ -2510,11 +2510,11 @@ | |
| 2510 | ** result in undefined behavior. |
| 2511 | ** |
| 2512 | ** A busy handler must not close the database connection |
| 2513 | ** or [prepared statement] that invoked the busy handler. |
| 2514 | */ |
| 2515 | SQLITE_API int SQLITE_STDCALL sqlite3_busy_handler(sqlite3*,int(*)(void*,int),void*); |
| 2516 | |
| 2517 | /* |
| 2518 | ** CAPI3REF: Set A Busy Timeout |
| 2519 | ** METHOD: sqlite3 |
| 2520 | ** |
| @@ -2533,11 +2533,11 @@ | |
| 2533 | ** was defined (using [sqlite3_busy_handler()]) prior to calling |
| 2534 | ** this routine, that other busy handler is cleared.)^ |
| 2535 | ** |
| 2536 | ** See also: [PRAGMA busy_timeout] |
| 2537 | */ |
| 2538 | SQLITE_API int SQLITE_STDCALL sqlite3_busy_timeout(sqlite3*, int ms); |
| 2539 | |
| 2540 | /* |
| 2541 | ** CAPI3REF: Convenience Routines For Running Queries |
| 2542 | ** METHOD: sqlite3 |
| 2543 | ** |
| @@ -2608,19 +2608,19 @@ | |
| 2608 | ** interface defined here. As a consequence, errors that occur in the |
| 2609 | ** wrapper layer outside of the internal [sqlite3_exec()] call are not |
| 2610 | ** reflected in subsequent calls to [sqlite3_errcode()] or |
| 2611 | ** [sqlite3_errmsg()]. |
| 2612 | */ |
| 2613 | SQLITE_API int SQLITE_STDCALL sqlite3_get_table( |
| 2614 | sqlite3 *db, /* An open database */ |
| 2615 | const char *zSql, /* SQL to be evaluated */ |
| 2616 | char ***pazResult, /* Results of the query */ |
| 2617 | int *pnRow, /* Number of result rows written here */ |
| 2618 | int *pnColumn, /* Number of result columns written here */ |
| 2619 | char **pzErrmsg /* Error msg written here */ |
| 2620 | ); |
| 2621 | SQLITE_API void SQLITE_STDCALL sqlite3_free_table(char **result); |
| 2622 | |
| 2623 | /* |
| 2624 | ** CAPI3REF: Formatted String Printing Functions |
| 2625 | ** |
| 2626 | ** These routines are work-alikes of the "printf()" family of functions |
| @@ -2723,13 +2723,13 @@ | |
| 2723 | ** ^(The "%z" formatting option works like "%s" but with the |
| 2724 | ** addition that after the string has been read and copied into |
| 2725 | ** the result, [sqlite3_free()] is called on the input string.)^ |
| 2726 | */ |
| 2727 | SQLITE_API char *SQLITE_CDECL sqlite3_mprintf(const char*,...); |
| 2728 | SQLITE_API char *SQLITE_STDCALL sqlite3_vmprintf(const char*, va_list); |
| 2729 | SQLITE_API char *SQLITE_CDECL sqlite3_snprintf(int,char*,const char*, ...); |
| 2730 | SQLITE_API char *SQLITE_STDCALL sqlite3_vsnprintf(int,char*,const char*, va_list); |
| 2731 | |
| 2732 | /* |
| 2733 | ** CAPI3REF: Memory Allocation Subsystem |
| 2734 | ** |
| 2735 | ** The SQLite core uses these three routines for all of its own |
| @@ -2815,16 +2815,16 @@ | |
| 2815 | ** |
| 2816 | ** The application must not read or write any part of |
| 2817 | ** a block of memory after it has been released using |
| 2818 | ** [sqlite3_free()] or [sqlite3_realloc()]. |
| 2819 | */ |
| 2820 | SQLITE_API void *SQLITE_STDCALL sqlite3_malloc(int); |
| 2821 | SQLITE_API void *SQLITE_STDCALL sqlite3_malloc64(sqlite3_uint64); |
| 2822 | SQLITE_API void *SQLITE_STDCALL sqlite3_realloc(void*, int); |
| 2823 | SQLITE_API void *SQLITE_STDCALL sqlite3_realloc64(void*, sqlite3_uint64); |
| 2824 | SQLITE_API void SQLITE_STDCALL sqlite3_free(void*); |
| 2825 | SQLITE_API sqlite3_uint64 SQLITE_STDCALL sqlite3_msize(void*); |
| 2826 | |
| 2827 | /* |
| 2828 | ** CAPI3REF: Memory Allocator Statistics |
| 2829 | ** |
| 2830 | ** SQLite provides these two interfaces for reporting on the status |
| @@ -2845,12 +2845,12 @@ | |
| 2845 | ** [sqlite3_memory_used()] if and only if the parameter to |
| 2846 | ** [sqlite3_memory_highwater()] is true. ^The value returned |
| 2847 | ** by [sqlite3_memory_highwater(1)] is the high-water mark |
| 2848 | ** prior to the reset. |
| 2849 | */ |
| 2850 | SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_memory_used(void); |
| 2851 | SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_memory_highwater(int resetFlag); |
| 2852 | |
| 2853 | /* |
| 2854 | ** CAPI3REF: Pseudo-Random Number Generator |
| 2855 | ** |
| 2856 | ** SQLite contains a high-quality pseudo-random number generator (PRNG) used to |
| @@ -2869,11 +2869,11 @@ | |
| 2869 | ** ^If the previous call to this routine had an N of 1 or more and a |
| 2870 | ** non-NULL P then the pseudo-randomness is generated |
| 2871 | ** internally and without recourse to the [sqlite3_vfs] xRandomness |
| 2872 | ** method. |
| 2873 | */ |
| 2874 | SQLITE_API void SQLITE_STDCALL sqlite3_randomness(int N, void *P); |
| 2875 | |
| 2876 | /* |
| 2877 | ** CAPI3REF: Compile-Time Authorization Callbacks |
| 2878 | ** METHOD: sqlite3 |
| 2879 | ** |
| @@ -2952,13 +2952,13 @@ | |
| 2952 | ** [sqlite3_prepare()] or its variants. Authorization is not |
| 2953 | ** performed during statement evaluation in [sqlite3_step()], unless |
| 2954 | ** as stated in the previous paragraph, sqlite3_step() invokes |
| 2955 | ** sqlite3_prepare_v2() to reprepare a statement after a schema change. |
| 2956 | */ |
| 2957 | SQLITE_API int SQLITE_STDCALL sqlite3_set_authorizer( |
| 2958 | sqlite3*, |
| 2959 | int (*xAuth)(void*,int,const char*,const char*,const char*,const char*), |
| 2960 | void *pUserData |
| 2961 | ); |
| 2962 | |
| 2963 | /* |
| 2964 | ** CAPI3REF: Authorizer Return Codes |
| @@ -3060,14 +3060,14 @@ | |
| 3060 | ** digits in the time are meaningless. Future versions of SQLite |
| 3061 | ** might provide greater resolution on the profiler callback. The |
| 3062 | ** sqlite3_profile() function is considered experimental and is |
| 3063 | ** subject to change in future versions of SQLite. |
| 3064 | */ |
| 3065 | SQLITE_API SQLITE_DEPRECATED void *SQLITE_STDCALL sqlite3_trace(sqlite3*, |
| 3066 | void(*xTrace)(void*,const char*), void*); |
| 3067 | SQLITE_API SQLITE_DEPRECATED void *SQLITE_STDCALL sqlite3_profile(sqlite3*, |
| 3068 | void(*xProfile)(void*,const char*,sqlite3_uint64), void*); |
| 3069 | |
| 3070 | /* |
| 3071 | ** CAPI3REF: SQL Trace Event Codes |
| 3072 | ** KEYWORDS: SQLITE_TRACE |
| 3073 | ** |
| @@ -3151,14 +3151,14 @@ | |
| 3151 | ** |
| 3152 | ** The sqlite3_trace_v2() interface is intended to replace the legacy |
| 3153 | ** interfaces [sqlite3_trace()] and [sqlite3_profile()], both of which |
| 3154 | ** are deprecated. |
| 3155 | */ |
| 3156 | SQLITE_API int SQLITE_STDCALL sqlite3_trace_v2( |
| 3157 | sqlite3*, |
| 3158 | unsigned uMask, |
| 3159 | int(*xCallback)(unsigned,void*,void*,void*), |
| 3160 | void *pCtx |
| 3161 | ); |
| 3162 | |
| 3163 | /* |
| 3164 | ** CAPI3REF: Query Progress Callbacks |
| @@ -3190,11 +3190,11 @@ | |
| 3190 | ** the database connection that invoked the progress handler. |
| 3191 | ** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their |
| 3192 | ** database connections for the meaning of "modify" in this paragraph. |
| 3193 | ** |
| 3194 | */ |
| 3195 | SQLITE_API void SQLITE_STDCALL sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*); |
| 3196 | |
| 3197 | /* |
| 3198 | ** CAPI3REF: Opening A New Database Connection |
| 3199 | ** CONSTRUCTOR: sqlite3 |
| 3200 | ** |
| @@ -3419,19 +3419,19 @@ | |
| 3419 | ** prior to calling sqlite3_open() or sqlite3_open_v2(). Otherwise, various |
| 3420 | ** features that require the use of temporary files may fail. |
| 3421 | ** |
| 3422 | ** See also: [sqlite3_temp_directory] |
| 3423 | */ |
| 3424 | SQLITE_API int SQLITE_STDCALL sqlite3_open( |
| 3425 | const char *filename, /* Database filename (UTF-8) */ |
| 3426 | sqlite3 **ppDb /* OUT: SQLite db handle */ |
| 3427 | ); |
| 3428 | SQLITE_API int SQLITE_STDCALL sqlite3_open16( |
| 3429 | const void *filename, /* Database filename (UTF-16) */ |
| 3430 | sqlite3 **ppDb /* OUT: SQLite db handle */ |
| 3431 | ); |
| 3432 | SQLITE_API int SQLITE_STDCALL sqlite3_open_v2( |
| 3433 | const char *filename, /* Database filename (UTF-8) */ |
| 3434 | sqlite3 **ppDb, /* OUT: SQLite db handle */ |
| 3435 | int flags, /* Flags */ |
| 3436 | const char *zVfs /* Name of VFS module to use */ |
| 3437 | ); |
| @@ -3473,13 +3473,13 @@ | |
| 3473 | ** sqlite3_uri_boolean(F,P,B) returns B. If F is not a NULL pointer and |
| 3474 | ** is not a database file pathname pointer that SQLite passed into the xOpen |
| 3475 | ** VFS method, then the behavior of this routine is undefined and probably |
| 3476 | ** undesirable. |
| 3477 | */ |
| 3478 | SQLITE_API const char *SQLITE_STDCALL sqlite3_uri_parameter(const char *zFilename, const char *zParam); |
| 3479 | SQLITE_API int SQLITE_STDCALL sqlite3_uri_boolean(const char *zFile, const char *zParam, int bDefault); |
| 3480 | SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_uri_int64(const char*, const char*, sqlite3_int64); |
| 3481 | |
| 3482 | |
| 3483 | /* |
| 3484 | ** CAPI3REF: Error Codes And Messages |
| 3485 | ** METHOD: sqlite3 |
| @@ -3519,15 +3519,15 @@ | |
| 3519 | ** |
| 3520 | ** If an interface fails with SQLITE_MISUSE, that means the interface |
| 3521 | ** was invoked incorrectly by the application. In that case, the |
| 3522 | ** error code and message may or may not be set. |
| 3523 | */ |
| 3524 | SQLITE_API int SQLITE_STDCALL sqlite3_errcode(sqlite3 *db); |
| 3525 | SQLITE_API int SQLITE_STDCALL sqlite3_extended_errcode(sqlite3 *db); |
| 3526 | SQLITE_API const char *SQLITE_STDCALL sqlite3_errmsg(sqlite3*); |
| 3527 | SQLITE_API const void *SQLITE_STDCALL sqlite3_errmsg16(sqlite3*); |
| 3528 | SQLITE_API const char *SQLITE_STDCALL sqlite3_errstr(int); |
| 3529 | |
| 3530 | /* |
| 3531 | ** CAPI3REF: Prepared Statement Object |
| 3532 | ** KEYWORDS: {prepared statement} {prepared statements} |
| 3533 | ** |
| @@ -3591,11 +3591,11 @@ | |
| 3591 | ** created by an untrusted script can be contained using the |
| 3592 | ** [max_page_count] [PRAGMA]. |
| 3593 | ** |
| 3594 | ** New run-time limit categories may be added in future releases. |
| 3595 | */ |
| 3596 | SQLITE_API int SQLITE_STDCALL sqlite3_limit(sqlite3*, int id, int newVal); |
| 3597 | |
| 3598 | /* |
| 3599 | ** CAPI3REF: Run-Time Limit Categories |
| 3600 | ** KEYWORDS: {limit category} {*limit categories} |
| 3601 | ** |
| @@ -3743,32 +3743,32 @@ | |
| 3743 | ** or [GLOB] operator or if the parameter is compared to an indexed column |
| 3744 | ** and the [SQLITE_ENABLE_STAT3] compile-time option is enabled. |
| 3745 | ** </li> |
| 3746 | ** </ol> |
| 3747 | */ |
| 3748 | SQLITE_API int SQLITE_STDCALL sqlite3_prepare( |
| 3749 | sqlite3 *db, /* Database handle */ |
| 3750 | const char *zSql, /* SQL statement, UTF-8 encoded */ |
| 3751 | int nByte, /* Maximum length of zSql in bytes. */ |
| 3752 | sqlite3_stmt **ppStmt, /* OUT: Statement handle */ |
| 3753 | const char **pzTail /* OUT: Pointer to unused portion of zSql */ |
| 3754 | ); |
| 3755 | SQLITE_API int SQLITE_STDCALL sqlite3_prepare_v2( |
| 3756 | sqlite3 *db, /* Database handle */ |
| 3757 | const char *zSql, /* SQL statement, UTF-8 encoded */ |
| 3758 | int nByte, /* Maximum length of zSql in bytes. */ |
| 3759 | sqlite3_stmt **ppStmt, /* OUT: Statement handle */ |
| 3760 | const char **pzTail /* OUT: Pointer to unused portion of zSql */ |
| 3761 | ); |
| 3762 | SQLITE_API int SQLITE_STDCALL sqlite3_prepare16( |
| 3763 | sqlite3 *db, /* Database handle */ |
| 3764 | const void *zSql, /* SQL statement, UTF-16 encoded */ |
| 3765 | int nByte, /* Maximum length of zSql in bytes. */ |
| 3766 | sqlite3_stmt **ppStmt, /* OUT: Statement handle */ |
| 3767 | const void **pzTail /* OUT: Pointer to unused portion of zSql */ |
| 3768 | ); |
| 3769 | SQLITE_API int SQLITE_STDCALL sqlite3_prepare16_v2( |
| 3770 | sqlite3 *db, /* Database handle */ |
| 3771 | const void *zSql, /* SQL statement, UTF-16 encoded */ |
| 3772 | int nByte, /* Maximum length of zSql in bytes. */ |
| 3773 | sqlite3_stmt **ppStmt, /* OUT: Statement handle */ |
| 3774 | const void **pzTail /* OUT: Pointer to unused portion of zSql */ |
| @@ -3803,12 +3803,12 @@ | |
| 3803 | ** automatically freed when the prepared statement is finalized. |
| 3804 | ** ^The string returned by sqlite3_expanded_sql(P), on the other hand, |
| 3805 | ** is obtained from [sqlite3_malloc()] and must be free by the application |
| 3806 | ** by passing it to [sqlite3_free()]. |
| 3807 | */ |
| 3808 | SQLITE_API const char *SQLITE_STDCALL sqlite3_sql(sqlite3_stmt *pStmt); |
| 3809 | SQLITE_API char *SQLITE_STDCALL sqlite3_expanded_sql(sqlite3_stmt *pStmt); |
| 3810 | |
| 3811 | /* |
| 3812 | ** CAPI3REF: Determine If An SQL Statement Writes The Database |
| 3813 | ** METHOD: sqlite3_stmt |
| 3814 | ** |
| @@ -3836,11 +3836,11 @@ | |
| 3836 | ** database. ^The [ATTACH] and [DETACH] statements also cause |
| 3837 | ** sqlite3_stmt_readonly() to return true since, while those statements |
| 3838 | ** change the configuration of a database connection, they do not make |
| 3839 | ** changes to the content of the database files on disk. |
| 3840 | */ |
| 3841 | SQLITE_API int SQLITE_STDCALL sqlite3_stmt_readonly(sqlite3_stmt *pStmt); |
| 3842 | |
| 3843 | /* |
| 3844 | ** CAPI3REF: Determine If A Prepared Statement Has Been Reset |
| 3845 | ** METHOD: sqlite3_stmt |
| 3846 | ** |
| @@ -3857,11 +3857,11 @@ | |
| 3857 | ** to locate all prepared statements associated with a database |
| 3858 | ** connection that are in need of being reset. This can be used, |
| 3859 | ** for example, in diagnostic routines to search for prepared |
| 3860 | ** statements that are holding a transaction open. |
| 3861 | */ |
| 3862 | SQLITE_API int SQLITE_STDCALL sqlite3_stmt_busy(sqlite3_stmt*); |
| 3863 | |
| 3864 | /* |
| 3865 | ** CAPI3REF: Dynamically Typed Value Object |
| 3866 | ** KEYWORDS: {protected sqlite3_value} {unprotected sqlite3_value} |
| 3867 | ** |
| @@ -4021,24 +4021,24 @@ | |
| 4021 | ** index is out of range. ^[SQLITE_NOMEM] is returned if malloc() fails. |
| 4022 | ** |
| 4023 | ** See also: [sqlite3_bind_parameter_count()], |
| 4024 | ** [sqlite3_bind_parameter_name()], and [sqlite3_bind_parameter_index()]. |
| 4025 | */ |
| 4026 | SQLITE_API int SQLITE_STDCALL sqlite3_bind_blob(sqlite3_stmt*, int, const void*, int n, void(*)(void*)); |
| 4027 | SQLITE_API int SQLITE_STDCALL sqlite3_bind_blob64(sqlite3_stmt*, int, const void*, sqlite3_uint64, |
| 4028 | void(*)(void*)); |
| 4029 | SQLITE_API int SQLITE_STDCALL sqlite3_bind_double(sqlite3_stmt*, int, double); |
| 4030 | SQLITE_API int SQLITE_STDCALL sqlite3_bind_int(sqlite3_stmt*, int, int); |
| 4031 | SQLITE_API int SQLITE_STDCALL sqlite3_bind_int64(sqlite3_stmt*, int, sqlite3_int64); |
| 4032 | SQLITE_API int SQLITE_STDCALL sqlite3_bind_null(sqlite3_stmt*, int); |
| 4033 | SQLITE_API int SQLITE_STDCALL sqlite3_bind_text(sqlite3_stmt*,int,const char*,int,void(*)(void*)); |
| 4034 | SQLITE_API int SQLITE_STDCALL sqlite3_bind_text16(sqlite3_stmt*, int, const void*, int, void(*)(void*)); |
| 4035 | SQLITE_API int SQLITE_STDCALL sqlite3_bind_text64(sqlite3_stmt*, int, const char*, sqlite3_uint64, |
| 4036 | void(*)(void*), unsigned char encoding); |
| 4037 | SQLITE_API int SQLITE_STDCALL sqlite3_bind_value(sqlite3_stmt*, int, const sqlite3_value*); |
| 4038 | SQLITE_API int SQLITE_STDCALL sqlite3_bind_zeroblob(sqlite3_stmt*, int, int n); |
| 4039 | SQLITE_API int SQLITE_STDCALL sqlite3_bind_zeroblob64(sqlite3_stmt*, int, sqlite3_uint64); |
| 4040 | |
| 4041 | /* |
| 4042 | ** CAPI3REF: Number Of SQL Parameters |
| 4043 | ** METHOD: sqlite3_stmt |
| 4044 | ** |
| @@ -4055,11 +4055,11 @@ | |
| 4055 | ** |
| 4056 | ** See also: [sqlite3_bind_blob|sqlite3_bind()], |
| 4057 | ** [sqlite3_bind_parameter_name()], and |
| 4058 | ** [sqlite3_bind_parameter_index()]. |
| 4059 | */ |
| 4060 | SQLITE_API int SQLITE_STDCALL sqlite3_bind_parameter_count(sqlite3_stmt*); |
| 4061 | |
| 4062 | /* |
| 4063 | ** CAPI3REF: Name Of A Host Parameter |
| 4064 | ** METHOD: sqlite3_stmt |
| 4065 | ** |
| @@ -4083,11 +4083,11 @@ | |
| 4083 | ** |
| 4084 | ** See also: [sqlite3_bind_blob|sqlite3_bind()], |
| 4085 | ** [sqlite3_bind_parameter_count()], and |
| 4086 | ** [sqlite3_bind_parameter_index()]. |
| 4087 | */ |
| 4088 | SQLITE_API const char *SQLITE_STDCALL sqlite3_bind_parameter_name(sqlite3_stmt*, int); |
| 4089 | |
| 4090 | /* |
| 4091 | ** CAPI3REF: Index Of A Parameter With A Given Name |
| 4092 | ** METHOD: sqlite3_stmt |
| 4093 | ** |
| @@ -4100,21 +4100,21 @@ | |
| 4100 | ** |
| 4101 | ** See also: [sqlite3_bind_blob|sqlite3_bind()], |
| 4102 | ** [sqlite3_bind_parameter_count()], and |
| 4103 | ** [sqlite3_bind_parameter_name()]. |
| 4104 | */ |
| 4105 | SQLITE_API int SQLITE_STDCALL sqlite3_bind_parameter_index(sqlite3_stmt*, const char *zName); |
| 4106 | |
| 4107 | /* |
| 4108 | ** CAPI3REF: Reset All Bindings On A Prepared Statement |
| 4109 | ** METHOD: sqlite3_stmt |
| 4110 | ** |
| 4111 | ** ^Contrary to the intuition of many, [sqlite3_reset()] does not reset |
| 4112 | ** the [sqlite3_bind_blob | bindings] on a [prepared statement]. |
| 4113 | ** ^Use this routine to reset all host parameters to NULL. |
| 4114 | */ |
| 4115 | SQLITE_API int SQLITE_STDCALL sqlite3_clear_bindings(sqlite3_stmt*); |
| 4116 | |
| 4117 | /* |
| 4118 | ** CAPI3REF: Number Of Columns In A Result Set |
| 4119 | ** METHOD: sqlite3_stmt |
| 4120 | ** |
| @@ -4122,11 +4122,11 @@ | |
| 4122 | ** [prepared statement]. ^This routine returns 0 if pStmt is an SQL |
| 4123 | ** statement that does not return data (for example an [UPDATE]). |
| 4124 | ** |
| 4125 | ** See also: [sqlite3_data_count()] |
| 4126 | */ |
| 4127 | SQLITE_API int SQLITE_STDCALL sqlite3_column_count(sqlite3_stmt *pStmt); |
| 4128 | |
| 4129 | /* |
| 4130 | ** CAPI3REF: Column Names In A Result Set |
| 4131 | ** METHOD: sqlite3_stmt |
| 4132 | ** |
| @@ -4151,12 +4151,12 @@ | |
| 4151 | ** ^The name of a result column is the value of the "AS" clause for |
| 4152 | ** that column, if there is an AS clause. If there is no AS clause |
| 4153 | ** then the name of the column is unspecified and may change from |
| 4154 | ** one release of SQLite to the next. |
| 4155 | */ |
| 4156 | SQLITE_API const char *SQLITE_STDCALL sqlite3_column_name(sqlite3_stmt*, int N); |
| 4157 | SQLITE_API const void *SQLITE_STDCALL sqlite3_column_name16(sqlite3_stmt*, int N); |
| 4158 | |
| 4159 | /* |
| 4160 | ** CAPI3REF: Source Of Data In A Query Result |
| 4161 | ** METHOD: sqlite3_stmt |
| 4162 | ** |
| @@ -4200,16 +4200,16 @@ | |
| 4200 | ** If two or more threads call one or more |
| 4201 | ** [sqlite3_column_database_name | column metadata interfaces] |
| 4202 | ** for the same [prepared statement] and result column |
| 4203 | ** at the same time then the results are undefined. |
| 4204 | */ |
| 4205 | SQLITE_API const char *SQLITE_STDCALL sqlite3_column_database_name(sqlite3_stmt*,int); |
| 4206 | SQLITE_API const void *SQLITE_STDCALL sqlite3_column_database_name16(sqlite3_stmt*,int); |
| 4207 | SQLITE_API const char *SQLITE_STDCALL sqlite3_column_table_name(sqlite3_stmt*,int); |
| 4208 | SQLITE_API const void *SQLITE_STDCALL sqlite3_column_table_name16(sqlite3_stmt*,int); |
| 4209 | SQLITE_API const char *SQLITE_STDCALL sqlite3_column_origin_name(sqlite3_stmt*,int); |
| 4210 | SQLITE_API const void *SQLITE_STDCALL sqlite3_column_origin_name16(sqlite3_stmt*,int); |
| 4211 | |
| 4212 | /* |
| 4213 | ** CAPI3REF: Declared Datatype Of A Query Result |
| 4214 | ** METHOD: sqlite3_stmt |
| 4215 | ** |
| @@ -4237,12 +4237,12 @@ | |
| 4237 | ** data stored in that column is of the declared type. SQLite is |
| 4238 | ** strongly typed, but the typing is dynamic not static. ^Type |
| 4239 | ** is associated with individual values, not with the containers |
| 4240 | ** used to hold those values. |
| 4241 | */ |
| 4242 | SQLITE_API const char *SQLITE_STDCALL sqlite3_column_decltype(sqlite3_stmt*,int); |
| 4243 | SQLITE_API const void *SQLITE_STDCALL sqlite3_column_decltype16(sqlite3_stmt*,int); |
| 4244 | |
| 4245 | /* |
| 4246 | ** CAPI3REF: Evaluate An SQL Statement |
| 4247 | ** METHOD: sqlite3_stmt |
| 4248 | ** |
| @@ -4318,11 +4318,11 @@ | |
| 4318 | ** using either [sqlite3_prepare_v2()] or [sqlite3_prepare16_v2()] instead |
| 4319 | ** of the legacy [sqlite3_prepare()] and [sqlite3_prepare16()] interfaces, |
| 4320 | ** then the more specific [error codes] are returned directly |
| 4321 | ** by sqlite3_step(). The use of the "v2" interface is recommended. |
| 4322 | */ |
| 4323 | SQLITE_API int SQLITE_STDCALL sqlite3_step(sqlite3_stmt*); |
| 4324 | |
| 4325 | /* |
| 4326 | ** CAPI3REF: Number of columns in a result set |
| 4327 | ** METHOD: sqlite3_stmt |
| 4328 | ** |
| @@ -4339,11 +4339,11 @@ | |
| 4339 | ** where it always returns zero since each step of that multi-step |
| 4340 | ** pragma returns 0 columns of data. |
| 4341 | ** |
| 4342 | ** See also: [sqlite3_column_count()] |
| 4343 | */ |
| 4344 | SQLITE_API int SQLITE_STDCALL sqlite3_data_count(sqlite3_stmt *pStmt); |
| 4345 | |
| 4346 | /* |
| 4347 | ** CAPI3REF: Fundamental Datatypes |
| 4348 | ** KEYWORDS: SQLITE_TEXT |
| 4349 | ** |
| @@ -4529,20 +4529,20 @@ | |
| 4529 | ** of these routines, a default value is returned. The default value |
| 4530 | ** is either the integer 0, the floating point number 0.0, or a NULL |
| 4531 | ** pointer. Subsequent calls to [sqlite3_errcode()] will return |
| 4532 | ** [SQLITE_NOMEM].)^ |
| 4533 | */ |
| 4534 | SQLITE_API const void *SQLITE_STDCALL sqlite3_column_blob(sqlite3_stmt*, int iCol); |
| 4535 | SQLITE_API int SQLITE_STDCALL sqlite3_column_bytes(sqlite3_stmt*, int iCol); |
| 4536 | SQLITE_API int SQLITE_STDCALL sqlite3_column_bytes16(sqlite3_stmt*, int iCol); |
| 4537 | SQLITE_API double SQLITE_STDCALL sqlite3_column_double(sqlite3_stmt*, int iCol); |
| 4538 | SQLITE_API int SQLITE_STDCALL sqlite3_column_int(sqlite3_stmt*, int iCol); |
| 4539 | SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_column_int64(sqlite3_stmt*, int iCol); |
| 4540 | SQLITE_API const unsigned char *SQLITE_STDCALL sqlite3_column_text(sqlite3_stmt*, int iCol); |
| 4541 | SQLITE_API const void *SQLITE_STDCALL sqlite3_column_text16(sqlite3_stmt*, int iCol); |
| 4542 | SQLITE_API int SQLITE_STDCALL sqlite3_column_type(sqlite3_stmt*, int iCol); |
| 4543 | SQLITE_API sqlite3_value *SQLITE_STDCALL sqlite3_column_value(sqlite3_stmt*, int iCol); |
| 4544 | |
| 4545 | /* |
| 4546 | ** CAPI3REF: Destroy A Prepared Statement Object |
| 4547 | ** DESTRUCTOR: sqlite3_stmt |
| 4548 | ** |
| @@ -4566,11 +4566,11 @@ | |
| 4566 | ** resource leaks. It is a grievous error for the application to try to use |
| 4567 | ** a prepared statement after it has been finalized. Any use of a prepared |
| 4568 | ** statement after it has been finalized can result in undefined and |
| 4569 | ** undesirable behavior such as segfaults and heap corruption. |
| 4570 | */ |
| 4571 | SQLITE_API int SQLITE_STDCALL sqlite3_finalize(sqlite3_stmt *pStmt); |
| 4572 | |
| 4573 | /* |
| 4574 | ** CAPI3REF: Reset A Prepared Statement Object |
| 4575 | ** METHOD: sqlite3_stmt |
| 4576 | ** |
| @@ -4593,11 +4593,11 @@ | |
| 4593 | ** [sqlite3_reset(S)] returns an appropriate [error code]. |
| 4594 | ** |
| 4595 | ** ^The [sqlite3_reset(S)] interface does not change the values |
| 4596 | ** of any [sqlite3_bind_blob|bindings] on the [prepared statement] S. |
| 4597 | */ |
| 4598 | SQLITE_API int SQLITE_STDCALL sqlite3_reset(sqlite3_stmt *pStmt); |
| 4599 | |
| 4600 | /* |
| 4601 | ** CAPI3REF: Create Or Redefine SQL Functions |
| 4602 | ** KEYWORDS: {function creation routines} |
| 4603 | ** KEYWORDS: {application-defined SQL function} |
| @@ -4693,40 +4693,40 @@ | |
| 4693 | ** ^An application-defined function is permitted to call other |
| 4694 | ** SQLite interfaces. However, such calls must not |
| 4695 | ** close the database connection nor finalize or reset the prepared |
| 4696 | ** statement in which the function is running. |
| 4697 | */ |
| 4698 | SQLITE_API int SQLITE_STDCALL sqlite3_create_function( |
| 4699 | sqlite3 *db, |
| 4700 | const char *zFunctionName, |
| 4701 | int nArg, |
| 4702 | int eTextRep, |
| 4703 | void *pApp, |
| 4704 | void (*xFunc)(sqlite3_context*,int,sqlite3_value**), |
| 4705 | void (*xStep)(sqlite3_context*,int,sqlite3_value**), |
| 4706 | void (*xFinal)(sqlite3_context*) |
| 4707 | ); |
| 4708 | SQLITE_API int SQLITE_STDCALL sqlite3_create_function16( |
| 4709 | sqlite3 *db, |
| 4710 | const void *zFunctionName, |
| 4711 | int nArg, |
| 4712 | int eTextRep, |
| 4713 | void *pApp, |
| 4714 | void (*xFunc)(sqlite3_context*,int,sqlite3_value**), |
| 4715 | void (*xStep)(sqlite3_context*,int,sqlite3_value**), |
| 4716 | void (*xFinal)(sqlite3_context*) |
| 4717 | ); |
| 4718 | SQLITE_API int SQLITE_STDCALL sqlite3_create_function_v2( |
| 4719 | sqlite3 *db, |
| 4720 | const char *zFunctionName, |
| 4721 | int nArg, |
| 4722 | int eTextRep, |
| 4723 | void *pApp, |
| 4724 | void (*xFunc)(sqlite3_context*,int,sqlite3_value**), |
| 4725 | void (*xStep)(sqlite3_context*,int,sqlite3_value**), |
| 4726 | void (*xFinal)(sqlite3_context*), |
| 4727 | void(*xDestroy)(void*) |
| 4728 | ); |
| 4729 | |
| 4730 | /* |
| 4731 | ** CAPI3REF: Text Encodings |
| 4732 | ** |
| @@ -4759,16 +4759,16 @@ | |
| 4759 | ** to be supported. However, new applications should avoid |
| 4760 | ** the use of these functions. To encourage programmers to avoid |
| 4761 | ** these functions, we will not explain what they do. |
| 4762 | */ |
| 4763 | #ifndef SQLITE_OMIT_DEPRECATED |
| 4764 | SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_aggregate_count(sqlite3_context*); |
| 4765 | SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_expired(sqlite3_stmt*); |
| 4766 | SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_transfer_bindings(sqlite3_stmt*, sqlite3_stmt*); |
| 4767 | SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_global_recover(void); |
| 4768 | SQLITE_API SQLITE_DEPRECATED void SQLITE_STDCALL sqlite3_thread_cleanup(void); |
| 4769 | SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_memory_alarm(void(*)(void*,sqlite3_int64,int), |
| 4770 | void*,sqlite3_int64); |
| 4771 | #endif |
| 4772 | |
| 4773 | /* |
| 4774 | ** CAPI3REF: Obtaining SQL Values |
| @@ -4814,22 +4814,22 @@ | |
| 4814 | ** or [sqlite3_value_text16()]. |
| 4815 | ** |
| 4816 | ** These routines must be called from the same thread as |
| 4817 | ** the SQL function that supplied the [sqlite3_value*] parameters. |
| 4818 | */ |
| 4819 | SQLITE_API const void *SQLITE_STDCALL sqlite3_value_blob(sqlite3_value*); |
| 4820 | SQLITE_API int SQLITE_STDCALL sqlite3_value_bytes(sqlite3_value*); |
| 4821 | SQLITE_API int SQLITE_STDCALL sqlite3_value_bytes16(sqlite3_value*); |
| 4822 | SQLITE_API double SQLITE_STDCALL sqlite3_value_double(sqlite3_value*); |
| 4823 | SQLITE_API int SQLITE_STDCALL sqlite3_value_int(sqlite3_value*); |
| 4824 | SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_value_int64(sqlite3_value*); |
| 4825 | SQLITE_API const unsigned char *SQLITE_STDCALL sqlite3_value_text(sqlite3_value*); |
| 4826 | SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16(sqlite3_value*); |
| 4827 | SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16le(sqlite3_value*); |
| 4828 | SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16be(sqlite3_value*); |
| 4829 | SQLITE_API int SQLITE_STDCALL sqlite3_value_type(sqlite3_value*); |
| 4830 | SQLITE_API int SQLITE_STDCALL sqlite3_value_numeric_type(sqlite3_value*); |
| 4831 | |
| 4832 | /* |
| 4833 | ** CAPI3REF: Finding The Subtype Of SQL Values |
| 4834 | ** METHOD: sqlite3_value |
| 4835 | ** |
| @@ -4841,11 +4841,11 @@ | |
| 4841 | ** |
| 4842 | ** SQLite makes no use of subtype itself. It merely passes the subtype |
| 4843 | ** from the result of one [application-defined SQL function] into the |
| 4844 | ** input of another. |
| 4845 | */ |
| 4846 | SQLITE_API unsigned int SQLITE_STDCALL sqlite3_value_subtype(sqlite3_value*); |
| 4847 | |
| 4848 | /* |
| 4849 | ** CAPI3REF: Copy And Free SQL Values |
| 4850 | ** METHOD: sqlite3_value |
| 4851 | ** |
| @@ -4857,12 +4857,12 @@ | |
| 4857 | ** |
| 4858 | ** ^The sqlite3_value_free(V) interface frees an [sqlite3_value] object |
| 4859 | ** previously obtained from [sqlite3_value_dup()]. ^If V is a NULL pointer |
| 4860 | ** then sqlite3_value_free(V) is a harmless no-op. |
| 4861 | */ |
| 4862 | SQLITE_API sqlite3_value *SQLITE_STDCALL sqlite3_value_dup(const sqlite3_value*); |
| 4863 | SQLITE_API void SQLITE_STDCALL sqlite3_value_free(sqlite3_value*); |
| 4864 | |
| 4865 | /* |
| 4866 | ** CAPI3REF: Obtain Aggregate Function Context |
| 4867 | ** METHOD: sqlite3_context |
| 4868 | ** |
| @@ -4903,11 +4903,11 @@ | |
| 4903 | ** function. |
| 4904 | ** |
| 4905 | ** This routine must be called from the same thread in which |
| 4906 | ** the aggregate SQL function is running. |
| 4907 | */ |
| 4908 | SQLITE_API void *SQLITE_STDCALL sqlite3_aggregate_context(sqlite3_context*, int nBytes); |
| 4909 | |
| 4910 | /* |
| 4911 | ** CAPI3REF: User Data For Functions |
| 4912 | ** METHOD: sqlite3_context |
| 4913 | ** |
| @@ -4918,11 +4918,11 @@ | |
| 4918 | ** registered the application defined function. |
| 4919 | ** |
| 4920 | ** This routine must be called from the same thread in which |
| 4921 | ** the application-defined function is running. |
| 4922 | */ |
| 4923 | SQLITE_API void *SQLITE_STDCALL sqlite3_user_data(sqlite3_context*); |
| 4924 | |
| 4925 | /* |
| 4926 | ** CAPI3REF: Database Connection For Functions |
| 4927 | ** METHOD: sqlite3_context |
| 4928 | ** |
| @@ -4930,11 +4930,11 @@ | |
| 4930 | ** the pointer to the [database connection] (the 1st parameter) |
| 4931 | ** of the [sqlite3_create_function()] |
| 4932 | ** and [sqlite3_create_function16()] routines that originally |
| 4933 | ** registered the application defined function. |
| 4934 | */ |
| 4935 | SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3_context_db_handle(sqlite3_context*); |
| 4936 | |
| 4937 | /* |
| 4938 | ** CAPI3REF: Function Auxiliary Data |
| 4939 | ** METHOD: sqlite3_context |
| 4940 | ** |
| @@ -4962,16 +4962,17 @@ | |
| 4962 | ** NULL if the metadata has been discarded. |
| 4963 | ** ^After each call to sqlite3_set_auxdata(C,N,P,X) where X is not NULL, |
| 4964 | ** SQLite will invoke the destructor function X with parameter P exactly |
| 4965 | ** once, when the metadata is discarded. |
| 4966 | ** SQLite is free to discard the metadata at any time, including: <ul> |
| 4967 | ** <li> ^(when the corresponding function parameter changes)^, or |
| 4968 | ** <li> ^(when [sqlite3_reset()] or [sqlite3_finalize()] is called for the |
| 4969 | ** SQL statement)^, or |
| 4970 | ** <li> ^(when sqlite3_set_auxdata() is invoked again on the same |
| 4971 | ** parameter)^, or |
| 4972 | ** <li> ^(during the original sqlite3_set_auxdata() call when a memory |
| 4973 | ** allocation error occurs.)^ </ul> |
| 4974 | ** |
| 4975 | ** Note the last bullet in particular. The destructor X in |
| 4976 | ** sqlite3_set_auxdata(C,N,P,X) might be called immediately, before the |
| 4977 | ** sqlite3_set_auxdata() interface even returns. Hence sqlite3_set_auxdata() |
| 4978 | ** should be called near the end of the function implementation and the |
| @@ -4983,12 +4984,12 @@ | |
| 4984 | ** values and [parameters] and expressions composed from the same.)^ |
| 4985 | ** |
| 4986 | ** These routines must be called from the same thread in which |
| 4987 | ** the SQL function is running. |
| 4988 | */ |
| 4989 | SQLITE_API void *SQLITE_STDCALL sqlite3_get_auxdata(sqlite3_context*, int N); |
| 4990 | SQLITE_API void SQLITE_STDCALL sqlite3_set_auxdata(sqlite3_context*, int N, void*, void (*)(void*)); |
| 4991 | |
| 4992 | |
| 4993 | /* |
| 4994 | ** CAPI3REF: Constants Defining Special Destructor Behavior |
| 4995 | ** |
| @@ -5001,11 +5002,11 @@ | |
| 5002 | ** the content before returning. |
| 5003 | ** |
| 5004 | ** The typedef is necessary to work around problems in certain |
| 5005 | ** C++ compilers. |
| 5006 | */ |
| 5007 | typedef void (*sqlite3_destructor_type)(void*); |
| 5008 | #define SQLITE_STATIC ((sqlite3_destructor_type)0) |
| 5009 | #define SQLITE_TRANSIENT ((sqlite3_destructor_type)-1) |
| 5010 | |
| 5011 | /* |
| 5012 | ** CAPI3REF: Setting The Result Of An SQL Function |
| @@ -5120,31 +5121,31 @@ | |
| 5121 | ** |
| 5122 | ** If these routines are called from within the different thread |
| 5123 | ** than the one containing the application-defined function that received |
| 5124 | ** the [sqlite3_context] pointer, the results are undefined. |
| 5125 | */ |
| 5126 | SQLITE_API void SQLITE_STDCALL sqlite3_result_blob(sqlite3_context*, const void*, int, void(*)(void*)); |
| 5127 | SQLITE_API void SQLITE_STDCALL sqlite3_result_blob64(sqlite3_context*,const void*, |
| 5128 | sqlite3_uint64,void(*)(void*)); |
| 5129 | SQLITE_API void SQLITE_STDCALL sqlite3_result_double(sqlite3_context*, double); |
| 5130 | SQLITE_API void SQLITE_STDCALL sqlite3_result_error(sqlite3_context*, const char*, int); |
| 5131 | SQLITE_API void SQLITE_STDCALL sqlite3_result_error16(sqlite3_context*, const void*, int); |
| 5132 | SQLITE_API void SQLITE_STDCALL sqlite3_result_error_toobig(sqlite3_context*); |
| 5133 | SQLITE_API void SQLITE_STDCALL sqlite3_result_error_nomem(sqlite3_context*); |
| 5134 | SQLITE_API void SQLITE_STDCALL sqlite3_result_error_code(sqlite3_context*, int); |
| 5135 | SQLITE_API void SQLITE_STDCALL sqlite3_result_int(sqlite3_context*, int); |
| 5136 | SQLITE_API void SQLITE_STDCALL sqlite3_result_int64(sqlite3_context*, sqlite3_int64); |
| 5137 | SQLITE_API void SQLITE_STDCALL sqlite3_result_null(sqlite3_context*); |
| 5138 | SQLITE_API void SQLITE_STDCALL sqlite3_result_text(sqlite3_context*, const char*, int, void(*)(void*)); |
| 5139 | SQLITE_API void SQLITE_STDCALL sqlite3_result_text64(sqlite3_context*, const char*,sqlite3_uint64, |
| 5140 | void(*)(void*), unsigned char encoding); |
| 5141 | SQLITE_API void SQLITE_STDCALL sqlite3_result_text16(sqlite3_context*, const void*, int, void(*)(void*)); |
| 5142 | SQLITE_API void SQLITE_STDCALL sqlite3_result_text16le(sqlite3_context*, const void*, int,void(*)(void*)); |
| 5143 | SQLITE_API void SQLITE_STDCALL sqlite3_result_text16be(sqlite3_context*, const void*, int,void(*)(void*)); |
| 5144 | SQLITE_API void SQLITE_STDCALL sqlite3_result_value(sqlite3_context*, sqlite3_value*); |
| 5145 | SQLITE_API void SQLITE_STDCALL sqlite3_result_zeroblob(sqlite3_context*, int n); |
| 5146 | SQLITE_API int SQLITE_STDCALL sqlite3_result_zeroblob64(sqlite3_context*, sqlite3_uint64 n); |
| 5147 | |
| 5148 | |
| 5149 | /* |
| 5150 | ** CAPI3REF: Setting The Subtype Of An SQL Function |
| 5151 | ** METHOD: sqlite3_context |
| @@ -5155,11 +5156,11 @@ | |
| 5156 | ** of the subtype T are preserved in current versions of SQLite; |
| 5157 | ** higher order bits are discarded. |
| 5158 | ** The number of subtype bytes preserved by SQLite might increase |
| 5159 | ** in future releases of SQLite. |
| 5160 | */ |
| 5161 | SQLITE_API void SQLITE_STDCALL sqlite3_result_subtype(sqlite3_context*,unsigned int); |
| 5162 | |
| 5163 | /* |
| 5164 | ** CAPI3REF: Define New Collating Sequences |
| 5165 | ** METHOD: sqlite3 |
| 5166 | ** |
| @@ -5237,31 +5238,31 @@ | |
| 5238 | ** is unfortunate but cannot be changed without breaking backwards |
| 5239 | ** compatibility. |
| 5240 | ** |
| 5241 | ** See also: [sqlite3_collation_needed()] and [sqlite3_collation_needed16()]. |
| 5242 | */ |
| 5243 | SQLITE_API int SQLITE_STDCALL sqlite3_create_collation( |
| 5244 | sqlite3*, |
| 5245 | const char *zName, |
| 5246 | int eTextRep, |
| 5247 | void *pArg, |
| 5248 | int(*xCompare)(void*,int,const void*,int,const void*) |
| 5249 | ); |
| 5250 | SQLITE_API int SQLITE_STDCALL sqlite3_create_collation_v2( |
| 5251 | sqlite3*, |
| 5252 | const char *zName, |
| 5253 | int eTextRep, |
| 5254 | void *pArg, |
| 5255 | int(*xCompare)(void*,int,const void*,int,const void*), |
| 5256 | void(*xDestroy)(void*) |
| 5257 | ); |
| 5258 | SQLITE_API int SQLITE_STDCALL sqlite3_create_collation16( |
| 5259 | sqlite3*, |
| 5260 | const void *zName, |
| 5261 | int eTextRep, |
| 5262 | void *pArg, |
| 5263 | int(*xCompare)(void*,int,const void*,int,const void*) |
| 5264 | ); |
| 5265 | |
| 5266 | /* |
| 5267 | ** CAPI3REF: Collation Needed Callbacks |
| 5268 | ** METHOD: sqlite3 |
| @@ -5287,19 +5288,19 @@ | |
| 5288 | ** |
| 5289 | ** The callback function should register the desired collation using |
| 5290 | ** [sqlite3_create_collation()], [sqlite3_create_collation16()], or |
| 5291 | ** [sqlite3_create_collation_v2()]. |
| 5292 | */ |
| 5293 | SQLITE_API int SQLITE_STDCALL sqlite3_collation_needed( |
| 5294 | sqlite3*, |
| 5295 | void*, |
| 5296 | void(*)(void*,sqlite3*,int eTextRep,const char*) |
| 5297 | ); |
| 5298 | SQLITE_API int SQLITE_STDCALL sqlite3_collation_needed16( |
| 5299 | sqlite3*, |
| 5300 | void*, |
| 5301 | void(*)(void*,sqlite3*,int eTextRep,const void*) |
| 5302 | ); |
| 5303 | |
| 5304 | #ifdef SQLITE_HAS_CODEC |
| 5305 | /* |
| 5306 | ** Specify the key for an encrypted database. This routine should be |
| @@ -5306,15 +5307,15 @@ | |
| 5307 | ** called right after sqlite3_open(). |
| 5308 | ** |
| 5309 | ** The code to implement this API is not available in the public release |
| 5310 | ** of SQLite. |
| 5311 | */ |
| 5312 | SQLITE_API int SQLITE_STDCALL sqlite3_key( |
| 5313 | sqlite3 *db, /* Database to be rekeyed */ |
| 5314 | const void *pKey, int nKey /* The key */ |
| 5315 | ); |
| 5316 | SQLITE_API int SQLITE_STDCALL sqlite3_key_v2( |
| 5317 | sqlite3 *db, /* Database to be rekeyed */ |
| 5318 | const char *zDbName, /* Name of the database */ |
| 5319 | const void *pKey, int nKey /* The key */ |
| 5320 | ); |
| 5321 | |
| @@ -5324,35 +5325,35 @@ | |
| 5325 | ** database is decrypted. |
| 5326 | ** |
| 5327 | ** The code to implement this API is not available in the public release |
| 5328 | ** of SQLite. |
| 5329 | */ |
| 5330 | SQLITE_API int SQLITE_STDCALL sqlite3_rekey( |
| 5331 | sqlite3 *db, /* Database to be rekeyed */ |
| 5332 | const void *pKey, int nKey /* The new key */ |
| 5333 | ); |
| 5334 | SQLITE_API int SQLITE_STDCALL sqlite3_rekey_v2( |
| 5335 | sqlite3 *db, /* Database to be rekeyed */ |
| 5336 | const char *zDbName, /* Name of the database */ |
| 5337 | const void *pKey, int nKey /* The new key */ |
| 5338 | ); |
| 5339 | |
| 5340 | /* |
| 5341 | ** Specify the activation key for a SEE database. Unless |
| 5342 | ** activated, none of the SEE routines will work. |
| 5343 | */ |
| 5344 | SQLITE_API void SQLITE_STDCALL sqlite3_activate_see( |
| 5345 | const char *zPassPhrase /* Activation phrase */ |
| 5346 | ); |
| 5347 | #endif |
| 5348 | |
| 5349 | #ifdef SQLITE_ENABLE_CEROD |
| 5350 | /* |
| 5351 | ** Specify the activation key for a CEROD database. Unless |
| 5352 | ** activated, none of the CEROD routines will work. |
| 5353 | */ |
| 5354 | SQLITE_API void SQLITE_STDCALL sqlite3_activate_cerod( |
| 5355 | const char *zPassPhrase /* Activation phrase */ |
| 5356 | ); |
| 5357 | #endif |
| 5358 | |
| 5359 | /* |
| @@ -5370,11 +5371,11 @@ | |
| 5371 | ** method of the default [sqlite3_vfs] object. If the xSleep() method |
| 5372 | ** of the default VFS is not implemented correctly, or not implemented at |
| 5373 | ** all, then the behavior of sqlite3_sleep() may deviate from the description |
| 5374 | ** in the previous paragraphs. |
| 5375 | */ |
| 5376 | SQLITE_API int SQLITE_STDCALL sqlite3_sleep(int); |
| 5377 | |
| 5378 | /* |
| 5379 | ** CAPI3REF: Name Of The Folder Holding Temporary Files |
| 5380 | ** |
| 5381 | ** ^(If this global variable is made to point to a string which is |
| @@ -5489,11 +5490,11 @@ | |
| 5490 | ** |
| 5491 | ** If another thread changes the autocommit status of the database |
| 5492 | ** connection while this routine is running, then the return value |
| 5493 | ** is undefined. |
| 5494 | */ |
| 5495 | SQLITE_API int SQLITE_STDCALL sqlite3_get_autocommit(sqlite3*); |
| 5496 | |
| 5497 | /* |
| 5498 | ** CAPI3REF: Find The Database Handle Of A Prepared Statement |
| 5499 | ** METHOD: sqlite3_stmt |
| 5500 | ** |
| @@ -5502,11 +5503,11 @@ | |
| 5503 | ** returned by sqlite3_db_handle is the same [database connection] |
| 5504 | ** that was the first argument |
| 5505 | ** to the [sqlite3_prepare_v2()] call (or its variants) that was used to |
| 5506 | ** create the statement in the first place. |
| 5507 | */ |
| 5508 | SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3_db_handle(sqlite3_stmt*); |
| 5509 | |
| 5510 | /* |
| 5511 | ** CAPI3REF: Return The Filename For A Database Connection |
| 5512 | ** METHOD: sqlite3 |
| 5513 | ** |
| @@ -5519,21 +5520,21 @@ | |
| 5520 | ** ^The filename returned by this function is the output of the |
| 5521 | ** xFullPathname method of the [VFS]. ^In other words, the filename |
| 5522 | ** will be an absolute pathname, even if the filename used |
| 5523 | ** to open the database originally was a URI or relative pathname. |
| 5524 | */ |
| 5525 | SQLITE_API const char *SQLITE_STDCALL sqlite3_db_filename(sqlite3 *db, const char *zDbName); |
| 5526 | |
| 5527 | /* |
| 5528 | ** CAPI3REF: Determine if a database is read-only |
| 5529 | ** METHOD: sqlite3 |
| 5530 | ** |
| 5531 | ** ^The sqlite3_db_readonly(D,N) interface returns 1 if the database N |
| 5532 | ** of connection D is read-only, 0 if it is read/write, or -1 if N is not |
| 5533 | ** the name of a database on connection D. |
| 5534 | */ |
| 5535 | SQLITE_API int SQLITE_STDCALL sqlite3_db_readonly(sqlite3 *db, const char *zDbName); |
| 5536 | |
| 5537 | /* |
| 5538 | ** CAPI3REF: Find the next prepared statement |
| 5539 | ** METHOD: sqlite3 |
| 5540 | ** |
| @@ -5545,11 +5546,11 @@ | |
| 5546 | ** |
| 5547 | ** The [database connection] pointer D in a call to |
| 5548 | ** [sqlite3_next_stmt(D,S)] must refer to an open database |
| 5549 | ** connection and in particular must not be a NULL pointer. |
| 5550 | */ |
| 5551 | SQLITE_API sqlite3_stmt *SQLITE_STDCALL sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt); |
| 5552 | |
| 5553 | /* |
| 5554 | ** CAPI3REF: Commit And Rollback Notification Callbacks |
| 5555 | ** METHOD: sqlite3 |
| 5556 | ** |
| @@ -5594,12 +5595,12 @@ | |
| 5595 | ** ^The rollback callback is not invoked if a transaction is |
| 5596 | ** automatically rolled back because the database connection is closed. |
| 5597 | ** |
| 5598 | ** See also the [sqlite3_update_hook()] interface. |
| 5599 | */ |
| 5600 | SQLITE_API void *SQLITE_STDCALL sqlite3_commit_hook(sqlite3*, int(*)(void*), void*); |
| 5601 | SQLITE_API void *SQLITE_STDCALL sqlite3_rollback_hook(sqlite3*, void(*)(void *), void*); |
| 5602 | |
| 5603 | /* |
| 5604 | ** CAPI3REF: Data Change Notification Callbacks |
| 5605 | ** METHOD: sqlite3 |
| 5606 | ** |
| @@ -5646,13 +5647,13 @@ | |
| 5647 | ** the first call on D. |
| 5648 | ** |
| 5649 | ** See also the [sqlite3_commit_hook()], [sqlite3_rollback_hook()], |
| 5650 | ** and [sqlite3_preupdate_hook()] interfaces. |
| 5651 | */ |
| 5652 | SQLITE_API void *SQLITE_STDCALL sqlite3_update_hook( |
| 5653 | sqlite3*, |
| 5654 | void(*)(void *,int ,char const *,char const *,sqlite3_int64), |
| 5655 | void* |
| 5656 | ); |
| 5657 | |
| 5658 | /* |
| 5659 | ** CAPI3REF: Enable Or Disable Shared Pager Cache |
| @@ -5686,11 +5687,11 @@ | |
| 5687 | ** This interface is threadsafe on processors where writing a |
| 5688 | ** 32-bit integer is atomic. |
| 5689 | ** |
| 5690 | ** See Also: [SQLite Shared-Cache Mode] |
| 5691 | */ |
| 5692 | SQLITE_API int SQLITE_STDCALL sqlite3_enable_shared_cache(int); |
| 5693 | |
| 5694 | /* |
| 5695 | ** CAPI3REF: Attempt To Free Heap Memory |
| 5696 | ** |
| 5697 | ** ^The sqlite3_release_memory() interface attempts to free N bytes |
| @@ -5702,11 +5703,11 @@ | |
| 5703 | ** ^The sqlite3_release_memory() routine is a no-op returning zero |
| 5704 | ** if SQLite is not compiled with [SQLITE_ENABLE_MEMORY_MANAGEMENT]. |
| 5705 | ** |
| 5706 | ** See also: [sqlite3_db_release_memory()] |
| 5707 | */ |
| 5708 | SQLITE_API int SQLITE_STDCALL sqlite3_release_memory(int); |
| 5709 | |
| 5710 | /* |
| 5711 | ** CAPI3REF: Free Memory Used By A Database Connection |
| 5712 | ** METHOD: sqlite3 |
| 5713 | ** |
| @@ -5716,11 +5717,11 @@ | |
| 5717 | ** when the [SQLITE_ENABLE_MEMORY_MANAGEMENT] compile-time option is |
| 5718 | ** omitted. |
| 5719 | ** |
| 5720 | ** See also: [sqlite3_release_memory()] |
| 5721 | */ |
| 5722 | SQLITE_API int SQLITE_STDCALL sqlite3_db_release_memory(sqlite3*); |
| 5723 | |
| 5724 | /* |
| 5725 | ** CAPI3REF: Impose A Limit On Heap Size |
| 5726 | ** |
| 5727 | ** ^The sqlite3_soft_heap_limit64() interface sets and/or queries the |
| @@ -5768,11 +5769,11 @@ | |
| 5769 | ** the use of [SQLITE_ENABLE_MEMORY_MANAGEMENT]. |
| 5770 | ** |
| 5771 | ** The circumstances under which SQLite will enforce the soft heap limit may |
| 5772 | ** changes in future releases of SQLite. |
| 5773 | */ |
| 5774 | SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_soft_heap_limit64(sqlite3_int64 N); |
| 5775 | |
| 5776 | /* |
| 5777 | ** CAPI3REF: Deprecated Soft Heap Limit Interface |
| 5778 | ** DEPRECATED |
| 5779 | ** |
| @@ -5779,11 +5780,11 @@ | |
| 5780 | ** This is a deprecated version of the [sqlite3_soft_heap_limit64()] |
| 5781 | ** interface. This routine is provided for historical compatibility |
| 5782 | ** only. All new applications should use the |
| 5783 | ** [sqlite3_soft_heap_limit64()] interface rather than this one. |
| 5784 | */ |
| 5785 | SQLITE_API SQLITE_DEPRECATED void SQLITE_STDCALL sqlite3_soft_heap_limit(int N); |
| 5786 | |
| 5787 | |
| 5788 | /* |
| 5789 | ** CAPI3REF: Extract Metadata About A Column Of A Table |
| 5790 | ** METHOD: sqlite3 |
| @@ -5849,11 +5850,11 @@ | |
| 5850 | ** |
| 5851 | ** ^This function causes all database schemas to be read from disk and |
| 5852 | ** parsed, if that has not already been done, and returns an error if |
| 5853 | ** any errors are encountered while loading the schema. |
| 5854 | */ |
| 5855 | SQLITE_API int SQLITE_STDCALL sqlite3_table_column_metadata( |
| 5856 | sqlite3 *db, /* Connection handle */ |
| 5857 | const char *zDbName, /* Database name or NULL */ |
| 5858 | const char *zTableName, /* Table name */ |
| 5859 | const char *zColumnName, /* Column name */ |
| 5860 | char const **pzDataType, /* OUTPUT: Declared data type */ |
| @@ -5905,11 +5906,11 @@ | |
| 5906 | ** disabled and prevent SQL injections from giving attackers |
| 5907 | ** access to extension loading capabilities. |
| 5908 | ** |
| 5909 | ** See also the [load_extension() SQL function]. |
| 5910 | */ |
| 5911 | SQLITE_API int SQLITE_STDCALL sqlite3_load_extension( |
| 5912 | sqlite3 *db, /* Load the extension into this database connection */ |
| 5913 | const char *zFile, /* Name of the shared library containing extension */ |
| 5914 | const char *zProc, /* Entry point. Derived from zFile if 0 */ |
| 5915 | char **pzErrMsg /* Put error message here if not 0 */ |
| 5916 | ); |
| @@ -5928,20 +5929,20 @@ | |
| 5929 | ** to turn extension loading on and call it with onoff==0 to turn |
| 5930 | ** it back off again. |
| 5931 | ** |
| 5932 | ** ^This interface enables or disables both the C-API |
| 5933 | ** [sqlite3_load_extension()] and the SQL function [load_extension()]. |
| 5934 | ** ^(Use [sqlite3_db_config](db,[SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION],..) |
| 5935 | ** to enable or disable only the C-API.)^ |
| 5936 | ** |
| 5937 | ** <b>Security warning:</b> It is recommended that extension loading |
| 5938 | ** be disabled using the [SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION] method |
| 5939 | ** rather than this interface, so the [load_extension()] SQL function |
| 5940 | ** remains disabled. This will prevent SQL injections from giving attackers |
| 5941 | ** access to extension loading capabilities. |
| 5942 | */ |
| 5943 | SQLITE_API int SQLITE_STDCALL sqlite3_enable_load_extension(sqlite3 *db, int onoff); |
| 5944 | |
| 5945 | /* |
| 5946 | ** CAPI3REF: Automatically Load Statically Linked Extensions |
| 5947 | ** |
| 5948 | ** ^This interface causes the xEntryPoint() function to be invoked for |
| @@ -5975,11 +5976,11 @@ | |
| 5976 | ** will be called more than once for each database connection that is opened. |
| 5977 | ** |
| 5978 | ** See also: [sqlite3_reset_auto_extension()] |
| 5979 | ** and [sqlite3_cancel_auto_extension()] |
| 5980 | */ |
| 5981 | SQLITE_API int SQLITE_STDCALL sqlite3_auto_extension(void(*xEntryPoint)(void)); |
| 5982 | |
| 5983 | /* |
| 5984 | ** CAPI3REF: Cancel Automatic Extension Loading |
| 5985 | ** |
| 5986 | ** ^The [sqlite3_cancel_auto_extension(X)] interface unregisters the |
| @@ -5987,19 +5988,19 @@ | |
| 5988 | ** [sqlite3_auto_extension(X)]. ^The [sqlite3_cancel_auto_extension(X)] |
| 5989 | ** routine returns 1 if initialization routine X was successfully |
| 5990 | ** unregistered and it returns 0 if X was not on the list of initialization |
| 5991 | ** routines. |
| 5992 | */ |
| 5993 | SQLITE_API int SQLITE_STDCALL sqlite3_cancel_auto_extension(void(*xEntryPoint)(void)); |
| 5994 | |
| 5995 | /* |
| 5996 | ** CAPI3REF: Reset Automatic Extension Loading |
| 5997 | ** |
| 5998 | ** ^This interface disables all automatic extensions previously |
| 5999 | ** registered using [sqlite3_auto_extension()]. |
| 6000 | */ |
| 6001 | SQLITE_API void SQLITE_STDCALL sqlite3_reset_auto_extension(void); |
| 6002 | |
| 6003 | /* |
| 6004 | ** The interface to the virtual-table mechanism is currently considered |
| 6005 | ** to be experimental. The interface might change in incompatible ways. |
| 6006 | ** If this is a problem for you, do not use the interface at this time. |
| @@ -6032,41 +6033,41 @@ | |
| 6033 | ** of this structure must not change while it is registered with |
| 6034 | ** any database connection. |
| 6035 | */ |
| 6036 | struct sqlite3_module { |
| 6037 | int iVersion; |
| 6038 | int (*xCreate)(sqlite3*, void *pAux, |
| 6039 | int argc, const char *const*argv, |
| 6040 | sqlite3_vtab **ppVTab, char**); |
| 6041 | int (*xConnect)(sqlite3*, void *pAux, |
| 6042 | int argc, const char *const*argv, |
| 6043 | sqlite3_vtab **ppVTab, char**); |
| 6044 | int (*xBestIndex)(sqlite3_vtab *pVTab, sqlite3_index_info*); |
| 6045 | int (*xDisconnect)(sqlite3_vtab *pVTab); |
| 6046 | int (*xDestroy)(sqlite3_vtab *pVTab); |
| 6047 | int (*xOpen)(sqlite3_vtab *pVTab, sqlite3_vtab_cursor **ppCursor); |
| 6048 | int (*xClose)(sqlite3_vtab_cursor*); |
| 6049 | int (*xFilter)(sqlite3_vtab_cursor*, int idxNum, const char *idxStr, |
| 6050 | int argc, sqlite3_value **argv); |
| 6051 | int (*xNext)(sqlite3_vtab_cursor*); |
| 6052 | int (*xEof)(sqlite3_vtab_cursor*); |
| 6053 | int (*xColumn)(sqlite3_vtab_cursor*, sqlite3_context*, int); |
| 6054 | int (*xRowid)(sqlite3_vtab_cursor*, sqlite3_int64 *pRowid); |
| 6055 | int (*xUpdate)(sqlite3_vtab *, int, sqlite3_value **, sqlite3_int64 *); |
| 6056 | int (*xBegin)(sqlite3_vtab *pVTab); |
| 6057 | int (*xSync)(sqlite3_vtab *pVTab); |
| 6058 | int (*xCommit)(sqlite3_vtab *pVTab); |
| 6059 | int (*xRollback)(sqlite3_vtab *pVTab); |
| 6060 | int (*xFindFunction)(sqlite3_vtab *pVtab, int nArg, const char *zName, |
| 6061 | void (**pxFunc)(sqlite3_context*,int,sqlite3_value**), |
| 6062 | void **ppArg); |
| 6063 | int (*xRename)(sqlite3_vtab *pVtab, const char *zNew); |
| 6064 | /* The methods above are in version 1 of the sqlite_module object. Those |
| 6065 | ** below are for version 2 and greater. */ |
| 6066 | int (*xSavepoint)(sqlite3_vtab *pVTab, int); |
| 6067 | int (*xRelease)(sqlite3_vtab *pVTab, int); |
| 6068 | int (*xRollbackTo)(sqlite3_vtab *pVTab, int); |
| 6069 | }; |
| 6070 | |
| 6071 | /* |
| 6072 | ** CAPI3REF: Virtual Table Indexing Information |
| 6073 | ** KEYWORDS: sqlite3_index_info |
| @@ -6240,22 +6241,22 @@ | |
| 6241 | ** be invoked if the call to sqlite3_create_module_v2() fails. |
| 6242 | ** ^The sqlite3_create_module() |
| 6243 | ** interface is equivalent to sqlite3_create_module_v2() with a NULL |
| 6244 | ** destructor. |
| 6245 | */ |
| 6246 | SQLITE_API int SQLITE_STDCALL sqlite3_create_module( |
| 6247 | sqlite3 *db, /* SQLite connection to register module with */ |
| 6248 | const char *zName, /* Name of the module */ |
| 6249 | const sqlite3_module *p, /* Methods for the module */ |
| 6250 | void *pClientData /* Client data for xCreate/xConnect */ |
| 6251 | ); |
| 6252 | SQLITE_API int SQLITE_STDCALL sqlite3_create_module_v2( |
| 6253 | sqlite3 *db, /* SQLite connection to register module with */ |
| 6254 | const char *zName, /* Name of the module */ |
| 6255 | const sqlite3_module *p, /* Methods for the module */ |
| 6256 | void *pClientData, /* Client data for xCreate/xConnect */ |
| 6257 | void(*xDestroy)(void*) /* Module destructor function */ |
| 6258 | ); |
| 6259 | |
| 6260 | /* |
| 6261 | ** CAPI3REF: Virtual Table Instance Object |
| 6262 | ** KEYWORDS: sqlite3_vtab |
| @@ -6309,11 +6310,11 @@ | |
| 6310 | ** ^The [xCreate] and [xConnect] methods of a |
| 6311 | ** [virtual table module] call this interface |
| 6312 | ** to declare the format (the names and datatypes of the columns) of |
| 6313 | ** the virtual tables they implement. |
| 6314 | */ |
| 6315 | SQLITE_API int SQLITE_STDCALL sqlite3_declare_vtab(sqlite3*, const char *zSQL); |
| 6316 | |
| 6317 | /* |
| 6318 | ** CAPI3REF: Overload A Function For A Virtual Table |
| 6319 | ** METHOD: sqlite3 |
| 6320 | ** |
| @@ -6328,11 +6329,11 @@ | |
| 6329 | ** of the new function always causes an exception to be thrown. So |
| 6330 | ** the new function is not good for anything by itself. Its only |
| 6331 | ** purpose is to be a placeholder function that can be overloaded |
| 6332 | ** by a [virtual table]. |
| 6333 | */ |
| 6334 | SQLITE_API int SQLITE_STDCALL sqlite3_overload_function(sqlite3*, const char *zFuncName, int nArg); |
| 6335 | |
| 6336 | /* |
| 6337 | ** The interface to the virtual-table mechanism defined above (back up |
| 6338 | ** to a comment remarkably similar to this one) is currently considered |
| 6339 | ** to be experimental. The interface might change in incompatible ways. |
| @@ -6427,11 +6428,11 @@ | |
| 6428 | ** zero-filled blob to read or write using the incremental-blob interface. |
| 6429 | ** |
| 6430 | ** To avoid a resource leak, every open [BLOB handle] should eventually |
| 6431 | ** be released by a call to [sqlite3_blob_close()]. |
| 6432 | */ |
| 6433 | SQLITE_API int SQLITE_STDCALL sqlite3_blob_open( |
| 6434 | sqlite3*, |
| 6435 | const char *zDb, |
| 6436 | const char *zTable, |
| 6437 | const char *zColumn, |
| 6438 | sqlite3_int64 iRow, |
| @@ -6460,11 +6461,11 @@ | |
| 6461 | ** SQLITE_ABORT. ^Calling [sqlite3_blob_bytes()] on an aborted blob handle |
| 6462 | ** always returns zero. |
| 6463 | ** |
| 6464 | ** ^This function sets the database handle error code and message. |
| 6465 | */ |
| 6466 | SQLITE_API int SQLITE_STDCALL sqlite3_blob_reopen(sqlite3_blob *, sqlite3_int64); |
| 6467 | |
| 6468 | /* |
| 6469 | ** CAPI3REF: Close A BLOB Handle |
| 6470 | ** DESTRUCTOR: sqlite3_blob |
| 6471 | ** |
| @@ -6483,11 +6484,11 @@ | |
| 6484 | ** with a null pointer (such as would be returned by a failed call to |
| 6485 | ** [sqlite3_blob_open()]) is a harmless no-op. ^Otherwise, if this function |
| 6486 | ** is passed a valid open blob handle, the values returned by the |
| 6487 | ** sqlite3_errcode() and sqlite3_errmsg() functions are set before returning. |
| 6488 | */ |
| 6489 | SQLITE_API int SQLITE_STDCALL sqlite3_blob_close(sqlite3_blob *); |
| 6490 | |
| 6491 | /* |
| 6492 | ** CAPI3REF: Return The Size Of An Open BLOB |
| 6493 | ** METHOD: sqlite3_blob |
| 6494 | ** |
| @@ -6499,11 +6500,11 @@ | |
| 6500 | ** This routine only works on a [BLOB handle] which has been created |
| 6501 | ** by a prior successful call to [sqlite3_blob_open()] and which has not |
| 6502 | ** been closed by [sqlite3_blob_close()]. Passing any other pointer in |
| 6503 | ** to this routine results in undefined and probably undesirable behavior. |
| 6504 | */ |
| 6505 | SQLITE_API int SQLITE_STDCALL sqlite3_blob_bytes(sqlite3_blob *); |
| 6506 | |
| 6507 | /* |
| 6508 | ** CAPI3REF: Read Data From A BLOB Incrementally |
| 6509 | ** METHOD: sqlite3_blob |
| 6510 | ** |
| @@ -6528,11 +6529,11 @@ | |
| 6529 | ** been closed by [sqlite3_blob_close()]. Passing any other pointer in |
| 6530 | ** to this routine results in undefined and probably undesirable behavior. |
| 6531 | ** |
| 6532 | ** See also: [sqlite3_blob_write()]. |
| 6533 | */ |
| 6534 | SQLITE_API int SQLITE_STDCALL sqlite3_blob_read(sqlite3_blob *, void *Z, int N, int iOffset); |
| 6535 | |
| 6536 | /* |
| 6537 | ** CAPI3REF: Write Data Into A BLOB Incrementally |
| 6538 | ** METHOD: sqlite3_blob |
| 6539 | ** |
| @@ -6570,11 +6571,11 @@ | |
| 6571 | ** been closed by [sqlite3_blob_close()]. Passing any other pointer in |
| 6572 | ** to this routine results in undefined and probably undesirable behavior. |
| 6573 | ** |
| 6574 | ** See also: [sqlite3_blob_read()]. |
| 6575 | */ |
| 6576 | SQLITE_API int SQLITE_STDCALL sqlite3_blob_write(sqlite3_blob *, const void *z, int n, int iOffset); |
| 6577 | |
| 6578 | /* |
| 6579 | ** CAPI3REF: Virtual File System Objects |
| 6580 | ** |
| 6581 | ** A virtual filesystem (VFS) is an [sqlite3_vfs] object |
| @@ -6601,13 +6602,13 @@ | |
| 6602 | ** |
| 6603 | ** ^Unregister a VFS with the sqlite3_vfs_unregister() interface. |
| 6604 | ** ^(If the default VFS is unregistered, another VFS is chosen as |
| 6605 | ** the default. The choice for the new VFS is arbitrary.)^ |
| 6606 | */ |
| 6607 | SQLITE_API sqlite3_vfs *SQLITE_STDCALL sqlite3_vfs_find(const char *zVfsName); |
| 6608 | SQLITE_API int SQLITE_STDCALL sqlite3_vfs_register(sqlite3_vfs*, int makeDflt); |
| 6609 | SQLITE_API int SQLITE_STDCALL sqlite3_vfs_unregister(sqlite3_vfs*); |
| 6610 | |
| 6611 | /* |
| 6612 | ** CAPI3REF: Mutexes |
| 6613 | ** |
| 6614 | ** The SQLite core uses these routines for thread |
| @@ -6719,15 +6720,15 @@ | |
| 6720 | ** sqlite3_mutex_leave() is a NULL pointer, then all three routines |
| 6721 | ** behave as no-ops. |
| 6722 | ** |
| 6723 | ** See also: [sqlite3_mutex_held()] and [sqlite3_mutex_notheld()]. |
| 6724 | */ |
| 6725 | SQLITE_API sqlite3_mutex *SQLITE_STDCALL sqlite3_mutex_alloc(int); |
| 6726 | SQLITE_API void SQLITE_STDCALL sqlite3_mutex_free(sqlite3_mutex*); |
| 6727 | SQLITE_API void SQLITE_STDCALL sqlite3_mutex_enter(sqlite3_mutex*); |
| 6728 | SQLITE_API int SQLITE_STDCALL sqlite3_mutex_try(sqlite3_mutex*); |
| 6729 | SQLITE_API void SQLITE_STDCALL sqlite3_mutex_leave(sqlite3_mutex*); |
| 6730 | |
| 6731 | /* |
| 6732 | ** CAPI3REF: Mutex Methods Object |
| 6733 | ** |
| 6734 | ** An instance of this structure defines the low-level routines |
| @@ -6792,19 +6793,19 @@ | |
| 6793 | ** If xMutexInit fails in any way, it is expected to clean up after itself |
| 6794 | ** prior to returning. |
| 6795 | */ |
| 6796 | typedef struct sqlite3_mutex_methods sqlite3_mutex_methods; |
| 6797 | struct sqlite3_mutex_methods { |
| 6798 | int (*xMutexInit)(void); |
| 6799 | int (*xMutexEnd)(void); |
| 6800 | sqlite3_mutex *(*xMutexAlloc)(int); |
| 6801 | void (*xMutexFree)(sqlite3_mutex *); |
| 6802 | void (*xMutexEnter)(sqlite3_mutex *); |
| 6803 | int (*xMutexTry)(sqlite3_mutex *); |
| 6804 | void (*xMutexLeave)(sqlite3_mutex *); |
| 6805 | int (*xMutexHeld)(sqlite3_mutex *); |
| 6806 | int (*xMutexNotheld)(sqlite3_mutex *); |
| 6807 | }; |
| 6808 | |
| 6809 | /* |
| 6810 | ** CAPI3REF: Mutex Verification Routines |
| 6811 | ** |
| @@ -6833,12 +6834,12 @@ | |
| 6834 | ** call to sqlite3_mutex_held() to fail, so a non-zero return is |
| 6835 | ** the appropriate thing to do. The sqlite3_mutex_notheld() |
| 6836 | ** interface should also return 1 when given a NULL pointer. |
| 6837 | */ |
| 6838 | #ifndef NDEBUG |
| 6839 | SQLITE_API int SQLITE_STDCALL sqlite3_mutex_held(sqlite3_mutex*); |
| 6840 | SQLITE_API int SQLITE_STDCALL sqlite3_mutex_notheld(sqlite3_mutex*); |
| 6841 | #endif |
| 6842 | |
| 6843 | /* |
| 6844 | ** CAPI3REF: Mutex Types |
| 6845 | ** |
| @@ -6874,11 +6875,11 @@ | |
| 6875 | ** serializes access to the [database connection] given in the argument |
| 6876 | ** when the [threading mode] is Serialized. |
| 6877 | ** ^If the [threading mode] is Single-thread or Multi-thread then this |
| 6878 | ** routine returns a NULL pointer. |
| 6879 | */ |
| 6880 | SQLITE_API sqlite3_mutex *SQLITE_STDCALL sqlite3_db_mutex(sqlite3*); |
| 6881 | |
| 6882 | /* |
| 6883 | ** CAPI3REF: Low-Level Control Of Database Files |
| 6884 | ** METHOD: sqlite3 |
| 6885 | ** |
| @@ -6909,11 +6910,11 @@ | |
| 6910 | ** an incorrect zDbName and an SQLITE_ERROR return from the underlying |
| 6911 | ** xFileControl method. |
| 6912 | ** |
| 6913 | ** See also: [SQLITE_FCNTL_LOCKSTATE] |
| 6914 | */ |
| 6915 | SQLITE_API int SQLITE_STDCALL sqlite3_file_control(sqlite3*, const char *zDbName, int op, void*); |
| 6916 | |
| 6917 | /* |
| 6918 | ** CAPI3REF: Testing Interface |
| 6919 | ** |
| 6920 | ** ^The sqlite3_test_control() interface is used to read out internal |
| @@ -6991,12 +6992,12 @@ | |
| 6992 | ** be represented by a 32-bit integer, then the values returned by |
| 6993 | ** sqlite3_status() are undefined. |
| 6994 | ** |
| 6995 | ** See also: [sqlite3_db_status()] |
| 6996 | */ |
| 6997 | SQLITE_API int SQLITE_STDCALL sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag); |
| 6998 | SQLITE_API int SQLITE_STDCALL sqlite3_status64( |
| 6999 | int op, |
| 7000 | sqlite3_int64 *pCurrent, |
| 7001 | sqlite3_int64 *pHighwater, |
| 7002 | int resetFlag |
| 7003 | ); |
| @@ -7117,11 +7118,11 @@ | |
| 7118 | ** ^The sqlite3_db_status() routine returns SQLITE_OK on success and a |
| 7119 | ** non-zero [error code] on failure. |
| 7120 | ** |
| 7121 | ** See also: [sqlite3_status()] and [sqlite3_stmt_status()]. |
| 7122 | */ |
| 7123 | SQLITE_API int SQLITE_STDCALL sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int resetFlg); |
| 7124 | |
| 7125 | /* |
| 7126 | ** CAPI3REF: Status Parameters for database connections |
| 7127 | ** KEYWORDS: {SQLITE_DBSTATUS options} |
| 7128 | ** |
| @@ -7260,11 +7261,11 @@ | |
| 7261 | ** ^If the resetFlg is true, then the counter is reset to zero after this |
| 7262 | ** interface call returns. |
| 7263 | ** |
| 7264 | ** See also: [sqlite3_status()] and [sqlite3_db_status()]. |
| 7265 | */ |
| 7266 | SQLITE_API int SQLITE_STDCALL sqlite3_stmt_status(sqlite3_stmt*, int op,int resetFlg); |
| 7267 | |
| 7268 | /* |
| 7269 | ** CAPI3REF: Status Parameters for prepared statements |
| 7270 | ** KEYWORDS: {SQLITE_STMTSTATUS counter} {SQLITE_STMTSTATUS counters} |
| 7271 | ** |
| @@ -7496,22 +7497,22 @@ | |
| 7497 | */ |
| 7498 | typedef struct sqlite3_pcache_methods2 sqlite3_pcache_methods2; |
| 7499 | struct sqlite3_pcache_methods2 { |
| 7500 | int iVersion; |
| 7501 | void *pArg; |
| 7502 | int (*xInit)(void*); |
| 7503 | void (*xShutdown)(void*); |
| 7504 | sqlite3_pcache *(*xCreate)(int szPage, int szExtra, int bPurgeable); |
| 7505 | void (*xCachesize)(sqlite3_pcache*, int nCachesize); |
| 7506 | int (*xPagecount)(sqlite3_pcache*); |
| 7507 | sqlite3_pcache_page *(*xFetch)(sqlite3_pcache*, unsigned key, int createFlag); |
| 7508 | void (*xUnpin)(sqlite3_pcache*, sqlite3_pcache_page*, int discard); |
| 7509 | void (*xRekey)(sqlite3_pcache*, sqlite3_pcache_page*, |
| 7510 | unsigned oldKey, unsigned newKey); |
| 7511 | void (*xTruncate)(sqlite3_pcache*, unsigned iLimit); |
| 7512 | void (*xDestroy)(sqlite3_pcache*); |
| 7513 | void (*xShrink)(sqlite3_pcache*); |
| 7514 | }; |
| 7515 | |
| 7516 | /* |
| 7517 | ** This is the obsolete pcache_methods object that has now been replaced |
| 7518 | ** by sqlite3_pcache_methods2. This object is not used by SQLite. It is |
| @@ -7518,20 +7519,20 @@ | |
| 7519 | ** retained in the header file for backwards compatibility only. |
| 7520 | */ |
| 7521 | typedef struct sqlite3_pcache_methods sqlite3_pcache_methods; |
| 7522 | struct sqlite3_pcache_methods { |
| 7523 | void *pArg; |
| 7524 | int (*xInit)(void*); |
| 7525 | void (*xShutdown)(void*); |
| 7526 | sqlite3_pcache *(*xCreate)(int szPage, int bPurgeable); |
| 7527 | void (*xCachesize)(sqlite3_pcache*, int nCachesize); |
| 7528 | int (*xPagecount)(sqlite3_pcache*); |
| 7529 | void *(*xFetch)(sqlite3_pcache*, unsigned key, int createFlag); |
| 7530 | void (*xUnpin)(sqlite3_pcache*, void*, int discard); |
| 7531 | void (*xRekey)(sqlite3_pcache*, void*, unsigned oldKey, unsigned newKey); |
| 7532 | void (*xTruncate)(sqlite3_pcache*, unsigned iLimit); |
| 7533 | void (*xDestroy)(sqlite3_pcache*); |
| 7534 | }; |
| 7535 | |
| 7536 | |
| 7537 | /* |
| 7538 | ** CAPI3REF: Online Backup Object |
| @@ -7729,20 +7730,20 @@ | |
| 7730 | ** However, the sqlite3_backup_remaining() and sqlite3_backup_pagecount() |
| 7731 | ** APIs are not strictly speaking threadsafe. If they are invoked at the |
| 7732 | ** same time as another thread is invoking sqlite3_backup_step() it is |
| 7733 | ** possible that they return invalid values. |
| 7734 | */ |
| 7735 | SQLITE_API sqlite3_backup *SQLITE_STDCALL sqlite3_backup_init( |
| 7736 | sqlite3 *pDest, /* Destination database handle */ |
| 7737 | const char *zDestName, /* Destination database name */ |
| 7738 | sqlite3 *pSource, /* Source database handle */ |
| 7739 | const char *zSourceName /* Source database name */ |
| 7740 | ); |
| 7741 | SQLITE_API int SQLITE_STDCALL sqlite3_backup_step(sqlite3_backup *p, int nPage); |
| 7742 | SQLITE_API int SQLITE_STDCALL sqlite3_backup_finish(sqlite3_backup *p); |
| 7743 | SQLITE_API int SQLITE_STDCALL sqlite3_backup_remaining(sqlite3_backup *p); |
| 7744 | SQLITE_API int SQLITE_STDCALL sqlite3_backup_pagecount(sqlite3_backup *p); |
| 7745 | |
| 7746 | /* |
| 7747 | ** CAPI3REF: Unlock Notification |
| 7748 | ** METHOD: sqlite3 |
| 7749 | ** |
| @@ -7855,13 +7856,13 @@ | |
| 7856 | ** by an sqlite3_step() call. ^(If there is a blocking connection, then the |
| 7857 | ** extended error code is set to SQLITE_LOCKED_SHAREDCACHE. Otherwise, in |
| 7858 | ** the special "DROP TABLE/INDEX" case, the extended error code is just |
| 7859 | ** SQLITE_LOCKED.)^ |
| 7860 | */ |
| 7861 | SQLITE_API int SQLITE_STDCALL sqlite3_unlock_notify( |
| 7862 | sqlite3 *pBlocked, /* Waiting connection */ |
| 7863 | void (*xNotify)(void **apArg, int nArg), /* Callback function to invoke */ |
| 7864 | void *pNotifyArg /* Argument to pass to xNotify */ |
| 7865 | ); |
| 7866 | |
| 7867 | |
| 7868 | /* |
| @@ -7870,12 +7871,12 @@ | |
| 7871 | ** ^The [sqlite3_stricmp()] and [sqlite3_strnicmp()] APIs allow applications |
| 7872 | ** and extensions to compare the contents of two buffers containing UTF-8 |
| 7873 | ** strings in a case-independent fashion, using the same definition of "case |
| 7874 | ** independence" that SQLite uses internally when comparing identifiers. |
| 7875 | */ |
| 7876 | SQLITE_API int SQLITE_STDCALL sqlite3_stricmp(const char *, const char *); |
| 7877 | SQLITE_API int SQLITE_STDCALL sqlite3_strnicmp(const char *, const char *, int); |
| 7878 | |
| 7879 | /* |
| 7880 | ** CAPI3REF: String Globbing |
| 7881 | * |
| 7882 | ** ^The [sqlite3_strglob(P,X)] interface returns zero if and only if |
| @@ -7888,11 +7889,11 @@ | |
| 7889 | ** Note that this routine returns zero on a match and non-zero if the strings |
| 7890 | ** do not match, the same as [sqlite3_stricmp()] and [sqlite3_strnicmp()]. |
| 7891 | ** |
| 7892 | ** See also: [sqlite3_strlike()]. |
| 7893 | */ |
| 7894 | SQLITE_API int SQLITE_STDCALL sqlite3_strglob(const char *zGlob, const char *zStr); |
| 7895 | |
| 7896 | /* |
| 7897 | ** CAPI3REF: String LIKE Matching |
| 7898 | * |
| 7899 | ** ^The [sqlite3_strlike(P,X,E)] interface returns zero if and only if |
| @@ -7911,11 +7912,11 @@ | |
| 7912 | ** Note that this routine returns zero on a match and non-zero if the strings |
| 7913 | ** do not match, the same as [sqlite3_stricmp()] and [sqlite3_strnicmp()]. |
| 7914 | ** |
| 7915 | ** See also: [sqlite3_strglob()]. |
| 7916 | */ |
| 7917 | SQLITE_API int SQLITE_STDCALL sqlite3_strlike(const char *zGlob, const char *zStr, unsigned int cEsc); |
| 7918 | |
| 7919 | /* |
| 7920 | ** CAPI3REF: Error Logging Interface |
| 7921 | ** |
| 7922 | ** ^The [sqlite3_log()] interface writes a message into the [error log] |
| @@ -7970,13 +7971,13 @@ | |
| 7971 | ** previously registered write-ahead log callback. ^Note that the |
| 7972 | ** [sqlite3_wal_autocheckpoint()] interface and the |
| 7973 | ** [wal_autocheckpoint pragma] both invoke [sqlite3_wal_hook()] and will |
| 7974 | ** overwrite any prior [sqlite3_wal_hook()] settings. |
| 7975 | */ |
| 7976 | SQLITE_API void *SQLITE_STDCALL sqlite3_wal_hook( |
| 7977 | sqlite3*, |
| 7978 | int(*)(void *,sqlite3*,const char*,int), |
| 7979 | void* |
| 7980 | ); |
| 7981 | |
| 7982 | /* |
| 7983 | ** CAPI3REF: Configure an auto-checkpoint |
| @@ -8005,11 +8006,11 @@ | |
| 8006 | ** enabled with a threshold of 1000 or [SQLITE_DEFAULT_WAL_AUTOCHECKPOINT] |
| 8007 | ** pages. The use of this interface |
| 8008 | ** is only necessary if the default setting is found to be suboptimal |
| 8009 | ** for a particular application. |
| 8010 | */ |
| 8011 | SQLITE_API int SQLITE_STDCALL sqlite3_wal_autocheckpoint(sqlite3 *db, int N); |
| 8012 | |
| 8013 | /* |
| 8014 | ** CAPI3REF: Checkpoint a database |
| 8015 | ** METHOD: sqlite3 |
| 8016 | ** |
| @@ -8027,11 +8028,11 @@ | |
| 8028 | ** interface was added. This interface is retained for backwards |
| 8029 | ** compatibility and as a convenience for applications that need to manually |
| 8030 | ** start a callback but which do not need the full power (and corresponding |
| 8031 | ** complication) of [sqlite3_wal_checkpoint_v2()]. |
| 8032 | */ |
| 8033 | SQLITE_API int SQLITE_STDCALL sqlite3_wal_checkpoint(sqlite3 *db, const char *zDb); |
| 8034 | |
| 8035 | /* |
| 8036 | ** CAPI3REF: Checkpoint a database |
| 8037 | ** METHOD: sqlite3 |
| 8038 | ** |
| @@ -8121,11 +8122,11 @@ | |
| 8122 | ** [sqlite3_errcode()] and [sqlite3_errmsg()]. |
| 8123 | ** |
| 8124 | ** ^The [PRAGMA wal_checkpoint] command can be used to invoke this interface |
| 8125 | ** from SQL. |
| 8126 | */ |
| 8127 | SQLITE_API int SQLITE_STDCALL sqlite3_wal_checkpoint_v2( |
| 8128 | sqlite3 *db, /* Database handle */ |
| 8129 | const char *zDb, /* Name of attached database (or NULL) */ |
| 8130 | int eMode, /* SQLITE_CHECKPOINT_* value */ |
| 8131 | int *pnLog, /* OUT: Size of WAL log in frames */ |
| 8132 | int *pnCkpt /* OUT: Total number of frames checkpointed */ |
| @@ -8210,11 +8211,11 @@ | |
| 8211 | ** value returned is one of [SQLITE_ROLLBACK], [SQLITE_IGNORE], [SQLITE_FAIL], |
| 8212 | ** [SQLITE_ABORT], or [SQLITE_REPLACE], according to the [ON CONFLICT] mode |
| 8213 | ** of the SQL statement that triggered the call to the [xUpdate] method of the |
| 8214 | ** [virtual table]. |
| 8215 | */ |
| 8216 | SQLITE_API int SQLITE_STDCALL sqlite3_vtab_on_conflict(sqlite3 *); |
| 8217 | |
| 8218 | /* |
| 8219 | ** CAPI3REF: Conflict resolution modes |
| 8220 | ** KEYWORDS: {conflict resolution mode} |
| 8221 | ** |
| @@ -8315,11 +8316,11 @@ | |
| 8316 | ** as if the loop did not exist - it returns non-zero and leave the variable |
| 8317 | ** that pOut points to unchanged. |
| 8318 | ** |
| 8319 | ** See also: [sqlite3_stmt_scanstatus_reset()] |
| 8320 | */ |
| 8321 | SQLITE_API int SQLITE_STDCALL sqlite3_stmt_scanstatus( |
| 8322 | sqlite3_stmt *pStmt, /* Prepared statement for which info desired */ |
| 8323 | int idx, /* Index of loop to report on */ |
| 8324 | int iScanStatusOp, /* Information desired. SQLITE_SCANSTAT_* */ |
| 8325 | void *pOut /* Result written here */ |
| 8326 | ); |
| @@ -8331,11 +8332,11 @@ | |
| 8332 | ** ^Zero all [sqlite3_stmt_scanstatus()] related event counters. |
| 8333 | ** |
| 8334 | ** This API is only available if the library is built with pre-processor |
| 8335 | ** symbol [SQLITE_ENABLE_STMT_SCANSTATUS] defined. |
| 8336 | */ |
| 8337 | SQLITE_API void SQLITE_STDCALL sqlite3_stmt_scanstatus_reset(sqlite3_stmt*); |
| 8338 | |
| 8339 | /* |
| 8340 | ** CAPI3REF: Flush caches to disk mid-transaction |
| 8341 | ** |
| 8342 | ** ^If a write-transaction is open on [database connection] D when the |
| @@ -8363,11 +8364,11 @@ | |
| 8364 | ** ^Otherwise, if no error occurs, [sqlite3_db_cacheflush()] returns SQLITE_OK. |
| 8365 | ** |
| 8366 | ** ^This function does not set the database handle error code or message |
| 8367 | ** returned by the [sqlite3_errcode()] and [sqlite3_errmsg()] functions. |
| 8368 | */ |
| 8369 | SQLITE_API int SQLITE_STDCALL sqlite3_db_cacheflush(sqlite3*); |
| 8370 | |
| 8371 | /* |
| 8372 | ** CAPI3REF: The pre-update hook. |
| 8373 | ** |
| 8374 | ** ^These interfaces are only available if SQLite is compiled using the |
| @@ -8443,13 +8444,13 @@ | |
| 8444 | ** triggers; or 2 for changes resulting from triggers called by top-level |
| 8445 | ** triggers; and so forth. |
| 8446 | ** |
| 8447 | ** See also: [sqlite3_update_hook()] |
| 8448 | */ |
| 8449 | SQLITE_API SQLITE_EXPERIMENTAL void *SQLITE_STDCALL sqlite3_preupdate_hook( |
| 8450 | sqlite3 *db, |
| 8451 | void(*xPreUpdate)( |
| 8452 | void *pCtx, /* Copy of third arg to preupdate_hook() */ |
| 8453 | sqlite3 *db, /* Database handle */ |
| 8454 | int op, /* SQLITE_UPDATE, DELETE or INSERT */ |
| 8455 | char const *zDb, /* Database name */ |
| 8456 | char const *zName, /* Table name */ |
| @@ -8456,14 +8457,14 @@ | |
| 8457 | sqlite3_int64 iKey1, /* Rowid of row about to be deleted/updated */ |
| 8458 | sqlite3_int64 iKey2 /* New rowid value (for a rowid UPDATE) */ |
| 8459 | ), |
| 8460 | void* |
| 8461 | ); |
| 8462 | SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_preupdate_old(sqlite3 *, int, sqlite3_value **); |
| 8463 | SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_preupdate_count(sqlite3 *); |
| 8464 | SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_preupdate_depth(sqlite3 *); |
| 8465 | SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_preupdate_new(sqlite3 *, int, sqlite3_value **); |
| 8466 | |
| 8467 | /* |
| 8468 | ** CAPI3REF: Low-level system error code |
| 8469 | ** |
| 8470 | ** ^Attempt to return the underlying operating system error code or error |
| @@ -8471,11 +8472,11 @@ | |
| 8472 | ** The return value is OS-dependent. For example, on unix systems, after |
| 8473 | ** [sqlite3_open_v2()] returns [SQLITE_CANTOPEN], this interface could be |
| 8474 | ** called to get back the underlying "errno" that caused the problem, such |
| 8475 | ** as ENOSPC, EAUTH, EISDIR, and so forth. |
| 8476 | */ |
| 8477 | SQLITE_API int SQLITE_STDCALL sqlite3_system_errno(sqlite3*); |
| 8478 | |
| 8479 | /* |
| 8480 | ** CAPI3REF: Database Snapshot |
| 8481 | ** KEYWORDS: {snapshot} |
| 8482 | ** EXPERIMENTAL |
| @@ -8521,11 +8522,11 @@ | |
| 8522 | ** to avoid a memory leak. |
| 8523 | ** |
| 8524 | ** The [sqlite3_snapshot_get()] interface is only available when the |
| 8525 | ** SQLITE_ENABLE_SNAPSHOT compile-time option is used. |
| 8526 | */ |
| 8527 | SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_snapshot_get( |
| 8528 | sqlite3 *db, |
| 8529 | const char *zSchema, |
| 8530 | sqlite3_snapshot **ppSnapshot |
| 8531 | ); |
| 8532 | |
| @@ -8559,11 +8560,11 @@ | |
| 8560 | ** database connection in order to make it ready to use snapshots.) |
| 8561 | ** |
| 8562 | ** The [sqlite3_snapshot_open()] interface is only available when the |
| 8563 | ** SQLITE_ENABLE_SNAPSHOT compile-time option is used. |
| 8564 | */ |
| 8565 | SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_snapshot_open( |
| 8566 | sqlite3 *db, |
| 8567 | const char *zSchema, |
| 8568 | sqlite3_snapshot *pSnapshot |
| 8569 | ); |
| 8570 | |
| @@ -8576,11 +8577,11 @@ | |
| 8577 | ** using this routine to avoid a memory leak. |
| 8578 | ** |
| 8579 | ** The [sqlite3_snapshot_free()] interface is only available when the |
| 8580 | ** SQLITE_ENABLE_SNAPSHOT compile-time option is used. |
| 8581 | */ |
| 8582 | SQLITE_API SQLITE_EXPERIMENTAL void SQLITE_STDCALL sqlite3_snapshot_free(sqlite3_snapshot*); |
| 8583 | |
| 8584 | /* |
| 8585 | ** CAPI3REF: Compare the ages of two snapshot handles. |
| 8586 | ** EXPERIMENTAL |
| 8587 | ** |
| @@ -8600,11 +8601,11 @@ | |
| 8601 | ** |
| 8602 | ** Otherwise, this API returns a negative value if P1 refers to an older |
| 8603 | ** snapshot than P2, zero if the two handles refer to the same database |
| 8604 | ** snapshot, and a positive value if P1 is a newer snapshot than P2. |
| 8605 | */ |
| 8606 | SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_snapshot_cmp( |
| 8607 | sqlite3_snapshot *p1, |
| 8608 | sqlite3_snapshot *p2 |
| 8609 | ); |
| 8610 | |
| 8611 | /* |
| @@ -8658,14 +8659,14 @@ | |
| 8659 | ** Register a geometry callback named zGeom that can be used as part of an |
| 8660 | ** R-Tree geometry query as follows: |
| 8661 | ** |
| 8662 | ** SELECT ... FROM <rtree> WHERE <rtree col> MATCH $zGeom(... params ...) |
| 8663 | */ |
| 8664 | SQLITE_API int SQLITE_STDCALL sqlite3_rtree_geometry_callback( |
| 8665 | sqlite3 *db, |
| 8666 | const char *zGeom, |
| 8667 | int (*xGeom)(sqlite3_rtree_geometry*, int, sqlite3_rtree_dbl*,int*), |
| 8668 | void *pContext |
| 8669 | ); |
| 8670 | |
| 8671 | |
| 8672 | /* |
| @@ -8675,25 +8676,25 @@ | |
| 8676 | struct sqlite3_rtree_geometry { |
| 8677 | void *pContext; /* Copy of pContext passed to s_r_g_c() */ |
| 8678 | int nParam; /* Size of array aParam[] */ |
| 8679 | sqlite3_rtree_dbl *aParam; /* Parameters passed to SQL geom function */ |
| 8680 | void *pUser; /* Callback implementation user data */ |
| 8681 | void (*xDelUser)(void *); /* Called by SQLite to clean up pUser */ |
| 8682 | }; |
| 8683 | |
| 8684 | /* |
| 8685 | ** Register a 2nd-generation geometry callback named zScore that can be |
| 8686 | ** used as part of an R-Tree geometry query as follows: |
| 8687 | ** |
| 8688 | ** SELECT ... FROM <rtree> WHERE <rtree col> MATCH $zQueryFunc(... params ...) |
| 8689 | */ |
| 8690 | SQLITE_API int SQLITE_STDCALL sqlite3_rtree_query_callback( |
| 8691 | sqlite3 *db, |
| 8692 | const char *zQueryFunc, |
| 8693 | int (*xQueryFunc)(sqlite3_rtree_query_info*), |
| 8694 | void *pContext, |
| 8695 | void (*xDestructor)(void*) |
| 8696 | ); |
| 8697 | |
| 8698 | |
| 8699 | /* |
| 8700 | ** A pointer to a structure of the following type is passed as the |
| @@ -8707,11 +8708,11 @@ | |
| 8708 | struct sqlite3_rtree_query_info { |
| 8709 | void *pContext; /* pContext from when function registered */ |
| 8710 | int nParam; /* Number of function parameters */ |
| 8711 | sqlite3_rtree_dbl *aParam; /* value of function parameters */ |
| 8712 | void *pUser; /* callback can use this, if desired */ |
| 8713 | void (*xDelUser)(void*); /* function to free pUser */ |
| 8714 | sqlite3_rtree_dbl *aCoord; /* Coordinates of node or entry to check */ |
| 8715 | unsigned int *anQueue; /* Number of pending entries in the queue */ |
| 8716 | int nCoord; /* Number of coordinates */ |
| 8717 | int iLevel; /* Level of current node or entry */ |
| 8718 | int mxLevel; /* The largest iLevel value in the tree */ |
| @@ -8903,11 +8904,11 @@ | |
| 8904 | ** If xFilter returns 0, changes is not tracked. Note that once a table is |
| 8905 | ** attached, xFilter will not be called again. |
| 8906 | */ |
| 8907 | void sqlite3session_table_filter( |
| 8908 | sqlite3_session *pSession, /* Session object */ |
| 8909 | int(*xFilter)( |
| 8910 | void *pCtx, /* Copy of third arg to _filter_table() */ |
| 8911 | const char *zTab /* Table name */ |
| 8912 | ), |
| 8913 | void *pCtx /* First argument passed to xFilter */ |
| 8914 | ); |
| @@ -9478,11 +9479,11 @@ | |
| 9479 | ** An sqlite3_changegroup object is used to combine two or more changesets |
| 9480 | ** (or patchsets) into a single changeset (or patchset). A single changegroup |
| 9481 | ** object may combine changesets or patchsets, but not both. The output is |
| 9482 | ** always in the same format as the input. |
| 9483 | ** |
| 9484 | ** If successful, this function returns SQLITE_OK and populates (*pp) with |
| 9485 | ** a pointer to a new sqlite3_changegroup object before returning. The caller |
| 9486 | ** should eventually free the returned object using a call to |
| 9487 | ** sqlite3changegroup_delete(). If an error occurs, an SQLite error code |
| 9488 | ** (i.e. SQLITE_NOMEM) is returned and *pp is set to NULL. |
| 9489 | ** |
| @@ -9598,11 +9599,11 @@ | |
| 9599 | ** changes for tables that do not appear in the first changeset, they are |
| 9600 | ** appended onto the end of the output changeset, again in the order in |
| 9601 | ** which they are first encountered. |
| 9602 | ** |
| 9603 | ** If an error occurs, an SQLite error code is returned and the output |
| 9604 | ** variables (*pnData) and (*ppData) are set to 0. Otherwise, SQLITE_OK |
| 9605 | ** is returned and the output variables are set to the size of and a |
| 9606 | ** pointer to the output buffer, respectively. In this case it is the |
| 9607 | ** responsibility of the caller to eventually free the buffer using a |
| 9608 | ** call to sqlite3_free(). |
| 9609 | */ |
| @@ -9755,15 +9756,15 @@ | |
| 9756 | */ |
| 9757 | int sqlite3changeset_apply( |
| 9758 | sqlite3 *db, /* Apply change to "main" db of this handle */ |
| 9759 | int nChangeset, /* Size of changeset in bytes */ |
| 9760 | void *pChangeset, /* Changeset blob */ |
| 9761 | int(*xFilter)( |
| 9762 | void *pCtx, /* Copy of sixth arg to _apply() */ |
| 9763 | const char *zTab /* Table name */ |
| 9764 | ), |
| 9765 | int(*xConflict)( |
| 9766 | void *pCtx, /* Copy of sixth arg to _apply() */ |
| 9767 | int eConflict, /* DATA, MISSING, CONFLICT, CONSTRAINT */ |
| 9768 | sqlite3_changeset_iter *p /* Handle describing change and conflict */ |
| 9769 | ), |
| 9770 | void *pCtx /* First argument passed to xConflict */ |
| @@ -9900,20 +9901,20 @@ | |
| 9901 | ** </pre> |
| 9902 | ** |
| 9903 | ** Is replaced by: |
| 9904 | ** |
| 9905 | ** <pre> |
| 9906 | ** int (*xInput)(void *pIn, void *pData, int *pnData), |
| 9907 | ** void *pIn, |
| 9908 | ** </pre> |
| 9909 | ** |
| 9910 | ** Each time the xInput callback is invoked by the sessions module, the first |
| 9911 | ** argument passed is a copy of the supplied pIn context pointer. The second |
| 9912 | ** argument, pData, points to a buffer (*pnData) bytes in size. Assuming no |
| 9913 | ** error occurs the xInput method should copy up to (*pnData) bytes of data |
| 9914 | ** into the buffer and set (*pnData) to the actual number of bytes copied |
| 9915 | ** before returning SQLITE_OK. If the input is completely exhausted, (*pnData) |
| 9916 | ** should be set to zero to indicate this. Or, if an error occurs, an SQLite |
| 9917 | ** error code should be returned. In all cases, if an xInput callback returns |
| 9918 | ** an error, all processing is abandoned and the streaming API function |
| 9919 | ** returns a copy of the error code to the caller. |
| 9920 | ** |
| @@ -9934,11 +9935,11 @@ | |
| 9935 | ** </pre> |
| 9936 | ** |
| 9937 | ** Is replaced by: |
| 9938 | ** |
| 9939 | ** <pre> |
| 9940 | ** int (*xOutput)(void *pOut, const void *pData, int nData), |
| 9941 | ** void *pOut |
| 9942 | ** </pre> |
| 9943 | ** |
| 9944 | ** The xOutput callback is invoked zero or more times to return data to |
| 9945 | ** the application. The first parameter passed to each call is a copy of the |
| @@ -9954,58 +9955,58 @@ | |
| 9955 | ** parameter set to a value less than or equal to zero. Other than this, |
| 9956 | ** no guarantees are made as to the size of the chunks of data returned. |
| 9957 | */ |
| 9958 | int sqlite3changeset_apply_strm( |
| 9959 | sqlite3 *db, /* Apply change to "main" db of this handle */ |
| 9960 | int (*xInput)(void *pIn, void *pData, int *pnData), /* Input function */ |
| 9961 | void *pIn, /* First arg for xInput */ |
| 9962 | int(*xFilter)( |
| 9963 | void *pCtx, /* Copy of sixth arg to _apply() */ |
| 9964 | const char *zTab /* Table name */ |
| 9965 | ), |
| 9966 | int(*xConflict)( |
| 9967 | void *pCtx, /* Copy of sixth arg to _apply() */ |
| 9968 | int eConflict, /* DATA, MISSING, CONFLICT, CONSTRAINT */ |
| 9969 | sqlite3_changeset_iter *p /* Handle describing change and conflict */ |
| 9970 | ), |
| 9971 | void *pCtx /* First argument passed to xConflict */ |
| 9972 | ); |
| 9973 | int sqlite3changeset_concat_strm( |
| 9974 | int (*xInputA)(void *pIn, void *pData, int *pnData), |
| 9975 | void *pInA, |
| 9976 | int (*xInputB)(void *pIn, void *pData, int *pnData), |
| 9977 | void *pInB, |
| 9978 | int (*xOutput)(void *pOut, const void *pData, int nData), |
| 9979 | void *pOut |
| 9980 | ); |
| 9981 | int sqlite3changeset_invert_strm( |
| 9982 | int (*xInput)(void *pIn, void *pData, int *pnData), |
| 9983 | void *pIn, |
| 9984 | int (*xOutput)(void *pOut, const void *pData, int nData), |
| 9985 | void *pOut |
| 9986 | ); |
| 9987 | int sqlite3changeset_start_strm( |
| 9988 | sqlite3_changeset_iter **pp, |
| 9989 | int (*xInput)(void *pIn, void *pData, int *pnData), |
| 9990 | void *pIn |
| 9991 | ); |
| 9992 | int sqlite3session_changeset_strm( |
| 9993 | sqlite3_session *pSession, |
| 9994 | int (*xOutput)(void *pOut, const void *pData, int nData), |
| 9995 | void *pOut |
| 9996 | ); |
| 9997 | int sqlite3session_patchset_strm( |
| 9998 | sqlite3_session *pSession, |
| 9999 | int (*xOutput)(void *pOut, const void *pData, int nData), |
| 10000 | void *pOut |
| 10001 | ); |
| 10002 | int sqlite3changegroup_add_strm(sqlite3_changegroup*, |
| 10003 | int (*xInput)(void *pIn, void *pData, int *pnData), |
| 10004 | void *pIn |
| 10005 | ); |
| 10006 | int sqlite3changegroup_output_strm(sqlite3_changegroup*, |
| 10007 | int (*xOutput)(void *pOut, const void *pData, int nData), |
| 10008 | void *pOut |
| 10009 | ); |
| 10010 | |
| 10011 | |
| 10012 | /* |
| @@ -10056,11 +10057,11 @@ | |
| 10057 | |
| 10058 | typedef struct Fts5ExtensionApi Fts5ExtensionApi; |
| 10059 | typedef struct Fts5Context Fts5Context; |
| 10060 | typedef struct Fts5PhraseIter Fts5PhraseIter; |
| 10061 | |
| 10062 | typedef void (*fts5_extension_function)( |
| 10063 | const Fts5ExtensionApi *pApi, /* API offered by current FTS version */ |
| 10064 | Fts5Context *pFts, /* First arg to pass to pApi functions */ |
| 10065 | sqlite3_context *pCtx, /* Context for returning result/error */ |
| 10066 | int nVal, /* Number of values in apVal[] array */ |
| 10067 | sqlite3_value **apVal /* Array of trailing arguments */ |
| @@ -10107,15 +10108,15 @@ | |
| 10108 | ** This function may be quite inefficient if used with an FTS5 table |
| 10109 | ** created with the "columnsize=0" option. |
| 10110 | ** |
| 10111 | ** xColumnText: |
| 10112 | ** This function attempts to retrieve the text of column iCol of the |
| 10113 | ** current document. If successful, (*pz) is set to point to a buffer |
| 10114 | ** containing the text in utf-8 encoding, (*pn) is set to the size in bytes |
| 10115 | ** (not characters) of the buffer and SQLITE_OK is returned. Otherwise, |
| 10116 | ** if an error occurs, an SQLite error code is returned and the final values |
| 10117 | ** of (*pz) and (*pn) are undefined. |
| 10118 | ** |
| 10119 | ** xPhraseCount: |
| 10120 | ** Returns the number of phrases in the current query expression. |
| 10121 | ** |
| 10122 | ** xPhraseSize: |
| @@ -10220,11 +10221,11 @@ | |
| 10221 | ** xRowCount(pFts5, pnRow) |
| 10222 | ** |
| 10223 | ** This function is used to retrieve the total number of rows in the table. |
| 10224 | ** In other words, the same value that would be returned by: |
| 10225 | ** |
| 10226 | ** SELECT count(*) FROM ftstable; |
| 10227 | ** |
| 10228 | ** xPhraseFirst() |
| 10229 | ** This function is used, along with type Fts5PhraseIter and the xPhraseNext |
| 10230 | ** method, to iterate through all instances of a single query phrase within |
| 10231 | ** the current row. This is the same information as is accessible via the |
| @@ -10287,43 +10288,43 @@ | |
| 10288 | ** See xPhraseFirstColumn above. |
| 10289 | */ |
| 10290 | struct Fts5ExtensionApi { |
| 10291 | int iVersion; /* Currently always set to 3 */ |
| 10292 | |
| 10293 | void *(*xUserData)(Fts5Context*); |
| 10294 | |
| 10295 | int (*xColumnCount)(Fts5Context*); |
| 10296 | int (*xRowCount)(Fts5Context*, sqlite3_int64 *pnRow); |
| 10297 | int (*xColumnTotalSize)(Fts5Context*, int iCol, sqlite3_int64 *pnToken); |
| 10298 | |
| 10299 | int (*xTokenize)(Fts5Context*, |
| 10300 | const char *pText, int nText, /* Text to tokenize */ |
| 10301 | void *pCtx, /* Context passed to xToken() */ |
| 10302 | int (*xToken)(void*, int, const char*, int, int, int) /* Callback */ |
| 10303 | ); |
| 10304 | |
| 10305 | int (*xPhraseCount)(Fts5Context*); |
| 10306 | int (*xPhraseSize)(Fts5Context*, int iPhrase); |
| 10307 | |
| 10308 | int (*xInstCount)(Fts5Context*, int *pnInst); |
| 10309 | int (*xInst)(Fts5Context*, int iIdx, int *piPhrase, int *piCol, int *piOff); |
| 10310 | |
| 10311 | sqlite3_int64 (*xRowid)(Fts5Context*); |
| 10312 | int (*xColumnText)(Fts5Context*, int iCol, const char **pz, int *pn); |
| 10313 | int (*xColumnSize)(Fts5Context*, int iCol, int *pnToken); |
| 10314 | |
| 10315 | int (*xQueryPhrase)(Fts5Context*, int iPhrase, void *pUserData, |
| 10316 | int(*)(const Fts5ExtensionApi*,Fts5Context*,void*) |
| 10317 | ); |
| 10318 | int (*xSetAuxdata)(Fts5Context*, void *pAux, void(*xDelete)(void*)); |
| 10319 | void *(*xGetAuxdata)(Fts5Context*, int bClear); |
| 10320 | |
| 10321 | int (*xPhraseFirst)(Fts5Context*, int iPhrase, Fts5PhraseIter*, int*, int*); |
| 10322 | void (*xPhraseNext)(Fts5Context*, Fts5PhraseIter*, int *piCol, int *piOff); |
| 10323 | |
| 10324 | int (*xPhraseFirstColumn)(Fts5Context*, int iPhrase, Fts5PhraseIter*, int*); |
| 10325 | void (*xPhraseNextColumn)(Fts5Context*, Fts5PhraseIter*, int *piCol); |
| 10326 | }; |
| 10327 | |
| 10328 | /* |
| 10329 | ** CUSTOM AUXILIARY FUNCTIONS |
| 10330 | *************************************************************************/ |
| @@ -10347,11 +10348,11 @@ | |
| 10348 | ** The second and third arguments are an array of nul-terminated strings |
| 10349 | ** containing the tokenizer arguments, if any, specified following the |
| 10350 | ** tokenizer name as part of the CREATE VIRTUAL TABLE statement used |
| 10351 | ** to create the FTS5 table. |
| 10352 | ** |
| 10353 | ** The final argument is an output variable. If successful, (*ppOut) |
| 10354 | ** should be set to point to the new tokenizer handle and SQLITE_OK |
| 10355 | ** returned. If an error occurs, some value other than SQLITE_OK should |
| 10356 | ** be returned. In this case, fts5 assumes that the final value of *ppOut |
| 10357 | ** is undefined. |
| 10358 | ** |
| @@ -10521,17 +10522,17 @@ | |
| 10522 | ** inefficient. |
| 10523 | */ |
| 10524 | typedef struct Fts5Tokenizer Fts5Tokenizer; |
| 10525 | typedef struct fts5_tokenizer fts5_tokenizer; |
| 10526 | struct fts5_tokenizer { |
| 10527 | int (*xCreate)(void*, const char **azArg, int nArg, Fts5Tokenizer **ppOut); |
| 10528 | void (*xDelete)(Fts5Tokenizer*); |
| 10529 | int (*xTokenize)(Fts5Tokenizer*, |
| 10530 | void *pCtx, |
| 10531 | int flags, /* Mask of FTS5_TOKENIZE_* flags */ |
| 10532 | const char *pText, int nText, |
| 10533 | int (*xToken)( |
| 10534 | void *pCtx, /* Copy of 2nd argument to xTokenize() */ |
| 10535 | int tflags, /* Mask of FTS5_TOKEN_* flags */ |
| 10536 | const char *pToken, /* Pointer to buffer containing token */ |
| 10537 | int nToken, /* Size of token in bytes */ |
| 10538 | int iStart, /* Byte offset of token within input text */ |
| @@ -10560,33 +10561,33 @@ | |
| 10561 | typedef struct fts5_api fts5_api; |
| 10562 | struct fts5_api { |
| 10563 | int iVersion; /* Currently always set to 2 */ |
| 10564 | |
| 10565 | /* Create a new tokenizer */ |
| 10566 | int (*xCreateTokenizer)( |
| 10567 | fts5_api *pApi, |
| 10568 | const char *zName, |
| 10569 | void *pContext, |
| 10570 | fts5_tokenizer *pTokenizer, |
| 10571 | void (*xDestroy)(void*) |
| 10572 | ); |
| 10573 | |
| 10574 | /* Find an existing tokenizer */ |
| 10575 | int (*xFindTokenizer)( |
| 10576 | fts5_api *pApi, |
| 10577 | const char *zName, |
| 10578 | void **ppContext, |
| 10579 | fts5_tokenizer *pTokenizer |
| 10580 | ); |
| 10581 | |
| 10582 | /* Create a new auxiliary function */ |
| 10583 | int (*xCreateFunction)( |
| 10584 | fts5_api *pApi, |
| 10585 | const char *zName, |
| 10586 | void *pContext, |
| 10587 | fts5_extension_function xFunction, |
| 10588 | void (*xDestroy)(void*) |
| 10589 | ); |
| 10590 | }; |
| 10591 | |
| 10592 | /* |
| 10593 | ** END OF REGISTRATION API |
| @@ -11900,12 +11901,12 @@ | |
| 11901 | */ |
| 11902 | #ifdef SQLITE_OMIT_WSD |
| 11903 | #define SQLITE_WSD const |
| 11904 | #define GLOBAL(t,v) (*(t*)sqlite3_wsd_find((void*)&(v), sizeof(v))) |
| 11905 | #define sqlite3GlobalConfig GLOBAL(struct Sqlite3Config, sqlite3Config) |
| 11906 | SQLITE_API int SQLITE_STDCALL sqlite3_wsd_init(int N, int J); |
| 11907 | SQLITE_API void *SQLITE_STDCALL sqlite3_wsd_find(void *K, int L); |
| 11908 | #else |
| 11909 | #define SQLITE_WSD |
| 11910 | #define GLOBAL(t,v) v |
| 11911 | #define sqlite3GlobalConfig sqlite3Config |
| 11912 | #endif |
| @@ -17560,11 +17561,11 @@ | |
| 17561 | ** was used and false if not. |
| 17562 | ** |
| 17563 | ** The name can optionally begin with "SQLITE_" but the "SQLITE_" prefix |
| 17564 | ** is not required for a match. |
| 17565 | */ |
| 17566 | SQLITE_API int SQLITE_STDCALL sqlite3_compileoption_used(const char *zOptName){ |
| 17567 | int i, n; |
| 17568 | |
| 17569 | #if SQLITE_ENABLE_API_ARMOR |
| 17570 | if( zOptName==0 ){ |
| 17571 | (void)SQLITE_MISUSE_BKPT; |
| @@ -17588,11 +17589,11 @@ | |
| 17589 | |
| 17590 | /* |
| 17591 | ** Return the N-th compile-time option string. If N is out of range, |
| 17592 | ** return a NULL pointer. |
| 17593 | */ |
| 17594 | SQLITE_API const char *SQLITE_STDCALL sqlite3_compileoption_get(int N){ |
| 17595 | if( N>=0 && N<ArraySize(azCompileOpt) ){ |
| 17596 | return azCompileOpt[N]; |
| 17597 | } |
| 17598 | return 0; |
| 17599 | } |
| @@ -18298,11 +18299,11 @@ | |
| 18299 | } |
| 18300 | |
| 18301 | /* |
| 18302 | ** Query status information. |
| 18303 | */ |
| 18304 | SQLITE_API int SQLITE_STDCALL sqlite3_status64( |
| 18305 | int op, |
| 18306 | sqlite3_int64 *pCurrent, |
| 18307 | sqlite3_int64 *pHighwater, |
| 18308 | int resetFlag |
| 18309 | ){ |
| @@ -18323,11 +18324,11 @@ | |
| 18324 | } |
| 18325 | sqlite3_mutex_leave(pMutex); |
| 18326 | (void)pMutex; /* Prevent warning when SQLITE_THREADSAFE=0 */ |
| 18327 | return SQLITE_OK; |
| 18328 | } |
| 18329 | SQLITE_API int SQLITE_STDCALL sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag){ |
| 18330 | sqlite3_int64 iCur = 0, iHwtr = 0; |
| 18331 | int rc; |
| 18332 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 18333 | if( pCurrent==0 || pHighwater==0 ) return SQLITE_MISUSE_BKPT; |
| 18334 | #endif |
| @@ -18340,11 +18341,11 @@ | |
| 18341 | } |
| 18342 | |
| 18343 | /* |
| 18344 | ** Query status information for a single database connection |
| 18345 | */ |
| 18346 | SQLITE_API int SQLITE_STDCALL sqlite3_db_status( |
| 18347 | sqlite3 *db, /* The database connection whose status is desired */ |
| 18348 | int op, /* Status verb */ |
| 18349 | int *pCurrent, /* Write current value here */ |
| 18350 | int *pHighwater, /* Write high-water mark here */ |
| 18351 | int resetFlag /* Reset high-water mark if true */ |
| @@ -19632,11 +19633,10 @@ | |
| 19633 | int argc, |
| 19634 | sqlite3_value **argv |
| 19635 | ){ |
| 19636 | time_t t; |
| 19637 | char *zFormat = (char *)sqlite3_user_data(context); |
| 19638 | sqlite3_int64 iT; |
| 19639 | struct tm *pTm; |
| 19640 | struct tm sNow; |
| 19641 | char zBuf[20]; |
| 19642 | |
| @@ -20018,11 +20018,11 @@ | |
| 20018 | |
| 20019 | /* |
| 20020 | ** Locate a VFS by name. If no name is given, simply return the |
| 20021 | ** first VFS on the list. |
| 20022 | */ |
| 20023 | SQLITE_API sqlite3_vfs *SQLITE_STDCALL sqlite3_vfs_find(const char *zVfs){ |
| 20024 | sqlite3_vfs *pVfs = 0; |
| 20025 | #if SQLITE_THREADSAFE |
| 20026 | sqlite3_mutex *mutex; |
| 20027 | #endif |
| 20028 | #ifndef SQLITE_OMIT_AUTOINIT |
| @@ -20064,11 +20064,11 @@ | |
| 20064 | /* |
| 20065 | ** Register a VFS with the system. It is harmless to register the same |
| 20066 | ** VFS multiple times. The new VFS becomes the default if makeDflt is |
| 20067 | ** true. |
| 20068 | */ |
| 20069 | SQLITE_API int SQLITE_STDCALL sqlite3_vfs_register(sqlite3_vfs *pVfs, int makeDflt){ |
| 20070 | MUTEX_LOGIC(sqlite3_mutex *mutex;) |
| 20071 | #ifndef SQLITE_OMIT_AUTOINIT |
| 20072 | int rc = sqlite3_initialize(); |
| 20073 | if( rc ) return rc; |
| 20074 | #endif |
| @@ -20092,11 +20092,11 @@ | |
| 20092 | } |
| 20093 | |
| 20094 | /* |
| 20095 | ** Unregister a VFS so that it is no longer accessible. |
| 20096 | */ |
| 20097 | SQLITE_API int SQLITE_STDCALL sqlite3_vfs_unregister(sqlite3_vfs *pVfs){ |
| 20098 | #if SQLITE_THREADSAFE |
| 20099 | sqlite3_mutex *mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER); |
| 20100 | #endif |
| 20101 | sqlite3_mutex_enter(mutex); |
| 20102 | vfsUnlink(pVfs); |
| @@ -22443,11 +22443,11 @@ | |
| 22443 | } |
| 22444 | |
| 22445 | /* |
| 22446 | ** Retrieve a pointer to a static mutex or allocate a new dynamic one. |
| 22447 | */ |
| 22448 | SQLITE_API sqlite3_mutex *SQLITE_STDCALL sqlite3_mutex_alloc(int id){ |
| 22449 | #ifndef SQLITE_OMIT_AUTOINIT |
| 22450 | if( id<=SQLITE_MUTEX_RECURSIVE && sqlite3_initialize() ) return 0; |
| 22451 | if( id>SQLITE_MUTEX_RECURSIVE && sqlite3MutexInit() ) return 0; |
| 22452 | #endif |
| 22453 | assert( sqlite3GlobalConfig.mutex.xMutexAlloc ); |
| @@ -22464,11 +22464,11 @@ | |
| 22464 | } |
| 22465 | |
| 22466 | /* |
| 22467 | ** Free a dynamic mutex. |
| 22468 | */ |
| 22469 | SQLITE_API void SQLITE_STDCALL sqlite3_mutex_free(sqlite3_mutex *p){ |
| 22470 | if( p ){ |
| 22471 | assert( sqlite3GlobalConfig.mutex.xMutexFree ); |
| 22472 | sqlite3GlobalConfig.mutex.xMutexFree(p); |
| 22473 | } |
| 22474 | } |
| @@ -22475,11 +22475,11 @@ | |
| 22475 | |
| 22476 | /* |
| 22477 | ** Obtain the mutex p. If some other thread already has the mutex, block |
| 22478 | ** until it can be obtained. |
| 22479 | */ |
| 22480 | SQLITE_API void SQLITE_STDCALL sqlite3_mutex_enter(sqlite3_mutex *p){ |
| 22481 | if( p ){ |
| 22482 | assert( sqlite3GlobalConfig.mutex.xMutexEnter ); |
| 22483 | sqlite3GlobalConfig.mutex.xMutexEnter(p); |
| 22484 | } |
| 22485 | } |
| @@ -22486,11 +22486,11 @@ | |
| 22486 | |
| 22487 | /* |
| 22488 | ** Obtain the mutex p. If successful, return SQLITE_OK. Otherwise, if another |
| 22489 | ** thread holds the mutex and it cannot be obtained, return SQLITE_BUSY. |
| 22490 | */ |
| 22491 | SQLITE_API int SQLITE_STDCALL sqlite3_mutex_try(sqlite3_mutex *p){ |
| 22492 | int rc = SQLITE_OK; |
| 22493 | if( p ){ |
| 22494 | assert( sqlite3GlobalConfig.mutex.xMutexTry ); |
| 22495 | return sqlite3GlobalConfig.mutex.xMutexTry(p); |
| 22496 | } |
| @@ -22501,11 +22501,11 @@ | |
| 22501 | ** The sqlite3_mutex_leave() routine exits a mutex that was previously |
| 22502 | ** entered by the same thread. The behavior is undefined if the mutex |
| 22503 | ** is not currently entered. If a NULL pointer is passed as an argument |
| 22504 | ** this function is a no-op. |
| 22505 | */ |
| 22506 | SQLITE_API void SQLITE_STDCALL sqlite3_mutex_leave(sqlite3_mutex *p){ |
| 22507 | if( p ){ |
| 22508 | assert( sqlite3GlobalConfig.mutex.xMutexLeave ); |
| 22509 | sqlite3GlobalConfig.mutex.xMutexLeave(p); |
| 22510 | } |
| 22511 | } |
| @@ -22513,15 +22513,15 @@ | |
| 22513 | #ifndef NDEBUG |
| 22514 | /* |
| 22515 | ** The sqlite3_mutex_held() and sqlite3_mutex_notheld() routine are |
| 22516 | ** intended for use inside assert() statements. |
| 22517 | */ |
| 22518 | SQLITE_API int SQLITE_STDCALL sqlite3_mutex_held(sqlite3_mutex *p){ |
| 22519 | assert( p==0 || sqlite3GlobalConfig.mutex.xMutexHeld ); |
| 22520 | return p==0 || sqlite3GlobalConfig.mutex.xMutexHeld(p); |
| 22521 | } |
| 22522 | SQLITE_API int SQLITE_STDCALL sqlite3_mutex_notheld(sqlite3_mutex *p){ |
| 22523 | assert( p==0 || sqlite3GlobalConfig.mutex.xMutexNotheld ); |
| 22524 | return p==0 || sqlite3GlobalConfig.mutex.xMutexNotheld(p); |
| 22525 | } |
| 22526 | #endif |
| 22527 | |
| @@ -23549,12 +23549,12 @@ | |
| 23549 | ** of the sqlite3_initialize() and sqlite3_shutdown() processing, the |
| 23550 | ** "interlocked" magic used here is probably not strictly necessary. |
| 23551 | */ |
| 23552 | static LONG SQLITE_WIN32_VOLATILE winMutex_lock = 0; |
| 23553 | |
| 23554 | SQLITE_API int SQLITE_STDCALL sqlite3_win32_is_nt(void); /* os_win.c */ |
| 23555 | SQLITE_API void SQLITE_STDCALL sqlite3_win32_sleep(DWORD milliseconds); /* os_win.c */ |
| 23556 | |
| 23557 | static int winMutexInit(void){ |
| 23558 | /* The first to increment to 1 does actual initialization */ |
| 23559 | if( InterlockedCompareExchange(&winMutex_lock, 1, 0)==0 ){ |
| 23560 | int i; |
| @@ -23850,11 +23850,11 @@ | |
| 23850 | /* |
| 23851 | ** Attempt to release up to n bytes of non-essential memory currently |
| 23852 | ** held by SQLite. An example of non-essential memory is memory used to |
| 23853 | ** cache database pages that are not currently in use. |
| 23854 | */ |
| 23855 | SQLITE_API int SQLITE_STDCALL sqlite3_release_memory(int n){ |
| 23856 | #ifdef SQLITE_ENABLE_MEMORY_MANAGEMENT |
| 23857 | return sqlite3PcacheReleaseMemory(n); |
| 23858 | #else |
| 23859 | /* IMPLEMENTATION-OF: R-34391-24921 The sqlite3_release_memory() routine |
| 23860 | ** is a no-op returning zero if SQLite is not compiled with |
| @@ -23909,11 +23909,11 @@ | |
| 23909 | /* |
| 23910 | ** Deprecated external interface. It used to set an alarm callback |
| 23911 | ** that was invoked when memory usage grew too large. Now it is a |
| 23912 | ** no-op. |
| 23913 | */ |
| 23914 | SQLITE_API int SQLITE_STDCALL sqlite3_memory_alarm( |
| 23915 | void(*xCallback)(void *pArg, sqlite3_int64 used,int N), |
| 23916 | void *pArg, |
| 23917 | sqlite3_int64 iThreshold |
| 23918 | ){ |
| 23919 | (void)xCallback; |
| @@ -23925,11 +23925,11 @@ | |
| 23925 | |
| 23926 | /* |
| 23927 | ** Set the soft heap-size limit for the library. Passing a zero or |
| 23928 | ** negative value indicates no limit. |
| 23929 | */ |
| 23930 | SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_soft_heap_limit64(sqlite3_int64 n){ |
| 23931 | sqlite3_int64 priorLimit; |
| 23932 | sqlite3_int64 excess; |
| 23933 | sqlite3_int64 nUsed; |
| 23934 | #ifndef SQLITE_OMIT_AUTOINIT |
| 23935 | int rc = sqlite3_initialize(); |
| @@ -23947,11 +23947,11 @@ | |
| 23947 | sqlite3_mutex_leave(mem0.mutex); |
| 23948 | excess = sqlite3_memory_used() - n; |
| 23949 | if( excess>0 ) sqlite3_release_memory((int)(excess & 0x7fffffff)); |
| 23950 | return priorLimit; |
| 23951 | } |
| 23952 | SQLITE_API void SQLITE_STDCALL sqlite3_soft_heap_limit(int n){ |
| 23953 | if( n<0 ) n = 0; |
| 23954 | sqlite3_soft_heap_limit64(n); |
| 23955 | } |
| 23956 | |
| 23957 | /* |
| @@ -24016,11 +24016,11 @@ | |
| 24016 | } |
| 24017 | |
| 24018 | /* |
| 24019 | ** Return the amount of memory currently checked out. |
| 24020 | */ |
| 24021 | SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_memory_used(void){ |
| 24022 | sqlite3_int64 res, mx; |
| 24023 | sqlite3_status64(SQLITE_STATUS_MEMORY_USED, &res, &mx, 0); |
| 24024 | return res; |
| 24025 | } |
| 24026 | |
| @@ -24027,11 +24027,11 @@ | |
| 24027 | /* |
| 24028 | ** Return the maximum amount of memory that has ever been |
| 24029 | ** checked out since either the beginning of this process |
| 24030 | ** or since the most recent reset. |
| 24031 | */ |
| 24032 | SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_memory_highwater(int resetFlag){ |
| 24033 | sqlite3_int64 res, mx; |
| 24034 | sqlite3_status64(SQLITE_STATUS_MEMORY_USED, &res, &mx, resetFlag); |
| 24035 | return mx; |
| 24036 | } |
| 24037 | |
| @@ -24107,17 +24107,17 @@ | |
| 24107 | /* |
| 24108 | ** This version of the memory allocation is for use by the application. |
| 24109 | ** First make sure the memory subsystem is initialized, then do the |
| 24110 | ** allocation. |
| 24111 | */ |
| 24112 | SQLITE_API void *SQLITE_STDCALL sqlite3_malloc(int n){ |
| 24113 | #ifndef SQLITE_OMIT_AUTOINIT |
| 24114 | if( sqlite3_initialize() ) return 0; |
| 24115 | #endif |
| 24116 | return n<=0 ? 0 : sqlite3Malloc(n); |
| 24117 | } |
| 24118 | SQLITE_API void *SQLITE_STDCALL sqlite3_malloc64(sqlite3_uint64 n){ |
| 24119 | #ifndef SQLITE_OMIT_AUTOINIT |
| 24120 | if( sqlite3_initialize() ) return 0; |
| 24121 | #endif |
| 24122 | return sqlite3Malloc(n); |
| 24123 | } |
| @@ -24256,20 +24256,20 @@ | |
| 24256 | }else{ |
| 24257 | assert( sqlite3_mutex_held(db->mutex) ); |
| 24258 | return db->lookaside.sz; |
| 24259 | } |
| 24260 | } |
| 24261 | SQLITE_API sqlite3_uint64 SQLITE_STDCALL sqlite3_msize(void *p){ |
| 24262 | assert( sqlite3MemdebugNoType(p, (u8)~MEMTYPE_HEAP) ); |
| 24263 | assert( sqlite3MemdebugHasType(p, MEMTYPE_HEAP) ); |
| 24264 | return p ? sqlite3GlobalConfig.m.xSize(p) : 0; |
| 24265 | } |
| 24266 | |
| 24267 | /* |
| 24268 | ** Free memory previously obtained from sqlite3Malloc(). |
| 24269 | */ |
| 24270 | SQLITE_API void SQLITE_STDCALL sqlite3_free(void *p){ |
| 24271 | if( p==0 ) return; /* IMP: R-49053-54554 */ |
| 24272 | assert( sqlite3MemdebugHasType(p, MEMTYPE_HEAP) ); |
| 24273 | assert( sqlite3MemdebugNoType(p, (u8)~MEMTYPE_HEAP) ); |
| 24274 | if( sqlite3GlobalConfig.bMemstat ){ |
| 24275 | sqlite3_mutex_enter(mem0.mutex); |
| @@ -24374,18 +24374,18 @@ | |
| 24374 | |
| 24375 | /* |
| 24376 | ** The public interface to sqlite3Realloc. Make sure that the memory |
| 24377 | ** subsystem is initialized prior to invoking sqliteRealloc. |
| 24378 | */ |
| 24379 | SQLITE_API void *SQLITE_STDCALL sqlite3_realloc(void *pOld, int n){ |
| 24380 | #ifndef SQLITE_OMIT_AUTOINIT |
| 24381 | if( sqlite3_initialize() ) return 0; |
| 24382 | #endif |
| 24383 | if( n<0 ) n = 0; /* IMP: R-26507-47431 */ |
| 24384 | return sqlite3Realloc(pOld, n); |
| 24385 | } |
| 24386 | SQLITE_API void *SQLITE_STDCALL sqlite3_realloc64(void *pOld, sqlite3_uint64 n){ |
| 24387 | #ifndef SQLITE_OMIT_AUTOINIT |
| 24388 | if( sqlite3_initialize() ) return 0; |
| 24389 | #endif |
| 24390 | return sqlite3Realloc(pOld, n); |
| 24391 | } |
| @@ -25608,11 +25608,11 @@ | |
| 25608 | |
| 25609 | /* |
| 25610 | ** Print into memory obtained from sqlite3_malloc(). Omit the internal |
| 25611 | ** %-conversion extensions. |
| 25612 | */ |
| 25613 | SQLITE_API char *SQLITE_STDCALL sqlite3_vmprintf(const char *zFormat, va_list ap){ |
| 25614 | char *z; |
| 25615 | char zBase[SQLITE_PRINT_BUF_SIZE]; |
| 25616 | StrAccum acc; |
| 25617 | |
| 25618 | #ifdef SQLITE_ENABLE_API_ARMOR |
| @@ -25657,11 +25657,11 @@ | |
| 25657 | ** this without breaking compatibility, so we just have to live with the |
| 25658 | ** mistake. |
| 25659 | ** |
| 25660 | ** sqlite3_vsnprintf() is the varargs version. |
| 25661 | */ |
| 25662 | SQLITE_API char *SQLITE_STDCALL sqlite3_vsnprintf(int n, char *zBuf, const char *zFormat, va_list ap){ |
| 25663 | StrAccum acc; |
| 25664 | if( n<=0 ) return zBuf; |
| 25665 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 25666 | if( zBuf==0 || zFormat==0 ) { |
| 25667 | (void)SQLITE_MISUSE_BKPT; |
| @@ -26284,11 +26284,11 @@ | |
| 26284 | } sqlite3Prng; |
| 26285 | |
| 26286 | /* |
| 26287 | ** Return N random bytes. |
| 26288 | */ |
| 26289 | SQLITE_API void SQLITE_STDCALL sqlite3_randomness(int N, void *pBuf){ |
| 26290 | unsigned char t; |
| 26291 | unsigned char *zBuf = pBuf; |
| 26292 | |
| 26293 | /* The "wsdPrng" macro will resolve to the pseudo-random number generator |
| 26294 | ** state vector. If writable static data is unsupported on the target, |
| @@ -27487,11 +27487,11 @@ | |
| 27487 | ** sqlite3_strnicmp() APIs allow applications and extensions to compare |
| 27488 | ** the contents of two buffers containing UTF-8 strings in a |
| 27489 | ** case-independent fashion, using the same definition of "case |
| 27490 | ** independence" that SQLite uses internally when comparing identifiers. |
| 27491 | */ |
| 27492 | SQLITE_API int SQLITE_STDCALL sqlite3_stricmp(const char *zLeft, const char *zRight){ |
| 27493 | if( zLeft==0 ){ |
| 27494 | return zRight ? -1 : 0; |
| 27495 | }else if( zRight==0 ){ |
| 27496 | return 1; |
| 27497 | } |
| @@ -27508,11 +27508,11 @@ | |
| 27508 | a++; |
| 27509 | b++; |
| 27510 | } |
| 27511 | return c; |
| 27512 | } |
| 27513 | SQLITE_API int SQLITE_STDCALL sqlite3_strnicmp(const char *zLeft, const char *zRight, int N){ |
| 27514 | register unsigned char *a, *b; |
| 27515 | if( zLeft==0 ){ |
| 27516 | return zRight ? -1 : 0; |
| 27517 | }else if( zRight==0 ){ |
| 27518 | return 1; |
| @@ -36807,11 +36807,11 @@ | |
| 36807 | ** This routine is called once during SQLite initialization and by a |
| 36808 | ** single thread. The memory allocation and mutex subsystems have not |
| 36809 | ** necessarily been initialized when this routine is called, and so they |
| 36810 | ** should not be used. |
| 36811 | */ |
| 36812 | SQLITE_API int SQLITE_STDCALL sqlite3_os_init(void){ |
| 36813 | /* |
| 36814 | ** The following macro defines an initializer for an sqlite3_vfs object. |
| 36815 | ** The name of the VFS is NAME. The pAppData is a pointer to a pointer |
| 36816 | ** to the "finder" function. (pAppData is a pointer to a pointer because |
| 36817 | ** silly C90 rules prohibit a void* from being cast to a function pointer |
| @@ -36906,11 +36906,11 @@ | |
| 36906 | ** |
| 36907 | ** Some operating systems might need to do some cleanup in this routine, |
| 36908 | ** to release dynamically allocated objects. But not on unix. |
| 36909 | ** This routine is a no-op for unix. |
| 36910 | */ |
| 36911 | SQLITE_API int SQLITE_STDCALL sqlite3_os_end(void){ |
| 36912 | return SQLITE_OK; |
| 36913 | } |
| 36914 | |
| 36915 | #endif /* SQLITE_OS_UNIX */ |
| 36916 | |
| @@ -38341,11 +38341,11 @@ | |
| 38341 | ** compact it. Upon success, SQLITE_OK will be returned. Upon failure, one |
| 38342 | ** of SQLITE_NOMEM, SQLITE_ERROR, or SQLITE_NOTFOUND will be returned. The |
| 38343 | ** "pnLargest" argument, if non-zero, will be used to return the size of the |
| 38344 | ** largest committed free block in the heap, in bytes. |
| 38345 | */ |
| 38346 | SQLITE_API int SQLITE_STDCALL sqlite3_win32_compact_heap(LPUINT pnLargest){ |
| 38347 | int rc = SQLITE_OK; |
| 38348 | UINT nLargest = 0; |
| 38349 | HANDLE hHeap; |
| 38350 | |
| 38351 | winMemAssertMagic(); |
| @@ -38381,11 +38381,11 @@ | |
| 38381 | ** If a Win32 native heap has been configured, this function will attempt to |
| 38382 | ** destroy and recreate it. If the Win32 native heap is not isolated and/or |
| 38383 | ** the sqlite3_memory_used() function does not return zero, SQLITE_BUSY will |
| 38384 | ** be returned and no changes will be made to the Win32 native heap. |
| 38385 | */ |
| 38386 | SQLITE_API int SQLITE_STDCALL sqlite3_win32_reset_heap(){ |
| 38387 | int rc; |
| 38388 | MUTEX_LOGIC( sqlite3_mutex *pMaster; ) /* The main static mutex */ |
| 38389 | MUTEX_LOGIC( sqlite3_mutex *pMem; ) /* The memsys static mutex */ |
| 38390 | MUTEX_LOGIC( pMaster = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER); ) |
| 38391 | MUTEX_LOGIC( pMem = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MEM); ) |
| @@ -38426,11 +38426,11 @@ | |
| 38426 | /* |
| 38427 | ** This function outputs the specified (ANSI) string to the Win32 debugger |
| 38428 | ** (if available). |
| 38429 | */ |
| 38430 | |
| 38431 | SQLITE_API void SQLITE_STDCALL sqlite3_win32_write_debug(const char *zBuf, int nBuf){ |
| 38432 | char zDbgBuf[SQLITE_WIN32_DBG_BUF_SIZE]; |
| 38433 | int nMin = MIN(nBuf, (SQLITE_WIN32_DBG_BUF_SIZE - 1)); /* may be negative. */ |
| 38434 | if( nMin<-1 ) nMin = -1; /* all negative values become -1. */ |
| 38435 | assert( nMin==-1 || nMin==0 || nMin<SQLITE_WIN32_DBG_BUF_SIZE ); |
| 38436 | #ifdef SQLITE_ENABLE_API_ARMOR |
| @@ -38472,11 +38472,11 @@ | |
| 38472 | */ |
| 38473 | #if SQLITE_OS_WINRT |
| 38474 | static HANDLE sleepObj = NULL; |
| 38475 | #endif |
| 38476 | |
| 38477 | SQLITE_API void SQLITE_STDCALL sqlite3_win32_sleep(DWORD milliseconds){ |
| 38478 | #if SQLITE_OS_WINRT |
| 38479 | if ( sleepObj==NULL ){ |
| 38480 | sleepObj = osCreateEventExW(NULL, NULL, CREATE_EVENT_MANUAL_RESET, |
| 38481 | SYNCHRONIZE); |
| 38482 | } |
| @@ -38521,11 +38521,11 @@ | |
| 38521 | |
| 38522 | /* |
| 38523 | ** This function determines if the machine is running a version of Windows |
| 38524 | ** based on the NT kernel. |
| 38525 | */ |
| 38526 | SQLITE_API int SQLITE_STDCALL sqlite3_win32_is_nt(void){ |
| 38527 | #if SQLITE_OS_WINRT |
| 38528 | /* |
| 38529 | ** NOTE: The WinRT sub-platform is always assumed to be based on the NT |
| 38530 | ** kernel. |
| 38531 | */ |
| @@ -38909,11 +38909,11 @@ | |
| 38909 | } |
| 38910 | |
| 38911 | /* |
| 38912 | ** This is a public wrapper for the winUtf8ToUnicode() function. |
| 38913 | */ |
| 38914 | SQLITE_API LPWSTR SQLITE_STDCALL sqlite3_win32_utf8_to_unicode(const char *zText){ |
| 38915 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 38916 | if( !zText ){ |
| 38917 | (void)SQLITE_MISUSE_BKPT; |
| 38918 | return 0; |
| 38919 | } |
| @@ -38925,11 +38925,11 @@ | |
| 38925 | } |
| 38926 | |
| 38927 | /* |
| 38928 | ** This is a public wrapper for the winUnicodeToUtf8() function. |
| 38929 | */ |
| 38930 | SQLITE_API char *SQLITE_STDCALL sqlite3_win32_unicode_to_utf8(LPCWSTR zWideText){ |
| 38931 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 38932 | if( !zWideText ){ |
| 38933 | (void)SQLITE_MISUSE_BKPT; |
| 38934 | return 0; |
| 38935 | } |
| @@ -38941,11 +38941,11 @@ | |
| 38941 | } |
| 38942 | |
| 38943 | /* |
| 38944 | ** This is a public wrapper for the winMbcsToUtf8() function. |
| 38945 | */ |
| 38946 | SQLITE_API char *SQLITE_STDCALL sqlite3_win32_mbcs_to_utf8(const char *zText){ |
| 38947 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 38948 | if( !zText ){ |
| 38949 | (void)SQLITE_MISUSE_BKPT; |
| 38950 | return 0; |
| 38951 | } |
| @@ -38957,11 +38957,11 @@ | |
| 38957 | } |
| 38958 | |
| 38959 | /* |
| 38960 | ** This is a public wrapper for the winMbcsToUtf8() function. |
| 38961 | */ |
| 38962 | SQLITE_API char *SQLITE_STDCALL sqlite3_win32_mbcs_to_utf8_v2(const char *zText, int useAnsi){ |
| 38963 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 38964 | if( !zText ){ |
| 38965 | (void)SQLITE_MISUSE_BKPT; |
| 38966 | return 0; |
| 38967 | } |
| @@ -38973,11 +38973,11 @@ | |
| 38973 | } |
| 38974 | |
| 38975 | /* |
| 38976 | ** This is a public wrapper for the winUtf8ToMbcs() function. |
| 38977 | */ |
| 38978 | SQLITE_API char *SQLITE_STDCALL sqlite3_win32_utf8_to_mbcs(const char *zText){ |
| 38979 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 38980 | if( !zText ){ |
| 38981 | (void)SQLITE_MISUSE_BKPT; |
| 38982 | return 0; |
| 38983 | } |
| @@ -38989,11 +38989,11 @@ | |
| 38989 | } |
| 38990 | |
| 38991 | /* |
| 38992 | ** This is a public wrapper for the winUtf8ToMbcs() function. |
| 38993 | */ |
| 38994 | SQLITE_API char *SQLITE_STDCALL sqlite3_win32_utf8_to_mbcs_v2(const char *zText, int useAnsi){ |
| 38995 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 38996 | if( !zText ){ |
| 38997 | (void)SQLITE_MISUSE_BKPT; |
| 38998 | return 0; |
| 38999 | } |
| @@ -39009,11 +39009,11 @@ | |
| 39009 | ** the provided arguments. The type argument must be 1 in order to set the |
| 39010 | ** data directory or 2 in order to set the temporary directory. The zValue |
| 39011 | ** argument is the name of the directory to use. The return value will be |
| 39012 | ** SQLITE_OK if successful. |
| 39013 | */ |
| 39014 | SQLITE_API int SQLITE_STDCALL sqlite3_win32_set_directory(DWORD type, LPCWSTR zValue){ |
| 39015 | char **ppDirectory = 0; |
| 39016 | #ifndef SQLITE_OMIT_AUTOINIT |
| 39017 | int rc = sqlite3_initialize(); |
| 39018 | if( rc ) return rc; |
| 39019 | #endif |
| @@ -42927,11 +42927,11 @@ | |
| 42927 | } |
| 42928 | |
| 42929 | /* |
| 42930 | ** Initialize and deinitialize the operating system interface. |
| 42931 | */ |
| 42932 | SQLITE_API int SQLITE_STDCALL sqlite3_os_init(void){ |
| 42933 | static sqlite3_vfs winVfs = { |
| 42934 | 3, /* iVersion */ |
| 42935 | sizeof(winFile), /* szOsFile */ |
| 42936 | SQLITE_WIN32_MAX_PATH_BYTES, /* mxPathname */ |
| 42937 | 0, /* pNext */ |
| @@ -43058,11 +43058,11 @@ | |
| 43058 | #endif |
| 43059 | |
| 43060 | return SQLITE_OK; |
| 43061 | } |
| 43062 | |
| 43063 | SQLITE_API int SQLITE_STDCALL sqlite3_os_end(void){ |
| 43064 | #if SQLITE_OS_WINRT |
| 43065 | if( sleepObj!=NULL ){ |
| 43066 | osCloseHandle(sleepObj); |
| 43067 | sleepObj = NULL; |
| 43068 | } |
| @@ -57053,11 +57053,11 @@ | |
| 57053 | |
| 57054 | /* |
| 57055 | ** Return a +ve value if snapshot p1 is newer than p2. A -ve value if |
| 57056 | ** p1 is older than p2 and zero if p1 and p2 are the same snapshot. |
| 57057 | */ |
| 57058 | SQLITE_API int SQLITE_STDCALL sqlite3_snapshot_cmp(sqlite3_snapshot *p1, sqlite3_snapshot *p2){ |
| 57059 | WalIndexHdr *pHdr1 = (WalIndexHdr*)p1; |
| 57060 | WalIndexHdr *pHdr2 = (WalIndexHdr*)p2; |
| 57061 | |
| 57062 | /* aSalt[0] is a copy of the value stored in the wal file header. It |
| 57063 | ** is incremented each time the wal file is restarted. */ |
| @@ -58190,11 +58190,11 @@ | |
| 58190 | ** |
| 58191 | ** This routine has no effect on existing database connections. |
| 58192 | ** The shared cache setting effects only future calls to |
| 58193 | ** sqlite3_open(), sqlite3_open16(), or sqlite3_open_v2(). |
| 58194 | */ |
| 58195 | SQLITE_API int SQLITE_STDCALL sqlite3_enable_shared_cache(int enable){ |
| 58196 | sqlite3GlobalConfig.sharedCacheEnabled = enable; |
| 58197 | return SQLITE_OK; |
| 58198 | } |
| 58199 | #endif |
| 58200 | |
| @@ -64489,11 +64489,11 @@ | |
| 64489 | } |
| 64490 | } |
| 64491 | |
| 64492 | /* |
| 64493 | ** A CellArray object contains a cache of pointers and sizes for a |
| 64494 | ** consecutive sequence of cells that might be held on multiple pages. |
| 64495 | */ |
| 64496 | typedef struct CellArray CellArray; |
| 64497 | struct CellArray { |
| 64498 | int nCell; /* Number of cells in apCell[] */ |
| 64499 | MemPage *pRef; /* Reference page */ |
| @@ -67963,11 +67963,11 @@ | |
| 67963 | ** a pointer to the new sqlite3_backup object. |
| 67964 | ** |
| 67965 | ** If an error occurs, NULL is returned and an error code and error message |
| 67966 | ** stored in database handle pDestDb. |
| 67967 | */ |
| 67968 | SQLITE_API sqlite3_backup *SQLITE_STDCALL sqlite3_backup_init( |
| 67969 | sqlite3* pDestDb, /* Database to write to */ |
| 67970 | const char *zDestDb, /* Name of database within pDestDb */ |
| 67971 | sqlite3* pSrcDb, /* Database connection to read from */ |
| 67972 | const char *zSrcDb /* Name of database within pSrcDb */ |
| 67973 | ){ |
| @@ -68171,11 +68171,11 @@ | |
| 68171 | } |
| 68172 | |
| 68173 | /* |
| 68174 | ** Copy nPage pages from the source b-tree to the destination. |
| 68175 | */ |
| 68176 | SQLITE_API int SQLITE_STDCALL sqlite3_backup_step(sqlite3_backup *p, int nPage){ |
| 68177 | int rc; |
| 68178 | int destMode; /* Destination journal mode */ |
| 68179 | int pgszSrc = 0; /* Source page size */ |
| 68180 | int pgszDest = 0; /* Destination page size */ |
| 68181 | |
| @@ -68415,11 +68415,11 @@ | |
| 68415 | } |
| 68416 | |
| 68417 | /* |
| 68418 | ** Release all resources associated with an sqlite3_backup* handle. |
| 68419 | */ |
| 68420 | SQLITE_API int SQLITE_STDCALL sqlite3_backup_finish(sqlite3_backup *p){ |
| 68421 | sqlite3_backup **pp; /* Ptr to head of pagers backup list */ |
| 68422 | sqlite3 *pSrcDb; /* Source database connection */ |
| 68423 | int rc; /* Value to return */ |
| 68424 | |
| 68425 | /* Enter the mutexes */ |
| @@ -68467,11 +68467,11 @@ | |
| 68467 | |
| 68468 | /* |
| 68469 | ** Return the number of pages still to be backed up as of the most recent |
| 68470 | ** call to sqlite3_backup_step(). |
| 68471 | */ |
| 68472 | SQLITE_API int SQLITE_STDCALL sqlite3_backup_remaining(sqlite3_backup *p){ |
| 68473 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 68474 | if( p==0 ){ |
| 68475 | (void)SQLITE_MISUSE_BKPT; |
| 68476 | return 0; |
| 68477 | } |
| @@ -68481,11 +68481,11 @@ | |
| 68481 | |
| 68482 | /* |
| 68483 | ** Return the total number of pages in the source database as of the most |
| 68484 | ** recent call to sqlite3_backup_step(). |
| 68485 | */ |
| 68486 | SQLITE_API int SQLITE_STDCALL sqlite3_backup_pagecount(sqlite3_backup *p){ |
| 68487 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 68488 | if( p==0 ){ |
| 68489 | (void)SQLITE_MISUSE_BKPT; |
| 68490 | return 0; |
| 68491 | } |
| @@ -74935,11 +74935,11 @@ | |
| 74935 | ** execution environment changes in a way that would alter the program |
| 74936 | ** that sqlite3_prepare() generates. For example, if new functions or |
| 74937 | ** collating sequences are registered or if an authorizer function is |
| 74938 | ** added or changed. |
| 74939 | */ |
| 74940 | SQLITE_API int SQLITE_STDCALL sqlite3_expired(sqlite3_stmt *pStmt){ |
| 74941 | Vdbe *p = (Vdbe*)pStmt; |
| 74942 | return p==0 || p->expired; |
| 74943 | } |
| 74944 | #endif |
| 74945 | |
| @@ -75004,11 +75004,11 @@ | |
| 75004 | ** machine. |
| 75005 | ** |
| 75006 | ** This routine sets the error code and string returned by |
| 75007 | ** sqlite3_errcode(), sqlite3_errmsg() and sqlite3_errmsg16(). |
| 75008 | */ |
| 75009 | SQLITE_API int SQLITE_STDCALL sqlite3_finalize(sqlite3_stmt *pStmt){ |
| 75010 | int rc; |
| 75011 | if( pStmt==0 ){ |
| 75012 | /* IMPLEMENTATION-OF: R-57228-12904 Invoking sqlite3_finalize() on a NULL |
| 75013 | ** pointer is a harmless no-op. */ |
| 75014 | rc = SQLITE_OK; |
| @@ -75031,11 +75031,11 @@ | |
| 75031 | ** the prior execution is returned. |
| 75032 | ** |
| 75033 | ** This routine sets the error code and string returned by |
| 75034 | ** sqlite3_errcode(), sqlite3_errmsg() and sqlite3_errmsg16(). |
| 75035 | */ |
| 75036 | SQLITE_API int SQLITE_STDCALL sqlite3_reset(sqlite3_stmt *pStmt){ |
| 75037 | int rc; |
| 75038 | if( pStmt==0 ){ |
| 75039 | rc = SQLITE_OK; |
| 75040 | }else{ |
| 75041 | Vdbe *v = (Vdbe*)pStmt; |
| @@ -75052,11 +75052,11 @@ | |
| 75052 | } |
| 75053 | |
| 75054 | /* |
| 75055 | ** Set all the parameters in the compiled SQL statement to NULL. |
| 75056 | */ |
| 75057 | SQLITE_API int SQLITE_STDCALL sqlite3_clear_bindings(sqlite3_stmt *pStmt){ |
| 75058 | int i; |
| 75059 | int rc = SQLITE_OK; |
| 75060 | Vdbe *p = (Vdbe*)pStmt; |
| 75061 | #if SQLITE_THREADSAFE |
| 75062 | sqlite3_mutex *mutex = ((Vdbe*)pStmt)->db->mutex; |
| @@ -75076,11 +75076,11 @@ | |
| 75076 | |
| 75077 | /**************************** sqlite3_value_ ******************************* |
| 75078 | ** The following routines extract information from a Mem or sqlite3_value |
| 75079 | ** structure. |
| 75080 | */ |
| 75081 | SQLITE_API const void *SQLITE_STDCALL sqlite3_value_blob(sqlite3_value *pVal){ |
| 75082 | Mem *p = (Mem*)pVal; |
| 75083 | if( p->flags & (MEM_Blob|MEM_Str) ){ |
| 75084 | if( sqlite3VdbeMemExpandBlob(p)!=SQLITE_OK ){ |
| 75085 | assert( p->flags==MEM_Null && p->z==0 ); |
| 75086 | return 0; |
| @@ -75089,48 +75089,48 @@ | |
| 75089 | return p->n ? p->z : 0; |
| 75090 | }else{ |
| 75091 | return sqlite3_value_text(pVal); |
| 75092 | } |
| 75093 | } |
| 75094 | SQLITE_API int SQLITE_STDCALL sqlite3_value_bytes(sqlite3_value *pVal){ |
| 75095 | return sqlite3ValueBytes(pVal, SQLITE_UTF8); |
| 75096 | } |
| 75097 | SQLITE_API int SQLITE_STDCALL sqlite3_value_bytes16(sqlite3_value *pVal){ |
| 75098 | return sqlite3ValueBytes(pVal, SQLITE_UTF16NATIVE); |
| 75099 | } |
| 75100 | SQLITE_API double SQLITE_STDCALL sqlite3_value_double(sqlite3_value *pVal){ |
| 75101 | return sqlite3VdbeRealValue((Mem*)pVal); |
| 75102 | } |
| 75103 | SQLITE_API int SQLITE_STDCALL sqlite3_value_int(sqlite3_value *pVal){ |
| 75104 | return (int)sqlite3VdbeIntValue((Mem*)pVal); |
| 75105 | } |
| 75106 | SQLITE_API sqlite_int64 SQLITE_STDCALL sqlite3_value_int64(sqlite3_value *pVal){ |
| 75107 | return sqlite3VdbeIntValue((Mem*)pVal); |
| 75108 | } |
| 75109 | SQLITE_API unsigned int SQLITE_STDCALL sqlite3_value_subtype(sqlite3_value *pVal){ |
| 75110 | Mem *pMem = (Mem*)pVal; |
| 75111 | return ((pMem->flags & MEM_Subtype) ? pMem->eSubtype : 0); |
| 75112 | } |
| 75113 | SQLITE_API const unsigned char *SQLITE_STDCALL sqlite3_value_text(sqlite3_value *pVal){ |
| 75114 | return (const unsigned char *)sqlite3ValueText(pVal, SQLITE_UTF8); |
| 75115 | } |
| 75116 | #ifndef SQLITE_OMIT_UTF16 |
| 75117 | SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16(sqlite3_value* pVal){ |
| 75118 | return sqlite3ValueText(pVal, SQLITE_UTF16NATIVE); |
| 75119 | } |
| 75120 | SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16be(sqlite3_value *pVal){ |
| 75121 | return sqlite3ValueText(pVal, SQLITE_UTF16BE); |
| 75122 | } |
| 75123 | SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16le(sqlite3_value *pVal){ |
| 75124 | return sqlite3ValueText(pVal, SQLITE_UTF16LE); |
| 75125 | } |
| 75126 | #endif /* SQLITE_OMIT_UTF16 */ |
| 75127 | /* EVIDENCE-OF: R-12793-43283 Every value in SQLite has one of five |
| 75128 | ** fundamental datatypes: 64-bit signed integer 64-bit IEEE floating |
| 75129 | ** point number string BLOB NULL |
| 75130 | */ |
| 75131 | SQLITE_API int SQLITE_STDCALL sqlite3_value_type(sqlite3_value* pVal){ |
| 75132 | static const u8 aType[] = { |
| 75133 | SQLITE_BLOB, /* 0x00 */ |
| 75134 | SQLITE_NULL, /* 0x01 */ |
| 75135 | SQLITE_TEXT, /* 0x02 */ |
| 75136 | SQLITE_NULL, /* 0x03 */ |
| @@ -75166,11 +75166,11 @@ | |
| 75166 | return aType[pVal->flags&MEM_AffMask]; |
| 75167 | } |
| 75168 | |
| 75169 | /* Make a copy of an sqlite3_value object |
| 75170 | */ |
| 75171 | SQLITE_API sqlite3_value *SQLITE_STDCALL sqlite3_value_dup(const sqlite3_value *pOrig){ |
| 75172 | sqlite3_value *pNew; |
| 75173 | if( pOrig==0 ) return 0; |
| 75174 | pNew = sqlite3_malloc( sizeof(*pNew) ); |
| 75175 | if( pNew==0 ) return 0; |
| 75176 | memset(pNew, 0, sizeof(*pNew)); |
| @@ -75189,11 +75189,11 @@ | |
| 75189 | } |
| 75190 | |
| 75191 | /* Destroy an sqlite3_value object previously obtained from |
| 75192 | ** sqlite3_value_dup(). |
| 75193 | */ |
| 75194 | SQLITE_API void SQLITE_STDCALL sqlite3_value_free(sqlite3_value *pOld){ |
| 75195 | sqlite3ValueFree(pOld); |
| 75196 | } |
| 75197 | |
| 75198 | |
| 75199 | /**************************** sqlite3_result_ ******************************* |
| @@ -75232,21 +75232,21 @@ | |
| 75232 | xDel((void*)p); |
| 75233 | } |
| 75234 | if( pCtx ) sqlite3_result_error_toobig(pCtx); |
| 75235 | return SQLITE_TOOBIG; |
| 75236 | } |
| 75237 | SQLITE_API void SQLITE_STDCALL sqlite3_result_blob( |
| 75238 | sqlite3_context *pCtx, |
| 75239 | const void *z, |
| 75240 | int n, |
| 75241 | void (*xDel)(void *) |
| 75242 | ){ |
| 75243 | assert( n>=0 ); |
| 75244 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75245 | setResultStrOrError(pCtx, z, n, 0, xDel); |
| 75246 | } |
| 75247 | SQLITE_API void SQLITE_STDCALL sqlite3_result_blob64( |
| 75248 | sqlite3_context *pCtx, |
| 75249 | const void *z, |
| 75250 | sqlite3_uint64 n, |
| 75251 | void (*xDel)(void *) |
| 75252 | ){ |
| @@ -75256,56 +75256,56 @@ | |
| 75256 | (void)invokeValueDestructor(z, xDel, pCtx); |
| 75257 | }else{ |
| 75258 | setResultStrOrError(pCtx, z, (int)n, 0, xDel); |
| 75259 | } |
| 75260 | } |
| 75261 | SQLITE_API void SQLITE_STDCALL sqlite3_result_double(sqlite3_context *pCtx, double rVal){ |
| 75262 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75263 | sqlite3VdbeMemSetDouble(pCtx->pOut, rVal); |
| 75264 | } |
| 75265 | SQLITE_API void SQLITE_STDCALL sqlite3_result_error(sqlite3_context *pCtx, const char *z, int n){ |
| 75266 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75267 | pCtx->isError = SQLITE_ERROR; |
| 75268 | pCtx->fErrorOrAux = 1; |
| 75269 | sqlite3VdbeMemSetStr(pCtx->pOut, z, n, SQLITE_UTF8, SQLITE_TRANSIENT); |
| 75270 | } |
| 75271 | #ifndef SQLITE_OMIT_UTF16 |
| 75272 | SQLITE_API void SQLITE_STDCALL sqlite3_result_error16(sqlite3_context *pCtx, const void *z, int n){ |
| 75273 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75274 | pCtx->isError = SQLITE_ERROR; |
| 75275 | pCtx->fErrorOrAux = 1; |
| 75276 | sqlite3VdbeMemSetStr(pCtx->pOut, z, n, SQLITE_UTF16NATIVE, SQLITE_TRANSIENT); |
| 75277 | } |
| 75278 | #endif |
| 75279 | SQLITE_API void SQLITE_STDCALL sqlite3_result_int(sqlite3_context *pCtx, int iVal){ |
| 75280 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75281 | sqlite3VdbeMemSetInt64(pCtx->pOut, (i64)iVal); |
| 75282 | } |
| 75283 | SQLITE_API void SQLITE_STDCALL sqlite3_result_int64(sqlite3_context *pCtx, i64 iVal){ |
| 75284 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75285 | sqlite3VdbeMemSetInt64(pCtx->pOut, iVal); |
| 75286 | } |
| 75287 | SQLITE_API void SQLITE_STDCALL sqlite3_result_null(sqlite3_context *pCtx){ |
| 75288 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75289 | sqlite3VdbeMemSetNull(pCtx->pOut); |
| 75290 | } |
| 75291 | SQLITE_API void SQLITE_STDCALL sqlite3_result_subtype(sqlite3_context *pCtx, unsigned int eSubtype){ |
| 75292 | Mem *pOut = pCtx->pOut; |
| 75293 | assert( sqlite3_mutex_held(pOut->db->mutex) ); |
| 75294 | pOut->eSubtype = eSubtype & 0xff; |
| 75295 | pOut->flags |= MEM_Subtype; |
| 75296 | } |
| 75297 | SQLITE_API void SQLITE_STDCALL sqlite3_result_text( |
| 75298 | sqlite3_context *pCtx, |
| 75299 | const char *z, |
| 75300 | int n, |
| 75301 | void (*xDel)(void *) |
| 75302 | ){ |
| 75303 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75304 | setResultStrOrError(pCtx, z, n, SQLITE_UTF8, xDel); |
| 75305 | } |
| 75306 | SQLITE_API void SQLITE_STDCALL sqlite3_result_text64( |
| 75307 | sqlite3_context *pCtx, |
| 75308 | const char *z, |
| 75309 | sqlite3_uint64 n, |
| 75310 | void (*xDel)(void *), |
| 75311 | unsigned char enc |
| @@ -75318,56 +75318,56 @@ | |
| 75318 | }else{ |
| 75319 | setResultStrOrError(pCtx, z, (int)n, enc, xDel); |
| 75320 | } |
| 75321 | } |
| 75322 | #ifndef SQLITE_OMIT_UTF16 |
| 75323 | SQLITE_API void SQLITE_STDCALL sqlite3_result_text16( |
| 75324 | sqlite3_context *pCtx, |
| 75325 | const void *z, |
| 75326 | int n, |
| 75327 | void (*xDel)(void *) |
| 75328 | ){ |
| 75329 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75330 | setResultStrOrError(pCtx, z, n, SQLITE_UTF16NATIVE, xDel); |
| 75331 | } |
| 75332 | SQLITE_API void SQLITE_STDCALL sqlite3_result_text16be( |
| 75333 | sqlite3_context *pCtx, |
| 75334 | const void *z, |
| 75335 | int n, |
| 75336 | void (*xDel)(void *) |
| 75337 | ){ |
| 75338 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75339 | setResultStrOrError(pCtx, z, n, SQLITE_UTF16BE, xDel); |
| 75340 | } |
| 75341 | SQLITE_API void SQLITE_STDCALL sqlite3_result_text16le( |
| 75342 | sqlite3_context *pCtx, |
| 75343 | const void *z, |
| 75344 | int n, |
| 75345 | void (*xDel)(void *) |
| 75346 | ){ |
| 75347 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75348 | setResultStrOrError(pCtx, z, n, SQLITE_UTF16LE, xDel); |
| 75349 | } |
| 75350 | #endif /* SQLITE_OMIT_UTF16 */ |
| 75351 | SQLITE_API void SQLITE_STDCALL sqlite3_result_value(sqlite3_context *pCtx, sqlite3_value *pValue){ |
| 75352 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75353 | sqlite3VdbeMemCopy(pCtx->pOut, pValue); |
| 75354 | } |
| 75355 | SQLITE_API void SQLITE_STDCALL sqlite3_result_zeroblob(sqlite3_context *pCtx, int n){ |
| 75356 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75357 | sqlite3VdbeMemSetZeroBlob(pCtx->pOut, n); |
| 75358 | } |
| 75359 | SQLITE_API int SQLITE_STDCALL sqlite3_result_zeroblob64(sqlite3_context *pCtx, u64 n){ |
| 75360 | Mem *pOut = pCtx->pOut; |
| 75361 | assert( sqlite3_mutex_held(pOut->db->mutex) ); |
| 75362 | if( n>(u64)pOut->db->aLimit[SQLITE_LIMIT_LENGTH] ){ |
| 75363 | return SQLITE_TOOBIG; |
| 75364 | } |
| 75365 | sqlite3VdbeMemSetZeroBlob(pCtx->pOut, (int)n); |
| 75366 | return SQLITE_OK; |
| 75367 | } |
| 75368 | SQLITE_API void SQLITE_STDCALL sqlite3_result_error_code(sqlite3_context *pCtx, int errCode){ |
| 75369 | pCtx->isError = errCode; |
| 75370 | pCtx->fErrorOrAux = 1; |
| 75371 | #ifdef SQLITE_DEBUG |
| 75372 | if( pCtx->pVdbe ) pCtx->pVdbe->rcApp = errCode; |
| 75373 | #endif |
| @@ -75376,20 +75376,20 @@ | |
| 75376 | SQLITE_UTF8, SQLITE_STATIC); |
| 75377 | } |
| 75378 | } |
| 75379 | |
| 75380 | /* Force an SQLITE_TOOBIG error. */ |
| 75381 | SQLITE_API void SQLITE_STDCALL sqlite3_result_error_toobig(sqlite3_context *pCtx){ |
| 75382 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75383 | pCtx->isError = SQLITE_TOOBIG; |
| 75384 | pCtx->fErrorOrAux = 1; |
| 75385 | sqlite3VdbeMemSetStr(pCtx->pOut, "string or blob too big", -1, |
| 75386 | SQLITE_UTF8, SQLITE_STATIC); |
| 75387 | } |
| 75388 | |
| 75389 | /* An SQLITE_NOMEM error. */ |
| 75390 | SQLITE_API void SQLITE_STDCALL sqlite3_result_error_nomem(sqlite3_context *pCtx){ |
| 75391 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75392 | sqlite3VdbeMemSetNull(pCtx->pOut); |
| 75393 | pCtx->isError = SQLITE_NOMEM_BKPT; |
| 75394 | pCtx->fErrorOrAux = 1; |
| 75395 | sqlite3OomFault(pCtx->pOut->db); |
| @@ -75557,11 +75557,11 @@ | |
| 75557 | /* |
| 75558 | ** This is the top-level implementation of sqlite3_step(). Call |
| 75559 | ** sqlite3Step() to do most of the work. If a schema error occurs, |
| 75560 | ** call sqlite3Reprepare() and try again. |
| 75561 | */ |
| 75562 | SQLITE_API int SQLITE_STDCALL sqlite3_step(sqlite3_stmt *pStmt){ |
| 75563 | int rc = SQLITE_OK; /* Result from sqlite3Step() */ |
| 75564 | int rc2 = SQLITE_OK; /* Result from sqlite3Reprepare() */ |
| 75565 | Vdbe *v = (Vdbe*)pStmt; /* the prepared statement */ |
| 75566 | int cnt = 0; /* Counter to prevent infinite loop of reprepares */ |
| 75567 | sqlite3 *db; /* The database connection */ |
| @@ -75608,11 +75608,11 @@ | |
| 75608 | |
| 75609 | /* |
| 75610 | ** Extract the user data from a sqlite3_context structure and return a |
| 75611 | ** pointer to it. |
| 75612 | */ |
| 75613 | SQLITE_API void *SQLITE_STDCALL sqlite3_user_data(sqlite3_context *p){ |
| 75614 | assert( p && p->pFunc ); |
| 75615 | return p->pFunc->pUserData; |
| 75616 | } |
| 75617 | |
| 75618 | /* |
| @@ -75623,11 +75623,11 @@ | |
| 75623 | ** returns a copy of the pointer to the database connection (the 1st |
| 75624 | ** parameter) of the sqlite3_create_function() and |
| 75625 | ** sqlite3_create_function16() routines that originally registered the |
| 75626 | ** application defined function. |
| 75627 | */ |
| 75628 | SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3_context_db_handle(sqlite3_context *p){ |
| 75629 | assert( p && p->pOut ); |
| 75630 | return p->pOut->db; |
| 75631 | } |
| 75632 | |
| 75633 | /* |
| @@ -75699,11 +75699,11 @@ | |
| 75699 | /* |
| 75700 | ** Allocate or return the aggregate context for a user function. A new |
| 75701 | ** context is allocated on the first call. Subsequent calls return the |
| 75702 | ** same context that was returned on prior calls. |
| 75703 | */ |
| 75704 | SQLITE_API void *SQLITE_STDCALL sqlite3_aggregate_context(sqlite3_context *p, int nByte){ |
| 75705 | assert( p && p->pFunc && p->pFunc->xFinalize ); |
| 75706 | assert( sqlite3_mutex_held(p->pOut->db->mutex) ); |
| 75707 | testcase( nByte<0 ); |
| 75708 | if( (p->pMem->flags & MEM_Agg)==0 ){ |
| 75709 | return createAggContext(p, nByte); |
| @@ -75714,11 +75714,11 @@ | |
| 75714 | |
| 75715 | /* |
| 75716 | ** Return the auxiliary data pointer, if any, for the iArg'th argument to |
| 75717 | ** the user-function defined by pCtx. |
| 75718 | */ |
| 75719 | SQLITE_API void *SQLITE_STDCALL sqlite3_get_auxdata(sqlite3_context *pCtx, int iArg){ |
| 75720 | AuxData *pAuxData; |
| 75721 | |
| 75722 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75723 | #if SQLITE_ENABLE_STAT3_OR_STAT4 |
| 75724 | if( pCtx->pVdbe==0 ) return 0; |
| @@ -75735,11 +75735,11 @@ | |
| 75735 | /* |
| 75736 | ** Set the auxiliary data pointer and delete function, for the iArg'th |
| 75737 | ** argument to the user-function defined by pCtx. Any previous value is |
| 75738 | ** deleted by calling the delete function specified when it was set. |
| 75739 | */ |
| 75740 | SQLITE_API void SQLITE_STDCALL sqlite3_set_auxdata( |
| 75741 | sqlite3_context *pCtx, |
| 75742 | int iArg, |
| 75743 | void *pAux, |
| 75744 | void (*xDelete)(void*) |
| 75745 | ){ |
| @@ -75790,29 +75790,29 @@ | |
| 75790 | ** This function is deprecated. Do not use it for new code. It is |
| 75791 | ** provide only to avoid breaking legacy code. New aggregate function |
| 75792 | ** implementations should keep their own counts within their aggregate |
| 75793 | ** context. |
| 75794 | */ |
| 75795 | SQLITE_API int SQLITE_STDCALL sqlite3_aggregate_count(sqlite3_context *p){ |
| 75796 | assert( p && p->pMem && p->pFunc && p->pFunc->xFinalize ); |
| 75797 | return p->pMem->n; |
| 75798 | } |
| 75799 | #endif |
| 75800 | |
| 75801 | /* |
| 75802 | ** Return the number of columns in the result set for the statement pStmt. |
| 75803 | */ |
| 75804 | SQLITE_API int SQLITE_STDCALL sqlite3_column_count(sqlite3_stmt *pStmt){ |
| 75805 | Vdbe *pVm = (Vdbe *)pStmt; |
| 75806 | return pVm ? pVm->nResColumn : 0; |
| 75807 | } |
| 75808 | |
| 75809 | /* |
| 75810 | ** Return the number of values available from the current row of the |
| 75811 | ** currently executing statement pStmt. |
| 75812 | */ |
| 75813 | SQLITE_API int SQLITE_STDCALL sqlite3_data_count(sqlite3_stmt *pStmt){ |
| 75814 | Vdbe *pVm = (Vdbe *)pStmt; |
| 75815 | if( pVm==0 || pVm->pResultSet==0 ) return 0; |
| 75816 | return pVm->nResColumn; |
| 75817 | } |
| 75818 | |
| @@ -75911,67 +75911,67 @@ | |
| 75911 | |
| 75912 | /**************************** sqlite3_column_ ******************************* |
| 75913 | ** The following routines are used to access elements of the current row |
| 75914 | ** in the result set. |
| 75915 | */ |
| 75916 | SQLITE_API const void *SQLITE_STDCALL sqlite3_column_blob(sqlite3_stmt *pStmt, int i){ |
| 75917 | const void *val; |
| 75918 | val = sqlite3_value_blob( columnMem(pStmt,i) ); |
| 75919 | /* Even though there is no encoding conversion, value_blob() might |
| 75920 | ** need to call malloc() to expand the result of a zeroblob() |
| 75921 | ** expression. |
| 75922 | */ |
| 75923 | columnMallocFailure(pStmt); |
| 75924 | return val; |
| 75925 | } |
| 75926 | SQLITE_API int SQLITE_STDCALL sqlite3_column_bytes(sqlite3_stmt *pStmt, int i){ |
| 75927 | int val = sqlite3_value_bytes( columnMem(pStmt,i) ); |
| 75928 | columnMallocFailure(pStmt); |
| 75929 | return val; |
| 75930 | } |
| 75931 | SQLITE_API int SQLITE_STDCALL sqlite3_column_bytes16(sqlite3_stmt *pStmt, int i){ |
| 75932 | int val = sqlite3_value_bytes16( columnMem(pStmt,i) ); |
| 75933 | columnMallocFailure(pStmt); |
| 75934 | return val; |
| 75935 | } |
| 75936 | SQLITE_API double SQLITE_STDCALL sqlite3_column_double(sqlite3_stmt *pStmt, int i){ |
| 75937 | double val = sqlite3_value_double( columnMem(pStmt,i) ); |
| 75938 | columnMallocFailure(pStmt); |
| 75939 | return val; |
| 75940 | } |
| 75941 | SQLITE_API int SQLITE_STDCALL sqlite3_column_int(sqlite3_stmt *pStmt, int i){ |
| 75942 | int val = sqlite3_value_int( columnMem(pStmt,i) ); |
| 75943 | columnMallocFailure(pStmt); |
| 75944 | return val; |
| 75945 | } |
| 75946 | SQLITE_API sqlite_int64 SQLITE_STDCALL sqlite3_column_int64(sqlite3_stmt *pStmt, int i){ |
| 75947 | sqlite_int64 val = sqlite3_value_int64( columnMem(pStmt,i) ); |
| 75948 | columnMallocFailure(pStmt); |
| 75949 | return val; |
| 75950 | } |
| 75951 | SQLITE_API const unsigned char *SQLITE_STDCALL sqlite3_column_text(sqlite3_stmt *pStmt, int i){ |
| 75952 | const unsigned char *val = sqlite3_value_text( columnMem(pStmt,i) ); |
| 75953 | columnMallocFailure(pStmt); |
| 75954 | return val; |
| 75955 | } |
| 75956 | SQLITE_API sqlite3_value *SQLITE_STDCALL sqlite3_column_value(sqlite3_stmt *pStmt, int i){ |
| 75957 | Mem *pOut = columnMem(pStmt, i); |
| 75958 | if( pOut->flags&MEM_Static ){ |
| 75959 | pOut->flags &= ~MEM_Static; |
| 75960 | pOut->flags |= MEM_Ephem; |
| 75961 | } |
| 75962 | columnMallocFailure(pStmt); |
| 75963 | return (sqlite3_value *)pOut; |
| 75964 | } |
| 75965 | #ifndef SQLITE_OMIT_UTF16 |
| 75966 | SQLITE_API const void *SQLITE_STDCALL sqlite3_column_text16(sqlite3_stmt *pStmt, int i){ |
| 75967 | const void *val = sqlite3_value_text16( columnMem(pStmt,i) ); |
| 75968 | columnMallocFailure(pStmt); |
| 75969 | return val; |
| 75970 | } |
| 75971 | #endif /* SQLITE_OMIT_UTF16 */ |
| 75972 | SQLITE_API int SQLITE_STDCALL sqlite3_column_type(sqlite3_stmt *pStmt, int i){ |
| 75973 | int iType = sqlite3_value_type( columnMem(pStmt,i) ); |
| 75974 | columnMallocFailure(pStmt); |
| 75975 | return iType; |
| 75976 | } |
| 75977 | |
| @@ -76031,16 +76031,16 @@ | |
| 76031 | |
| 76032 | /* |
| 76033 | ** Return the name of the Nth column of the result set returned by SQL |
| 76034 | ** statement pStmt. |
| 76035 | */ |
| 76036 | SQLITE_API const char *SQLITE_STDCALL sqlite3_column_name(sqlite3_stmt *pStmt, int N){ |
| 76037 | return columnName( |
| 76038 | pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_NAME); |
| 76039 | } |
| 76040 | #ifndef SQLITE_OMIT_UTF16 |
| 76041 | SQLITE_API const void *SQLITE_STDCALL sqlite3_column_name16(sqlite3_stmt *pStmt, int N){ |
| 76042 | return columnName( |
| 76043 | pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_NAME); |
| 76044 | } |
| 76045 | #endif |
| 76046 | |
| @@ -76056,16 +76056,16 @@ | |
| 76056 | #ifndef SQLITE_OMIT_DECLTYPE |
| 76057 | /* |
| 76058 | ** Return the column declaration type (if applicable) of the 'i'th column |
| 76059 | ** of the result set of SQL statement pStmt. |
| 76060 | */ |
| 76061 | SQLITE_API const char *SQLITE_STDCALL sqlite3_column_decltype(sqlite3_stmt *pStmt, int N){ |
| 76062 | return columnName( |
| 76063 | pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_DECLTYPE); |
| 76064 | } |
| 76065 | #ifndef SQLITE_OMIT_UTF16 |
| 76066 | SQLITE_API const void *SQLITE_STDCALL sqlite3_column_decltype16(sqlite3_stmt *pStmt, int N){ |
| 76067 | return columnName( |
| 76068 | pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_DECLTYPE); |
| 76069 | } |
| 76070 | #endif /* SQLITE_OMIT_UTF16 */ |
| 76071 | #endif /* SQLITE_OMIT_DECLTYPE */ |
| @@ -76074,16 +76074,16 @@ | |
| 76074 | /* |
| 76075 | ** Return the name of the database from which a result column derives. |
| 76076 | ** NULL is returned if the result column is an expression or constant or |
| 76077 | ** anything else which is not an unambiguous reference to a database column. |
| 76078 | */ |
| 76079 | SQLITE_API const char *SQLITE_STDCALL sqlite3_column_database_name(sqlite3_stmt *pStmt, int N){ |
| 76080 | return columnName( |
| 76081 | pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_DATABASE); |
| 76082 | } |
| 76083 | #ifndef SQLITE_OMIT_UTF16 |
| 76084 | SQLITE_API const void *SQLITE_STDCALL sqlite3_column_database_name16(sqlite3_stmt *pStmt, int N){ |
| 76085 | return columnName( |
| 76086 | pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_DATABASE); |
| 76087 | } |
| 76088 | #endif /* SQLITE_OMIT_UTF16 */ |
| 76089 | |
| @@ -76090,16 +76090,16 @@ | |
| 76090 | /* |
| 76091 | ** Return the name of the table from which a result column derives. |
| 76092 | ** NULL is returned if the result column is an expression or constant or |
| 76093 | ** anything else which is not an unambiguous reference to a database column. |
| 76094 | */ |
| 76095 | SQLITE_API const char *SQLITE_STDCALL sqlite3_column_table_name(sqlite3_stmt *pStmt, int N){ |
| 76096 | return columnName( |
| 76097 | pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_TABLE); |
| 76098 | } |
| 76099 | #ifndef SQLITE_OMIT_UTF16 |
| 76100 | SQLITE_API const void *SQLITE_STDCALL sqlite3_column_table_name16(sqlite3_stmt *pStmt, int N){ |
| 76101 | return columnName( |
| 76102 | pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_TABLE); |
| 76103 | } |
| 76104 | #endif /* SQLITE_OMIT_UTF16 */ |
| 76105 | |
| @@ -76106,16 +76106,16 @@ | |
| 76106 | /* |
| 76107 | ** Return the name of the table column from which a result column derives. |
| 76108 | ** NULL is returned if the result column is an expression or constant or |
| 76109 | ** anything else which is not an unambiguous reference to a database column. |
| 76110 | */ |
| 76111 | SQLITE_API const char *SQLITE_STDCALL sqlite3_column_origin_name(sqlite3_stmt *pStmt, int N){ |
| 76112 | return columnName( |
| 76113 | pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_COLUMN); |
| 76114 | } |
| 76115 | #ifndef SQLITE_OMIT_UTF16 |
| 76116 | SQLITE_API const void *SQLITE_STDCALL sqlite3_column_origin_name16(sqlite3_stmt *pStmt, int N){ |
| 76117 | return columnName( |
| 76118 | pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_COLUMN); |
| 76119 | } |
| 76120 | #endif /* SQLITE_OMIT_UTF16 */ |
| 76121 | #endif /* SQLITE_ENABLE_COLUMN_METADATA */ |
| @@ -76212,11 +76212,11 @@ | |
| 76212 | |
| 76213 | |
| 76214 | /* |
| 76215 | ** Bind a blob value to an SQL statement variable. |
| 76216 | */ |
| 76217 | SQLITE_API int SQLITE_STDCALL sqlite3_bind_blob( |
| 76218 | sqlite3_stmt *pStmt, |
| 76219 | int i, |
| 76220 | const void *zData, |
| 76221 | int nData, |
| 76222 | void (*xDel)(void*) |
| @@ -76224,11 +76224,11 @@ | |
| 76224 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 76225 | if( nData<0 ) return SQLITE_MISUSE_BKPT; |
| 76226 | #endif |
| 76227 | return bindText(pStmt, i, zData, nData, xDel, 0); |
| 76228 | } |
| 76229 | SQLITE_API int SQLITE_STDCALL sqlite3_bind_blob64( |
| 76230 | sqlite3_stmt *pStmt, |
| 76231 | int i, |
| 76232 | const void *zData, |
| 76233 | sqlite3_uint64 nData, |
| 76234 | void (*xDel)(void*) |
| @@ -76238,52 +76238,52 @@ | |
| 76238 | return invokeValueDestructor(zData, xDel, 0); |
| 76239 | }else{ |
| 76240 | return bindText(pStmt, i, zData, (int)nData, xDel, 0); |
| 76241 | } |
| 76242 | } |
| 76243 | SQLITE_API int SQLITE_STDCALL sqlite3_bind_double(sqlite3_stmt *pStmt, int i, double rValue){ |
| 76244 | int rc; |
| 76245 | Vdbe *p = (Vdbe *)pStmt; |
| 76246 | rc = vdbeUnbind(p, i); |
| 76247 | if( rc==SQLITE_OK ){ |
| 76248 | sqlite3VdbeMemSetDouble(&p->aVar[i-1], rValue); |
| 76249 | sqlite3_mutex_leave(p->db->mutex); |
| 76250 | } |
| 76251 | return rc; |
| 76252 | } |
| 76253 | SQLITE_API int SQLITE_STDCALL sqlite3_bind_int(sqlite3_stmt *p, int i, int iValue){ |
| 76254 | return sqlite3_bind_int64(p, i, (i64)iValue); |
| 76255 | } |
| 76256 | SQLITE_API int SQLITE_STDCALL sqlite3_bind_int64(sqlite3_stmt *pStmt, int i, sqlite_int64 iValue){ |
| 76257 | int rc; |
| 76258 | Vdbe *p = (Vdbe *)pStmt; |
| 76259 | rc = vdbeUnbind(p, i); |
| 76260 | if( rc==SQLITE_OK ){ |
| 76261 | sqlite3VdbeMemSetInt64(&p->aVar[i-1], iValue); |
| 76262 | sqlite3_mutex_leave(p->db->mutex); |
| 76263 | } |
| 76264 | return rc; |
| 76265 | } |
| 76266 | SQLITE_API int SQLITE_STDCALL sqlite3_bind_null(sqlite3_stmt *pStmt, int i){ |
| 76267 | int rc; |
| 76268 | Vdbe *p = (Vdbe*)pStmt; |
| 76269 | rc = vdbeUnbind(p, i); |
| 76270 | if( rc==SQLITE_OK ){ |
| 76271 | sqlite3_mutex_leave(p->db->mutex); |
| 76272 | } |
| 76273 | return rc; |
| 76274 | } |
| 76275 | SQLITE_API int SQLITE_STDCALL sqlite3_bind_text( |
| 76276 | sqlite3_stmt *pStmt, |
| 76277 | int i, |
| 76278 | const char *zData, |
| 76279 | int nData, |
| 76280 | void (*xDel)(void*) |
| 76281 | ){ |
| 76282 | return bindText(pStmt, i, zData, nData, xDel, SQLITE_UTF8); |
| 76283 | } |
| 76284 | SQLITE_API int SQLITE_STDCALL sqlite3_bind_text64( |
| 76285 | sqlite3_stmt *pStmt, |
| 76286 | int i, |
| 76287 | const char *zData, |
| 76288 | sqlite3_uint64 nData, |
| 76289 | void (*xDel)(void*), |
| @@ -76296,21 +76296,21 @@ | |
| 76296 | if( enc==SQLITE_UTF16 ) enc = SQLITE_UTF16NATIVE; |
| 76297 | return bindText(pStmt, i, zData, (int)nData, xDel, enc); |
| 76298 | } |
| 76299 | } |
| 76300 | #ifndef SQLITE_OMIT_UTF16 |
| 76301 | SQLITE_API int SQLITE_STDCALL sqlite3_bind_text16( |
| 76302 | sqlite3_stmt *pStmt, |
| 76303 | int i, |
| 76304 | const void *zData, |
| 76305 | int nData, |
| 76306 | void (*xDel)(void*) |
| 76307 | ){ |
| 76308 | return bindText(pStmt, i, zData, nData, xDel, SQLITE_UTF16NATIVE); |
| 76309 | } |
| 76310 | #endif /* SQLITE_OMIT_UTF16 */ |
| 76311 | SQLITE_API int SQLITE_STDCALL sqlite3_bind_value(sqlite3_stmt *pStmt, int i, const sqlite3_value *pValue){ |
| 76312 | int rc; |
| 76313 | switch( sqlite3_value_type((sqlite3_value*)pValue) ){ |
| 76314 | case SQLITE_INTEGER: { |
| 76315 | rc = sqlite3_bind_int64(pStmt, i, pValue->u.i); |
| 76316 | break; |
| @@ -76337,21 +76337,21 @@ | |
| 76337 | break; |
| 76338 | } |
| 76339 | } |
| 76340 | return rc; |
| 76341 | } |
| 76342 | SQLITE_API int SQLITE_STDCALL sqlite3_bind_zeroblob(sqlite3_stmt *pStmt, int i, int n){ |
| 76343 | int rc; |
| 76344 | Vdbe *p = (Vdbe *)pStmt; |
| 76345 | rc = vdbeUnbind(p, i); |
| 76346 | if( rc==SQLITE_OK ){ |
| 76347 | sqlite3VdbeMemSetZeroBlob(&p->aVar[i-1], n); |
| 76348 | sqlite3_mutex_leave(p->db->mutex); |
| 76349 | } |
| 76350 | return rc; |
| 76351 | } |
| 76352 | SQLITE_API int SQLITE_STDCALL sqlite3_bind_zeroblob64(sqlite3_stmt *pStmt, int i, sqlite3_uint64 n){ |
| 76353 | int rc; |
| 76354 | Vdbe *p = (Vdbe *)pStmt; |
| 76355 | sqlite3_mutex_enter(p->db->mutex); |
| 76356 | if( n>(u64)p->db->aLimit[SQLITE_LIMIT_LENGTH] ){ |
| 76357 | rc = SQLITE_TOOBIG; |
| @@ -76366,11 +76366,11 @@ | |
| 76366 | |
| 76367 | /* |
| 76368 | ** Return the number of wildcards that can be potentially bound to. |
| 76369 | ** This routine is added to support DBD::SQLite. |
| 76370 | */ |
| 76371 | SQLITE_API int SQLITE_STDCALL sqlite3_bind_parameter_count(sqlite3_stmt *pStmt){ |
| 76372 | Vdbe *p = (Vdbe*)pStmt; |
| 76373 | return p ? p->nVar : 0; |
| 76374 | } |
| 76375 | |
| 76376 | /* |
| @@ -76377,11 +76377,11 @@ | |
| 76377 | ** Return the name of a wildcard parameter. Return NULL if the index |
| 76378 | ** is out of range or if the wildcard is unnamed. |
| 76379 | ** |
| 76380 | ** The result is always UTF-8. |
| 76381 | */ |
| 76382 | SQLITE_API const char *SQLITE_STDCALL sqlite3_bind_parameter_name(sqlite3_stmt *pStmt, int i){ |
| 76383 | Vdbe *p = (Vdbe*)pStmt; |
| 76384 | if( p==0 || i<1 || i>p->nzVar ){ |
| 76385 | return 0; |
| 76386 | } |
| 76387 | return p->azVar[i-1]; |
| @@ -76405,11 +76405,11 @@ | |
| 76405 | } |
| 76406 | } |
| 76407 | } |
| 76408 | return 0; |
| 76409 | } |
| 76410 | SQLITE_API int SQLITE_STDCALL sqlite3_bind_parameter_index(sqlite3_stmt *pStmt, const char *zName){ |
| 76411 | return sqlite3VdbeParameterIndex((Vdbe*)pStmt, zName, sqlite3Strlen30(zName)); |
| 76412 | } |
| 76413 | |
| 76414 | /* |
| 76415 | ** Transfer all bindings from the first statement over to the second. |
| @@ -76439,11 +76439,11 @@ | |
| 76439 | ** |
| 76440 | ** If the two statements contain a different number of bindings, then |
| 76441 | ** an SQLITE_ERROR is returned. Nothing else can go wrong, so otherwise |
| 76442 | ** SQLITE_OK is returned. |
| 76443 | */ |
| 76444 | SQLITE_API int SQLITE_STDCALL sqlite3_transfer_bindings(sqlite3_stmt *pFromStmt, sqlite3_stmt *pToStmt){ |
| 76445 | Vdbe *pFrom = (Vdbe*)pFromStmt; |
| 76446 | Vdbe *pTo = (Vdbe*)pToStmt; |
| 76447 | if( pFrom->nVar!=pTo->nVar ){ |
| 76448 | return SQLITE_ERROR; |
| 76449 | } |
| @@ -76461,26 +76461,26 @@ | |
| 76461 | ** Return the sqlite3* database handle to which the prepared statement given |
| 76462 | ** in the argument belongs. This is the same database handle that was |
| 76463 | ** the first argument to the sqlite3_prepare() that was used to create |
| 76464 | ** the statement in the first place. |
| 76465 | */ |
| 76466 | SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3_db_handle(sqlite3_stmt *pStmt){ |
| 76467 | return pStmt ? ((Vdbe*)pStmt)->db : 0; |
| 76468 | } |
| 76469 | |
| 76470 | /* |
| 76471 | ** Return true if the prepared statement is guaranteed to not modify the |
| 76472 | ** database. |
| 76473 | */ |
| 76474 | SQLITE_API int SQLITE_STDCALL sqlite3_stmt_readonly(sqlite3_stmt *pStmt){ |
| 76475 | return pStmt ? ((Vdbe*)pStmt)->readOnly : 1; |
| 76476 | } |
| 76477 | |
| 76478 | /* |
| 76479 | ** Return true if the prepared statement is in need of being reset. |
| 76480 | */ |
| 76481 | SQLITE_API int SQLITE_STDCALL sqlite3_stmt_busy(sqlite3_stmt *pStmt){ |
| 76482 | Vdbe *v = (Vdbe*)pStmt; |
| 76483 | return v!=0 && v->pc>=0 && v->magic==VDBE_MAGIC_RUN; |
| 76484 | } |
| 76485 | |
| 76486 | /* |
| @@ -76487,11 +76487,11 @@ | |
| 76487 | ** Return a pointer to the next prepared statement after pStmt associated |
| 76488 | ** with database connection pDb. If pStmt is NULL, return the first |
| 76489 | ** prepared statement for the database connection. Return NULL if there |
| 76490 | ** are no more. |
| 76491 | */ |
| 76492 | SQLITE_API sqlite3_stmt *SQLITE_STDCALL sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt){ |
| 76493 | sqlite3_stmt *pNext; |
| 76494 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 76495 | if( !sqlite3SafetyCheckOk(pDb) ){ |
| 76496 | (void)SQLITE_MISUSE_BKPT; |
| 76497 | return 0; |
| @@ -76508,11 +76508,11 @@ | |
| 76508 | } |
| 76509 | |
| 76510 | /* |
| 76511 | ** Return the value of a status counter for a prepared statement |
| 76512 | */ |
| 76513 | SQLITE_API int SQLITE_STDCALL sqlite3_stmt_status(sqlite3_stmt *pStmt, int op, int resetFlag){ |
| 76514 | Vdbe *pVdbe = (Vdbe*)pStmt; |
| 76515 | u32 v; |
| 76516 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 76517 | if( !pStmt ){ |
| 76518 | (void)SQLITE_MISUSE_BKPT; |
| @@ -76525,11 +76525,11 @@ | |
| 76525 | } |
| 76526 | |
| 76527 | /* |
| 76528 | ** Return the SQL associated with a prepared statement |
| 76529 | */ |
| 76530 | SQLITE_API const char *SQLITE_STDCALL sqlite3_sql(sqlite3_stmt *pStmt){ |
| 76531 | Vdbe *p = (Vdbe *)pStmt; |
| 76532 | return p ? p->zSql : 0; |
| 76533 | } |
| 76534 | |
| 76535 | /* |
| @@ -76539,11 +76539,11 @@ | |
| 76539 | ** freeing the returned string by passing it to sqlite3_free(). |
| 76540 | ** |
| 76541 | ** The SQLITE_TRACE_SIZE_LIMIT puts an upper bound on the size of |
| 76542 | ** expanded bound parameters. |
| 76543 | */ |
| 76544 | SQLITE_API char *SQLITE_STDCALL sqlite3_expanded_sql(sqlite3_stmt *pStmt){ |
| 76545 | #ifdef SQLITE_OMIT_TRACE |
| 76546 | return 0; |
| 76547 | #else |
| 76548 | char *z = 0; |
| 76549 | const char *zSql = sqlite3_sql(pStmt); |
| @@ -76581,11 +76581,11 @@ | |
| 76581 | |
| 76582 | /* |
| 76583 | ** This function is called from within a pre-update callback to retrieve |
| 76584 | ** a field of the row currently being updated or deleted. |
| 76585 | */ |
| 76586 | SQLITE_API int SQLITE_STDCALL sqlite3_preupdate_old(sqlite3 *db, int iIdx, sqlite3_value **ppValue){ |
| 76587 | PreUpdate *p = db->pPreUpdate; |
| 76588 | int rc = SQLITE_OK; |
| 76589 | |
| 76590 | /* Test that this call is being made from within an SQLITE_DELETE or |
| 76591 | ** SQLITE_UPDATE pre-update callback, and that iIdx is within range. */ |
| @@ -76636,11 +76636,11 @@ | |
| 76636 | #ifdef SQLITE_ENABLE_PREUPDATE_HOOK |
| 76637 | /* |
| 76638 | ** This function is called from within a pre-update callback to retrieve |
| 76639 | ** the number of columns in the row being updated, deleted or inserted. |
| 76640 | */ |
| 76641 | SQLITE_API int SQLITE_STDCALL sqlite3_preupdate_count(sqlite3 *db){ |
| 76642 | PreUpdate *p = db->pPreUpdate; |
| 76643 | return (p ? p->keyinfo.nField : 0); |
| 76644 | } |
| 76645 | #endif /* SQLITE_ENABLE_PREUPDATE_HOOK */ |
| 76646 | |
| @@ -76654,11 +76654,11 @@ | |
| 76654 | ** top-level trigger etc.). |
| 76655 | ** |
| 76656 | ** For the purposes of the previous paragraph, a foreign key CASCADE, SET NULL |
| 76657 | ** or SET DEFAULT action is considered a trigger. |
| 76658 | */ |
| 76659 | SQLITE_API int SQLITE_STDCALL sqlite3_preupdate_depth(sqlite3 *db){ |
| 76660 | PreUpdate *p = db->pPreUpdate; |
| 76661 | return (p ? p->v->nFrame : 0); |
| 76662 | } |
| 76663 | #endif /* SQLITE_ENABLE_PREUPDATE_HOOK */ |
| 76664 | |
| @@ -76665,11 +76665,11 @@ | |
| 76665 | #ifdef SQLITE_ENABLE_PREUPDATE_HOOK |
| 76666 | /* |
| 76667 | ** This function is called from within a pre-update callback to retrieve |
| 76668 | ** a field of the row currently being updated or inserted. |
| 76669 | */ |
| 76670 | SQLITE_API int SQLITE_STDCALL sqlite3_preupdate_new(sqlite3 *db, int iIdx, sqlite3_value **ppValue){ |
| 76671 | PreUpdate *p = db->pPreUpdate; |
| 76672 | int rc = SQLITE_OK; |
| 76673 | Mem *pMem; |
| 76674 | |
| 76675 | if( !p || p->op==SQLITE_DELETE ){ |
| @@ -76739,11 +76739,11 @@ | |
| 76739 | |
| 76740 | #ifdef SQLITE_ENABLE_STMT_SCANSTATUS |
| 76741 | /* |
| 76742 | ** Return status data for a single loop within query pStmt. |
| 76743 | */ |
| 76744 | SQLITE_API int SQLITE_STDCALL sqlite3_stmt_scanstatus( |
| 76745 | sqlite3_stmt *pStmt, /* Prepared statement being queried */ |
| 76746 | int idx, /* Index of loop to report on */ |
| 76747 | int iScanStatusOp, /* Which metric to return */ |
| 76748 | void *pOut /* OUT: Write the answer here */ |
| 76749 | ){ |
| @@ -76798,11 +76798,11 @@ | |
| 76798 | } |
| 76799 | |
| 76800 | /* |
| 76801 | ** Zero all counters associated with the sqlite3_stmt_scanstatus() data. |
| 76802 | */ |
| 76803 | SQLITE_API void SQLITE_STDCALL sqlite3_stmt_scanstatus_reset(sqlite3_stmt *pStmt){ |
| 76804 | Vdbe *p = (Vdbe*)pStmt; |
| 76805 | memset(p->anExec, 0, p->nOp * sizeof(i64)); |
| 76806 | } |
| 76807 | #endif /* SQLITE_ENABLE_STMT_SCANSTATUS */ |
| 76808 | |
| @@ -77325,11 +77325,11 @@ | |
| 77325 | ** Try to convert the type of a function argument or a result column |
| 77326 | ** into a numeric representation. Use either INTEGER or REAL whichever |
| 77327 | ** is appropriate. But only do the conversion if it is possible without |
| 77328 | ** loss of information and return the revised type of the argument. |
| 77329 | */ |
| 77330 | SQLITE_API int SQLITE_STDCALL sqlite3_value_numeric_type(sqlite3_value *pVal){ |
| 77331 | int eType = sqlite3_value_type(pVal); |
| 77332 | if( eType==SQLITE_TEXT ){ |
| 77333 | Mem *pMem = (Mem*)pVal; |
| 77334 | applyNumericAffinity(pMem, 0); |
| 77335 | eType = sqlite3_value_type(pVal); |
| @@ -84177,11 +84177,11 @@ | |
| 84177 | } |
| 84178 | |
| 84179 | /* |
| 84180 | ** Open a blob handle. |
| 84181 | */ |
| 84182 | SQLITE_API int SQLITE_STDCALL sqlite3_blob_open( |
| 84183 | sqlite3* db, /* The database connection */ |
| 84184 | const char *zDb, /* The attached database containing the blob */ |
| 84185 | const char *zTable, /* The table containing the blob */ |
| 84186 | const char *zColumn, /* The column containing the blob */ |
| 84187 | sqlite_int64 iRow, /* The row containing the glob */ |
| @@ -84418,11 +84418,11 @@ | |
| 84418 | |
| 84419 | /* |
| 84420 | ** Close a blob handle that was previously created using |
| 84421 | ** sqlite3_blob_open(). |
| 84422 | */ |
| 84423 | SQLITE_API int SQLITE_STDCALL sqlite3_blob_close(sqlite3_blob *pBlob){ |
| 84424 | Incrblob *p = (Incrblob *)pBlob; |
| 84425 | int rc; |
| 84426 | sqlite3 *db; |
| 84427 | |
| 84428 | if( p ){ |
| @@ -84511,28 +84511,28 @@ | |
| 84511 | } |
| 84512 | |
| 84513 | /* |
| 84514 | ** Read data from a blob handle. |
| 84515 | */ |
| 84516 | SQLITE_API int SQLITE_STDCALL sqlite3_blob_read(sqlite3_blob *pBlob, void *z, int n, int iOffset){ |
| 84517 | return blobReadWrite(pBlob, z, n, iOffset, sqlite3BtreeData); |
| 84518 | } |
| 84519 | |
| 84520 | /* |
| 84521 | ** Write data to a blob handle. |
| 84522 | */ |
| 84523 | SQLITE_API int SQLITE_STDCALL sqlite3_blob_write(sqlite3_blob *pBlob, const void *z, int n, int iOffset){ |
| 84524 | return blobReadWrite(pBlob, (void *)z, n, iOffset, sqlite3BtreePutData); |
| 84525 | } |
| 84526 | |
| 84527 | /* |
| 84528 | ** Query a blob handle for the size of the data. |
| 84529 | ** |
| 84530 | ** The Incrblob.nByte field is fixed for the lifetime of the Incrblob |
| 84531 | ** so no mutex is required for access. |
| 84532 | */ |
| 84533 | SQLITE_API int SQLITE_STDCALL sqlite3_blob_bytes(sqlite3_blob *pBlob){ |
| 84534 | Incrblob *p = (Incrblob *)pBlob; |
| 84535 | return (p && p->pStmt) ? p->nByte : 0; |
| 84536 | } |
| 84537 | |
| 84538 | /* |
| @@ -84543,11 +84543,11 @@ | |
| 84543 | ** contain a blob or text value, then an error code is returned and the |
| 84544 | ** database handle error code and message set. If this happens, then all |
| 84545 | ** subsequent calls to sqlite3_blob_xxx() functions (except blob_close()) |
| 84546 | ** immediately return SQLITE_ABORT. |
| 84547 | */ |
| 84548 | SQLITE_API int SQLITE_STDCALL sqlite3_blob_reopen(sqlite3_blob *pBlob, sqlite3_int64 iRow){ |
| 84549 | int rc; |
| 84550 | Incrblob *p = (Incrblob *)pBlob; |
| 84551 | sqlite3 *db; |
| 84552 | |
| 84553 | if( p==0 ) return SQLITE_MISUSE_BKPT; |
| @@ -88640,11 +88640,15 @@ | |
| 88640 | } |
| 88641 | if( is_agg && (pNC->ncFlags & NC_AllowAgg)==0 ){ |
| 88642 | sqlite3ErrorMsg(pParse, "misuse of aggregate function %.*s()", nId,zId); |
| 88643 | pNC->nErr++; |
| 88644 | is_agg = 0; |
| 88645 | }else if( no_such_func && pParse->db->init.busy==0 |
| 88646 | #ifdef SQLITE_ENABLE_UNKNOWN_SQL_FUNCTION |
| 88647 | && pParse->explain==0 |
| 88648 | #endif |
| 88649 | ){ |
| 88650 | sqlite3ErrorMsg(pParse, "no such function: %.*s", nId, zId); |
| 88651 | pNC->nErr++; |
| 88652 | }else if( wrong_num_args ){ |
| 88653 | sqlite3ErrorMsg(pParse,"wrong number of arguments to function %.*s()", |
| 88654 | nId, zId); |
| @@ -92365,10 +92369,15 @@ | |
| 92369 | } |
| 92370 | nFarg = pFarg ? pFarg->nExpr : 0; |
| 92371 | assert( !ExprHasProperty(pExpr, EP_IntValue) ); |
| 92372 | zId = pExpr->u.zToken; |
| 92373 | pDef = sqlite3FindFunction(db, zId, nFarg, enc, 0); |
| 92374 | #ifdef SQLITE_ENABLE_UNKNOWN_SQL_FUNCTION |
| 92375 | if( pDef==0 && pParse->explain ){ |
| 92376 | pDef = sqlite3FindFunction(db, "unknown", nFarg, enc, 0); |
| 92377 | } |
| 92378 | #endif |
| 92379 | if( pDef==0 || pDef->xFinalize!=0 ){ |
| 92380 | sqlite3ErrorMsg(pParse, "unknown function: %s()", zId); |
| 92381 | break; |
| 92382 | } |
| 92383 | |
| @@ -97147,11 +97156,11 @@ | |
| 97156 | ** and attempts to write the column will be ignored. |
| 97157 | ** |
| 97158 | ** Setting the auth function to NULL disables this hook. The default |
| 97159 | ** setting of the auth function is NULL. |
| 97160 | */ |
| 97161 | SQLITE_API int SQLITE_STDCALL sqlite3_set_authorizer( |
| 97162 | sqlite3 *db, |
| 97163 | int (*xAuth)(void*,int,const char*,const char*,const char*,const char*), |
| 97164 | void *pArg |
| 97165 | ){ |
| 97166 | #ifdef SQLITE_ENABLE_API_ARMOR |
| @@ -103910,18 +103919,18 @@ | |
| 103919 | } |
| 103920 | |
| 103921 | /* |
| 103922 | ** The sqlite3_strglob() interface. |
| 103923 | */ |
| 103924 | SQLITE_API int SQLITE_STDCALL sqlite3_strglob(const char *zGlobPattern, const char *zString){ |
| 103925 | return patternCompare((u8*)zGlobPattern, (u8*)zString, &globInfo, '[')==0; |
| 103926 | } |
| 103927 | |
| 103928 | /* |
| 103929 | ** The sqlite3_strlike() interface. |
| 103930 | */ |
| 103931 | SQLITE_API int SQLITE_STDCALL sqlite3_strlike(const char *zPattern, const char *zStr, unsigned int esc){ |
| 103932 | return patternCompare((u8*)zPattern, (u8*)zStr, &likeInfoNorm, esc)==0; |
| 103933 | } |
| 103934 | |
| 103935 | /* |
| 103936 | ** Count the number of times that the LIKE operator (or GLOB which is |
| @@ -104473,10 +104482,30 @@ | |
| 104482 | } |
| 104483 | } |
| 104484 | sqlite3_result_text(context, (char*)zIn, nIn, SQLITE_TRANSIENT); |
| 104485 | } |
| 104486 | |
| 104487 | |
| 104488 | #ifdef SQLITE_ENABLE_UNKNOWN_SQL_FUNCTION |
| 104489 | /* |
| 104490 | ** The "unknown" function is automatically substituted in place of |
| 104491 | ** any unrecognized function name when doing an EXPLAIN or EXPLAIN QUERY PLAN |
| 104492 | ** when the SQLITE_ENABLE_UNKNOWN_FUNCTION compile-time option is used. |
| 104493 | ** When the "sqlite3" command-line shell is built using this functionality, |
| 104494 | ** that allows an EXPLAIN or EXPLAIN QUERY PLAN for complex queries |
| 104495 | ** involving application-defined functions to be examined in a generic |
| 104496 | ** sqlite3 shell. |
| 104497 | */ |
| 104498 | static void unknownFunc( |
| 104499 | sqlite3_context *context, |
| 104500 | int argc, |
| 104501 | sqlite3_value **argv |
| 104502 | ){ |
| 104503 | /* no-op */ |
| 104504 | } |
| 104505 | #endif /*SQLITE_ENABLE_UNKNOWN_SQL_FUNCTION*/ |
| 104506 | |
| 104507 | |
| 104508 | /* IMP: R-25361-16150 This function is omitted from SQLite by default. It |
| 104509 | ** is only available if the SQLITE_SOUNDEX compile-time option is used |
| 104510 | ** when SQLite is built. |
| 104511 | */ |
| @@ -104944,17 +104973,20 @@ | |
| 104973 | AGGREGATE(count, 1, 0, 0, countStep, countFinalize ), |
| 104974 | AGGREGATE(group_concat, 1, 0, 0, groupConcatStep, groupConcatFinalize), |
| 104975 | AGGREGATE(group_concat, 2, 0, 0, groupConcatStep, groupConcatFinalize), |
| 104976 | |
| 104977 | LIKEFUNC(glob, 2, &globInfo, SQLITE_FUNC_LIKE|SQLITE_FUNC_CASE), |
| 104978 | #ifdef SQLITE_CASE_SENSITIVE_LIKE |
| 104979 | LIKEFUNC(like, 2, &likeInfoAlt, SQLITE_FUNC_LIKE|SQLITE_FUNC_CASE), |
| 104980 | LIKEFUNC(like, 3, &likeInfoAlt, SQLITE_FUNC_LIKE|SQLITE_FUNC_CASE), |
| 104981 | #else |
| 104982 | LIKEFUNC(like, 2, &likeInfoNorm, SQLITE_FUNC_LIKE), |
| 104983 | LIKEFUNC(like, 3, &likeInfoNorm, SQLITE_FUNC_LIKE), |
| 104984 | #endif |
| 104985 | #ifdef SQLITE_ENABLE_UNKNOWN_SQL_FUNCTION |
| 104986 | FUNCTION(unknown, -1, 0, 0, unknownFunc ), |
| 104987 | #endif |
| 104988 | FUNCTION(coalesce, 1, 0, 0, 0 ), |
| 104989 | FUNCTION(coalesce, 0, 0, 0, 0 ), |
| 104990 | FUNCTION2(coalesce, -1, 0, 0, noopFunc, SQLITE_FUNC_COALESCE), |
| 104991 | }; |
| 104992 | #ifndef SQLITE_OMIT_ALTERTABLE |
| @@ -108613,11 +108645,11 @@ | |
| 108645 | ** If the SQL is a query, then for each row in the query result |
| 108646 | ** the xCallback() function is called. pArg becomes the first |
| 108647 | ** argument to xCallback(). If xCallback=NULL then no callback |
| 108648 | ** is invoked, even for queries. |
| 108649 | */ |
| 108650 | SQLITE_API int SQLITE_STDCALL sqlite3_exec( |
| 108651 | sqlite3 *db, /* The database on which the SQL executes */ |
| 108652 | const char *zSql, /* The SQL to be executed */ |
| 108653 | sqlite3_callback xCallback, /* Invoke this callback routine */ |
| 108654 | void *pArg, /* First argument to xCallback() */ |
| 108655 | char **pzErrMsg /* Write error messages here */ |
| @@ -109875,11 +109907,11 @@ | |
| 109907 | db->aExtension = aHandle; |
| 109908 | |
| 109909 | db->aExtension[db->nExtension++] = handle; |
| 109910 | return SQLITE_OK; |
| 109911 | } |
| 109912 | SQLITE_API int SQLITE_STDCALL sqlite3_load_extension( |
| 109913 | sqlite3 *db, /* Load the extension into this database connection */ |
| 109914 | const char *zFile, /* Name of the shared library containing extension */ |
| 109915 | const char *zProc, /* Entry point. Use "sqlite3_extension_init" if 0 */ |
| 109916 | char **pzErrMsg /* Put error message here if not 0 */ |
| 109917 | ){ |
| @@ -109906,11 +109938,11 @@ | |
| 109938 | |
| 109939 | /* |
| 109940 | ** Enable or disable extension loading. Extension loading is disabled by |
| 109941 | ** default so as not to open security holes in older applications. |
| 109942 | */ |
| 109943 | SQLITE_API int SQLITE_STDCALL sqlite3_enable_load_extension(sqlite3 *db, int onoff){ |
| 109944 | sqlite3_mutex_enter(db->mutex); |
| 109945 | if( onoff ){ |
| 109946 | db->flags |= SQLITE_LoadExtension|SQLITE_LoadExtFunc; |
| 109947 | }else{ |
| 109948 | db->flags &= ~(SQLITE_LoadExtension|SQLITE_LoadExtFunc); |
| @@ -109963,11 +109995,11 @@ | |
| 109995 | |
| 109996 | /* |
| 109997 | ** Register a statically linked extension that is automatically |
| 109998 | ** loaded by every new database connection. |
| 109999 | */ |
| 110000 | SQLITE_API int SQLITE_STDCALL sqlite3_auto_extension( |
| 110001 | void (*xInit)(void) |
| 110002 | ){ |
| 110003 | int rc = SQLITE_OK; |
| 110004 | #ifndef SQLITE_OMIT_AUTOINIT |
| 110005 | rc = sqlite3_initialize(); |
| @@ -110010,11 +110042,11 @@ | |
| 110042 | ** routine is a no-op. |
| 110043 | ** |
| 110044 | ** Return 1 if xInit was found on the list and removed. Return 0 if xInit |
| 110045 | ** was not on the list. |
| 110046 | */ |
| 110047 | SQLITE_API int SQLITE_STDCALL sqlite3_cancel_auto_extension( |
| 110048 | void (*xInit)(void) |
| 110049 | ){ |
| 110050 | #if SQLITE_THREADSAFE |
| 110051 | sqlite3_mutex *mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER); |
| 110052 | #endif |
| @@ -110035,11 +110067,11 @@ | |
| 110067 | } |
| 110068 | |
| 110069 | /* |
| 110070 | ** Reset the automatic extension loading mechanism. |
| 110071 | */ |
| 110072 | SQLITE_API void SQLITE_STDCALL sqlite3_reset_auto_extension(void){ |
| 110073 | #ifndef SQLITE_OMIT_AUTOINIT |
| 110074 | if( sqlite3_initialize()==SQLITE_OK ) |
| 110075 | #endif |
| 110076 | { |
| 110077 | #if SQLITE_THREADSAFE |
| @@ -113296,11 +113328,11 @@ | |
| 113328 | ** and so if a schema change occurs, SQLITE_SCHEMA is returned by |
| 113329 | ** sqlite3_step(). In the new version, the original SQL text is retained |
| 113330 | ** and the statement is automatically recompiled if an schema change |
| 113331 | ** occurs. |
| 113332 | */ |
| 113333 | SQLITE_API int SQLITE_STDCALL sqlite3_prepare( |
| 113334 | sqlite3 *db, /* Database handle. */ |
| 113335 | const char *zSql, /* UTF-8 encoded SQL statement. */ |
| 113336 | int nBytes, /* Length of zSql in bytes. */ |
| 113337 | sqlite3_stmt **ppStmt, /* OUT: A pointer to the prepared statement */ |
| 113338 | const char **pzTail /* OUT: End of parsed string */ |
| @@ -113308,11 +113340,11 @@ | |
| 113340 | int rc; |
| 113341 | rc = sqlite3LockAndPrepare(db,zSql,nBytes,0,0,ppStmt,pzTail); |
| 113342 | assert( rc==SQLITE_OK || ppStmt==0 || *ppStmt==0 ); /* VERIFY: F13021 */ |
| 113343 | return rc; |
| 113344 | } |
| 113345 | SQLITE_API int SQLITE_STDCALL sqlite3_prepare_v2( |
| 113346 | sqlite3 *db, /* Database handle. */ |
| 113347 | const char *zSql, /* UTF-8 encoded SQL statement. */ |
| 113348 | int nBytes, /* Length of zSql in bytes. */ |
| 113349 | sqlite3_stmt **ppStmt, /* OUT: A pointer to the prepared statement */ |
| 113350 | const char **pzTail /* OUT: End of parsed string */ |
| @@ -113384,11 +113416,11 @@ | |
| 113416 | ** and so if a schema change occurs, SQLITE_SCHEMA is returned by |
| 113417 | ** sqlite3_step(). In the new version, the original SQL text is retained |
| 113418 | ** and the statement is automatically recompiled if an schema change |
| 113419 | ** occurs. |
| 113420 | */ |
| 113421 | SQLITE_API int SQLITE_STDCALL sqlite3_prepare16( |
| 113422 | sqlite3 *db, /* Database handle. */ |
| 113423 | const void *zSql, /* UTF-16 encoded SQL statement. */ |
| 113424 | int nBytes, /* Length of zSql in bytes. */ |
| 113425 | sqlite3_stmt **ppStmt, /* OUT: A pointer to the prepared statement */ |
| 113426 | const void **pzTail /* OUT: End of parsed string */ |
| @@ -113396,11 +113428,11 @@ | |
| 113428 | int rc; |
| 113429 | rc = sqlite3Prepare16(db,zSql,nBytes,0,ppStmt,pzTail); |
| 113430 | assert( rc==SQLITE_OK || ppStmt==0 || *ppStmt==0 ); /* VERIFY: F13021 */ |
| 113431 | return rc; |
| 113432 | } |
| 113433 | SQLITE_API int SQLITE_STDCALL sqlite3_prepare16_v2( |
| 113434 | sqlite3 *db, /* Database handle. */ |
| 113435 | const void *zSql, /* UTF-16 encoded SQL statement. */ |
| 113436 | int nBytes, /* Length of zSql in bytes. */ |
| 113437 | sqlite3_stmt **ppStmt, /* OUT: A pointer to the prepared statement */ |
| 113438 | const void **pzTail /* OUT: End of parsed string */ |
| @@ -119239,11 +119271,11 @@ | |
| 119271 | ** The result that is written to ***pazResult is held in memory obtained |
| 119272 | ** from malloc(). But the caller cannot free this memory directly. |
| 119273 | ** Instead, the entire table should be passed to sqlite3_free_table() when |
| 119274 | ** the calling procedure is finished using it. |
| 119275 | */ |
| 119276 | SQLITE_API int SQLITE_STDCALL sqlite3_get_table( |
| 119277 | sqlite3 *db, /* The database on which the SQL executes */ |
| 119278 | const char *zSql, /* The SQL to be executed */ |
| 119279 | char ***pazResult, /* Write the result table here */ |
| 119280 | int *pnRow, /* Write the number of rows in the result here */ |
| 119281 | int *pnColumn, /* Write the number of columns of result here */ |
| @@ -119308,11 +119340,11 @@ | |
| 119340 | } |
| 119341 | |
| 119342 | /* |
| 119343 | ** This routine frees the space the sqlite3_get_table() malloced. |
| 119344 | */ |
| 119345 | SQLITE_API void SQLITE_STDCALL sqlite3_free_table( |
| 119346 | char **azResult /* Result returned from sqlite3_get_table() */ |
| 119347 | ){ |
| 119348 | if( azResult ){ |
| 119349 | int i, n; |
| 119350 | azResult--; |
| @@ -121718,11 +121750,11 @@ | |
| 121750 | |
| 121751 | |
| 121752 | /* |
| 121753 | ** External API function used to create a new virtual-table module. |
| 121754 | */ |
| 121755 | SQLITE_API int SQLITE_STDCALL sqlite3_create_module( |
| 121756 | sqlite3 *db, /* Database in which module is registered */ |
| 121757 | const char *zName, /* Name assigned to this module */ |
| 121758 | const sqlite3_module *pModule, /* The definition of the module */ |
| 121759 | void *pAux /* Context pointer for xCreate/xConnect */ |
| 121760 | ){ |
| @@ -121733,11 +121765,11 @@ | |
| 121765 | } |
| 121766 | |
| 121767 | /* |
| 121768 | ** External API function used to create a new virtual-table module. |
| 121769 | */ |
| 121770 | SQLITE_API int SQLITE_STDCALL sqlite3_create_module_v2( |
| 121771 | sqlite3 *db, /* Database in which module is registered */ |
| 121772 | const char *zName, /* Name assigned to this module */ |
| 121773 | const sqlite3_module *pModule, /* The definition of the module */ |
| 121774 | void *pAux, /* Context pointer for xCreate/xConnect */ |
| 121775 | void (*xDestroy)(void *) /* Module destructor function */ |
| @@ -122357,11 +122389,11 @@ | |
| 122389 | /* |
| 122390 | ** This function is used to set the schema of a virtual table. It is only |
| 122391 | ** valid to call this function from within the xCreate() or xConnect() of a |
| 122392 | ** virtual table module. |
| 122393 | */ |
| 122394 | SQLITE_API int SQLITE_STDCALL sqlite3_declare_vtab(sqlite3 *db, const char *zCreateTable){ |
| 122395 | VtabCtx *pCtx; |
| 122396 | Parse *pParse; |
| 122397 | int rc = SQLITE_OK; |
| 122398 | Table *pTab; |
| 122399 | char *zErr = 0; |
| @@ -122587,11 +122619,14 @@ | |
| 122619 | if( rc==SQLITE_OK ){ |
| 122620 | rc = pModule->xBegin(pVTab->pVtab); |
| 122621 | if( rc==SQLITE_OK ){ |
| 122622 | int iSvpt = db->nStatement + db->nSavepoint; |
| 122623 | addToVTrans(db, pVTab); |
| 122624 | if( iSvpt && pModule->xSavepoint ){ |
| 122625 | pVTab->iSavepoint = iSvpt; |
| 122626 | rc = pModule->xSavepoint(pVTab->pVtab, iSvpt-1); |
| 122627 | } |
| 122628 | } |
| 122629 | } |
| 122630 | } |
| 122631 | return rc; |
| 122632 | } |
| @@ -122811,11 +122846,11 @@ | |
| 122846 | ** table update operation currently in progress. |
| 122847 | ** |
| 122848 | ** The results of this routine are undefined unless it is called from |
| 122849 | ** within an xUpdate method. |
| 122850 | */ |
| 122851 | SQLITE_API int SQLITE_STDCALL sqlite3_vtab_on_conflict(sqlite3 *db){ |
| 122852 | static const unsigned char aMap[] = { |
| 122853 | SQLITE_ROLLBACK, SQLITE_ABORT, SQLITE_FAIL, SQLITE_IGNORE, SQLITE_REPLACE |
| 122854 | }; |
| 122855 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 122856 | if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT; |
| @@ -130601,11 +130636,11 @@ | |
| 130636 | }else{ |
| 130637 | pWInfo->nOBSat = pFrom->isOrdered; |
| 130638 | pWInfo->revMask = pFrom->revLoop; |
| 130639 | if( pWInfo->nOBSat<=0 ){ |
| 130640 | pWInfo->nOBSat = 0; |
| 130641 | if( nLoop>0 && (pFrom->aLoop[nLoop-1]->wsFlags & WHERE_ONEROW)==0 ){ |
| 130642 | Bitmask m = 0; |
| 130643 | int rc = wherePathSatisfiesOrderBy(pWInfo, pWInfo->pOrderBy, pFrom, |
| 130644 | WHERE_ORDERBY_LIMIT, nLoop-1, pFrom->aLoop[nLoop-1], &m); |
| 130645 | if( rc==pWInfo->pOrderBy->nExpr ){ |
| 130646 | pWInfo->bOrderedInnerLoop = 1; |
| @@ -136136,11 +136171,11 @@ | |
| 136171 | ** |
| 136172 | ** If we compile with SQLITE_OMIT_TRIGGER, all of the computation needed |
| 136173 | ** to recognize the end of a trigger can be omitted. All we have to do |
| 136174 | ** is look for a semicolon that is not part of an string or comment. |
| 136175 | */ |
| 136176 | SQLITE_API int SQLITE_STDCALL sqlite3_complete(const char *zSql){ |
| 136177 | u8 state = 0; /* Current state, using numbers defined in header comment */ |
| 136178 | u8 token; /* Value of the next token */ |
| 136179 | |
| 136180 | #ifndef SQLITE_OMIT_TRIGGER |
| 136181 | /* A complex statement machine used to detect the end of a CREATE TRIGGER |
| @@ -136301,11 +136336,11 @@ | |
| 136336 | /* |
| 136337 | ** This routine is the same as the sqlite3_complete() routine described |
| 136338 | ** above, except that the parameter is required to be UTF-16 encoded, not |
| 136339 | ** UTF-8. |
| 136340 | */ |
| 136341 | SQLITE_API int SQLITE_STDCALL sqlite3_complete16(const void *zSql){ |
| 136342 | sqlite3_value *pVal; |
| 136343 | char const *zSql8; |
| 136344 | int rc; |
| 136345 | |
| 136346 | #ifndef SQLITE_OMIT_AUTOINIT |
| @@ -136461,28 +136496,28 @@ | |
| 136496 | #endif |
| 136497 | |
| 136498 | /* IMPLEMENTATION-OF: R-53536-42575 The sqlite3_libversion() function returns |
| 136499 | ** a pointer to the to the sqlite3_version[] string constant. |
| 136500 | */ |
| 136501 | SQLITE_API const char *SQLITE_STDCALL sqlite3_libversion(void){ return sqlite3_version; } |
| 136502 | |
| 136503 | /* IMPLEMENTATION-OF: R-63124-39300 The sqlite3_sourceid() function returns a |
| 136504 | ** pointer to a string constant whose value is the same as the |
| 136505 | ** SQLITE_SOURCE_ID C preprocessor macro. |
| 136506 | */ |
| 136507 | SQLITE_API const char *SQLITE_STDCALL sqlite3_sourceid(void){ return SQLITE_SOURCE_ID; } |
| 136508 | |
| 136509 | /* IMPLEMENTATION-OF: R-35210-63508 The sqlite3_libversion_number() function |
| 136510 | ** returns an integer equal to SQLITE_VERSION_NUMBER. |
| 136511 | */ |
| 136512 | SQLITE_API int SQLITE_STDCALL sqlite3_libversion_number(void){ return SQLITE_VERSION_NUMBER; } |
| 136513 | |
| 136514 | /* IMPLEMENTATION-OF: R-20790-14025 The sqlite3_threadsafe() function returns |
| 136515 | ** zero if and only if SQLite was compiled with mutexing code omitted due to |
| 136516 | ** the SQLITE_THREADSAFE compile-time option being set to 0. |
| 136517 | */ |
| 136518 | SQLITE_API int SQLITE_STDCALL sqlite3_threadsafe(void){ return SQLITE_THREADSAFE; } |
| 136519 | |
| 136520 | /* |
| 136521 | ** When compiling the test fixture or with debugging enabled (on Win32), |
| 136522 | ** this variable being set to non-zero will cause OSTRACE macros to emit |
| 136523 | ** extra diagnostic information. |
| @@ -136551,11 +136586,11 @@ | |
| 136586 | ** call by X completes. |
| 136587 | ** |
| 136588 | ** * Recursive calls to this routine from thread X return immediately |
| 136589 | ** without blocking. |
| 136590 | */ |
| 136591 | SQLITE_API int SQLITE_STDCALL sqlite3_initialize(void){ |
| 136592 | MUTEX_LOGIC( sqlite3_mutex *pMaster; ) /* The main static mutex */ |
| 136593 | int rc; /* Result code */ |
| 136594 | #ifdef SQLITE_EXTRA_INIT |
| 136595 | int bRunExtraInit = 0; /* Extra initialization needed */ |
| 136596 | #endif |
| @@ -136717,11 +136752,11 @@ | |
| 136752 | ** while any part of SQLite is otherwise in use in any thread. This |
| 136753 | ** routine is not threadsafe. But it is safe to invoke this routine |
| 136754 | ** on when SQLite is already shut down. If SQLite is already shut down |
| 136755 | ** when this routine is invoked, then this routine is a harmless no-op. |
| 136756 | */ |
| 136757 | SQLITE_API int SQLITE_STDCALL sqlite3_shutdown(void){ |
| 136758 | #ifdef SQLITE_OMIT_WSD |
| 136759 | int rc = sqlite3_wsd_init(4096, 24); |
| 136760 | if( rc!=SQLITE_OK ){ |
| 136761 | return rc; |
| 136762 | } |
| @@ -137136,11 +137171,11 @@ | |
| 137171 | } |
| 137172 | |
| 137173 | /* |
| 137174 | ** Return the mutex associated with a database connection. |
| 137175 | */ |
| 137176 | SQLITE_API sqlite3_mutex *SQLITE_STDCALL sqlite3_db_mutex(sqlite3 *db){ |
| 137177 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 137178 | if( !sqlite3SafetyCheckOk(db) ){ |
| 137179 | (void)SQLITE_MISUSE_BKPT; |
| 137180 | return 0; |
| 137181 | } |
| @@ -137150,11 +137185,11 @@ | |
| 137185 | |
| 137186 | /* |
| 137187 | ** Free up as much memory as we can from the given database |
| 137188 | ** connection. |
| 137189 | */ |
| 137190 | SQLITE_API int SQLITE_STDCALL sqlite3_db_release_memory(sqlite3 *db){ |
| 137191 | int i; |
| 137192 | |
| 137193 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 137194 | if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT; |
| 137195 | #endif |
| @@ -137174,11 +137209,11 @@ | |
| 137209 | |
| 137210 | /* |
| 137211 | ** Flush any dirty pages in the pager-cache for any attached database |
| 137212 | ** to disk. |
| 137213 | */ |
| 137214 | SQLITE_API int SQLITE_STDCALL sqlite3_db_cacheflush(sqlite3 *db){ |
| 137215 | int i; |
| 137216 | int rc = SQLITE_OK; |
| 137217 | int bSeenBusy = 0; |
| 137218 | |
| 137219 | #ifdef SQLITE_ENABLE_API_ARMOR |
| @@ -137324,11 +137359,11 @@ | |
| 137359 | } |
| 137360 | |
| 137361 | /* |
| 137362 | ** Return the ROWID of the most recent insert |
| 137363 | */ |
| 137364 | SQLITE_API sqlite_int64 SQLITE_STDCALL sqlite3_last_insert_rowid(sqlite3 *db){ |
| 137365 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 137366 | if( !sqlite3SafetyCheckOk(db) ){ |
| 137367 | (void)SQLITE_MISUSE_BKPT; |
| 137368 | return 0; |
| 137369 | } |
| @@ -137337,11 +137372,11 @@ | |
| 137372 | } |
| 137373 | |
| 137374 | /* |
| 137375 | ** Return the number of changes in the most recent call to sqlite3_exec(). |
| 137376 | */ |
| 137377 | SQLITE_API int SQLITE_STDCALL sqlite3_changes(sqlite3 *db){ |
| 137378 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 137379 | if( !sqlite3SafetyCheckOk(db) ){ |
| 137380 | (void)SQLITE_MISUSE_BKPT; |
| 137381 | return 0; |
| 137382 | } |
| @@ -137350,11 +137385,11 @@ | |
| 137385 | } |
| 137386 | |
| 137387 | /* |
| 137388 | ** Return the number of changes since the database handle was opened. |
| 137389 | */ |
| 137390 | SQLITE_API int SQLITE_STDCALL sqlite3_total_changes(sqlite3 *db){ |
| 137391 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 137392 | if( !sqlite3SafetyCheckOk(db) ){ |
| 137393 | (void)SQLITE_MISUSE_BKPT; |
| 137394 | return 0; |
| 137395 | } |
| @@ -137501,12 +137536,12 @@ | |
| 137536 | ** statements or unfinished sqlite3_backups. The sqlite3_close_v2() |
| 137537 | ** version forces the connection to become a zombie if there are |
| 137538 | ** unclosed resources, and arranges for deallocation when the last |
| 137539 | ** prepare statement or sqlite3_backup closes. |
| 137540 | */ |
| 137541 | SQLITE_API int SQLITE_STDCALL sqlite3_close(sqlite3 *db){ return sqlite3Close(db,0); } |
| 137542 | SQLITE_API int SQLITE_STDCALL sqlite3_close_v2(sqlite3 *db){ return sqlite3Close(db,1); } |
| 137543 | |
| 137544 | |
| 137545 | /* |
| 137546 | ** Close the mutex on database connection db. |
| 137547 | ** |
| @@ -137909,11 +137944,11 @@ | |
| 137944 | |
| 137945 | /* |
| 137946 | ** This routine sets the busy callback for an Sqlite database to the |
| 137947 | ** given callback function with the given argument. |
| 137948 | */ |
| 137949 | SQLITE_API int SQLITE_STDCALL sqlite3_busy_handler( |
| 137950 | sqlite3 *db, |
| 137951 | int (*xBusy)(void*,int), |
| 137952 | void *pArg |
| 137953 | ){ |
| 137954 | #ifdef SQLITE_ENABLE_API_ARMOR |
| @@ -137932,11 +137967,11 @@ | |
| 137967 | /* |
| 137968 | ** This routine sets the progress callback for an Sqlite database to the |
| 137969 | ** given callback function with the given argument. The progress callback will |
| 137970 | ** be invoked every nOps opcodes. |
| 137971 | */ |
| 137972 | SQLITE_API void SQLITE_STDCALL sqlite3_progress_handler( |
| 137973 | sqlite3 *db, |
| 137974 | int nOps, |
| 137975 | int (*xProgress)(void*), |
| 137976 | void *pArg |
| 137977 | ){ |
| @@ -137963,11 +137998,11 @@ | |
| 137998 | |
| 137999 | /* |
| 138000 | ** This routine installs a default busy handler that waits for the |
| 138001 | ** specified number of milliseconds before returning 0. |
| 138002 | */ |
| 138003 | SQLITE_API int SQLITE_STDCALL sqlite3_busy_timeout(sqlite3 *db, int ms){ |
| 138004 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 138005 | if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT; |
| 138006 | #endif |
| 138007 | if( ms>0 ){ |
| 138008 | sqlite3_busy_handler(db, sqliteDefaultBusyCallback, (void*)db); |
| @@ -137979,11 +138014,11 @@ | |
| 138014 | } |
| 138015 | |
| 138016 | /* |
| 138017 | ** Cause any pending operation to stop at its earliest opportunity. |
| 138018 | */ |
| 138019 | SQLITE_API void SQLITE_STDCALL sqlite3_interrupt(sqlite3 *db){ |
| 138020 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 138021 | if( !sqlite3SafetyCheckOk(db) ){ |
| 138022 | (void)SQLITE_MISUSE_BKPT; |
| 138023 | return; |
| 138024 | } |
| @@ -138095,11 +138130,11 @@ | |
| 138130 | } |
| 138131 | |
| 138132 | /* |
| 138133 | ** Create new user functions. |
| 138134 | */ |
| 138135 | SQLITE_API int SQLITE_STDCALL sqlite3_create_function( |
| 138136 | sqlite3 *db, |
| 138137 | const char *zFunc, |
| 138138 | int nArg, |
| 138139 | int enc, |
| 138140 | void *p, |
| @@ -138109,11 +138144,11 @@ | |
| 138144 | ){ |
| 138145 | return sqlite3_create_function_v2(db, zFunc, nArg, enc, p, xSFunc, xStep, |
| 138146 | xFinal, 0); |
| 138147 | } |
| 138148 | |
| 138149 | SQLITE_API int SQLITE_STDCALL sqlite3_create_function_v2( |
| 138150 | sqlite3 *db, |
| 138151 | const char *zFunc, |
| 138152 | int nArg, |
| 138153 | int enc, |
| 138154 | void *p, |
| @@ -138152,11 +138187,11 @@ | |
| 138187 | sqlite3_mutex_leave(db->mutex); |
| 138188 | return rc; |
| 138189 | } |
| 138190 | |
| 138191 | #ifndef SQLITE_OMIT_UTF16 |
| 138192 | SQLITE_API int SQLITE_STDCALL sqlite3_create_function16( |
| 138193 | sqlite3 *db, |
| 138194 | const void *zFunctionName, |
| 138195 | int nArg, |
| 138196 | int eTextRep, |
| 138197 | void *p, |
| @@ -138192,11 +138227,11 @@ | |
| 138227 | ** When virtual tables intend to provide an overloaded function, they |
| 138228 | ** should call this routine to make sure the global function exists. |
| 138229 | ** A global function must exist in order for name resolution to work |
| 138230 | ** properly. |
| 138231 | */ |
| 138232 | SQLITE_API int SQLITE_STDCALL sqlite3_overload_function( |
| 138233 | sqlite3 *db, |
| 138234 | const char *zName, |
| 138235 | int nArg |
| 138236 | ){ |
| 138237 | int rc = SQLITE_OK; |
| @@ -138224,11 +138259,11 @@ | |
| 138259 | ** A NULL trace function means that no tracing is executes. A non-NULL |
| 138260 | ** trace is a pointer to a function that is invoked at the start of each |
| 138261 | ** SQL statement. |
| 138262 | */ |
| 138263 | #ifndef SQLITE_OMIT_DEPRECATED |
| 138264 | SQLITE_API void *SQLITE_STDCALL sqlite3_trace(sqlite3 *db, void(*xTrace)(void*,const char*), void *pArg){ |
| 138265 | void *pOld; |
| 138266 | |
| 138267 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 138268 | if( !sqlite3SafetyCheckOk(db) ){ |
| 138269 | (void)SQLITE_MISUSE_BKPT; |
| @@ -138245,11 +138280,11 @@ | |
| 138280 | } |
| 138281 | #endif /* SQLITE_OMIT_DEPRECATED */ |
| 138282 | |
| 138283 | /* Register a trace callback using the version-2 interface. |
| 138284 | */ |
| 138285 | SQLITE_API int SQLITE_STDCALL sqlite3_trace_v2( |
| 138286 | sqlite3 *db, /* Trace this connection */ |
| 138287 | unsigned mTrace, /* Mask of events to be traced */ |
| 138288 | int(*xTrace)(unsigned,void*,void*,void*), /* Callback to invoke */ |
| 138289 | void *pArg /* Context */ |
| 138290 | ){ |
| @@ -138273,11 +138308,11 @@ | |
| 138308 | ** |
| 138309 | ** A NULL profile function means that no profiling is executes. A non-NULL |
| 138310 | ** profile is a pointer to a function that is invoked at the conclusion of |
| 138311 | ** each SQL statement that is run. |
| 138312 | */ |
| 138313 | SQLITE_API void *SQLITE_STDCALL sqlite3_profile( |
| 138314 | sqlite3 *db, |
| 138315 | void (*xProfile)(void*,const char*,sqlite_uint64), |
| 138316 | void *pArg |
| 138317 | ){ |
| 138318 | void *pOld; |
| @@ -138301,11 +138336,11 @@ | |
| 138336 | /* |
| 138337 | ** Register a function to be invoked when a transaction commits. |
| 138338 | ** If the invoked function returns non-zero, then the commit becomes a |
| 138339 | ** rollback. |
| 138340 | */ |
| 138341 | SQLITE_API void *SQLITE_STDCALL sqlite3_commit_hook( |
| 138342 | sqlite3 *db, /* Attach the hook to this database */ |
| 138343 | int (*xCallback)(void*), /* Function to invoke on each commit */ |
| 138344 | void *pArg /* Argument to the function */ |
| 138345 | ){ |
| 138346 | void *pOld; |
| @@ -138326,11 +138361,11 @@ | |
| 138361 | |
| 138362 | /* |
| 138363 | ** Register a callback to be invoked each time a row is updated, |
| 138364 | ** inserted or deleted using this database connection. |
| 138365 | */ |
| 138366 | SQLITE_API void *SQLITE_STDCALL sqlite3_update_hook( |
| 138367 | sqlite3 *db, /* Attach the hook to this database */ |
| 138368 | void (*xCallback)(void*,int,char const *,char const *,sqlite_int64), |
| 138369 | void *pArg /* Argument to the function */ |
| 138370 | ){ |
| 138371 | void *pRet; |
| @@ -138351,11 +138386,11 @@ | |
| 138386 | |
| 138387 | /* |
| 138388 | ** Register a callback to be invoked each time a transaction is rolled |
| 138389 | ** back by this database connection. |
| 138390 | */ |
| 138391 | SQLITE_API void *SQLITE_STDCALL sqlite3_rollback_hook( |
| 138392 | sqlite3 *db, /* Attach the hook to this database */ |
| 138393 | void (*xCallback)(void*), /* Callback function */ |
| 138394 | void *pArg /* Argument to the function */ |
| 138395 | ){ |
| 138396 | void *pRet; |
| @@ -138377,11 +138412,11 @@ | |
| 138412 | #ifdef SQLITE_ENABLE_PREUPDATE_HOOK |
| 138413 | /* |
| 138414 | ** Register a callback to be invoked each time a row is updated, |
| 138415 | ** inserted or deleted using this database connection. |
| 138416 | */ |
| 138417 | SQLITE_API void *SQLITE_STDCALL sqlite3_preupdate_hook( |
| 138418 | sqlite3 *db, /* Attach the hook to this database */ |
| 138419 | void(*xCallback)( /* Callback function */ |
| 138420 | void*,sqlite3*,int,char const*,char const*,sqlite3_int64,sqlite3_int64), |
| 138421 | void *pArg /* First callback argument */ |
| 138422 | ){ |
| @@ -138426,11 +138461,11 @@ | |
| 138461 | ** The callback registered by this function replaces any existing callback |
| 138462 | ** registered using sqlite3_wal_hook(). Likewise, registering a callback |
| 138463 | ** using sqlite3_wal_hook() disables the automatic checkpoint mechanism |
| 138464 | ** configured by this function. |
| 138465 | */ |
| 138466 | SQLITE_API int SQLITE_STDCALL sqlite3_wal_autocheckpoint(sqlite3 *db, int nFrame){ |
| 138467 | #ifdef SQLITE_OMIT_WAL |
| 138468 | UNUSED_PARAMETER(db); |
| 138469 | UNUSED_PARAMETER(nFrame); |
| 138470 | #else |
| 138471 | #ifdef SQLITE_ENABLE_API_ARMOR |
| @@ -138447,11 +138482,11 @@ | |
| 138482 | |
| 138483 | /* |
| 138484 | ** Register a callback to be invoked each time a transaction is written |
| 138485 | ** into the write-ahead-log by this database connection. |
| 138486 | */ |
| 138487 | SQLITE_API void *SQLITE_STDCALL sqlite3_wal_hook( |
| 138488 | sqlite3 *db, /* Attach the hook to this db handle */ |
| 138489 | int(*xCallback)(void *, sqlite3*, const char*, int), |
| 138490 | void *pArg /* First argument passed to xCallback() */ |
| 138491 | ){ |
| 138492 | #ifndef SQLITE_OMIT_WAL |
| @@ -138474,11 +138509,11 @@ | |
| 138509 | } |
| 138510 | |
| 138511 | /* |
| 138512 | ** Checkpoint database zDb. |
| 138513 | */ |
| 138514 | SQLITE_API int SQLITE_STDCALL sqlite3_wal_checkpoint_v2( |
| 138515 | sqlite3 *db, /* Database handle */ |
| 138516 | const char *zDb, /* Name of attached database (or NULL) */ |
| 138517 | int eMode, /* SQLITE_CHECKPOINT_* value */ |
| 138518 | int *pnLog, /* OUT: Size of WAL log in frames */ |
| 138519 | int *pnCkpt /* OUT: Total number of frames checkpointed */ |
| @@ -138529,11 +138564,11 @@ | |
| 138564 | /* |
| 138565 | ** Checkpoint database zDb. If zDb is NULL, or if the buffer zDb points |
| 138566 | ** to contains a zero-length string, all attached databases are |
| 138567 | ** checkpointed. |
| 138568 | */ |
| 138569 | SQLITE_API int SQLITE_STDCALL sqlite3_wal_checkpoint(sqlite3 *db, const char *zDb){ |
| 138570 | /* EVIDENCE-OF: R-41613-20553 The sqlite3_wal_checkpoint(D,X) is equivalent to |
| 138571 | ** sqlite3_wal_checkpoint_v2(D,X,SQLITE_CHECKPOINT_PASSIVE,0,0). */ |
| 138572 | return sqlite3_wal_checkpoint_v2(db,zDb,SQLITE_CHECKPOINT_PASSIVE,0,0); |
| 138573 | } |
| 138574 | |
| @@ -138620,11 +138655,11 @@ | |
| 138655 | |
| 138656 | /* |
| 138657 | ** Return UTF-8 encoded English language explanation of the most recent |
| 138658 | ** error. |
| 138659 | */ |
| 138660 | SQLITE_API const char *SQLITE_STDCALL sqlite3_errmsg(sqlite3 *db){ |
| 138661 | const char *z; |
| 138662 | if( !db ){ |
| 138663 | return sqlite3ErrStr(SQLITE_NOMEM_BKPT); |
| 138664 | } |
| 138665 | if( !sqlite3SafetyCheckSickOrOk(db) ){ |
| @@ -138648,11 +138683,11 @@ | |
| 138683 | #ifndef SQLITE_OMIT_UTF16 |
| 138684 | /* |
| 138685 | ** Return UTF-16 encoded English language explanation of the most recent |
| 138686 | ** error. |
| 138687 | */ |
| 138688 | SQLITE_API const void *SQLITE_STDCALL sqlite3_errmsg16(sqlite3 *db){ |
| 138689 | static const u16 outOfMem[] = { |
| 138690 | 'o', 'u', 't', ' ', 'o', 'f', ' ', 'm', 'e', 'm', 'o', 'r', 'y', 0 |
| 138691 | }; |
| 138692 | static const u16 misuse[] = { |
| 138693 | 'l', 'i', 'b', 'r', 'a', 'r', 'y', ' ', |
| @@ -138693,38 +138728,38 @@ | |
| 138728 | |
| 138729 | /* |
| 138730 | ** Return the most recent error code generated by an SQLite routine. If NULL is |
| 138731 | ** passed to this function, we assume a malloc() failed during sqlite3_open(). |
| 138732 | */ |
| 138733 | SQLITE_API int SQLITE_STDCALL sqlite3_errcode(sqlite3 *db){ |
| 138734 | if( db && !sqlite3SafetyCheckSickOrOk(db) ){ |
| 138735 | return SQLITE_MISUSE_BKPT; |
| 138736 | } |
| 138737 | if( !db || db->mallocFailed ){ |
| 138738 | return SQLITE_NOMEM_BKPT; |
| 138739 | } |
| 138740 | return db->errCode & db->errMask; |
| 138741 | } |
| 138742 | SQLITE_API int SQLITE_STDCALL sqlite3_extended_errcode(sqlite3 *db){ |
| 138743 | if( db && !sqlite3SafetyCheckSickOrOk(db) ){ |
| 138744 | return SQLITE_MISUSE_BKPT; |
| 138745 | } |
| 138746 | if( !db || db->mallocFailed ){ |
| 138747 | return SQLITE_NOMEM_BKPT; |
| 138748 | } |
| 138749 | return db->errCode; |
| 138750 | } |
| 138751 | SQLITE_API int SQLITE_STDCALL sqlite3_system_errno(sqlite3 *db){ |
| 138752 | return db ? db->iSysErrno : 0; |
| 138753 | } |
| 138754 | |
| 138755 | /* |
| 138756 | ** Return a string that describes the kind of error specified in the |
| 138757 | ** argument. For now, this simply calls the internal sqlite3ErrStr() |
| 138758 | ** function. |
| 138759 | */ |
| 138760 | SQLITE_API const char *SQLITE_STDCALL sqlite3_errstr(int rc){ |
| 138761 | return sqlite3ErrStr(rc); |
| 138762 | } |
| 138763 | |
| 138764 | /* |
| 138765 | ** Create a new collating function for database "db". The name is zName |
| @@ -138868,11 +138903,11 @@ | |
| 138903 | ** |
| 138904 | ** A new lower limit does not shrink existing constructs. |
| 138905 | ** It merely prevents new constructs that exceed the limit |
| 138906 | ** from forming. |
| 138907 | */ |
| 138908 | SQLITE_API int SQLITE_STDCALL sqlite3_limit(sqlite3 *db, int limitId, int newLimit){ |
| 138909 | int oldLimit; |
| 138910 | |
| 138911 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 138912 | if( !sqlite3SafetyCheckOk(db) ){ |
| 138913 | (void)SQLITE_MISUSE_BKPT; |
| @@ -139492,18 +139527,18 @@ | |
| 139527 | } |
| 139528 | |
| 139529 | /* |
| 139530 | ** Open a new database handle. |
| 139531 | */ |
| 139532 | SQLITE_API int SQLITE_STDCALL sqlite3_open( |
| 139533 | const char *zFilename, |
| 139534 | sqlite3 **ppDb |
| 139535 | ){ |
| 139536 | return openDatabase(zFilename, ppDb, |
| 139537 | SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, 0); |
| 139538 | } |
| 139539 | SQLITE_API int SQLITE_STDCALL sqlite3_open_v2( |
| 139540 | const char *filename, /* Database filename (UTF-8) */ |
| 139541 | sqlite3 **ppDb, /* OUT: SQLite db handle */ |
| 139542 | int flags, /* Flags */ |
| 139543 | const char *zVfs /* Name of VFS module to use */ |
| 139544 | ){ |
| @@ -139512,11 +139547,11 @@ | |
| 139547 | |
| 139548 | #ifndef SQLITE_OMIT_UTF16 |
| 139549 | /* |
| 139550 | ** Open a new database handle. |
| 139551 | */ |
| 139552 | SQLITE_API int SQLITE_STDCALL sqlite3_open16( |
| 139553 | const void *zFilename, |
| 139554 | sqlite3 **ppDb |
| 139555 | ){ |
| 139556 | char const *zFilename8; /* zFilename encoded in UTF-8 instead of UTF-16 */ |
| 139557 | sqlite3_value *pVal; |
| @@ -139551,11 +139586,11 @@ | |
| 139586 | #endif /* SQLITE_OMIT_UTF16 */ |
| 139587 | |
| 139588 | /* |
| 139589 | ** Register a new collation sequence with the database handle db. |
| 139590 | */ |
| 139591 | SQLITE_API int SQLITE_STDCALL sqlite3_create_collation( |
| 139592 | sqlite3* db, |
| 139593 | const char *zName, |
| 139594 | int enc, |
| 139595 | void* pCtx, |
| 139596 | int(*xCompare)(void*,int,const void*,int,const void*) |
| @@ -139564,11 +139599,11 @@ | |
| 139599 | } |
| 139600 | |
| 139601 | /* |
| 139602 | ** Register a new collation sequence with the database handle db. |
| 139603 | */ |
| 139604 | SQLITE_API int SQLITE_STDCALL sqlite3_create_collation_v2( |
| 139605 | sqlite3* db, |
| 139606 | const char *zName, |
| 139607 | int enc, |
| 139608 | void* pCtx, |
| 139609 | int(*xCompare)(void*,int,const void*,int,const void*), |
| @@ -139589,11 +139624,11 @@ | |
| 139624 | |
| 139625 | #ifndef SQLITE_OMIT_UTF16 |
| 139626 | /* |
| 139627 | ** Register a new collation sequence with the database handle db. |
| 139628 | */ |
| 139629 | SQLITE_API int SQLITE_STDCALL sqlite3_create_collation16( |
| 139630 | sqlite3* db, |
| 139631 | const void *zName, |
| 139632 | int enc, |
| 139633 | void* pCtx, |
| 139634 | int(*xCompare)(void*,int,const void*,int,const void*) |
| @@ -139619,11 +139654,11 @@ | |
| 139654 | |
| 139655 | /* |
| 139656 | ** Register a collation sequence factory callback with the database handle |
| 139657 | ** db. Replace any previously installed collation sequence factory. |
| 139658 | */ |
| 139659 | SQLITE_API int SQLITE_STDCALL sqlite3_collation_needed( |
| 139660 | sqlite3 *db, |
| 139661 | void *pCollNeededArg, |
| 139662 | void(*xCollNeeded)(void*,sqlite3*,int eTextRep,const char*) |
| 139663 | ){ |
| 139664 | #ifdef SQLITE_ENABLE_API_ARMOR |
| @@ -139640,11 +139675,11 @@ | |
| 139675 | #ifndef SQLITE_OMIT_UTF16 |
| 139676 | /* |
| 139677 | ** Register a collation sequence factory callback with the database handle |
| 139678 | ** db. Replace any previously installed collation sequence factory. |
| 139679 | */ |
| 139680 | SQLITE_API int SQLITE_STDCALL sqlite3_collation_needed16( |
| 139681 | sqlite3 *db, |
| 139682 | void *pCollNeededArg, |
| 139683 | void(*xCollNeeded16)(void*,sqlite3*,int eTextRep,const void*) |
| 139684 | ){ |
| 139685 | #ifdef SQLITE_ENABLE_API_ARMOR |
| @@ -139662,11 +139697,11 @@ | |
| 139697 | #ifndef SQLITE_OMIT_DEPRECATED |
| 139698 | /* |
| 139699 | ** This function is now an anachronism. It used to be used to recover from a |
| 139700 | ** malloc() failure, but SQLite now does this automatically. |
| 139701 | */ |
| 139702 | SQLITE_API int SQLITE_STDCALL sqlite3_global_recover(void){ |
| 139703 | return SQLITE_OK; |
| 139704 | } |
| 139705 | #endif |
| 139706 | |
| 139707 | /* |
| @@ -139673,11 +139708,11 @@ | |
| 139708 | ** Test to see whether or not the database connection is in autocommit |
| 139709 | ** mode. Return TRUE if it is and FALSE if not. Autocommit mode is on |
| 139710 | ** by default. Autocommit is disabled by a BEGIN statement and reenabled |
| 139711 | ** by the next COMMIT or ROLLBACK. |
| 139712 | */ |
| 139713 | SQLITE_API int SQLITE_STDCALL sqlite3_get_autocommit(sqlite3 *db){ |
| 139714 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 139715 | if( !sqlite3SafetyCheckOk(db) ){ |
| 139716 | (void)SQLITE_MISUSE_BKPT; |
| 139717 | return 0; |
| 139718 | } |
| @@ -139730,19 +139765,19 @@ | |
| 139765 | ** data for this thread has been deallocated. |
| 139766 | ** |
| 139767 | ** SQLite no longer uses thread-specific data so this routine is now a |
| 139768 | ** no-op. It is retained for historical compatibility. |
| 139769 | */ |
| 139770 | SQLITE_API void SQLITE_STDCALL sqlite3_thread_cleanup(void){ |
| 139771 | } |
| 139772 | #endif |
| 139773 | |
| 139774 | /* |
| 139775 | ** Return meta information about a specific column of a database table. |
| 139776 | ** See comment in sqlite3.h (sqlite.h.in) for details. |
| 139777 | */ |
| 139778 | SQLITE_API int SQLITE_STDCALL sqlite3_table_column_metadata( |
| 139779 | sqlite3 *db, /* Connection handle */ |
| 139780 | const char *zDbName, /* Database name or NULL */ |
| 139781 | const char *zTableName, /* Table name */ |
| 139782 | const char *zColumnName, /* Column name */ |
| 139783 | char const **pzDataType, /* OUTPUT: Declared data type */ |
| @@ -139856,11 +139891,11 @@ | |
| 139891 | } |
| 139892 | |
| 139893 | /* |
| 139894 | ** Sleep for a little while. Return the amount of time slept. |
| 139895 | */ |
| 139896 | SQLITE_API int SQLITE_STDCALL sqlite3_sleep(int ms){ |
| 139897 | sqlite3_vfs *pVfs; |
| 139898 | int rc; |
| 139899 | pVfs = sqlite3_vfs_find(0); |
| 139900 | if( pVfs==0 ) return 0; |
| 139901 | |
| @@ -139872,11 +139907,11 @@ | |
| 139907 | } |
| 139908 | |
| 139909 | /* |
| 139910 | ** Enable or disable the extended result codes. |
| 139911 | */ |
| 139912 | SQLITE_API int SQLITE_STDCALL sqlite3_extended_result_codes(sqlite3 *db, int onoff){ |
| 139913 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 139914 | if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT; |
| 139915 | #endif |
| 139916 | sqlite3_mutex_enter(db->mutex); |
| 139917 | db->errMask = onoff ? 0xffffffff : 0xff; |
| @@ -139885,11 +139920,11 @@ | |
| 139920 | } |
| 139921 | |
| 139922 | /* |
| 139923 | ** Invoke the xFileControl method on a particular database. |
| 139924 | */ |
| 139925 | SQLITE_API int SQLITE_STDCALL sqlite3_file_control(sqlite3 *db, const char *zDbName, int op, void *pArg){ |
| 139926 | int rc = SQLITE_ERROR; |
| 139927 | Btree *pBtree; |
| 139928 | |
| 139929 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 139930 | if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT; |
| @@ -140270,11 +140305,11 @@ | |
| 140305 | ** method of a VFS implementation. The zParam argument is the name of the |
| 140306 | ** query parameter we seek. This routine returns the value of the zParam |
| 140307 | ** parameter if it exists. If the parameter does not exist, this routine |
| 140308 | ** returns a NULL pointer. |
| 140309 | */ |
| 140310 | SQLITE_API const char *SQLITE_STDCALL sqlite3_uri_parameter(const char *zFilename, const char *zParam){ |
| 140311 | if( zFilename==0 || zParam==0 ) return 0; |
| 140312 | zFilename += sqlite3Strlen30(zFilename) + 1; |
| 140313 | while( zFilename[0] ){ |
| 140314 | int x = strcmp(zFilename, zParam); |
| 140315 | zFilename += sqlite3Strlen30(zFilename) + 1; |
| @@ -140285,20 +140320,20 @@ | |
| 140320 | } |
| 140321 | |
| 140322 | /* |
| 140323 | ** Return a boolean value for a query parameter. |
| 140324 | */ |
| 140325 | SQLITE_API int SQLITE_STDCALL sqlite3_uri_boolean(const char *zFilename, const char *zParam, int bDflt){ |
| 140326 | const char *z = sqlite3_uri_parameter(zFilename, zParam); |
| 140327 | bDflt = bDflt!=0; |
| 140328 | return z ? sqlite3GetBoolean(z, bDflt) : bDflt; |
| 140329 | } |
| 140330 | |
| 140331 | /* |
| 140332 | ** Return a 64-bit integer value for a query parameter. |
| 140333 | */ |
| 140334 | SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_uri_int64( |
| 140335 | const char *zFilename, /* Filename as passed to xOpen */ |
| 140336 | const char *zParam, /* URI parameter sought */ |
| 140337 | sqlite3_int64 bDflt /* return if parameter is missing */ |
| 140338 | ){ |
| 140339 | const char *z = sqlite3_uri_parameter(zFilename, zParam); |
| @@ -140326,11 +140361,11 @@ | |
| 140361 | |
| 140362 | /* |
| 140363 | ** Return the filename of the database associated with a database |
| 140364 | ** connection. |
| 140365 | */ |
| 140366 | SQLITE_API const char *SQLITE_STDCALL sqlite3_db_filename(sqlite3 *db, const char *zDbName){ |
| 140367 | Btree *pBt; |
| 140368 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 140369 | if( !sqlite3SafetyCheckOk(db) ){ |
| 140370 | (void)SQLITE_MISUSE_BKPT; |
| 140371 | return 0; |
| @@ -140342,11 +140377,11 @@ | |
| 140377 | |
| 140378 | /* |
| 140379 | ** Return 1 if database is read-only or 0 if read/write. Return -1 if |
| 140380 | ** no such database exists. |
| 140381 | */ |
| 140382 | SQLITE_API int SQLITE_STDCALL sqlite3_db_readonly(sqlite3 *db, const char *zDbName){ |
| 140383 | Btree *pBt; |
| 140384 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 140385 | if( !sqlite3SafetyCheckOk(db) ){ |
| 140386 | (void)SQLITE_MISUSE_BKPT; |
| 140387 | return -1; |
| @@ -140359,11 +140394,11 @@ | |
| 140394 | #ifdef SQLITE_ENABLE_SNAPSHOT |
| 140395 | /* |
| 140396 | ** Obtain a snapshot handle for the snapshot of database zDb currently |
| 140397 | ** being read by handle db. |
| 140398 | */ |
| 140399 | SQLITE_API int SQLITE_STDCALL sqlite3_snapshot_get( |
| 140400 | sqlite3 *db, |
| 140401 | const char *zDb, |
| 140402 | sqlite3_snapshot **ppSnapshot |
| 140403 | ){ |
| 140404 | int rc = SQLITE_ERROR; |
| @@ -140394,11 +140429,11 @@ | |
| 140429 | } |
| 140430 | |
| 140431 | /* |
| 140432 | ** Open a read-transaction on the snapshot idendified by pSnapshot. |
| 140433 | */ |
| 140434 | SQLITE_API int SQLITE_STDCALL sqlite3_snapshot_open( |
| 140435 | sqlite3 *db, |
| 140436 | const char *zDb, |
| 140437 | sqlite3_snapshot *pSnapshot |
| 140438 | ){ |
| 140439 | int rc = SQLITE_ERROR; |
| @@ -140431,11 +140466,11 @@ | |
| 140466 | } |
| 140467 | |
| 140468 | /* |
| 140469 | ** Free a snapshot handle obtained from sqlite3_snapshot_get(). |
| 140470 | */ |
| 140471 | SQLITE_API void SQLITE_STDCALL sqlite3_snapshot_free(sqlite3_snapshot *pSnapshot){ |
| 140472 | sqlite3_free(pSnapshot); |
| 140473 | } |
| 140474 | #endif /* SQLITE_ENABLE_SNAPSHOT */ |
| 140475 | |
| 140476 | /************** End of main.c ************************************************/ |
| @@ -140585,11 +140620,11 @@ | |
| 140620 | ** |
| 140621 | ** Each call to this routine overrides any prior callbacks registered |
| 140622 | ** on the same "db". If xNotify==0 then any prior callbacks are immediately |
| 140623 | ** cancelled. |
| 140624 | */ |
| 140625 | SQLITE_API int SQLITE_STDCALL sqlite3_unlock_notify( |
| 140626 | sqlite3 *db, |
| 140627 | void (*xNotify)(void **, int), |
| 140628 | void *pArg |
| 140629 | ){ |
| 140630 | int rc = SQLITE_OK; |
| @@ -147588,11 +147623,11 @@ | |
| 147623 | ** Initialize API pointer table, if required. |
| 147624 | */ |
| 147625 | #ifdef _WIN32 |
| 147626 | __declspec(dllexport) |
| 147627 | #endif |
| 147628 | SQLITE_API int SQLITE_STDCALL sqlite3_fts3_init( |
| 147629 | sqlite3 *db, |
| 147630 | char **pzErrMsg, |
| 147631 | const sqlite3_api_routines *pApi |
| 147632 | ){ |
| 147633 | SQLITE_EXTENSION_INIT2(pApi) |
| @@ -163389,11 +163424,11 @@ | |
| 163424 | } |
| 163425 | |
| 163426 | /* |
| 163427 | ** Register a new geometry function for use with the r-tree MATCH operator. |
| 163428 | */ |
| 163429 | SQLITE_API int SQLITE_STDCALL sqlite3_rtree_geometry_callback( |
| 163430 | sqlite3 *db, /* Register SQL function on this connection */ |
| 163431 | const char *zGeom, /* Name of the new SQL function */ |
| 163432 | int (*xGeom)(sqlite3_rtree_geometry*,int,RtreeDValue*,int*), /* Callback */ |
| 163433 | void *pContext /* Extra data associated with the callback */ |
| 163434 | ){ |
| @@ -163413,11 +163448,11 @@ | |
| 163448 | |
| 163449 | /* |
| 163450 | ** Register a new 2nd-generation geometry function for use with the |
| 163451 | ** r-tree MATCH operator. |
| 163452 | */ |
| 163453 | SQLITE_API int SQLITE_STDCALL sqlite3_rtree_query_callback( |
| 163454 | sqlite3 *db, /* Register SQL function on this connection */ |
| 163455 | const char *zQueryFunc, /* Name of new SQL function */ |
| 163456 | int (*xQueryFunc)(sqlite3_rtree_query_info*), /* Callback */ |
| 163457 | void *pContext, /* Extra data passed into the callback */ |
| 163458 | void (*xDestructor)(void*) /* Destructor for the extra data */ |
| @@ -163438,11 +163473,11 @@ | |
| 163473 | |
| 163474 | #if !SQLITE_CORE |
| 163475 | #ifdef _WIN32 |
| 163476 | __declspec(dllexport) |
| 163477 | #endif |
| 163478 | SQLITE_API int SQLITE_STDCALL sqlite3_rtree_init( |
| 163479 | sqlite3 *db, |
| 163480 | char **pzErrMsg, |
| 163481 | const sqlite3_api_routines *pApi |
| 163482 | ){ |
| 163483 | SQLITE_EXTENSION_INIT2(pApi) |
| @@ -163989,11 +164024,11 @@ | |
| 164024 | |
| 164025 | #if !SQLITE_CORE |
| 164026 | #ifdef _WIN32 |
| 164027 | __declspec(dllexport) |
| 164028 | #endif |
| 164029 | SQLITE_API int SQLITE_STDCALL sqlite3_icu_init( |
| 164030 | sqlite3 *db, |
| 164031 | char **pzErrMsg, |
| 164032 | const sqlite3_api_routines *pApi |
| 164033 | ){ |
| 164034 | SQLITE_EXTENSION_INIT2(pApi) |
| @@ -164669,11 +164704,11 @@ | |
| 164704 | ** IMPORTANT NOTE FOR ZIPVFS USERS: The RBU extension works with all of |
| 164705 | ** SQLite's built-in VFSs, including the multiplexor VFS. However it does |
| 164706 | ** not work out of the box with zipvfs. Refer to the comment describing |
| 164707 | ** the zipvfs_create_vfs() API below for details on using RBU with zipvfs. |
| 164708 | */ |
| 164709 | SQLITE_API sqlite3rbu *SQLITE_STDCALL sqlite3rbu_open( |
| 164710 | const char *zTarget, |
| 164711 | const char *zRbu, |
| 164712 | const char *zState |
| 164713 | ); |
| 164714 | |
| @@ -164702,11 +164737,11 @@ | |
| 164737 | ** As with sqlite3rbu_open(), Zipvfs users should rever to the comment |
| 164738 | ** describing the sqlite3rbu_create_vfs() API function below for |
| 164739 | ** a description of the complications associated with using RBU with |
| 164740 | ** zipvfs databases. |
| 164741 | */ |
| 164742 | SQLITE_API sqlite3rbu *SQLITE_STDCALL sqlite3rbu_vacuum( |
| 164743 | const char *zTarget, |
| 164744 | const char *zState |
| 164745 | ); |
| 164746 | |
| 164747 | /* |
| @@ -164738,11 +164773,11 @@ | |
| 164773 | ** when sqlite3rbu_close() is called. |
| 164774 | ** |
| 164775 | ** Database handles returned by this function remain valid until the next |
| 164776 | ** call to any sqlite3rbu_xxx() function other than sqlite3rbu_db(). |
| 164777 | */ |
| 164778 | SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3rbu_db(sqlite3rbu*, int bRbu); |
| 164779 | |
| 164780 | /* |
| 164781 | ** Do some work towards applying the RBU update to the target db. |
| 164782 | ** |
| 164783 | ** Return SQLITE_DONE if the update has been completely applied, or |
| @@ -164752,11 +164787,11 @@ | |
| 164787 | ** |
| 164788 | ** Once a call to sqlite3rbu_step() has returned a value other than |
| 164789 | ** SQLITE_OK, all subsequent calls on the same RBU handle are no-ops |
| 164790 | ** that immediately return the same value. |
| 164791 | */ |
| 164792 | SQLITE_API int SQLITE_STDCALL sqlite3rbu_step(sqlite3rbu *pRbu); |
| 164793 | |
| 164794 | /* |
| 164795 | ** Force RBU to save its state to disk. |
| 164796 | ** |
| 164797 | ** If a power failure or application crash occurs during an update, following |
| @@ -164764,11 +164799,11 @@ | |
| 164799 | ** was last saved. In other words, from the most recent successful call to |
| 164800 | ** sqlite3rbu_close() or this function. |
| 164801 | ** |
| 164802 | ** SQLITE_OK is returned if successful, or an SQLite error code otherwise. |
| 164803 | */ |
| 164804 | SQLITE_API int SQLITE_STDCALL sqlite3rbu_savestate(sqlite3rbu *pRbu); |
| 164805 | |
| 164806 | /* |
| 164807 | ** Close an RBU handle. |
| 164808 | ** |
| 164809 | ** If the RBU update has been completely applied, mark the RBU database |
| @@ -164784,18 +164819,18 @@ | |
| 164819 | ** |
| 164820 | ** Otherwise, if no error occurs, this function returns SQLITE_OK if the |
| 164821 | ** update has been partially applied, or SQLITE_DONE if it has been |
| 164822 | ** completely applied. |
| 164823 | */ |
| 164824 | SQLITE_API int SQLITE_STDCALL sqlite3rbu_close(sqlite3rbu *pRbu, char **pzErrmsg); |
| 164825 | |
| 164826 | /* |
| 164827 | ** Return the total number of key-value operations (inserts, deletes or |
| 164828 | ** updates) that have been performed on the target database since the |
| 164829 | ** current RBU update was started. |
| 164830 | */ |
| 164831 | SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3rbu_progress(sqlite3rbu *pRbu); |
| 164832 | |
| 164833 | /* |
| 164834 | ** Obtain permyriadage (permyriadage is to 10000 as percentage is to 100) |
| 164835 | ** progress indications for the two stages of an RBU update. This API may |
| 164836 | ** be useful for driving GUI progress indicators and similar. |
| @@ -164833,11 +164868,11 @@ | |
| 164868 | ** permyriadage progress of the same stage. If the rbu_count table does |
| 164869 | ** not exist, then (*pnOne) is set to -1 during stage 1. If the rbu_count |
| 164870 | ** table exists but is not correctly populated, the value of the *pnOne |
| 164871 | ** output variable during stage 1 is undefined. |
| 164872 | */ |
| 164873 | SQLITE_API void SQLITE_STDCALL sqlite3rbu_bp_progress(sqlite3rbu *pRbu, int *pnOne, int *pnTwo); |
| 164874 | |
| 164875 | /* |
| 164876 | ** Obtain an indication as to the current stage of an RBU update or vacuum. |
| 164877 | ** This function always returns one of the SQLITE_RBU_STATE_XXX constants |
| 164878 | ** defined in this file. Return values should be interpreted as follows: |
| @@ -164871,11 +164906,11 @@ | |
| 164906 | #define SQLITE_RBU_STATE_MOVE 2 |
| 164907 | #define SQLITE_RBU_STATE_CHECKPOINT 3 |
| 164908 | #define SQLITE_RBU_STATE_DONE 4 |
| 164909 | #define SQLITE_RBU_STATE_ERROR 5 |
| 164910 | |
| 164911 | SQLITE_API int SQLITE_STDCALL sqlite3rbu_state(sqlite3rbu *pRbu); |
| 164912 | |
| 164913 | /* |
| 164914 | ** Create an RBU VFS named zName that accesses the underlying file-system |
| 164915 | ** via existing VFS zParent. Or, if the zParent parameter is passed NULL, |
| 164916 | ** then the new RBU VFS uses the default system VFS to access the file-system. |
| @@ -164915,21 +164950,21 @@ | |
| 164950 | ** The overhead of adding the "rbu" VFS to the system is negligible for |
| 164951 | ** non-RBU users. There is no harm in an application accessing the |
| 164952 | ** file-system via "rbu" all the time, even if it only uses RBU functionality |
| 164953 | ** occasionally. |
| 164954 | */ |
| 164955 | SQLITE_API int SQLITE_STDCALL sqlite3rbu_create_vfs(const char *zName, const char *zParent); |
| 164956 | |
| 164957 | /* |
| 164958 | ** Deregister and destroy an RBU vfs created by an earlier call to |
| 164959 | ** sqlite3rbu_create_vfs(). |
| 164960 | ** |
| 164961 | ** VFS objects are not reference counted. If a VFS object is destroyed |
| 164962 | ** before all database handles that use it have been closed, the results |
| 164963 | ** are undefined. |
| 164964 | */ |
| 164965 | SQLITE_API void SQLITE_STDCALL sqlite3rbu_destroy_vfs(const char *zName); |
| 164966 | |
| 164967 | #if 0 |
| 164968 | } /* end of the 'extern "C"' block */ |
| 164969 | #endif |
| 164970 | |
| @@ -168019,11 +168054,11 @@ | |
| 168054 | } |
| 168055 | |
| 168056 | /* |
| 168057 | ** Step the RBU object. |
| 168058 | */ |
| 168059 | SQLITE_API int SQLITE_STDCALL sqlite3rbu_step(sqlite3rbu *p){ |
| 168060 | if( p ){ |
| 168061 | switch( p->eStage ){ |
| 168062 | case RBU_STAGE_OAL: { |
| 168063 | RbuObjIter *pIter = &p->objiter; |
| 168064 | |
| @@ -168461,11 +168496,11 @@ | |
| 168496 | } |
| 168497 | |
| 168498 | /* |
| 168499 | ** Open and return a new RBU handle. |
| 168500 | */ |
| 168501 | SQLITE_API sqlite3rbu *SQLITE_STDCALL sqlite3rbu_open( |
| 168502 | const char *zTarget, |
| 168503 | const char *zRbu, |
| 168504 | const char *zState |
| 168505 | ){ |
| 168506 | /* TODO: Check that zTarget and zRbu are non-NULL */ |
| @@ -168473,11 +168508,11 @@ | |
| 168508 | } |
| 168509 | |
| 168510 | /* |
| 168511 | ** Open a handle to begin or resume an RBU VACUUM operation. |
| 168512 | */ |
| 168513 | SQLITE_API sqlite3rbu *SQLITE_STDCALL sqlite3rbu_vacuum( |
| 168514 | const char *zTarget, |
| 168515 | const char *zState |
| 168516 | ){ |
| 168517 | /* TODO: Check that both arguments are non-NULL */ |
| 168518 | return openRbuHandle(0, zTarget, zState); |
| @@ -168484,11 +168519,11 @@ | |
| 168519 | } |
| 168520 | |
| 168521 | /* |
| 168522 | ** Return the database handle used by pRbu. |
| 168523 | */ |
| 168524 | SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3rbu_db(sqlite3rbu *pRbu, int bRbu){ |
| 168525 | sqlite3 *db = 0; |
| 168526 | if( pRbu ){ |
| 168527 | db = (bRbu ? pRbu->dbRbu : pRbu->dbMain); |
| 168528 | } |
| 168529 | return db; |
| @@ -168516,11 +168551,11 @@ | |
| 168551 | } |
| 168552 | |
| 168553 | /* |
| 168554 | ** Close the RBU handle. |
| 168555 | */ |
| 168556 | SQLITE_API int SQLITE_STDCALL sqlite3rbu_close(sqlite3rbu *p, char **pzErrmsg){ |
| 168557 | int rc; |
| 168558 | if( p ){ |
| 168559 | |
| 168560 | /* Commit the transaction to the *-oal file. */ |
| 168561 | if( p->rc==SQLITE_OK && p->eStage==RBU_STAGE_OAL ){ |
| @@ -168567,19 +168602,19 @@ | |
| 168602 | /* |
| 168603 | ** Return the total number of key-value operations (inserts, deletes or |
| 168604 | ** updates) that have been performed on the target database since the |
| 168605 | ** current RBU update was started. |
| 168606 | */ |
| 168607 | SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3rbu_progress(sqlite3rbu *pRbu){ |
| 168608 | return pRbu->nProgress; |
| 168609 | } |
| 168610 | |
| 168611 | /* |
| 168612 | ** Return permyriadage progress indications for the two main stages of |
| 168613 | ** an RBU update. |
| 168614 | */ |
| 168615 | SQLITE_API void SQLITE_STDCALL sqlite3rbu_bp_progress(sqlite3rbu *p, int *pnOne, int *pnTwo){ |
| 168616 | const int MAX_PROGRESS = 10000; |
| 168617 | switch( p->eStage ){ |
| 168618 | case RBU_STAGE_OAL: |
| 168619 | if( p->nPhaseOneStep>0 ){ |
| 168620 | *pnOne = (int)(MAX_PROGRESS * (i64)p->nProgress/(i64)p->nPhaseOneStep); |
| @@ -168610,11 +168645,11 @@ | |
| 168645 | } |
| 168646 | |
| 168647 | /* |
| 168648 | ** Return the current state of the RBU vacuum or update operation. |
| 168649 | */ |
| 168650 | SQLITE_API int SQLITE_STDCALL sqlite3rbu_state(sqlite3rbu *p){ |
| 168651 | int aRes[] = { |
| 168652 | 0, SQLITE_RBU_STATE_OAL, SQLITE_RBU_STATE_MOVE, |
| 168653 | 0, SQLITE_RBU_STATE_CHECKPOINT, SQLITE_RBU_STATE_DONE |
| 168654 | }; |
| 168655 | |
| @@ -168638,11 +168673,11 @@ | |
| 168673 | ); |
| 168674 | return aRes[p->eStage]; |
| 168675 | } |
| 168676 | } |
| 168677 | |
| 168678 | SQLITE_API int SQLITE_STDCALL sqlite3rbu_savestate(sqlite3rbu *p){ |
| 168679 | int rc = p->rc; |
| 168680 | if( rc==SQLITE_DONE ) return SQLITE_OK; |
| 168681 | |
| 168682 | assert( p->eStage>=RBU_STAGE_OAL && p->eStage<=RBU_STAGE_DONE ); |
| 168683 | if( p->eStage==RBU_STAGE_OAL ){ |
| @@ -169465,11 +169500,11 @@ | |
| 169500 | |
| 169501 | /* |
| 169502 | ** Deregister and destroy an RBU vfs created by an earlier call to |
| 169503 | ** sqlite3rbu_create_vfs(). |
| 169504 | */ |
| 169505 | SQLITE_API void SQLITE_STDCALL sqlite3rbu_destroy_vfs(const char *zName){ |
| 169506 | sqlite3_vfs *pVfs = sqlite3_vfs_find(zName); |
| 169507 | if( pVfs && pVfs->xOpen==rbuVfsOpen ){ |
| 169508 | sqlite3_mutex_free(((rbu_vfs*)pVfs)->mutex); |
| 169509 | sqlite3_vfs_unregister(pVfs); |
| 169510 | sqlite3_free(pVfs); |
| @@ -169479,11 +169514,11 @@ | |
| 169514 | /* |
| 169515 | ** Create an RBU VFS named zName that accesses the underlying file-system |
| 169516 | ** via existing VFS zParent. The new object is registered as a non-default |
| 169517 | ** VFS with SQLite before returning. |
| 169518 | */ |
| 169519 | SQLITE_API int SQLITE_STDCALL sqlite3rbu_create_vfs(const char *zName, const char *zParent){ |
| 169520 | |
| 169521 | /* Template for VFS */ |
| 169522 | static sqlite3_vfs vfs_template = { |
| 169523 | 1, /* iVersion */ |
| 169524 | 0, /* szOsFile */ |
| @@ -171724,11 +171759,11 @@ | |
| 171759 | } |
| 171760 | |
| 171761 | return rc; |
| 171762 | } |
| 171763 | |
| 171764 | SQLITE_API int SQLITE_STDCALL sqlite3session_diff( |
| 171765 | sqlite3_session *pSession, |
| 171766 | const char *zFrom, |
| 171767 | const char *zTbl, |
| 171768 | char **pzErrMsg |
| 171769 | ){ |
| @@ -171818,11 +171853,11 @@ | |
| 171853 | |
| 171854 | /* |
| 171855 | ** Create a session object. This session object will record changes to |
| 171856 | ** database zDb attached to connection db. |
| 171857 | */ |
| 171858 | SQLITE_API int SQLITE_STDCALL sqlite3session_create( |
| 171859 | sqlite3 *db, /* Database handle */ |
| 171860 | const char *zDb, /* Name of db (e.g. "main") */ |
| 171861 | sqlite3_session **ppSession /* OUT: New session object */ |
| 171862 | ){ |
| 171863 | sqlite3_session *pNew; /* Newly allocated session object */ |
| @@ -171880,11 +171915,11 @@ | |
| 171915 | } |
| 171916 | |
| 171917 | /* |
| 171918 | ** Delete a session object previously allocated using sqlite3session_create(). |
| 171919 | */ |
| 171920 | SQLITE_API void SQLITE_STDCALL sqlite3session_delete(sqlite3_session *pSession){ |
| 171921 | sqlite3 *db = pSession->db; |
| 171922 | sqlite3_session *pHead; |
| 171923 | sqlite3_session **pp; |
| 171924 | |
| 171925 | /* Unlink the session from the linked list of sessions attached to the |
| @@ -171909,11 +171944,11 @@ | |
| 171944 | } |
| 171945 | |
| 171946 | /* |
| 171947 | ** Set a table filter on a Session Object. |
| 171948 | */ |
| 171949 | SQLITE_API void SQLITE_STDCALL sqlite3session_table_filter( |
| 171950 | sqlite3_session *pSession, |
| 171951 | int(*xFilter)(void*, const char*), |
| 171952 | void *pCtx /* First argument passed to xFilter */ |
| 171953 | ){ |
| 171954 | pSession->bAutoAttach = 1; |
| @@ -171927,11 +171962,11 @@ | |
| 171962 | ** |
| 171963 | ** Only tables that have a PRIMARY KEY defined may be attached. It does |
| 171964 | ** not matter if the PRIMARY KEY is an "INTEGER PRIMARY KEY" (rowid alias) |
| 171965 | ** or not. |
| 171966 | */ |
| 171967 | SQLITE_API int SQLITE_STDCALL sqlite3session_attach( |
| 171968 | sqlite3_session *pSession, /* Session object */ |
| 171969 | const char *zName /* Table name */ |
| 171970 | ){ |
| 171971 | int rc = SQLITE_OK; |
| 171972 | sqlite3_mutex_enter(sqlite3_db_mutex(pSession->db)); |
| @@ -172617,11 +172652,11 @@ | |
| 172652 | ** session object passed as the first argument. |
| 172653 | ** |
| 172654 | ** It is the responsibility of the caller to eventually free the buffer |
| 172655 | ** using sqlite3_free(). |
| 172656 | */ |
| 172657 | SQLITE_API int SQLITE_STDCALL sqlite3session_changeset( |
| 172658 | sqlite3_session *pSession, /* Session object */ |
| 172659 | int *pnChangeset, /* OUT: Size of buffer at *ppChangeset */ |
| 172660 | void **ppChangeset /* OUT: Buffer containing changeset */ |
| 172661 | ){ |
| 172662 | return sessionGenerateChangeset(pSession, 0, 0, 0, pnChangeset, ppChangeset); |
| @@ -172628,11 +172663,11 @@ | |
| 172663 | } |
| 172664 | |
| 172665 | /* |
| 172666 | ** Streaming version of sqlite3session_changeset(). |
| 172667 | */ |
| 172668 | SQLITE_API int SQLITE_STDCALL sqlite3session_changeset_strm( |
| 172669 | sqlite3_session *pSession, |
| 172670 | int (*xOutput)(void *pOut, const void *pData, int nData), |
| 172671 | void *pOut |
| 172672 | ){ |
| 172673 | return sessionGenerateChangeset(pSession, 0, xOutput, pOut, 0, 0); |
| @@ -172639,11 +172674,11 @@ | |
| 172674 | } |
| 172675 | |
| 172676 | /* |
| 172677 | ** Streaming version of sqlite3session_patchset(). |
| 172678 | */ |
| 172679 | SQLITE_API int SQLITE_STDCALL sqlite3session_patchset_strm( |
| 172680 | sqlite3_session *pSession, |
| 172681 | int (*xOutput)(void *pOut, const void *pData, int nData), |
| 172682 | void *pOut |
| 172683 | ){ |
| 172684 | return sessionGenerateChangeset(pSession, 1, xOutput, pOut, 0, 0); |
| @@ -172654,11 +172689,11 @@ | |
| 172689 | ** session object passed as the first argument. |
| 172690 | ** |
| 172691 | ** It is the responsibility of the caller to eventually free the buffer |
| 172692 | ** using sqlite3_free(). |
| 172693 | */ |
| 172694 | SQLITE_API int SQLITE_STDCALL sqlite3session_patchset( |
| 172695 | sqlite3_session *pSession, /* Session object */ |
| 172696 | int *pnPatchset, /* OUT: Size of buffer at *ppChangeset */ |
| 172697 | void **ppPatchset /* OUT: Buffer containing changeset */ |
| 172698 | ){ |
| 172699 | return sessionGenerateChangeset(pSession, 1, 0, 0, pnPatchset, ppPatchset); |
| @@ -172665,11 +172700,11 @@ | |
| 172700 | } |
| 172701 | |
| 172702 | /* |
| 172703 | ** Enable or disable the session object passed as the first argument. |
| 172704 | */ |
| 172705 | SQLITE_API int SQLITE_STDCALL sqlite3session_enable(sqlite3_session *pSession, int bEnable){ |
| 172706 | int ret; |
| 172707 | sqlite3_mutex_enter(sqlite3_db_mutex(pSession->db)); |
| 172708 | if( bEnable>=0 ){ |
| 172709 | pSession->bEnable = bEnable; |
| 172710 | } |
| @@ -172679,11 +172714,11 @@ | |
| 172714 | } |
| 172715 | |
| 172716 | /* |
| 172717 | ** Enable or disable the session object passed as the first argument. |
| 172718 | */ |
| 172719 | SQLITE_API int SQLITE_STDCALL sqlite3session_indirect(sqlite3_session *pSession, int bIndirect){ |
| 172720 | int ret; |
| 172721 | sqlite3_mutex_enter(sqlite3_db_mutex(pSession->db)); |
| 172722 | if( bIndirect>=0 ){ |
| 172723 | pSession->bIndirect = bIndirect; |
| 172724 | } |
| @@ -172694,11 +172729,11 @@ | |
| 172729 | |
| 172730 | /* |
| 172731 | ** Return true if there have been no changes to monitored tables recorded |
| 172732 | ** by the session object passed as the only argument. |
| 172733 | */ |
| 172734 | SQLITE_API int SQLITE_STDCALL sqlite3session_isempty(sqlite3_session *pSession){ |
| 172735 | int ret = 0; |
| 172736 | SessionTable *pTab; |
| 172737 | |
| 172738 | sqlite3_mutex_enter(sqlite3_db_mutex(pSession->db)); |
| 172739 | for(pTab=pSession->pTable; pTab && ret==0; pTab=pTab->pNext){ |
| @@ -172744,11 +172779,11 @@ | |
| 172779 | } |
| 172780 | |
| 172781 | /* |
| 172782 | ** Create an iterator used to iterate through the contents of a changeset. |
| 172783 | */ |
| 172784 | SQLITE_API int SQLITE_STDCALL sqlite3changeset_start( |
| 172785 | sqlite3_changeset_iter **pp, /* OUT: Changeset iterator handle */ |
| 172786 | int nChangeset, /* Size of buffer pChangeset in bytes */ |
| 172787 | void *pChangeset /* Pointer to buffer containing changeset */ |
| 172788 | ){ |
| 172789 | return sessionChangesetStart(pp, 0, 0, nChangeset, pChangeset); |
| @@ -172755,11 +172790,11 @@ | |
| 172790 | } |
| 172791 | |
| 172792 | /* |
| 172793 | ** Streaming version of sqlite3changeset_start(). |
| 172794 | */ |
| 172795 | SQLITE_API int SQLITE_STDCALL sqlite3changeset_start_strm( |
| 172796 | sqlite3_changeset_iter **pp, /* OUT: Changeset iterator handle */ |
| 172797 | int (*xInput)(void *pIn, void *pData, int *pnData), |
| 172798 | void *pIn |
| 172799 | ){ |
| 172800 | return sessionChangesetStart(pp, xInput, pIn, 0, 0); |
| @@ -173176,20 +173211,20 @@ | |
| 173211 | ** or SQLITE_CORRUPT. |
| 173212 | ** |
| 173213 | ** This function may not be called on iterators passed to a conflict handler |
| 173214 | ** callback by changeset_apply(). |
| 173215 | */ |
| 173216 | SQLITE_API int SQLITE_STDCALL sqlite3changeset_next(sqlite3_changeset_iter *p){ |
| 173217 | return sessionChangesetNext(p, 0, 0); |
| 173218 | } |
| 173219 | |
| 173220 | /* |
| 173221 | ** The following function extracts information on the current change |
| 173222 | ** from a changeset iterator. It may only be called after changeset_next() |
| 173223 | ** has returned SQLITE_ROW. |
| 173224 | */ |
| 173225 | SQLITE_API int SQLITE_STDCALL sqlite3changeset_op( |
| 173226 | sqlite3_changeset_iter *pIter, /* Iterator handle */ |
| 173227 | const char **pzTab, /* OUT: Pointer to table name */ |
| 173228 | int *pnCol, /* OUT: Number of columns in table */ |
| 173229 | int *pOp, /* OUT: SQLITE_INSERT, DELETE or UPDATE */ |
| 173230 | int *pbIndirect /* OUT: True if change is indirect */ |
| @@ -173205,11 +173240,11 @@ | |
| 173240 | ** Return information regarding the PRIMARY KEY and number of columns in |
| 173241 | ** the database table affected by the change that pIter currently points |
| 173242 | ** to. This function may only be called after changeset_next() returns |
| 173243 | ** SQLITE_ROW. |
| 173244 | */ |
| 173245 | SQLITE_API int SQLITE_STDCALL sqlite3changeset_pk( |
| 173246 | sqlite3_changeset_iter *pIter, /* Iterator object */ |
| 173247 | unsigned char **pabPK, /* OUT: Array of boolean - true for PK cols */ |
| 173248 | int *pnCol /* OUT: Number of entries in output array */ |
| 173249 | ){ |
| 173250 | *pabPK = pIter->abPK; |
| @@ -173228,11 +173263,11 @@ | |
| 173263 | ** was not modified and is not a PK column), set *ppValue to NULL. |
| 173264 | ** |
| 173265 | ** If value iVal is out-of-range, SQLITE_RANGE is returned and *ppValue is |
| 173266 | ** not modified. Otherwise, SQLITE_OK. |
| 173267 | */ |
| 173268 | SQLITE_API int SQLITE_STDCALL sqlite3changeset_old( |
| 173269 | sqlite3_changeset_iter *pIter, /* Changeset iterator */ |
| 173270 | int iVal, /* Index of old.* value to retrieve */ |
| 173271 | sqlite3_value **ppValue /* OUT: Old value (or NULL pointer) */ |
| 173272 | ){ |
| 173273 | if( pIter->op!=SQLITE_UPDATE && pIter->op!=SQLITE_DELETE ){ |
| @@ -173256,11 +173291,11 @@ | |
| 173291 | ** was not modified), set *ppValue to NULL. |
| 173292 | ** |
| 173293 | ** If value iVal is out-of-range, SQLITE_RANGE is returned and *ppValue is |
| 173294 | ** not modified. Otherwise, SQLITE_OK. |
| 173295 | */ |
| 173296 | SQLITE_API int SQLITE_STDCALL sqlite3changeset_new( |
| 173297 | sqlite3_changeset_iter *pIter, /* Changeset iterator */ |
| 173298 | int iVal, /* Index of new.* value to retrieve */ |
| 173299 | sqlite3_value **ppValue /* OUT: New value (or NULL pointer) */ |
| 173300 | ){ |
| 173301 | if( pIter->op!=SQLITE_UPDATE && pIter->op!=SQLITE_INSERT ){ |
| @@ -173290,11 +173325,11 @@ | |
| 173325 | ** containing the iVal'th value of the conflicting record. |
| 173326 | ** |
| 173327 | ** If value iVal is out-of-range or some other error occurs, an SQLite error |
| 173328 | ** code is returned. Otherwise, SQLITE_OK. |
| 173329 | */ |
| 173330 | SQLITE_API int SQLITE_STDCALL sqlite3changeset_conflict( |
| 173331 | sqlite3_changeset_iter *pIter, /* Changeset iterator */ |
| 173332 | int iVal, /* Index of conflict record value to fetch */ |
| 173333 | sqlite3_value **ppValue /* OUT: Value from conflicting row */ |
| 173334 | ){ |
| 173335 | if( !pIter->pConflict ){ |
| @@ -173313,11 +173348,11 @@ | |
| 173348 | ** it sets the output variable to the total number of known foreign key |
| 173349 | ** violations in the destination database and returns SQLITE_OK. |
| 173350 | ** |
| 173351 | ** In all other cases this function returns SQLITE_MISUSE. |
| 173352 | */ |
| 173353 | SQLITE_API int SQLITE_STDCALL sqlite3changeset_fk_conflicts( |
| 173354 | sqlite3_changeset_iter *pIter, /* Changeset iterator */ |
| 173355 | int *pnOut /* OUT: Number of FK violations */ |
| 173356 | ){ |
| 173357 | if( pIter->pConflict || pIter->apValue ){ |
| 173358 | return SQLITE_MISUSE; |
| @@ -173331,11 +173366,11 @@ | |
| 173366 | ** Finalize an iterator allocated with sqlite3changeset_start(). |
| 173367 | ** |
| 173368 | ** This function may not be called on iterators passed to a conflict handler |
| 173369 | ** callback by changeset_apply(). |
| 173370 | */ |
| 173371 | SQLITE_API int SQLITE_STDCALL sqlite3changeset_finalize(sqlite3_changeset_iter *p){ |
| 173372 | int rc = SQLITE_OK; |
| 173373 | if( p ){ |
| 173374 | int i; /* Used to iterate through p->apValue[] */ |
| 173375 | rc = p->rc; |
| 173376 | if( p->apValue ){ |
| @@ -173505,11 +173540,11 @@ | |
| 173540 | |
| 173541 | |
| 173542 | /* |
| 173543 | ** Invert a changeset object. |
| 173544 | */ |
| 173545 | SQLITE_API int SQLITE_STDCALL sqlite3changeset_invert( |
| 173546 | int nChangeset, /* Number of bytes in input */ |
| 173547 | const void *pChangeset, /* Input changeset */ |
| 173548 | int *pnInverted, /* OUT: Number of bytes in output changeset */ |
| 173549 | void **ppInverted /* OUT: Inverse of pChangeset */ |
| 173550 | ){ |
| @@ -173524,11 +173559,11 @@ | |
| 173559 | } |
| 173560 | |
| 173561 | /* |
| 173562 | ** Streaming version of sqlite3changeset_invert(). |
| 173563 | */ |
| 173564 | SQLITE_API int SQLITE_STDCALL sqlite3changeset_invert_strm( |
| 173565 | int (*xInput)(void *pIn, void *pData, int *pnData), |
| 173566 | void *pIn, |
| 173567 | int (*xOutput)(void *pOut, const void *pData, int nData), |
| 173568 | void *pOut |
| 173569 | ){ |
| @@ -174404,11 +174439,11 @@ | |
| 174439 | /* |
| 174440 | ** Apply the changeset passed via pChangeset/nChangeset to the main database |
| 174441 | ** attached to handle "db". Invoke the supplied conflict handler callback |
| 174442 | ** to resolve any conflicts encountered while applying the change. |
| 174443 | */ |
| 174444 | SQLITE_API int SQLITE_STDCALL sqlite3changeset_apply( |
| 174445 | sqlite3 *db, /* Apply change to "main" db of this handle */ |
| 174446 | int nChangeset, /* Size of changeset in bytes */ |
| 174447 | void *pChangeset, /* Changeset blob */ |
| 174448 | int(*xFilter)( |
| 174449 | void *pCtx, /* Copy of sixth arg to _apply() */ |
| @@ -174432,11 +174467,11 @@ | |
| 174467 | /* |
| 174468 | ** Apply the changeset passed via xInput/pIn to the main database |
| 174469 | ** attached to handle "db". Invoke the supplied conflict handler callback |
| 174470 | ** to resolve any conflicts encountered while applying the change. |
| 174471 | */ |
| 174472 | SQLITE_API int SQLITE_STDCALL sqlite3changeset_apply_strm( |
| 174473 | sqlite3 *db, /* Apply change to "main" db of this handle */ |
| 174474 | int (*xInput)(void *pIn, void *pData, int *pnData), /* Input function */ |
| 174475 | void *pIn, /* First arg for xInput */ |
| 174476 | int(*xFilter)( |
| 174477 | void *pCtx, /* Copy of sixth arg to _apply() */ |
| @@ -174767,11 +174802,11 @@ | |
| 174802 | } |
| 174803 | |
| 174804 | /* |
| 174805 | ** Allocate a new, empty, sqlite3_changegroup. |
| 174806 | */ |
| 174807 | SQLITE_API int SQLITE_STDCALL sqlite3changegroup_new(sqlite3_changegroup **pp){ |
| 174808 | int rc = SQLITE_OK; /* Return code */ |
| 174809 | sqlite3_changegroup *p; /* New object */ |
| 174810 | p = (sqlite3_changegroup*)sqlite3_malloc(sizeof(sqlite3_changegroup)); |
| 174811 | if( p==0 ){ |
| 174812 | rc = SQLITE_NOMEM; |
| @@ -174784,11 +174819,11 @@ | |
| 174819 | |
| 174820 | /* |
| 174821 | ** Add the changeset currently stored in buffer pData, size nData bytes, |
| 174822 | ** to changeset-group p. |
| 174823 | */ |
| 174824 | SQLITE_API int SQLITE_STDCALL sqlite3changegroup_add(sqlite3_changegroup *pGrp, int nData, void *pData){ |
| 174825 | sqlite3_changeset_iter *pIter; /* Iterator opened on pData/nData */ |
| 174826 | int rc; /* Return code */ |
| 174827 | |
| 174828 | rc = sqlite3changeset_start(&pIter, nData, pData); |
| 174829 | if( rc==SQLITE_OK ){ |
| @@ -174800,11 +174835,11 @@ | |
| 174835 | |
| 174836 | /* |
| 174837 | ** Obtain a buffer containing a changeset representing the concatenation |
| 174838 | ** of all changesets added to the group so far. |
| 174839 | */ |
| 174840 | SQLITE_API int SQLITE_STDCALL sqlite3changegroup_output( |
| 174841 | sqlite3_changegroup *pGrp, |
| 174842 | int *pnData, |
| 174843 | void **ppData |
| 174844 | ){ |
| 174845 | return sessionChangegroupOutput(pGrp, 0, 0, pnData, ppData); |
| @@ -174811,11 +174846,11 @@ | |
| 174846 | } |
| 174847 | |
| 174848 | /* |
| 174849 | ** Streaming versions of changegroup_add(). |
| 174850 | */ |
| 174851 | SQLITE_API int SQLITE_STDCALL sqlite3changegroup_add_strm( |
| 174852 | sqlite3_changegroup *pGrp, |
| 174853 | int (*xInput)(void *pIn, void *pData, int *pnData), |
| 174854 | void *pIn |
| 174855 | ){ |
| 174856 | sqlite3_changeset_iter *pIter; /* Iterator opened on pData/nData */ |
| @@ -174830,11 +174865,11 @@ | |
| 174865 | } |
| 174866 | |
| 174867 | /* |
| 174868 | ** Streaming versions of changegroup_output(). |
| 174869 | */ |
| 174870 | SQLITE_API int SQLITE_STDCALL sqlite3changegroup_output_strm( |
| 174871 | sqlite3_changegroup *pGrp, |
| 174872 | int (*xOutput)(void *pOut, const void *pData, int nData), |
| 174873 | void *pOut |
| 174874 | ){ |
| 174875 | return sessionChangegroupOutput(pGrp, xOutput, pOut, 0, 0); |
| @@ -174841,21 +174876,21 @@ | |
| 174876 | } |
| 174877 | |
| 174878 | /* |
| 174879 | ** Delete a changegroup object. |
| 174880 | */ |
| 174881 | SQLITE_API void SQLITE_STDCALL sqlite3changegroup_delete(sqlite3_changegroup *pGrp){ |
| 174882 | if( pGrp ){ |
| 174883 | sessionDeleteTable(pGrp->pList); |
| 174884 | sqlite3_free(pGrp); |
| 174885 | } |
| 174886 | } |
| 174887 | |
| 174888 | /* |
| 174889 | ** Combine two changesets together. |
| 174890 | */ |
| 174891 | SQLITE_API int SQLITE_STDCALL sqlite3changeset_concat( |
| 174892 | int nLeft, /* Number of bytes in lhs input */ |
| 174893 | void *pLeft, /* Lhs input changeset */ |
| 174894 | int nRight /* Number of bytes in rhs input */, |
| 174895 | void *pRight, /* Rhs input changeset */ |
| 174896 | int *pnOut, /* OUT: Number of bytes in output changeset */ |
| @@ -174880,11 +174915,11 @@ | |
| 174915 | } |
| 174916 | |
| 174917 | /* |
| 174918 | ** Streaming version of sqlite3changeset_concat(). |
| 174919 | */ |
| 174920 | SQLITE_API int SQLITE_STDCALL sqlite3changeset_concat_strm( |
| 174921 | int (*xInputA)(void *pIn, void *pData, int *pnData), |
| 174922 | void *pInA, |
| 174923 | int (*xInputB)(void *pIn, void *pData, int *pnData), |
| 174924 | void *pInB, |
| 174925 | int (*xOutput)(void *pOut, const void *pData, int nData), |
| @@ -177112,11 +177147,11 @@ | |
| 177147 | |
| 177148 | #ifndef SQLITE_CORE |
| 177149 | #ifdef _WIN32 |
| 177150 | __declspec(dllexport) |
| 177151 | #endif |
| 177152 | SQLITE_API int SQLITE_STDCALL sqlite3_json_init( |
| 177153 | sqlite3 *db, |
| 177154 | char **pzErrMsg, |
| 177155 | const sqlite3_api_routines *pApi |
| 177156 | ){ |
| 177157 | SQLITE_EXTENSION_INIT2(pApi); |
| @@ -193945,11 +193980,11 @@ | |
| 193980 | int nArg, /* Number of args */ |
| 193981 | sqlite3_value **apUnused /* Function arguments */ |
| 193982 | ){ |
| 193983 | assert( nArg==0 ); |
| 193984 | UNUSED_PARAM2(nArg, apUnused); |
| 193985 | sqlite3_result_text(pCtx, "fts5: 2016-08-04 13:23:28 9adda385267d1a0ecff259b42a284913668441a2", -1, SQLITE_TRANSIENT); |
| 193986 | } |
| 193987 | |
| 193988 | static int fts5Init(sqlite3 *db){ |
| 193989 | static const sqlite3_module fts5Mod = { |
| 193990 | /* iVersion */ 2, |
| @@ -194033,11 +194068,11 @@ | |
| 194068 | */ |
| 194069 | #ifndef SQLITE_CORE |
| 194070 | #ifdef _WIN32 |
| 194071 | __declspec(dllexport) |
| 194072 | #endif |
| 194073 | SQLITE_API int SQLITE_STDCALL sqlite3_fts_init( |
| 194074 | sqlite3 *db, |
| 194075 | char **pzErrMsg, |
| 194076 | const sqlite3_api_routines *pApi |
| 194077 | ){ |
| 194078 | SQLITE_EXTENSION_INIT2(pApi); |
| @@ -194046,11 +194081,11 @@ | |
| 194081 | } |
| 194082 | |
| 194083 | #ifdef _WIN32 |
| 194084 | __declspec(dllexport) |
| 194085 | #endif |
| 194086 | SQLITE_API int SQLITE_STDCALL sqlite3_fts5_init( |
| 194087 | sqlite3 *db, |
| 194088 | char **pzErrMsg, |
| 194089 | const sqlite3_api_routines *pApi |
| 194090 | ){ |
| 194091 | SQLITE_EXTENSION_INIT2(pApi); |
| 194092 |
+458
-457
| --- src/sqlite3.h | ||
| +++ src/sqlite3.h | ||
| @@ -120,11 +120,11 @@ | ||
| 120 | 120 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 121 | 121 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 122 | 122 | */ |
| 123 | 123 | #define SQLITE_VERSION "3.14.0" |
| 124 | 124 | #define SQLITE_VERSION_NUMBER 3014000 |
| 125 | -#define SQLITE_SOURCE_ID "2016-08-02 08:45:26 7c38a79cdd42aaa45715aea330d10ca859098837" | |
| 125 | +#define SQLITE_SOURCE_ID "2016-08-04 13:23:28 9adda385267d1a0ecff259b42a284913668441a2" | |
| 126 | 126 | |
| 127 | 127 | /* |
| 128 | 128 | ** CAPI3REF: Run-Time Library Version Numbers |
| 129 | 129 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 130 | 130 | ** |
| @@ -153,13 +153,13 @@ | ||
| 153 | 153 | ** [SQLITE_SOURCE_ID] C preprocessor macro. |
| 154 | 154 | ** |
| 155 | 155 | ** See also: [sqlite_version()] and [sqlite_source_id()]. |
| 156 | 156 | */ |
| 157 | 157 | SQLITE_API SQLITE_EXTERN const char sqlite3_version[]; |
| 158 | -SQLITE_API const char *SQLITE_APICALL sqlite3_libversion(void); | |
| 159 | -SQLITE_API const char *SQLITE_APICALL sqlite3_sourceid(void); | |
| 160 | -SQLITE_API int SQLITE_APICALL sqlite3_libversion_number(void); | |
| 158 | +SQLITE_API const char *SQLITE_STDCALL sqlite3_libversion(void); | |
| 159 | +SQLITE_API const char *SQLITE_STDCALL sqlite3_sourceid(void); | |
| 160 | +SQLITE_API int SQLITE_STDCALL sqlite3_libversion_number(void); | |
| 161 | 161 | |
| 162 | 162 | /* |
| 163 | 163 | ** CAPI3REF: Run-Time Library Compilation Options Diagnostics |
| 164 | 164 | ** |
| 165 | 165 | ** ^The sqlite3_compileoption_used() function returns 0 or 1 |
| @@ -180,12 +180,12 @@ | ||
| 180 | 180 | ** |
| 181 | 181 | ** See also: SQL functions [sqlite_compileoption_used()] and |
| 182 | 182 | ** [sqlite_compileoption_get()] and the [compile_options pragma]. |
| 183 | 183 | */ |
| 184 | 184 | #ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS |
| 185 | -SQLITE_API int SQLITE_APICALL sqlite3_compileoption_used(const char *zOptName); | |
| 186 | -SQLITE_API const char *SQLITE_APICALL sqlite3_compileoption_get(int N); | |
| 185 | +SQLITE_API int SQLITE_STDCALL sqlite3_compileoption_used(const char *zOptName); | |
| 186 | +SQLITE_API const char *SQLITE_STDCALL sqlite3_compileoption_get(int N); | |
| 187 | 187 | #endif |
| 188 | 188 | |
| 189 | 189 | /* |
| 190 | 190 | ** CAPI3REF: Test To See If The Library Is Threadsafe |
| 191 | 191 | ** |
| @@ -220,11 +220,11 @@ | ||
| 220 | 220 | ** sqlite3_config(). In other words, the return value from sqlite3_threadsafe() |
| 221 | 221 | ** is unchanged by calls to sqlite3_config().)^ |
| 222 | 222 | ** |
| 223 | 223 | ** See the [threading mode] documentation for additional information. |
| 224 | 224 | */ |
| 225 | -SQLITE_API int SQLITE_APICALL sqlite3_threadsafe(void); | |
| 225 | +SQLITE_API int SQLITE_STDCALL sqlite3_threadsafe(void); | |
| 226 | 226 | |
| 227 | 227 | /* |
| 228 | 228 | ** CAPI3REF: Database Connection Handle |
| 229 | 229 | ** KEYWORDS: {database connection} {database connections} |
| 230 | 230 | ** |
| @@ -317,19 +317,19 @@ | ||
| 317 | 317 | ** from [sqlite3_open()], [sqlite3_open16()], or |
| 318 | 318 | ** [sqlite3_open_v2()], and not previously closed. |
| 319 | 319 | ** ^Calling sqlite3_close() or sqlite3_close_v2() with a NULL pointer |
| 320 | 320 | ** argument is a harmless no-op. |
| 321 | 321 | */ |
| 322 | -SQLITE_API int SQLITE_APICALL sqlite3_close(sqlite3*); | |
| 323 | -SQLITE_API int SQLITE_APICALL sqlite3_close_v2(sqlite3*); | |
| 322 | +SQLITE_API int SQLITE_STDCALL sqlite3_close(sqlite3*); | |
| 323 | +SQLITE_API int SQLITE_STDCALL sqlite3_close_v2(sqlite3*); | |
| 324 | 324 | |
| 325 | 325 | /* |
| 326 | 326 | ** The type for a callback function. |
| 327 | 327 | ** This is legacy and deprecated. It is included for historical |
| 328 | 328 | ** compatibility and is not documented. |
| 329 | 329 | */ |
| 330 | -typedef int (SQLITE_CALLBACK *sqlite3_callback)(void*,int,char**, char**); | |
| 330 | +typedef int (*sqlite3_callback)(void*,int,char**, char**); | |
| 331 | 331 | |
| 332 | 332 | /* |
| 333 | 333 | ** CAPI3REF: One-Step Query Execution Interface |
| 334 | 334 | ** METHOD: sqlite3 |
| 335 | 335 | ** |
| @@ -389,14 +389,14 @@ | ||
| 389 | 389 | ** the 1st parameter to sqlite3_exec() while sqlite3_exec() is running. |
| 390 | 390 | ** <li> The application must not modify the SQL statement text passed into |
| 391 | 391 | ** the 2nd parameter of sqlite3_exec() while sqlite3_exec() is running. |
| 392 | 392 | ** </ul> |
| 393 | 393 | */ |
| 394 | -SQLITE_API int SQLITE_APICALL sqlite3_exec( | |
| 394 | +SQLITE_API int SQLITE_STDCALL sqlite3_exec( | |
| 395 | 395 | sqlite3*, /* An open database */ |
| 396 | 396 | const char *sql, /* SQL to be evaluated */ |
| 397 | - int (SQLITE_CALLBACK *callback)(void*,int,char**,char**), /* Callback function */ | |
| 397 | + int (*callback)(void*,int,char**,char**), /* Callback function */ | |
| 398 | 398 | void *, /* 1st argument to callback */ |
| 399 | 399 | char **errmsg /* Error msg written here */ |
| 400 | 400 | ); |
| 401 | 401 | |
| 402 | 402 | /* |
| @@ -740,30 +740,30 @@ | ||
| 740 | 740 | ** database corruption. |
| 741 | 741 | */ |
| 742 | 742 | typedef struct sqlite3_io_methods sqlite3_io_methods; |
| 743 | 743 | struct sqlite3_io_methods { |
| 744 | 744 | int iVersion; |
| 745 | - int (SQLITE_CALLBACK *xClose)(sqlite3_file*); | |
| 746 | - int (SQLITE_CALLBACK *xRead)(sqlite3_file*, void*, int iAmt, sqlite3_int64 iOfst); | |
| 747 | - int (SQLITE_CALLBACK *xWrite)(sqlite3_file*, const void*, int iAmt, sqlite3_int64 iOfst); | |
| 748 | - int (SQLITE_CALLBACK *xTruncate)(sqlite3_file*, sqlite3_int64 size); | |
| 749 | - int (SQLITE_CALLBACK *xSync)(sqlite3_file*, int flags); | |
| 750 | - int (SQLITE_CALLBACK *xFileSize)(sqlite3_file*, sqlite3_int64 *pSize); | |
| 751 | - int (SQLITE_CALLBACK *xLock)(sqlite3_file*, int); | |
| 752 | - int (SQLITE_CALLBACK *xUnlock)(sqlite3_file*, int); | |
| 753 | - int (SQLITE_CALLBACK *xCheckReservedLock)(sqlite3_file*, int *pResOut); | |
| 754 | - int (SQLITE_CALLBACK *xFileControl)(sqlite3_file*, int op, void *pArg); | |
| 755 | - int (SQLITE_CALLBACK *xSectorSize)(sqlite3_file*); | |
| 756 | - int (SQLITE_CALLBACK *xDeviceCharacteristics)(sqlite3_file*); | |
| 745 | + int (*xClose)(sqlite3_file*); | |
| 746 | + int (*xRead)(sqlite3_file*, void*, int iAmt, sqlite3_int64 iOfst); | |
| 747 | + int (*xWrite)(sqlite3_file*, const void*, int iAmt, sqlite3_int64 iOfst); | |
| 748 | + int (*xTruncate)(sqlite3_file*, sqlite3_int64 size); | |
| 749 | + int (*xSync)(sqlite3_file*, int flags); | |
| 750 | + int (*xFileSize)(sqlite3_file*, sqlite3_int64 *pSize); | |
| 751 | + int (*xLock)(sqlite3_file*, int); | |
| 752 | + int (*xUnlock)(sqlite3_file*, int); | |
| 753 | + int (*xCheckReservedLock)(sqlite3_file*, int *pResOut); | |
| 754 | + int (*xFileControl)(sqlite3_file*, int op, void *pArg); | |
| 755 | + int (*xSectorSize)(sqlite3_file*); | |
| 756 | + int (*xDeviceCharacteristics)(sqlite3_file*); | |
| 757 | 757 | /* Methods above are valid for version 1 */ |
| 758 | - int (SQLITE_CALLBACK *xShmMap)(sqlite3_file*, int iPg, int pgsz, int, void volatile**); | |
| 759 | - int (SQLITE_CALLBACK *xShmLock)(sqlite3_file*, int offset, int n, int flags); | |
| 760 | - void (SQLITE_CALLBACK *xShmBarrier)(sqlite3_file*); | |
| 761 | - int (SQLITE_CALLBACK *xShmUnmap)(sqlite3_file*, int deleteFlag); | |
| 758 | + int (*xShmMap)(sqlite3_file*, int iPg, int pgsz, int, void volatile**); | |
| 759 | + int (*xShmLock)(sqlite3_file*, int offset, int n, int flags); | |
| 760 | + void (*xShmBarrier)(sqlite3_file*); | |
| 761 | + int (*xShmUnmap)(sqlite3_file*, int deleteFlag); | |
| 762 | 762 | /* Methods above are valid for version 2 */ |
| 763 | - int (SQLITE_CALLBACK *xFetch)(sqlite3_file*, sqlite3_int64 iOfst, int iAmt, void **pp); | |
| 764 | - int (SQLITE_CALLBACK *xUnfetch)(sqlite3_file*, sqlite3_int64 iOfst, void *p); | |
| 763 | + int (*xFetch)(sqlite3_file*, sqlite3_int64 iOfst, int iAmt, void **pp); | |
| 764 | + int (*xUnfetch)(sqlite3_file*, sqlite3_int64 iOfst, void *p); | |
| 765 | 765 | /* Methods above are valid for version 3 */ |
| 766 | 766 | /* Additional methods may be added in future releases */ |
| 767 | 767 | }; |
| 768 | 768 | |
| 769 | 769 | /* |
| @@ -935,11 +935,11 @@ | ||
| 935 | 935 | ** ^The [SQLITE_FCNTL_BUSYHANDLER] |
| 936 | 936 | ** file-control may be invoked by SQLite on the database file handle |
| 937 | 937 | ** shortly after it is opened in order to provide a custom VFS with access |
| 938 | 938 | ** to the connections busy-handler callback. The argument is of type (void **) |
| 939 | 939 | ** - an array of two (void *) values. The first (void *) actually points |
| 940 | -** to a function of type (int (SQLITE_CALLBACK *)(void *)). In order to invoke the connections | |
| 940 | +** to a function of type (int (*)(void *)). In order to invoke the connections | |
| 941 | 941 | ** busy-handler, this function should be invoked with the second (void *) in |
| 942 | 942 | ** the array as the only argument. If it returns non-zero, then the operation |
| 943 | 943 | ** should be retried. If it returns zero, the custom VFS should abandon the |
| 944 | 944 | ** current operation. |
| 945 | 945 | ** |
| @@ -1211,43 +1211,43 @@ | ||
| 1211 | 1211 | ** or all of these interfaces to be NULL or for their behavior to change |
| 1212 | 1212 | ** from one release to the next. Applications must not attempt to access |
| 1213 | 1213 | ** any of these methods if the iVersion of the VFS is less than 3. |
| 1214 | 1214 | */ |
| 1215 | 1215 | typedef struct sqlite3_vfs sqlite3_vfs; |
| 1216 | -typedef void (SQLITE_SYSAPI *sqlite3_syscall_ptr)(void); | |
| 1216 | +typedef void (*sqlite3_syscall_ptr)(void); | |
| 1217 | 1217 | struct sqlite3_vfs { |
| 1218 | 1218 | int iVersion; /* Structure version number (currently 3) */ |
| 1219 | 1219 | int szOsFile; /* Size of subclassed sqlite3_file */ |
| 1220 | 1220 | int mxPathname; /* Maximum file pathname length */ |
| 1221 | 1221 | sqlite3_vfs *pNext; /* Next registered VFS */ |
| 1222 | 1222 | const char *zName; /* Name of this virtual file system */ |
| 1223 | 1223 | void *pAppData; /* Pointer to application-specific data */ |
| 1224 | - int (SQLITE_CALLBACK *xOpen)(sqlite3_vfs*, const char *zName, sqlite3_file*, | |
| 1224 | + int (*xOpen)(sqlite3_vfs*, const char *zName, sqlite3_file*, | |
| 1225 | 1225 | int flags, int *pOutFlags); |
| 1226 | - int (SQLITE_CALLBACK *xDelete)(sqlite3_vfs*, const char *zName, int syncDir); | |
| 1227 | - int (SQLITE_CALLBACK *xAccess)(sqlite3_vfs*, const char *zName, int flags, int *pResOut); | |
| 1228 | - int (SQLITE_CALLBACK *xFullPathname)(sqlite3_vfs*, const char *zName, int nOut, char *zOut); | |
| 1229 | - void *(SQLITE_CALLBACK *xDlOpen)(sqlite3_vfs*, const char *zFilename); | |
| 1230 | - void (SQLITE_CALLBACK *xDlError)(sqlite3_vfs*, int nByte, char *zErrMsg); | |
| 1231 | - void (SQLITE_CALLBACK *(*xDlSym)(sqlite3_vfs*,void*, const char *zSymbol))(void); | |
| 1232 | - void (SQLITE_CALLBACK *xDlClose)(sqlite3_vfs*, void*); | |
| 1233 | - int (SQLITE_CALLBACK *xRandomness)(sqlite3_vfs*, int nByte, char *zOut); | |
| 1234 | - int (SQLITE_CALLBACK *xSleep)(sqlite3_vfs*, int microseconds); | |
| 1235 | - int (SQLITE_CALLBACK *xCurrentTime)(sqlite3_vfs*, double*); | |
| 1236 | - int (SQLITE_CALLBACK *xGetLastError)(sqlite3_vfs*, int, char *); | |
| 1226 | + int (*xDelete)(sqlite3_vfs*, const char *zName, int syncDir); | |
| 1227 | + int (*xAccess)(sqlite3_vfs*, const char *zName, int flags, int *pResOut); | |
| 1228 | + int (*xFullPathname)(sqlite3_vfs*, const char *zName, int nOut, char *zOut); | |
| 1229 | + void *(*xDlOpen)(sqlite3_vfs*, const char *zFilename); | |
| 1230 | + void (*xDlError)(sqlite3_vfs*, int nByte, char *zErrMsg); | |
| 1231 | + void (*(*xDlSym)(sqlite3_vfs*,void*, const char *zSymbol))(void); | |
| 1232 | + void (*xDlClose)(sqlite3_vfs*, void*); | |
| 1233 | + int (*xRandomness)(sqlite3_vfs*, int nByte, char *zOut); | |
| 1234 | + int (*xSleep)(sqlite3_vfs*, int microseconds); | |
| 1235 | + int (*xCurrentTime)(sqlite3_vfs*, double*); | |
| 1236 | + int (*xGetLastError)(sqlite3_vfs*, int, char *); | |
| 1237 | 1237 | /* |
| 1238 | 1238 | ** The methods above are in version 1 of the sqlite_vfs object |
| 1239 | 1239 | ** definition. Those that follow are added in version 2 or later |
| 1240 | 1240 | */ |
| 1241 | - int (SQLITE_CALLBACK *xCurrentTimeInt64)(sqlite3_vfs*, sqlite3_int64*); | |
| 1241 | + int (*xCurrentTimeInt64)(sqlite3_vfs*, sqlite3_int64*); | |
| 1242 | 1242 | /* |
| 1243 | 1243 | ** The methods above are in versions 1 and 2 of the sqlite_vfs object. |
| 1244 | 1244 | ** Those below are for version 3 and greater. |
| 1245 | 1245 | */ |
| 1246 | - int (SQLITE_CALLBACK *xSetSystemCall)(sqlite3_vfs*, const char *zName, sqlite3_syscall_ptr); | |
| 1247 | - sqlite3_syscall_ptr (SQLITE_CALLBACK *xGetSystemCall)(sqlite3_vfs*, const char *zName); | |
| 1248 | - const char *(SQLITE_CALLBACK *xNextSystemCall)(sqlite3_vfs*, const char *zName); | |
| 1246 | + int (*xSetSystemCall)(sqlite3_vfs*, const char *zName, sqlite3_syscall_ptr); | |
| 1247 | + sqlite3_syscall_ptr (*xGetSystemCall)(sqlite3_vfs*, const char *zName); | |
| 1248 | + const char *(*xNextSystemCall)(sqlite3_vfs*, const char *zName); | |
| 1249 | 1249 | /* |
| 1250 | 1250 | ** The methods above are in versions 1 through 3 of the sqlite_vfs object. |
| 1251 | 1251 | ** New fields may be appended in future versions. The iVersion |
| 1252 | 1252 | ** value will increment whenever this happens. |
| 1253 | 1253 | */ |
| @@ -1388,14 +1388,14 @@ | ||
| 1388 | 1388 | ** sqlite3_os_init() and sqlite3_os_end(). An application-supplied |
| 1389 | 1389 | ** implementation of sqlite3_os_init() or sqlite3_os_end() |
| 1390 | 1390 | ** must return [SQLITE_OK] on success and some other [error code] upon |
| 1391 | 1391 | ** failure. |
| 1392 | 1392 | */ |
| 1393 | -SQLITE_API int SQLITE_APICALL sqlite3_initialize(void); | |
| 1394 | -SQLITE_API int SQLITE_APICALL sqlite3_shutdown(void); | |
| 1395 | -SQLITE_API int SQLITE_APICALL sqlite3_os_init(void); | |
| 1396 | -SQLITE_API int SQLITE_APICALL sqlite3_os_end(void); | |
| 1393 | +SQLITE_API int SQLITE_STDCALL sqlite3_initialize(void); | |
| 1394 | +SQLITE_API int SQLITE_STDCALL sqlite3_shutdown(void); | |
| 1395 | +SQLITE_API int SQLITE_STDCALL sqlite3_os_init(void); | |
| 1396 | +SQLITE_API int SQLITE_STDCALL sqlite3_os_end(void); | |
| 1397 | 1397 | |
| 1398 | 1398 | /* |
| 1399 | 1399 | ** CAPI3REF: Configuring The SQLite Library |
| 1400 | 1400 | ** |
| 1401 | 1401 | ** The sqlite3_config() interface is used to make global configuration |
| @@ -1510,17 +1510,17 @@ | ||
| 1510 | 1510 | ** SQLite will never invoke xInit() more than once without an intervening |
| 1511 | 1511 | ** call to xShutdown(). |
| 1512 | 1512 | */ |
| 1513 | 1513 | typedef struct sqlite3_mem_methods sqlite3_mem_methods; |
| 1514 | 1514 | struct sqlite3_mem_methods { |
| 1515 | - void *(SQLITE_CALLBACK *xMalloc)(int); /* Memory allocation function */ | |
| 1516 | - void (SQLITE_CALLBACK *xFree)(void*); /* Free a prior allocation */ | |
| 1517 | - void *(SQLITE_CALLBACK *xRealloc)(void*,int); /* Resize an allocation */ | |
| 1518 | - int (SQLITE_CALLBACK *xSize)(void*); /* Return the size of an allocation */ | |
| 1519 | - int (SQLITE_CALLBACK *xRoundup)(int); /* Round up request size to allocation size */ | |
| 1520 | - int (SQLITE_CALLBACK *xInit)(void*); /* Initialize the memory allocator */ | |
| 1521 | - void (SQLITE_CALLBACK *xShutdown)(void*); /* Deinitialize the memory allocator */ | |
| 1515 | + void *(*xMalloc)(int); /* Memory allocation function */ | |
| 1516 | + void (*xFree)(void*); /* Free a prior allocation */ | |
| 1517 | + void *(*xRealloc)(void*,int); /* Resize an allocation */ | |
| 1518 | + int (*xSize)(void*); /* Return the size of an allocation */ | |
| 1519 | + int (*xRoundup)(int); /* Round up request size to allocation size */ | |
| 1520 | + int (*xInit)(void*); /* Initialize the memory allocator */ | |
| 1521 | + void (*xShutdown)(void*); /* Deinitialize the memory allocator */ | |
| 1522 | 1522 | void *pAppData; /* Argument to xInit() and xShutdown() */ |
| 1523 | 1523 | }; |
| 1524 | 1524 | |
| 1525 | 1525 | /* |
| 1526 | 1526 | ** CAPI3REF: Configuration Options |
| @@ -1733,11 +1733,11 @@ | ||
| 1733 | 1733 | ** |
| 1734 | 1734 | ** [[SQLITE_CONFIG_LOG]] <dt>SQLITE_CONFIG_LOG</dt> |
| 1735 | 1735 | ** <dd> The SQLITE_CONFIG_LOG option is used to configure the SQLite |
| 1736 | 1736 | ** global [error log]. |
| 1737 | 1737 | ** (^The SQLITE_CONFIG_LOG option takes two arguments: a pointer to a |
| 1738 | -** function with a call signature of void(SQLITE_CALLBACK *)(void*,int,const char*), | |
| 1738 | +** function with a call signature of void(*)(void*,int,const char*), | |
| 1739 | 1739 | ** and a pointer to void. ^If the function pointer is not NULL, it is |
| 1740 | 1740 | ** invoked by [sqlite3_log()] to process each logging event. ^If the |
| 1741 | 1741 | ** function pointer is NULL, the [sqlite3_log()] interface becomes a no-op. |
| 1742 | 1742 | ** ^The void pointer that is the second argument to SQLITE_CONFIG_LOG is |
| 1743 | 1743 | ** passed through as the first parameter to the application-defined logger |
| @@ -1786,11 +1786,11 @@ | ||
| 1786 | 1786 | ** |
| 1787 | 1787 | ** [[SQLITE_CONFIG_SQLLOG]] |
| 1788 | 1788 | ** <dt>SQLITE_CONFIG_SQLLOG |
| 1789 | 1789 | ** <dd>This option is only available if sqlite is compiled with the |
| 1790 | 1790 | ** [SQLITE_ENABLE_SQLLOG] pre-processor macro defined. The first argument should |
| 1791 | -** be a pointer to a function of type void(SQLITE_CALLBACK *)(void*,sqlite3*,const char*, int). | |
| 1791 | +** be a pointer to a function of type void(*)(void*,sqlite3*,const char*, int). | |
| 1792 | 1792 | ** The second should be of type (void*). The callback is invoked by the library |
| 1793 | 1793 | ** in three separate circumstances, identified by the value passed as the |
| 1794 | 1794 | ** fourth parameter. If the fourth parameter is 0, then the database connection |
| 1795 | 1795 | ** passed as the second argument has just been opened. The third argument |
| 1796 | 1796 | ** points to a buffer containing the name of the main database file. If the |
| @@ -1984,11 +1984,11 @@ | ||
| 1984 | 1984 | ** |
| 1985 | 1985 | ** ^The sqlite3_extended_result_codes() routine enables or disables the |
| 1986 | 1986 | ** [extended result codes] feature of SQLite. ^The extended result |
| 1987 | 1987 | ** codes are disabled by default for historical compatibility. |
| 1988 | 1988 | */ |
| 1989 | -SQLITE_API int SQLITE_APICALL sqlite3_extended_result_codes(sqlite3*, int onoff); | |
| 1989 | +SQLITE_API int SQLITE_STDCALL sqlite3_extended_result_codes(sqlite3*, int onoff); | |
| 1990 | 1990 | |
| 1991 | 1991 | /* |
| 1992 | 1992 | ** CAPI3REF: Last Insert Rowid |
| 1993 | 1993 | ** METHOD: sqlite3 |
| 1994 | 1994 | ** |
| @@ -2036,11 +2036,11 @@ | ||
| 2036 | 2036 | ** function is running and thus changes the last insert [rowid], |
| 2037 | 2037 | ** then the value returned by [sqlite3_last_insert_rowid()] is |
| 2038 | 2038 | ** unpredictable and might not equal either the old or the new |
| 2039 | 2039 | ** last insert [rowid]. |
| 2040 | 2040 | */ |
| 2041 | -SQLITE_API sqlite3_int64 SQLITE_APICALL sqlite3_last_insert_rowid(sqlite3*); | |
| 2041 | +SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_last_insert_rowid(sqlite3*); | |
| 2042 | 2042 | |
| 2043 | 2043 | /* |
| 2044 | 2044 | ** CAPI3REF: Count The Number Of Rows Modified |
| 2045 | 2045 | ** METHOD: sqlite3 |
| 2046 | 2046 | ** |
| @@ -2089,11 +2089,11 @@ | ||
| 2089 | 2089 | ** |
| 2090 | 2090 | ** If a separate thread makes changes on the same database connection |
| 2091 | 2091 | ** while [sqlite3_changes()] is running then the value returned |
| 2092 | 2092 | ** is unpredictable and not meaningful. |
| 2093 | 2093 | */ |
| 2094 | -SQLITE_API int SQLITE_APICALL sqlite3_changes(sqlite3*); | |
| 2094 | +SQLITE_API int SQLITE_STDCALL sqlite3_changes(sqlite3*); | |
| 2095 | 2095 | |
| 2096 | 2096 | /* |
| 2097 | 2097 | ** CAPI3REF: Total Number Of Rows Modified |
| 2098 | 2098 | ** METHOD: sqlite3 |
| 2099 | 2099 | ** |
| @@ -2113,11 +2113,11 @@ | ||
| 2113 | 2113 | ** |
| 2114 | 2114 | ** If a separate thread makes changes on the same database connection |
| 2115 | 2115 | ** while [sqlite3_total_changes()] is running then the value |
| 2116 | 2116 | ** returned is unpredictable and not meaningful. |
| 2117 | 2117 | */ |
| 2118 | -SQLITE_API int SQLITE_APICALL sqlite3_total_changes(sqlite3*); | |
| 2118 | +SQLITE_API int SQLITE_STDCALL sqlite3_total_changes(sqlite3*); | |
| 2119 | 2119 | |
| 2120 | 2120 | /* |
| 2121 | 2121 | ** CAPI3REF: Interrupt A Long-Running Query |
| 2122 | 2122 | ** METHOD: sqlite3 |
| 2123 | 2123 | ** |
| @@ -2153,11 +2153,11 @@ | ||
| 2153 | 2153 | ** that are started after the sqlite3_interrupt() call returns. |
| 2154 | 2154 | ** |
| 2155 | 2155 | ** If the database connection closes while [sqlite3_interrupt()] |
| 2156 | 2156 | ** is running then bad things will likely happen. |
| 2157 | 2157 | */ |
| 2158 | -SQLITE_API void SQLITE_APICALL sqlite3_interrupt(sqlite3*); | |
| 2158 | +SQLITE_API void SQLITE_STDCALL sqlite3_interrupt(sqlite3*); | |
| 2159 | 2159 | |
| 2160 | 2160 | /* |
| 2161 | 2161 | ** CAPI3REF: Determine If An SQL Statement Is Complete |
| 2162 | 2162 | ** |
| 2163 | 2163 | ** These routines are useful during command-line input to determine if the |
| @@ -2188,12 +2188,12 @@ | ||
| 2188 | 2188 | ** UTF-8 string. |
| 2189 | 2189 | ** |
| 2190 | 2190 | ** The input to [sqlite3_complete16()] must be a zero-terminated |
| 2191 | 2191 | ** UTF-16 string in native byte order. |
| 2192 | 2192 | */ |
| 2193 | -SQLITE_API int SQLITE_APICALL sqlite3_complete(const char *sql); | |
| 2194 | -SQLITE_API int SQLITE_APICALL sqlite3_complete16(const void *sql); | |
| 2193 | +SQLITE_API int SQLITE_STDCALL sqlite3_complete(const char *sql); | |
| 2194 | +SQLITE_API int SQLITE_STDCALL sqlite3_complete16(const void *sql); | |
| 2195 | 2195 | |
| 2196 | 2196 | /* |
| 2197 | 2197 | ** CAPI3REF: Register A Callback To Handle SQLITE_BUSY Errors |
| 2198 | 2198 | ** KEYWORDS: {busy-handler callback} {busy handler} |
| 2199 | 2199 | ** METHOD: sqlite3 |
| @@ -2250,11 +2250,11 @@ | ||
| 2250 | 2250 | ** result in undefined behavior. |
| 2251 | 2251 | ** |
| 2252 | 2252 | ** A busy handler must not close the database connection |
| 2253 | 2253 | ** or [prepared statement] that invoked the busy handler. |
| 2254 | 2254 | */ |
| 2255 | -SQLITE_API int SQLITE_APICALL sqlite3_busy_handler(sqlite3*,int(SQLITE_CALLBACK *)(void*,int),void*); | |
| 2255 | +SQLITE_API int SQLITE_STDCALL sqlite3_busy_handler(sqlite3*,int(*)(void*,int),void*); | |
| 2256 | 2256 | |
| 2257 | 2257 | /* |
| 2258 | 2258 | ** CAPI3REF: Set A Busy Timeout |
| 2259 | 2259 | ** METHOD: sqlite3 |
| 2260 | 2260 | ** |
| @@ -2273,11 +2273,11 @@ | ||
| 2273 | 2273 | ** was defined (using [sqlite3_busy_handler()]) prior to calling |
| 2274 | 2274 | ** this routine, that other busy handler is cleared.)^ |
| 2275 | 2275 | ** |
| 2276 | 2276 | ** See also: [PRAGMA busy_timeout] |
| 2277 | 2277 | */ |
| 2278 | -SQLITE_API int SQLITE_APICALL sqlite3_busy_timeout(sqlite3*, int ms); | |
| 2278 | +SQLITE_API int SQLITE_STDCALL sqlite3_busy_timeout(sqlite3*, int ms); | |
| 2279 | 2279 | |
| 2280 | 2280 | /* |
| 2281 | 2281 | ** CAPI3REF: Convenience Routines For Running Queries |
| 2282 | 2282 | ** METHOD: sqlite3 |
| 2283 | 2283 | ** |
| @@ -2348,19 +2348,19 @@ | ||
| 2348 | 2348 | ** interface defined here. As a consequence, errors that occur in the |
| 2349 | 2349 | ** wrapper layer outside of the internal [sqlite3_exec()] call are not |
| 2350 | 2350 | ** reflected in subsequent calls to [sqlite3_errcode()] or |
| 2351 | 2351 | ** [sqlite3_errmsg()]. |
| 2352 | 2352 | */ |
| 2353 | -SQLITE_API int SQLITE_APICALL sqlite3_get_table( | |
| 2353 | +SQLITE_API int SQLITE_STDCALL sqlite3_get_table( | |
| 2354 | 2354 | sqlite3 *db, /* An open database */ |
| 2355 | 2355 | const char *zSql, /* SQL to be evaluated */ |
| 2356 | 2356 | char ***pazResult, /* Results of the query */ |
| 2357 | 2357 | int *pnRow, /* Number of result rows written here */ |
| 2358 | 2358 | int *pnColumn, /* Number of result columns written here */ |
| 2359 | 2359 | char **pzErrmsg /* Error msg written here */ |
| 2360 | 2360 | ); |
| 2361 | -SQLITE_API void SQLITE_APICALL sqlite3_free_table(char **result); | |
| 2361 | +SQLITE_API void SQLITE_STDCALL sqlite3_free_table(char **result); | |
| 2362 | 2362 | |
| 2363 | 2363 | /* |
| 2364 | 2364 | ** CAPI3REF: Formatted String Printing Functions |
| 2365 | 2365 | ** |
| 2366 | 2366 | ** These routines are work-alikes of the "printf()" family of functions |
| @@ -2463,13 +2463,13 @@ | ||
| 2463 | 2463 | ** ^(The "%z" formatting option works like "%s" but with the |
| 2464 | 2464 | ** addition that after the string has been read and copied into |
| 2465 | 2465 | ** the result, [sqlite3_free()] is called on the input string.)^ |
| 2466 | 2466 | */ |
| 2467 | 2467 | SQLITE_API char *SQLITE_CDECL sqlite3_mprintf(const char*,...); |
| 2468 | -SQLITE_API char *SQLITE_APICALL sqlite3_vmprintf(const char*, va_list); | |
| 2468 | +SQLITE_API char *SQLITE_STDCALL sqlite3_vmprintf(const char*, va_list); | |
| 2469 | 2469 | SQLITE_API char *SQLITE_CDECL sqlite3_snprintf(int,char*,const char*, ...); |
| 2470 | -SQLITE_API char *SQLITE_APICALL sqlite3_vsnprintf(int,char*,const char*, va_list); | |
| 2470 | +SQLITE_API char *SQLITE_STDCALL sqlite3_vsnprintf(int,char*,const char*, va_list); | |
| 2471 | 2471 | |
| 2472 | 2472 | /* |
| 2473 | 2473 | ** CAPI3REF: Memory Allocation Subsystem |
| 2474 | 2474 | ** |
| 2475 | 2475 | ** The SQLite core uses these three routines for all of its own |
| @@ -2555,16 +2555,16 @@ | ||
| 2555 | 2555 | ** |
| 2556 | 2556 | ** The application must not read or write any part of |
| 2557 | 2557 | ** a block of memory after it has been released using |
| 2558 | 2558 | ** [sqlite3_free()] or [sqlite3_realloc()]. |
| 2559 | 2559 | */ |
| 2560 | -SQLITE_API void *SQLITE_APICALL sqlite3_malloc(int); | |
| 2561 | -SQLITE_API void *SQLITE_APICALL sqlite3_malloc64(sqlite3_uint64); | |
| 2562 | -SQLITE_API void *SQLITE_APICALL sqlite3_realloc(void*, int); | |
| 2563 | -SQLITE_API void *SQLITE_APICALL sqlite3_realloc64(void*, sqlite3_uint64); | |
| 2564 | -SQLITE_API void SQLITE_APICALL sqlite3_free(void*); | |
| 2565 | -SQLITE_API sqlite3_uint64 SQLITE_APICALL sqlite3_msize(void*); | |
| 2560 | +SQLITE_API void *SQLITE_STDCALL sqlite3_malloc(int); | |
| 2561 | +SQLITE_API void *SQLITE_STDCALL sqlite3_malloc64(sqlite3_uint64); | |
| 2562 | +SQLITE_API void *SQLITE_STDCALL sqlite3_realloc(void*, int); | |
| 2563 | +SQLITE_API void *SQLITE_STDCALL sqlite3_realloc64(void*, sqlite3_uint64); | |
| 2564 | +SQLITE_API void SQLITE_STDCALL sqlite3_free(void*); | |
| 2565 | +SQLITE_API sqlite3_uint64 SQLITE_STDCALL sqlite3_msize(void*); | |
| 2566 | 2566 | |
| 2567 | 2567 | /* |
| 2568 | 2568 | ** CAPI3REF: Memory Allocator Statistics |
| 2569 | 2569 | ** |
| 2570 | 2570 | ** SQLite provides these two interfaces for reporting on the status |
| @@ -2585,12 +2585,12 @@ | ||
| 2585 | 2585 | ** [sqlite3_memory_used()] if and only if the parameter to |
| 2586 | 2586 | ** [sqlite3_memory_highwater()] is true. ^The value returned |
| 2587 | 2587 | ** by [sqlite3_memory_highwater(1)] is the high-water mark |
| 2588 | 2588 | ** prior to the reset. |
| 2589 | 2589 | */ |
| 2590 | -SQLITE_API sqlite3_int64 SQLITE_APICALL sqlite3_memory_used(void); | |
| 2591 | -SQLITE_API sqlite3_int64 SQLITE_APICALL sqlite3_memory_highwater(int resetFlag); | |
| 2590 | +SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_memory_used(void); | |
| 2591 | +SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_memory_highwater(int resetFlag); | |
| 2592 | 2592 | |
| 2593 | 2593 | /* |
| 2594 | 2594 | ** CAPI3REF: Pseudo-Random Number Generator |
| 2595 | 2595 | ** |
| 2596 | 2596 | ** SQLite contains a high-quality pseudo-random number generator (PRNG) used to |
| @@ -2609,11 +2609,11 @@ | ||
| 2609 | 2609 | ** ^If the previous call to this routine had an N of 1 or more and a |
| 2610 | 2610 | ** non-NULL P then the pseudo-randomness is generated |
| 2611 | 2611 | ** internally and without recourse to the [sqlite3_vfs] xRandomness |
| 2612 | 2612 | ** method. |
| 2613 | 2613 | */ |
| 2614 | -SQLITE_API void SQLITE_APICALL sqlite3_randomness(int N, void *P); | |
| 2614 | +SQLITE_API void SQLITE_STDCALL sqlite3_randomness(int N, void *P); | |
| 2615 | 2615 | |
| 2616 | 2616 | /* |
| 2617 | 2617 | ** CAPI3REF: Compile-Time Authorization Callbacks |
| 2618 | 2618 | ** METHOD: sqlite3 |
| 2619 | 2619 | ** |
| @@ -2692,13 +2692,13 @@ | ||
| 2692 | 2692 | ** [sqlite3_prepare()] or its variants. Authorization is not |
| 2693 | 2693 | ** performed during statement evaluation in [sqlite3_step()], unless |
| 2694 | 2694 | ** as stated in the previous paragraph, sqlite3_step() invokes |
| 2695 | 2695 | ** sqlite3_prepare_v2() to reprepare a statement after a schema change. |
| 2696 | 2696 | */ |
| 2697 | -SQLITE_API int SQLITE_APICALL sqlite3_set_authorizer( | |
| 2697 | +SQLITE_API int SQLITE_STDCALL sqlite3_set_authorizer( | |
| 2698 | 2698 | sqlite3*, |
| 2699 | - int (SQLITE_CALLBACK *xAuth)(void*,int,const char*,const char*,const char*,const char*), | |
| 2699 | + int (*xAuth)(void*,int,const char*,const char*,const char*,const char*), | |
| 2700 | 2700 | void *pUserData |
| 2701 | 2701 | ); |
| 2702 | 2702 | |
| 2703 | 2703 | /* |
| 2704 | 2704 | ** CAPI3REF: Authorizer Return Codes |
| @@ -2800,14 +2800,14 @@ | ||
| 2800 | 2800 | ** digits in the time are meaningless. Future versions of SQLite |
| 2801 | 2801 | ** might provide greater resolution on the profiler callback. The |
| 2802 | 2802 | ** sqlite3_profile() function is considered experimental and is |
| 2803 | 2803 | ** subject to change in future versions of SQLite. |
| 2804 | 2804 | */ |
| 2805 | -SQLITE_API SQLITE_DEPRECATED void *SQLITE_APICALL sqlite3_trace(sqlite3*, | |
| 2806 | - void(SQLITE_CALLBACK *xTrace)(void*,const char*), void*); | |
| 2807 | -SQLITE_API SQLITE_DEPRECATED void *SQLITE_APICALL sqlite3_profile(sqlite3*, | |
| 2808 | - void(SQLITE_CALLBACK *xProfile)(void*,const char*,sqlite3_uint64), void*); | |
| 2805 | +SQLITE_API SQLITE_DEPRECATED void *SQLITE_STDCALL sqlite3_trace(sqlite3*, | |
| 2806 | + void(*xTrace)(void*,const char*), void*); | |
| 2807 | +SQLITE_API SQLITE_DEPRECATED void *SQLITE_STDCALL sqlite3_profile(sqlite3*, | |
| 2808 | + void(*xProfile)(void*,const char*,sqlite3_uint64), void*); | |
| 2809 | 2809 | |
| 2810 | 2810 | /* |
| 2811 | 2811 | ** CAPI3REF: SQL Trace Event Codes |
| 2812 | 2812 | ** KEYWORDS: SQLITE_TRACE |
| 2813 | 2813 | ** |
| @@ -2891,14 +2891,14 @@ | ||
| 2891 | 2891 | ** |
| 2892 | 2892 | ** The sqlite3_trace_v2() interface is intended to replace the legacy |
| 2893 | 2893 | ** interfaces [sqlite3_trace()] and [sqlite3_profile()], both of which |
| 2894 | 2894 | ** are deprecated. |
| 2895 | 2895 | */ |
| 2896 | -SQLITE_API int SQLITE_APICALL sqlite3_trace_v2( | |
| 2896 | +SQLITE_API int SQLITE_STDCALL sqlite3_trace_v2( | |
| 2897 | 2897 | sqlite3*, |
| 2898 | 2898 | unsigned uMask, |
| 2899 | - int(SQLITE_CALLBACK *xCallback)(unsigned,void*,void*,void*), | |
| 2899 | + int(*xCallback)(unsigned,void*,void*,void*), | |
| 2900 | 2900 | void *pCtx |
| 2901 | 2901 | ); |
| 2902 | 2902 | |
| 2903 | 2903 | /* |
| 2904 | 2904 | ** CAPI3REF: Query Progress Callbacks |
| @@ -2930,11 +2930,11 @@ | ||
| 2930 | 2930 | ** the database connection that invoked the progress handler. |
| 2931 | 2931 | ** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their |
| 2932 | 2932 | ** database connections for the meaning of "modify" in this paragraph. |
| 2933 | 2933 | ** |
| 2934 | 2934 | */ |
| 2935 | -SQLITE_API void SQLITE_APICALL sqlite3_progress_handler(sqlite3*, int, int(SQLITE_CALLBACK *)(void*), void*); | |
| 2935 | +SQLITE_API void SQLITE_STDCALL sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*); | |
| 2936 | 2936 | |
| 2937 | 2937 | /* |
| 2938 | 2938 | ** CAPI3REF: Opening A New Database Connection |
| 2939 | 2939 | ** CONSTRUCTOR: sqlite3 |
| 2940 | 2940 | ** |
| @@ -3159,19 +3159,19 @@ | ||
| 3159 | 3159 | ** prior to calling sqlite3_open() or sqlite3_open_v2(). Otherwise, various |
| 3160 | 3160 | ** features that require the use of temporary files may fail. |
| 3161 | 3161 | ** |
| 3162 | 3162 | ** See also: [sqlite3_temp_directory] |
| 3163 | 3163 | */ |
| 3164 | -SQLITE_API int SQLITE_APICALL sqlite3_open( | |
| 3164 | +SQLITE_API int SQLITE_STDCALL sqlite3_open( | |
| 3165 | 3165 | const char *filename, /* Database filename (UTF-8) */ |
| 3166 | 3166 | sqlite3 **ppDb /* OUT: SQLite db handle */ |
| 3167 | 3167 | ); |
| 3168 | -SQLITE_API int SQLITE_APICALL sqlite3_open16( | |
| 3168 | +SQLITE_API int SQLITE_STDCALL sqlite3_open16( | |
| 3169 | 3169 | const void *filename, /* Database filename (UTF-16) */ |
| 3170 | 3170 | sqlite3 **ppDb /* OUT: SQLite db handle */ |
| 3171 | 3171 | ); |
| 3172 | -SQLITE_API int SQLITE_APICALL sqlite3_open_v2( | |
| 3172 | +SQLITE_API int SQLITE_STDCALL sqlite3_open_v2( | |
| 3173 | 3173 | const char *filename, /* Database filename (UTF-8) */ |
| 3174 | 3174 | sqlite3 **ppDb, /* OUT: SQLite db handle */ |
| 3175 | 3175 | int flags, /* Flags */ |
| 3176 | 3176 | const char *zVfs /* Name of VFS module to use */ |
| 3177 | 3177 | ); |
| @@ -3213,13 +3213,13 @@ | ||
| 3213 | 3213 | ** sqlite3_uri_boolean(F,P,B) returns B. If F is not a NULL pointer and |
| 3214 | 3214 | ** is not a database file pathname pointer that SQLite passed into the xOpen |
| 3215 | 3215 | ** VFS method, then the behavior of this routine is undefined and probably |
| 3216 | 3216 | ** undesirable. |
| 3217 | 3217 | */ |
| 3218 | -SQLITE_API const char *SQLITE_APICALL sqlite3_uri_parameter(const char *zFilename, const char *zParam); | |
| 3219 | -SQLITE_API int SQLITE_APICALL sqlite3_uri_boolean(const char *zFile, const char *zParam, int bDefault); | |
| 3220 | -SQLITE_API sqlite3_int64 SQLITE_APICALL sqlite3_uri_int64(const char*, const char*, sqlite3_int64); | |
| 3218 | +SQLITE_API const char *SQLITE_STDCALL sqlite3_uri_parameter(const char *zFilename, const char *zParam); | |
| 3219 | +SQLITE_API int SQLITE_STDCALL sqlite3_uri_boolean(const char *zFile, const char *zParam, int bDefault); | |
| 3220 | +SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_uri_int64(const char*, const char*, sqlite3_int64); | |
| 3221 | 3221 | |
| 3222 | 3222 | |
| 3223 | 3223 | /* |
| 3224 | 3224 | ** CAPI3REF: Error Codes And Messages |
| 3225 | 3225 | ** METHOD: sqlite3 |
| @@ -3259,15 +3259,15 @@ | ||
| 3259 | 3259 | ** |
| 3260 | 3260 | ** If an interface fails with SQLITE_MISUSE, that means the interface |
| 3261 | 3261 | ** was invoked incorrectly by the application. In that case, the |
| 3262 | 3262 | ** error code and message may or may not be set. |
| 3263 | 3263 | */ |
| 3264 | -SQLITE_API int SQLITE_APICALL sqlite3_errcode(sqlite3 *db); | |
| 3265 | -SQLITE_API int SQLITE_APICALL sqlite3_extended_errcode(sqlite3 *db); | |
| 3266 | -SQLITE_API const char *SQLITE_APICALL sqlite3_errmsg(sqlite3*); | |
| 3267 | -SQLITE_API const void *SQLITE_APICALL sqlite3_errmsg16(sqlite3*); | |
| 3268 | -SQLITE_API const char *SQLITE_APICALL sqlite3_errstr(int); | |
| 3264 | +SQLITE_API int SQLITE_STDCALL sqlite3_errcode(sqlite3 *db); | |
| 3265 | +SQLITE_API int SQLITE_STDCALL sqlite3_extended_errcode(sqlite3 *db); | |
| 3266 | +SQLITE_API const char *SQLITE_STDCALL sqlite3_errmsg(sqlite3*); | |
| 3267 | +SQLITE_API const void *SQLITE_STDCALL sqlite3_errmsg16(sqlite3*); | |
| 3268 | +SQLITE_API const char *SQLITE_STDCALL sqlite3_errstr(int); | |
| 3269 | 3269 | |
| 3270 | 3270 | /* |
| 3271 | 3271 | ** CAPI3REF: Prepared Statement Object |
| 3272 | 3272 | ** KEYWORDS: {prepared statement} {prepared statements} |
| 3273 | 3273 | ** |
| @@ -3331,11 +3331,11 @@ | ||
| 3331 | 3331 | ** created by an untrusted script can be contained using the |
| 3332 | 3332 | ** [max_page_count] [PRAGMA]. |
| 3333 | 3333 | ** |
| 3334 | 3334 | ** New run-time limit categories may be added in future releases. |
| 3335 | 3335 | */ |
| 3336 | -SQLITE_API int SQLITE_APICALL sqlite3_limit(sqlite3*, int id, int newVal); | |
| 3336 | +SQLITE_API int SQLITE_STDCALL sqlite3_limit(sqlite3*, int id, int newVal); | |
| 3337 | 3337 | |
| 3338 | 3338 | /* |
| 3339 | 3339 | ** CAPI3REF: Run-Time Limit Categories |
| 3340 | 3340 | ** KEYWORDS: {limit category} {*limit categories} |
| 3341 | 3341 | ** |
| @@ -3483,32 +3483,32 @@ | ||
| 3483 | 3483 | ** or [GLOB] operator or if the parameter is compared to an indexed column |
| 3484 | 3484 | ** and the [SQLITE_ENABLE_STAT3] compile-time option is enabled. |
| 3485 | 3485 | ** </li> |
| 3486 | 3486 | ** </ol> |
| 3487 | 3487 | */ |
| 3488 | -SQLITE_API int SQLITE_APICALL sqlite3_prepare( | |
| 3488 | +SQLITE_API int SQLITE_STDCALL sqlite3_prepare( | |
| 3489 | 3489 | sqlite3 *db, /* Database handle */ |
| 3490 | 3490 | const char *zSql, /* SQL statement, UTF-8 encoded */ |
| 3491 | 3491 | int nByte, /* Maximum length of zSql in bytes. */ |
| 3492 | 3492 | sqlite3_stmt **ppStmt, /* OUT: Statement handle */ |
| 3493 | 3493 | const char **pzTail /* OUT: Pointer to unused portion of zSql */ |
| 3494 | 3494 | ); |
| 3495 | -SQLITE_API int SQLITE_APICALL sqlite3_prepare_v2( | |
| 3495 | +SQLITE_API int SQLITE_STDCALL sqlite3_prepare_v2( | |
| 3496 | 3496 | sqlite3 *db, /* Database handle */ |
| 3497 | 3497 | const char *zSql, /* SQL statement, UTF-8 encoded */ |
| 3498 | 3498 | int nByte, /* Maximum length of zSql in bytes. */ |
| 3499 | 3499 | sqlite3_stmt **ppStmt, /* OUT: Statement handle */ |
| 3500 | 3500 | const char **pzTail /* OUT: Pointer to unused portion of zSql */ |
| 3501 | 3501 | ); |
| 3502 | -SQLITE_API int SQLITE_APICALL sqlite3_prepare16( | |
| 3502 | +SQLITE_API int SQLITE_STDCALL sqlite3_prepare16( | |
| 3503 | 3503 | sqlite3 *db, /* Database handle */ |
| 3504 | 3504 | const void *zSql, /* SQL statement, UTF-16 encoded */ |
| 3505 | 3505 | int nByte, /* Maximum length of zSql in bytes. */ |
| 3506 | 3506 | sqlite3_stmt **ppStmt, /* OUT: Statement handle */ |
| 3507 | 3507 | const void **pzTail /* OUT: Pointer to unused portion of zSql */ |
| 3508 | 3508 | ); |
| 3509 | -SQLITE_API int SQLITE_APICALL sqlite3_prepare16_v2( | |
| 3509 | +SQLITE_API int SQLITE_STDCALL sqlite3_prepare16_v2( | |
| 3510 | 3510 | sqlite3 *db, /* Database handle */ |
| 3511 | 3511 | const void *zSql, /* SQL statement, UTF-16 encoded */ |
| 3512 | 3512 | int nByte, /* Maximum length of zSql in bytes. */ |
| 3513 | 3513 | sqlite3_stmt **ppStmt, /* OUT: Statement handle */ |
| 3514 | 3514 | const void **pzTail /* OUT: Pointer to unused portion of zSql */ |
| @@ -3543,12 +3543,12 @@ | ||
| 3543 | 3543 | ** automatically freed when the prepared statement is finalized. |
| 3544 | 3544 | ** ^The string returned by sqlite3_expanded_sql(P), on the other hand, |
| 3545 | 3545 | ** is obtained from [sqlite3_malloc()] and must be free by the application |
| 3546 | 3546 | ** by passing it to [sqlite3_free()]. |
| 3547 | 3547 | */ |
| 3548 | -SQLITE_API const char *SQLITE_APICALL sqlite3_sql(sqlite3_stmt *pStmt); | |
| 3549 | -SQLITE_API char *SQLITE_APICALL sqlite3_expanded_sql(sqlite3_stmt *pStmt); | |
| 3548 | +SQLITE_API const char *SQLITE_STDCALL sqlite3_sql(sqlite3_stmt *pStmt); | |
| 3549 | +SQLITE_API char *SQLITE_STDCALL sqlite3_expanded_sql(sqlite3_stmt *pStmt); | |
| 3550 | 3550 | |
| 3551 | 3551 | /* |
| 3552 | 3552 | ** CAPI3REF: Determine If An SQL Statement Writes The Database |
| 3553 | 3553 | ** METHOD: sqlite3_stmt |
| 3554 | 3554 | ** |
| @@ -3576,11 +3576,11 @@ | ||
| 3576 | 3576 | ** database. ^The [ATTACH] and [DETACH] statements also cause |
| 3577 | 3577 | ** sqlite3_stmt_readonly() to return true since, while those statements |
| 3578 | 3578 | ** change the configuration of a database connection, they do not make |
| 3579 | 3579 | ** changes to the content of the database files on disk. |
| 3580 | 3580 | */ |
| 3581 | -SQLITE_API int SQLITE_APICALL sqlite3_stmt_readonly(sqlite3_stmt *pStmt); | |
| 3581 | +SQLITE_API int SQLITE_STDCALL sqlite3_stmt_readonly(sqlite3_stmt *pStmt); | |
| 3582 | 3582 | |
| 3583 | 3583 | /* |
| 3584 | 3584 | ** CAPI3REF: Determine If A Prepared Statement Has Been Reset |
| 3585 | 3585 | ** METHOD: sqlite3_stmt |
| 3586 | 3586 | ** |
| @@ -3597,11 +3597,11 @@ | ||
| 3597 | 3597 | ** to locate all prepared statements associated with a database |
| 3598 | 3598 | ** connection that are in need of being reset. This can be used, |
| 3599 | 3599 | ** for example, in diagnostic routines to search for prepared |
| 3600 | 3600 | ** statements that are holding a transaction open. |
| 3601 | 3601 | */ |
| 3602 | -SQLITE_API int SQLITE_APICALL sqlite3_stmt_busy(sqlite3_stmt*); | |
| 3602 | +SQLITE_API int SQLITE_STDCALL sqlite3_stmt_busy(sqlite3_stmt*); | |
| 3603 | 3603 | |
| 3604 | 3604 | /* |
| 3605 | 3605 | ** CAPI3REF: Dynamically Typed Value Object |
| 3606 | 3606 | ** KEYWORDS: {protected sqlite3_value} {unprotected sqlite3_value} |
| 3607 | 3607 | ** |
| @@ -3761,24 +3761,24 @@ | ||
| 3761 | 3761 | ** index is out of range. ^[SQLITE_NOMEM] is returned if malloc() fails. |
| 3762 | 3762 | ** |
| 3763 | 3763 | ** See also: [sqlite3_bind_parameter_count()], |
| 3764 | 3764 | ** [sqlite3_bind_parameter_name()], and [sqlite3_bind_parameter_index()]. |
| 3765 | 3765 | */ |
| 3766 | -SQLITE_API int SQLITE_APICALL sqlite3_bind_blob(sqlite3_stmt*, int, const void*, int n, void(SQLITE_CALLBACK *)(void*)); | |
| 3767 | -SQLITE_API int SQLITE_APICALL sqlite3_bind_blob64(sqlite3_stmt*, int, const void*, sqlite3_uint64, | |
| 3768 | - void(SQLITE_CALLBACK *)(void*)); | |
| 3769 | -SQLITE_API int SQLITE_APICALL sqlite3_bind_double(sqlite3_stmt*, int, double); | |
| 3770 | -SQLITE_API int SQLITE_APICALL sqlite3_bind_int(sqlite3_stmt*, int, int); | |
| 3771 | -SQLITE_API int SQLITE_APICALL sqlite3_bind_int64(sqlite3_stmt*, int, sqlite3_int64); | |
| 3772 | -SQLITE_API int SQLITE_APICALL sqlite3_bind_null(sqlite3_stmt*, int); | |
| 3773 | -SQLITE_API int SQLITE_APICALL sqlite3_bind_text(sqlite3_stmt*,int,const char*,int,void(SQLITE_CALLBACK *)(void*)); | |
| 3774 | -SQLITE_API int SQLITE_APICALL sqlite3_bind_text16(sqlite3_stmt*, int, const void*, int, void(SQLITE_CALLBACK *)(void*)); | |
| 3775 | -SQLITE_API int SQLITE_APICALL sqlite3_bind_text64(sqlite3_stmt*, int, const char*, sqlite3_uint64, | |
| 3776 | - void(SQLITE_CALLBACK *)(void*), unsigned char encoding); | |
| 3777 | -SQLITE_API int SQLITE_APICALL sqlite3_bind_value(sqlite3_stmt*, int, const sqlite3_value*); | |
| 3778 | -SQLITE_API int SQLITE_APICALL sqlite3_bind_zeroblob(sqlite3_stmt*, int, int n); | |
| 3779 | -SQLITE_API int SQLITE_APICALL sqlite3_bind_zeroblob64(sqlite3_stmt*, int, sqlite3_uint64); | |
| 3766 | +SQLITE_API int SQLITE_STDCALL sqlite3_bind_blob(sqlite3_stmt*, int, const void*, int n, void(*)(void*)); | |
| 3767 | +SQLITE_API int SQLITE_STDCALL sqlite3_bind_blob64(sqlite3_stmt*, int, const void*, sqlite3_uint64, | |
| 3768 | + void(*)(void*)); | |
| 3769 | +SQLITE_API int SQLITE_STDCALL sqlite3_bind_double(sqlite3_stmt*, int, double); | |
| 3770 | +SQLITE_API int SQLITE_STDCALL sqlite3_bind_int(sqlite3_stmt*, int, int); | |
| 3771 | +SQLITE_API int SQLITE_STDCALL sqlite3_bind_int64(sqlite3_stmt*, int, sqlite3_int64); | |
| 3772 | +SQLITE_API int SQLITE_STDCALL sqlite3_bind_null(sqlite3_stmt*, int); | |
| 3773 | +SQLITE_API int SQLITE_STDCALL sqlite3_bind_text(sqlite3_stmt*,int,const char*,int,void(*)(void*)); | |
| 3774 | +SQLITE_API int SQLITE_STDCALL sqlite3_bind_text16(sqlite3_stmt*, int, const void*, int, void(*)(void*)); | |
| 3775 | +SQLITE_API int SQLITE_STDCALL sqlite3_bind_text64(sqlite3_stmt*, int, const char*, sqlite3_uint64, | |
| 3776 | + void(*)(void*), unsigned char encoding); | |
| 3777 | +SQLITE_API int SQLITE_STDCALL sqlite3_bind_value(sqlite3_stmt*, int, const sqlite3_value*); | |
| 3778 | +SQLITE_API int SQLITE_STDCALL sqlite3_bind_zeroblob(sqlite3_stmt*, int, int n); | |
| 3779 | +SQLITE_API int SQLITE_STDCALL sqlite3_bind_zeroblob64(sqlite3_stmt*, int, sqlite3_uint64); | |
| 3780 | 3780 | |
| 3781 | 3781 | /* |
| 3782 | 3782 | ** CAPI3REF: Number Of SQL Parameters |
| 3783 | 3783 | ** METHOD: sqlite3_stmt |
| 3784 | 3784 | ** |
| @@ -3795,11 +3795,11 @@ | ||
| 3795 | 3795 | ** |
| 3796 | 3796 | ** See also: [sqlite3_bind_blob|sqlite3_bind()], |
| 3797 | 3797 | ** [sqlite3_bind_parameter_name()], and |
| 3798 | 3798 | ** [sqlite3_bind_parameter_index()]. |
| 3799 | 3799 | */ |
| 3800 | -SQLITE_API int SQLITE_APICALL sqlite3_bind_parameter_count(sqlite3_stmt*); | |
| 3800 | +SQLITE_API int SQLITE_STDCALL sqlite3_bind_parameter_count(sqlite3_stmt*); | |
| 3801 | 3801 | |
| 3802 | 3802 | /* |
| 3803 | 3803 | ** CAPI3REF: Name Of A Host Parameter |
| 3804 | 3804 | ** METHOD: sqlite3_stmt |
| 3805 | 3805 | ** |
| @@ -3823,11 +3823,11 @@ | ||
| 3823 | 3823 | ** |
| 3824 | 3824 | ** See also: [sqlite3_bind_blob|sqlite3_bind()], |
| 3825 | 3825 | ** [sqlite3_bind_parameter_count()], and |
| 3826 | 3826 | ** [sqlite3_bind_parameter_index()]. |
| 3827 | 3827 | */ |
| 3828 | -SQLITE_API const char *SQLITE_APICALL sqlite3_bind_parameter_name(sqlite3_stmt*, int); | |
| 3828 | +SQLITE_API const char *SQLITE_STDCALL sqlite3_bind_parameter_name(sqlite3_stmt*, int); | |
| 3829 | 3829 | |
| 3830 | 3830 | /* |
| 3831 | 3831 | ** CAPI3REF: Index Of A Parameter With A Given Name |
| 3832 | 3832 | ** METHOD: sqlite3_stmt |
| 3833 | 3833 | ** |
| @@ -3840,21 +3840,21 @@ | ||
| 3840 | 3840 | ** |
| 3841 | 3841 | ** See also: [sqlite3_bind_blob|sqlite3_bind()], |
| 3842 | 3842 | ** [sqlite3_bind_parameter_count()], and |
| 3843 | 3843 | ** [sqlite3_bind_parameter_name()]. |
| 3844 | 3844 | */ |
| 3845 | -SQLITE_API int SQLITE_APICALL sqlite3_bind_parameter_index(sqlite3_stmt*, const char *zName); | |
| 3845 | +SQLITE_API int SQLITE_STDCALL sqlite3_bind_parameter_index(sqlite3_stmt*, const char *zName); | |
| 3846 | 3846 | |
| 3847 | 3847 | /* |
| 3848 | 3848 | ** CAPI3REF: Reset All Bindings On A Prepared Statement |
| 3849 | 3849 | ** METHOD: sqlite3_stmt |
| 3850 | 3850 | ** |
| 3851 | 3851 | ** ^Contrary to the intuition of many, [sqlite3_reset()] does not reset |
| 3852 | 3852 | ** the [sqlite3_bind_blob | bindings] on a [prepared statement]. |
| 3853 | 3853 | ** ^Use this routine to reset all host parameters to NULL. |
| 3854 | 3854 | */ |
| 3855 | -SQLITE_API int SQLITE_APICALL sqlite3_clear_bindings(sqlite3_stmt*); | |
| 3855 | +SQLITE_API int SQLITE_STDCALL sqlite3_clear_bindings(sqlite3_stmt*); | |
| 3856 | 3856 | |
| 3857 | 3857 | /* |
| 3858 | 3858 | ** CAPI3REF: Number Of Columns In A Result Set |
| 3859 | 3859 | ** METHOD: sqlite3_stmt |
| 3860 | 3860 | ** |
| @@ -3862,11 +3862,11 @@ | ||
| 3862 | 3862 | ** [prepared statement]. ^This routine returns 0 if pStmt is an SQL |
| 3863 | 3863 | ** statement that does not return data (for example an [UPDATE]). |
| 3864 | 3864 | ** |
| 3865 | 3865 | ** See also: [sqlite3_data_count()] |
| 3866 | 3866 | */ |
| 3867 | -SQLITE_API int SQLITE_APICALL sqlite3_column_count(sqlite3_stmt *pStmt); | |
| 3867 | +SQLITE_API int SQLITE_STDCALL sqlite3_column_count(sqlite3_stmt *pStmt); | |
| 3868 | 3868 | |
| 3869 | 3869 | /* |
| 3870 | 3870 | ** CAPI3REF: Column Names In A Result Set |
| 3871 | 3871 | ** METHOD: sqlite3_stmt |
| 3872 | 3872 | ** |
| @@ -3891,12 +3891,12 @@ | ||
| 3891 | 3891 | ** ^The name of a result column is the value of the "AS" clause for |
| 3892 | 3892 | ** that column, if there is an AS clause. If there is no AS clause |
| 3893 | 3893 | ** then the name of the column is unspecified and may change from |
| 3894 | 3894 | ** one release of SQLite to the next. |
| 3895 | 3895 | */ |
| 3896 | -SQLITE_API const char *SQLITE_APICALL sqlite3_column_name(sqlite3_stmt*, int N); | |
| 3897 | -SQLITE_API const void *SQLITE_APICALL sqlite3_column_name16(sqlite3_stmt*, int N); | |
| 3896 | +SQLITE_API const char *SQLITE_STDCALL sqlite3_column_name(sqlite3_stmt*, int N); | |
| 3897 | +SQLITE_API const void *SQLITE_STDCALL sqlite3_column_name16(sqlite3_stmt*, int N); | |
| 3898 | 3898 | |
| 3899 | 3899 | /* |
| 3900 | 3900 | ** CAPI3REF: Source Of Data In A Query Result |
| 3901 | 3901 | ** METHOD: sqlite3_stmt |
| 3902 | 3902 | ** |
| @@ -3940,16 +3940,16 @@ | ||
| 3940 | 3940 | ** If two or more threads call one or more |
| 3941 | 3941 | ** [sqlite3_column_database_name | column metadata interfaces] |
| 3942 | 3942 | ** for the same [prepared statement] and result column |
| 3943 | 3943 | ** at the same time then the results are undefined. |
| 3944 | 3944 | */ |
| 3945 | -SQLITE_API const char *SQLITE_APICALL sqlite3_column_database_name(sqlite3_stmt*,int); | |
| 3946 | -SQLITE_API const void *SQLITE_APICALL sqlite3_column_database_name16(sqlite3_stmt*,int); | |
| 3947 | -SQLITE_API const char *SQLITE_APICALL sqlite3_column_table_name(sqlite3_stmt*,int); | |
| 3948 | -SQLITE_API const void *SQLITE_APICALL sqlite3_column_table_name16(sqlite3_stmt*,int); | |
| 3949 | -SQLITE_API const char *SQLITE_APICALL sqlite3_column_origin_name(sqlite3_stmt*,int); | |
| 3950 | -SQLITE_API const void *SQLITE_APICALL sqlite3_column_origin_name16(sqlite3_stmt*,int); | |
| 3945 | +SQLITE_API const char *SQLITE_STDCALL sqlite3_column_database_name(sqlite3_stmt*,int); | |
| 3946 | +SQLITE_API const void *SQLITE_STDCALL sqlite3_column_database_name16(sqlite3_stmt*,int); | |
| 3947 | +SQLITE_API const char *SQLITE_STDCALL sqlite3_column_table_name(sqlite3_stmt*,int); | |
| 3948 | +SQLITE_API const void *SQLITE_STDCALL sqlite3_column_table_name16(sqlite3_stmt*,int); | |
| 3949 | +SQLITE_API const char *SQLITE_STDCALL sqlite3_column_origin_name(sqlite3_stmt*,int); | |
| 3950 | +SQLITE_API const void *SQLITE_STDCALL sqlite3_column_origin_name16(sqlite3_stmt*,int); | |
| 3951 | 3951 | |
| 3952 | 3952 | /* |
| 3953 | 3953 | ** CAPI3REF: Declared Datatype Of A Query Result |
| 3954 | 3954 | ** METHOD: sqlite3_stmt |
| 3955 | 3955 | ** |
| @@ -3977,12 +3977,12 @@ | ||
| 3977 | 3977 | ** data stored in that column is of the declared type. SQLite is |
| 3978 | 3978 | ** strongly typed, but the typing is dynamic not static. ^Type |
| 3979 | 3979 | ** is associated with individual values, not with the containers |
| 3980 | 3980 | ** used to hold those values. |
| 3981 | 3981 | */ |
| 3982 | -SQLITE_API const char *SQLITE_APICALL sqlite3_column_decltype(sqlite3_stmt*,int); | |
| 3983 | -SQLITE_API const void *SQLITE_APICALL sqlite3_column_decltype16(sqlite3_stmt*,int); | |
| 3982 | +SQLITE_API const char *SQLITE_STDCALL sqlite3_column_decltype(sqlite3_stmt*,int); | |
| 3983 | +SQLITE_API const void *SQLITE_STDCALL sqlite3_column_decltype16(sqlite3_stmt*,int); | |
| 3984 | 3984 | |
| 3985 | 3985 | /* |
| 3986 | 3986 | ** CAPI3REF: Evaluate An SQL Statement |
| 3987 | 3987 | ** METHOD: sqlite3_stmt |
| 3988 | 3988 | ** |
| @@ -4058,11 +4058,11 @@ | ||
| 4058 | 4058 | ** using either [sqlite3_prepare_v2()] or [sqlite3_prepare16_v2()] instead |
| 4059 | 4059 | ** of the legacy [sqlite3_prepare()] and [sqlite3_prepare16()] interfaces, |
| 4060 | 4060 | ** then the more specific [error codes] are returned directly |
| 4061 | 4061 | ** by sqlite3_step(). The use of the "v2" interface is recommended. |
| 4062 | 4062 | */ |
| 4063 | -SQLITE_API int SQLITE_APICALL sqlite3_step(sqlite3_stmt*); | |
| 4063 | +SQLITE_API int SQLITE_STDCALL sqlite3_step(sqlite3_stmt*); | |
| 4064 | 4064 | |
| 4065 | 4065 | /* |
| 4066 | 4066 | ** CAPI3REF: Number of columns in a result set |
| 4067 | 4067 | ** METHOD: sqlite3_stmt |
| 4068 | 4068 | ** |
| @@ -4079,11 +4079,11 @@ | ||
| 4079 | 4079 | ** where it always returns zero since each step of that multi-step |
| 4080 | 4080 | ** pragma returns 0 columns of data. |
| 4081 | 4081 | ** |
| 4082 | 4082 | ** See also: [sqlite3_column_count()] |
| 4083 | 4083 | */ |
| 4084 | -SQLITE_API int SQLITE_APICALL sqlite3_data_count(sqlite3_stmt *pStmt); | |
| 4084 | +SQLITE_API int SQLITE_STDCALL sqlite3_data_count(sqlite3_stmt *pStmt); | |
| 4085 | 4085 | |
| 4086 | 4086 | /* |
| 4087 | 4087 | ** CAPI3REF: Fundamental Datatypes |
| 4088 | 4088 | ** KEYWORDS: SQLITE_TEXT |
| 4089 | 4089 | ** |
| @@ -4269,20 +4269,20 @@ | ||
| 4269 | 4269 | ** of these routines, a default value is returned. The default value |
| 4270 | 4270 | ** is either the integer 0, the floating point number 0.0, or a NULL |
| 4271 | 4271 | ** pointer. Subsequent calls to [sqlite3_errcode()] will return |
| 4272 | 4272 | ** [SQLITE_NOMEM].)^ |
| 4273 | 4273 | */ |
| 4274 | -SQLITE_API const void *SQLITE_APICALL sqlite3_column_blob(sqlite3_stmt*, int iCol); | |
| 4275 | -SQLITE_API int SQLITE_APICALL sqlite3_column_bytes(sqlite3_stmt*, int iCol); | |
| 4276 | -SQLITE_API int SQLITE_APICALL sqlite3_column_bytes16(sqlite3_stmt*, int iCol); | |
| 4277 | -SQLITE_API double SQLITE_APICALL sqlite3_column_double(sqlite3_stmt*, int iCol); | |
| 4278 | -SQLITE_API int SQLITE_APICALL sqlite3_column_int(sqlite3_stmt*, int iCol); | |
| 4279 | -SQLITE_API sqlite3_int64 SQLITE_APICALL sqlite3_column_int64(sqlite3_stmt*, int iCol); | |
| 4280 | -SQLITE_API const unsigned char *SQLITE_APICALL sqlite3_column_text(sqlite3_stmt*, int iCol); | |
| 4281 | -SQLITE_API const void *SQLITE_APICALL sqlite3_column_text16(sqlite3_stmt*, int iCol); | |
| 4282 | -SQLITE_API int SQLITE_APICALL sqlite3_column_type(sqlite3_stmt*, int iCol); | |
| 4283 | -SQLITE_API sqlite3_value *SQLITE_APICALL sqlite3_column_value(sqlite3_stmt*, int iCol); | |
| 4274 | +SQLITE_API const void *SQLITE_STDCALL sqlite3_column_blob(sqlite3_stmt*, int iCol); | |
| 4275 | +SQLITE_API int SQLITE_STDCALL sqlite3_column_bytes(sqlite3_stmt*, int iCol); | |
| 4276 | +SQLITE_API int SQLITE_STDCALL sqlite3_column_bytes16(sqlite3_stmt*, int iCol); | |
| 4277 | +SQLITE_API double SQLITE_STDCALL sqlite3_column_double(sqlite3_stmt*, int iCol); | |
| 4278 | +SQLITE_API int SQLITE_STDCALL sqlite3_column_int(sqlite3_stmt*, int iCol); | |
| 4279 | +SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_column_int64(sqlite3_stmt*, int iCol); | |
| 4280 | +SQLITE_API const unsigned char *SQLITE_STDCALL sqlite3_column_text(sqlite3_stmt*, int iCol); | |
| 4281 | +SQLITE_API const void *SQLITE_STDCALL sqlite3_column_text16(sqlite3_stmt*, int iCol); | |
| 4282 | +SQLITE_API int SQLITE_STDCALL sqlite3_column_type(sqlite3_stmt*, int iCol); | |
| 4283 | +SQLITE_API sqlite3_value *SQLITE_STDCALL sqlite3_column_value(sqlite3_stmt*, int iCol); | |
| 4284 | 4284 | |
| 4285 | 4285 | /* |
| 4286 | 4286 | ** CAPI3REF: Destroy A Prepared Statement Object |
| 4287 | 4287 | ** DESTRUCTOR: sqlite3_stmt |
| 4288 | 4288 | ** |
| @@ -4306,11 +4306,11 @@ | ||
| 4306 | 4306 | ** resource leaks. It is a grievous error for the application to try to use |
| 4307 | 4307 | ** a prepared statement after it has been finalized. Any use of a prepared |
| 4308 | 4308 | ** statement after it has been finalized can result in undefined and |
| 4309 | 4309 | ** undesirable behavior such as segfaults and heap corruption. |
| 4310 | 4310 | */ |
| 4311 | -SQLITE_API int SQLITE_APICALL sqlite3_finalize(sqlite3_stmt *pStmt); | |
| 4311 | +SQLITE_API int SQLITE_STDCALL sqlite3_finalize(sqlite3_stmt *pStmt); | |
| 4312 | 4312 | |
| 4313 | 4313 | /* |
| 4314 | 4314 | ** CAPI3REF: Reset A Prepared Statement Object |
| 4315 | 4315 | ** METHOD: sqlite3_stmt |
| 4316 | 4316 | ** |
| @@ -4333,11 +4333,11 @@ | ||
| 4333 | 4333 | ** [sqlite3_reset(S)] returns an appropriate [error code]. |
| 4334 | 4334 | ** |
| 4335 | 4335 | ** ^The [sqlite3_reset(S)] interface does not change the values |
| 4336 | 4336 | ** of any [sqlite3_bind_blob|bindings] on the [prepared statement] S. |
| 4337 | 4337 | */ |
| 4338 | -SQLITE_API int SQLITE_APICALL sqlite3_reset(sqlite3_stmt *pStmt); | |
| 4338 | +SQLITE_API int SQLITE_STDCALL sqlite3_reset(sqlite3_stmt *pStmt); | |
| 4339 | 4339 | |
| 4340 | 4340 | /* |
| 4341 | 4341 | ** CAPI3REF: Create Or Redefine SQL Functions |
| 4342 | 4342 | ** KEYWORDS: {function creation routines} |
| 4343 | 4343 | ** KEYWORDS: {application-defined SQL function} |
| @@ -4433,40 +4433,40 @@ | ||
| 4433 | 4433 | ** ^An application-defined function is permitted to call other |
| 4434 | 4434 | ** SQLite interfaces. However, such calls must not |
| 4435 | 4435 | ** close the database connection nor finalize or reset the prepared |
| 4436 | 4436 | ** statement in which the function is running. |
| 4437 | 4437 | */ |
| 4438 | -SQLITE_API int SQLITE_APICALL sqlite3_create_function( | |
| 4438 | +SQLITE_API int SQLITE_STDCALL sqlite3_create_function( | |
| 4439 | 4439 | sqlite3 *db, |
| 4440 | 4440 | const char *zFunctionName, |
| 4441 | 4441 | int nArg, |
| 4442 | 4442 | int eTextRep, |
| 4443 | 4443 | void *pApp, |
| 4444 | - void (SQLITE_CALLBACK *xFunc)(sqlite3_context*,int,sqlite3_value**), | |
| 4445 | - void (SQLITE_CALLBACK *xStep)(sqlite3_context*,int,sqlite3_value**), | |
| 4446 | - void (SQLITE_CALLBACK *xFinal)(sqlite3_context*) | |
| 4444 | + void (*xFunc)(sqlite3_context*,int,sqlite3_value**), | |
| 4445 | + void (*xStep)(sqlite3_context*,int,sqlite3_value**), | |
| 4446 | + void (*xFinal)(sqlite3_context*) | |
| 4447 | 4447 | ); |
| 4448 | -SQLITE_API int SQLITE_APICALL sqlite3_create_function16( | |
| 4448 | +SQLITE_API int SQLITE_STDCALL sqlite3_create_function16( | |
| 4449 | 4449 | sqlite3 *db, |
| 4450 | 4450 | const void *zFunctionName, |
| 4451 | 4451 | int nArg, |
| 4452 | 4452 | int eTextRep, |
| 4453 | 4453 | void *pApp, |
| 4454 | - void (SQLITE_CALLBACK *xFunc)(sqlite3_context*,int,sqlite3_value**), | |
| 4455 | - void (SQLITE_CALLBACK *xStep)(sqlite3_context*,int,sqlite3_value**), | |
| 4456 | - void (SQLITE_CALLBACK *xFinal)(sqlite3_context*) | |
| 4454 | + void (*xFunc)(sqlite3_context*,int,sqlite3_value**), | |
| 4455 | + void (*xStep)(sqlite3_context*,int,sqlite3_value**), | |
| 4456 | + void (*xFinal)(sqlite3_context*) | |
| 4457 | 4457 | ); |
| 4458 | -SQLITE_API int SQLITE_APICALL sqlite3_create_function_v2( | |
| 4458 | +SQLITE_API int SQLITE_STDCALL sqlite3_create_function_v2( | |
| 4459 | 4459 | sqlite3 *db, |
| 4460 | 4460 | const char *zFunctionName, |
| 4461 | 4461 | int nArg, |
| 4462 | 4462 | int eTextRep, |
| 4463 | 4463 | void *pApp, |
| 4464 | - void (SQLITE_CALLBACK *xFunc)(sqlite3_context*,int,sqlite3_value**), | |
| 4465 | - void (SQLITE_CALLBACK *xStep)(sqlite3_context*,int,sqlite3_value**), | |
| 4466 | - void (SQLITE_CALLBACK *xFinal)(sqlite3_context*), | |
| 4467 | - void(SQLITE_CALLBACK *xDestroy)(void*) | |
| 4464 | + void (*xFunc)(sqlite3_context*,int,sqlite3_value**), | |
| 4465 | + void (*xStep)(sqlite3_context*,int,sqlite3_value**), | |
| 4466 | + void (*xFinal)(sqlite3_context*), | |
| 4467 | + void(*xDestroy)(void*) | |
| 4468 | 4468 | ); |
| 4469 | 4469 | |
| 4470 | 4470 | /* |
| 4471 | 4471 | ** CAPI3REF: Text Encodings |
| 4472 | 4472 | ** |
| @@ -4499,16 +4499,16 @@ | ||
| 4499 | 4499 | ** to be supported. However, new applications should avoid |
| 4500 | 4500 | ** the use of these functions. To encourage programmers to avoid |
| 4501 | 4501 | ** these functions, we will not explain what they do. |
| 4502 | 4502 | */ |
| 4503 | 4503 | #ifndef SQLITE_OMIT_DEPRECATED |
| 4504 | -SQLITE_API SQLITE_DEPRECATED int SQLITE_APICALL sqlite3_aggregate_count(sqlite3_context*); | |
| 4505 | -SQLITE_API SQLITE_DEPRECATED int SQLITE_APICALL sqlite3_expired(sqlite3_stmt*); | |
| 4506 | -SQLITE_API SQLITE_DEPRECATED int SQLITE_APICALL sqlite3_transfer_bindings(sqlite3_stmt*, sqlite3_stmt*); | |
| 4507 | -SQLITE_API SQLITE_DEPRECATED int SQLITE_APICALL sqlite3_global_recover(void); | |
| 4508 | -SQLITE_API SQLITE_DEPRECATED void SQLITE_APICALL sqlite3_thread_cleanup(void); | |
| 4509 | -SQLITE_API SQLITE_DEPRECATED int SQLITE_APICALL sqlite3_memory_alarm(void(SQLITE_CALLBACK *)(void*,sqlite3_int64,int), | |
| 4504 | +SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_aggregate_count(sqlite3_context*); | |
| 4505 | +SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_expired(sqlite3_stmt*); | |
| 4506 | +SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_transfer_bindings(sqlite3_stmt*, sqlite3_stmt*); | |
| 4507 | +SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_global_recover(void); | |
| 4508 | +SQLITE_API SQLITE_DEPRECATED void SQLITE_STDCALL sqlite3_thread_cleanup(void); | |
| 4509 | +SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_memory_alarm(void(*)(void*,sqlite3_int64,int), | |
| 4510 | 4510 | void*,sqlite3_int64); |
| 4511 | 4511 | #endif |
| 4512 | 4512 | |
| 4513 | 4513 | /* |
| 4514 | 4514 | ** CAPI3REF: Obtaining SQL Values |
| @@ -4554,22 +4554,22 @@ | ||
| 4554 | 4554 | ** or [sqlite3_value_text16()]. |
| 4555 | 4555 | ** |
| 4556 | 4556 | ** These routines must be called from the same thread as |
| 4557 | 4557 | ** the SQL function that supplied the [sqlite3_value*] parameters. |
| 4558 | 4558 | */ |
| 4559 | -SQLITE_API const void *SQLITE_APICALL sqlite3_value_blob(sqlite3_value*); | |
| 4560 | -SQLITE_API int SQLITE_APICALL sqlite3_value_bytes(sqlite3_value*); | |
| 4561 | -SQLITE_API int SQLITE_APICALL sqlite3_value_bytes16(sqlite3_value*); | |
| 4562 | -SQLITE_API double SQLITE_APICALL sqlite3_value_double(sqlite3_value*); | |
| 4563 | -SQLITE_API int SQLITE_APICALL sqlite3_value_int(sqlite3_value*); | |
| 4564 | -SQLITE_API sqlite3_int64 SQLITE_APICALL sqlite3_value_int64(sqlite3_value*); | |
| 4565 | -SQLITE_API const unsigned char *SQLITE_APICALL sqlite3_value_text(sqlite3_value*); | |
| 4566 | -SQLITE_API const void *SQLITE_APICALL sqlite3_value_text16(sqlite3_value*); | |
| 4567 | -SQLITE_API const void *SQLITE_APICALL sqlite3_value_text16le(sqlite3_value*); | |
| 4568 | -SQLITE_API const void *SQLITE_APICALL sqlite3_value_text16be(sqlite3_value*); | |
| 4569 | -SQLITE_API int SQLITE_APICALL sqlite3_value_type(sqlite3_value*); | |
| 4570 | -SQLITE_API int SQLITE_APICALL sqlite3_value_numeric_type(sqlite3_value*); | |
| 4559 | +SQLITE_API const void *SQLITE_STDCALL sqlite3_value_blob(sqlite3_value*); | |
| 4560 | +SQLITE_API int SQLITE_STDCALL sqlite3_value_bytes(sqlite3_value*); | |
| 4561 | +SQLITE_API int SQLITE_STDCALL sqlite3_value_bytes16(sqlite3_value*); | |
| 4562 | +SQLITE_API double SQLITE_STDCALL sqlite3_value_double(sqlite3_value*); | |
| 4563 | +SQLITE_API int SQLITE_STDCALL sqlite3_value_int(sqlite3_value*); | |
| 4564 | +SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_value_int64(sqlite3_value*); | |
| 4565 | +SQLITE_API const unsigned char *SQLITE_STDCALL sqlite3_value_text(sqlite3_value*); | |
| 4566 | +SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16(sqlite3_value*); | |
| 4567 | +SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16le(sqlite3_value*); | |
| 4568 | +SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16be(sqlite3_value*); | |
| 4569 | +SQLITE_API int SQLITE_STDCALL sqlite3_value_type(sqlite3_value*); | |
| 4570 | +SQLITE_API int SQLITE_STDCALL sqlite3_value_numeric_type(sqlite3_value*); | |
| 4571 | 4571 | |
| 4572 | 4572 | /* |
| 4573 | 4573 | ** CAPI3REF: Finding The Subtype Of SQL Values |
| 4574 | 4574 | ** METHOD: sqlite3_value |
| 4575 | 4575 | ** |
| @@ -4581,11 +4581,11 @@ | ||
| 4581 | 4581 | ** |
| 4582 | 4582 | ** SQLite makes no use of subtype itself. It merely passes the subtype |
| 4583 | 4583 | ** from the result of one [application-defined SQL function] into the |
| 4584 | 4584 | ** input of another. |
| 4585 | 4585 | */ |
| 4586 | -SQLITE_API unsigned int SQLITE_APICALL sqlite3_value_subtype(sqlite3_value*); | |
| 4586 | +SQLITE_API unsigned int SQLITE_STDCALL sqlite3_value_subtype(sqlite3_value*); | |
| 4587 | 4587 | |
| 4588 | 4588 | /* |
| 4589 | 4589 | ** CAPI3REF: Copy And Free SQL Values |
| 4590 | 4590 | ** METHOD: sqlite3_value |
| 4591 | 4591 | ** |
| @@ -4597,12 +4597,12 @@ | ||
| 4597 | 4597 | ** |
| 4598 | 4598 | ** ^The sqlite3_value_free(V) interface frees an [sqlite3_value] object |
| 4599 | 4599 | ** previously obtained from [sqlite3_value_dup()]. ^If V is a NULL pointer |
| 4600 | 4600 | ** then sqlite3_value_free(V) is a harmless no-op. |
| 4601 | 4601 | */ |
| 4602 | -SQLITE_API sqlite3_value *SQLITE_APICALL sqlite3_value_dup(const sqlite3_value*); | |
| 4603 | -SQLITE_API void SQLITE_APICALL sqlite3_value_free(sqlite3_value*); | |
| 4602 | +SQLITE_API sqlite3_value *SQLITE_STDCALL sqlite3_value_dup(const sqlite3_value*); | |
| 4603 | +SQLITE_API void SQLITE_STDCALL sqlite3_value_free(sqlite3_value*); | |
| 4604 | 4604 | |
| 4605 | 4605 | /* |
| 4606 | 4606 | ** CAPI3REF: Obtain Aggregate Function Context |
| 4607 | 4607 | ** METHOD: sqlite3_context |
| 4608 | 4608 | ** |
| @@ -4643,11 +4643,11 @@ | ||
| 4643 | 4643 | ** function. |
| 4644 | 4644 | ** |
| 4645 | 4645 | ** This routine must be called from the same thread in which |
| 4646 | 4646 | ** the aggregate SQL function is running. |
| 4647 | 4647 | */ |
| 4648 | -SQLITE_API void *SQLITE_APICALL sqlite3_aggregate_context(sqlite3_context*, int nBytes); | |
| 4648 | +SQLITE_API void *SQLITE_STDCALL sqlite3_aggregate_context(sqlite3_context*, int nBytes); | |
| 4649 | 4649 | |
| 4650 | 4650 | /* |
| 4651 | 4651 | ** CAPI3REF: User Data For Functions |
| 4652 | 4652 | ** METHOD: sqlite3_context |
| 4653 | 4653 | ** |
| @@ -4658,11 +4658,11 @@ | ||
| 4658 | 4658 | ** registered the application defined function. |
| 4659 | 4659 | ** |
| 4660 | 4660 | ** This routine must be called from the same thread in which |
| 4661 | 4661 | ** the application-defined function is running. |
| 4662 | 4662 | */ |
| 4663 | -SQLITE_API void *SQLITE_APICALL sqlite3_user_data(sqlite3_context*); | |
| 4663 | +SQLITE_API void *SQLITE_STDCALL sqlite3_user_data(sqlite3_context*); | |
| 4664 | 4664 | |
| 4665 | 4665 | /* |
| 4666 | 4666 | ** CAPI3REF: Database Connection For Functions |
| 4667 | 4667 | ** METHOD: sqlite3_context |
| 4668 | 4668 | ** |
| @@ -4670,11 +4670,11 @@ | ||
| 4670 | 4670 | ** the pointer to the [database connection] (the 1st parameter) |
| 4671 | 4671 | ** of the [sqlite3_create_function()] |
| 4672 | 4672 | ** and [sqlite3_create_function16()] routines that originally |
| 4673 | 4673 | ** registered the application defined function. |
| 4674 | 4674 | */ |
| 4675 | -SQLITE_API sqlite3 *SQLITE_APICALL sqlite3_context_db_handle(sqlite3_context*); | |
| 4675 | +SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3_context_db_handle(sqlite3_context*); | |
| 4676 | 4676 | |
| 4677 | 4677 | /* |
| 4678 | 4678 | ** CAPI3REF: Function Auxiliary Data |
| 4679 | 4679 | ** METHOD: sqlite3_context |
| 4680 | 4680 | ** |
| @@ -4702,16 +4702,17 @@ | ||
| 4702 | 4702 | ** NULL if the metadata has been discarded. |
| 4703 | 4703 | ** ^After each call to sqlite3_set_auxdata(C,N,P,X) where X is not NULL, |
| 4704 | 4704 | ** SQLite will invoke the destructor function X with parameter P exactly |
| 4705 | 4705 | ** once, when the metadata is discarded. |
| 4706 | 4706 | ** SQLite is free to discard the metadata at any time, including: <ul> |
| 4707 | -** <li> when the corresponding function parameter changes, or | |
| 4708 | -** <li> when [sqlite3_reset()] or [sqlite3_finalize()] is called for the | |
| 4709 | -** SQL statement, or | |
| 4710 | -** <li> when sqlite3_set_auxdata() is invoked again on the same parameter, or | |
| 4711 | -** <li> during the original sqlite3_set_auxdata() call when a memory | |
| 4712 | -** allocation error occurs. </ul>)^ | |
| 4707 | +** <li> ^(when the corresponding function parameter changes)^, or | |
| 4708 | +** <li> ^(when [sqlite3_reset()] or [sqlite3_finalize()] is called for the | |
| 4709 | +** SQL statement)^, or | |
| 4710 | +** <li> ^(when sqlite3_set_auxdata() is invoked again on the same | |
| 4711 | +** parameter)^, or | |
| 4712 | +** <li> ^(during the original sqlite3_set_auxdata() call when a memory | |
| 4713 | +** allocation error occurs.)^ </ul> | |
| 4713 | 4714 | ** |
| 4714 | 4715 | ** Note the last bullet in particular. The destructor X in |
| 4715 | 4716 | ** sqlite3_set_auxdata(C,N,P,X) might be called immediately, before the |
| 4716 | 4717 | ** sqlite3_set_auxdata() interface even returns. Hence sqlite3_set_auxdata() |
| 4717 | 4718 | ** should be called near the end of the function implementation and the |
| @@ -4723,12 +4724,12 @@ | ||
| 4723 | 4724 | ** values and [parameters] and expressions composed from the same.)^ |
| 4724 | 4725 | ** |
| 4725 | 4726 | ** These routines must be called from the same thread in which |
| 4726 | 4727 | ** the SQL function is running. |
| 4727 | 4728 | */ |
| 4728 | -SQLITE_API void *SQLITE_APICALL sqlite3_get_auxdata(sqlite3_context*, int N); | |
| 4729 | -SQLITE_API void SQLITE_APICALL sqlite3_set_auxdata(sqlite3_context*, int N, void*, void (SQLITE_CALLBACK *)(void*)); | |
| 4729 | +SQLITE_API void *SQLITE_STDCALL sqlite3_get_auxdata(sqlite3_context*, int N); | |
| 4730 | +SQLITE_API void SQLITE_STDCALL sqlite3_set_auxdata(sqlite3_context*, int N, void*, void (*)(void*)); | |
| 4730 | 4731 | |
| 4731 | 4732 | |
| 4732 | 4733 | /* |
| 4733 | 4734 | ** CAPI3REF: Constants Defining Special Destructor Behavior |
| 4734 | 4735 | ** |
| @@ -4741,11 +4742,11 @@ | ||
| 4741 | 4742 | ** the content before returning. |
| 4742 | 4743 | ** |
| 4743 | 4744 | ** The typedef is necessary to work around problems in certain |
| 4744 | 4745 | ** C++ compilers. |
| 4745 | 4746 | */ |
| 4746 | -typedef void (SQLITE_CALLBACK *sqlite3_destructor_type)(void*); | |
| 4747 | +typedef void (*sqlite3_destructor_type)(void*); | |
| 4747 | 4748 | #define SQLITE_STATIC ((sqlite3_destructor_type)0) |
| 4748 | 4749 | #define SQLITE_TRANSIENT ((sqlite3_destructor_type)-1) |
| 4749 | 4750 | |
| 4750 | 4751 | /* |
| 4751 | 4752 | ** CAPI3REF: Setting The Result Of An SQL Function |
| @@ -4860,31 +4861,31 @@ | ||
| 4860 | 4861 | ** |
| 4861 | 4862 | ** If these routines are called from within the different thread |
| 4862 | 4863 | ** than the one containing the application-defined function that received |
| 4863 | 4864 | ** the [sqlite3_context] pointer, the results are undefined. |
| 4864 | 4865 | */ |
| 4865 | -SQLITE_API void SQLITE_APICALL sqlite3_result_blob(sqlite3_context*, const void*, int, void(SQLITE_CALLBACK *)(void*)); | |
| 4866 | -SQLITE_API void SQLITE_APICALL sqlite3_result_blob64(sqlite3_context*,const void*, | |
| 4867 | - sqlite3_uint64,void(SQLITE_CALLBACK *)(void*)); | |
| 4868 | -SQLITE_API void SQLITE_APICALL sqlite3_result_double(sqlite3_context*, double); | |
| 4869 | -SQLITE_API void SQLITE_APICALL sqlite3_result_error(sqlite3_context*, const char*, int); | |
| 4870 | -SQLITE_API void SQLITE_APICALL sqlite3_result_error16(sqlite3_context*, const void*, int); | |
| 4871 | -SQLITE_API void SQLITE_APICALL sqlite3_result_error_toobig(sqlite3_context*); | |
| 4872 | -SQLITE_API void SQLITE_APICALL sqlite3_result_error_nomem(sqlite3_context*); | |
| 4873 | -SQLITE_API void SQLITE_APICALL sqlite3_result_error_code(sqlite3_context*, int); | |
| 4874 | -SQLITE_API void SQLITE_APICALL sqlite3_result_int(sqlite3_context*, int); | |
| 4875 | -SQLITE_API void SQLITE_APICALL sqlite3_result_int64(sqlite3_context*, sqlite3_int64); | |
| 4876 | -SQLITE_API void SQLITE_APICALL sqlite3_result_null(sqlite3_context*); | |
| 4877 | -SQLITE_API void SQLITE_APICALL sqlite3_result_text(sqlite3_context*, const char*, int, void(SQLITE_CALLBACK *)(void*)); | |
| 4878 | -SQLITE_API void SQLITE_APICALL sqlite3_result_text64(sqlite3_context*, const char*,sqlite3_uint64, | |
| 4879 | - void(SQLITE_CALLBACK *)(void*), unsigned char encoding); | |
| 4880 | -SQLITE_API void SQLITE_APICALL sqlite3_result_text16(sqlite3_context*, const void*, int, void(SQLITE_CALLBACK *)(void*)); | |
| 4881 | -SQLITE_API void SQLITE_APICALL sqlite3_result_text16le(sqlite3_context*, const void*, int,void(SQLITE_CALLBACK *)(void*)); | |
| 4882 | -SQLITE_API void SQLITE_APICALL sqlite3_result_text16be(sqlite3_context*, const void*, int,void(SQLITE_CALLBACK *)(void*)); | |
| 4883 | -SQLITE_API void SQLITE_APICALL sqlite3_result_value(sqlite3_context*, sqlite3_value*); | |
| 4884 | -SQLITE_API void SQLITE_APICALL sqlite3_result_zeroblob(sqlite3_context*, int n); | |
| 4885 | -SQLITE_API int SQLITE_APICALL sqlite3_result_zeroblob64(sqlite3_context*, sqlite3_uint64 n); | |
| 4866 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_blob(sqlite3_context*, const void*, int, void(*)(void*)); | |
| 4867 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_blob64(sqlite3_context*,const void*, | |
| 4868 | + sqlite3_uint64,void(*)(void*)); | |
| 4869 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_double(sqlite3_context*, double); | |
| 4870 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_error(sqlite3_context*, const char*, int); | |
| 4871 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_error16(sqlite3_context*, const void*, int); | |
| 4872 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_error_toobig(sqlite3_context*); | |
| 4873 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_error_nomem(sqlite3_context*); | |
| 4874 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_error_code(sqlite3_context*, int); | |
| 4875 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_int(sqlite3_context*, int); | |
| 4876 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_int64(sqlite3_context*, sqlite3_int64); | |
| 4877 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_null(sqlite3_context*); | |
| 4878 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_text(sqlite3_context*, const char*, int, void(*)(void*)); | |
| 4879 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_text64(sqlite3_context*, const char*,sqlite3_uint64, | |
| 4880 | + void(*)(void*), unsigned char encoding); | |
| 4881 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_text16(sqlite3_context*, const void*, int, void(*)(void*)); | |
| 4882 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_text16le(sqlite3_context*, const void*, int,void(*)(void*)); | |
| 4883 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_text16be(sqlite3_context*, const void*, int,void(*)(void*)); | |
| 4884 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_value(sqlite3_context*, sqlite3_value*); | |
| 4885 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_zeroblob(sqlite3_context*, int n); | |
| 4886 | +SQLITE_API int SQLITE_STDCALL sqlite3_result_zeroblob64(sqlite3_context*, sqlite3_uint64 n); | |
| 4886 | 4887 | |
| 4887 | 4888 | |
| 4888 | 4889 | /* |
| 4889 | 4890 | ** CAPI3REF: Setting The Subtype Of An SQL Function |
| 4890 | 4891 | ** METHOD: sqlite3_context |
| @@ -4895,11 +4896,11 @@ | ||
| 4895 | 4896 | ** of the subtype T are preserved in current versions of SQLite; |
| 4896 | 4897 | ** higher order bits are discarded. |
| 4897 | 4898 | ** The number of subtype bytes preserved by SQLite might increase |
| 4898 | 4899 | ** in future releases of SQLite. |
| 4899 | 4900 | */ |
| 4900 | -SQLITE_API void SQLITE_APICALL sqlite3_result_subtype(sqlite3_context*,unsigned int); | |
| 4901 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_subtype(sqlite3_context*,unsigned int); | |
| 4901 | 4902 | |
| 4902 | 4903 | /* |
| 4903 | 4904 | ** CAPI3REF: Define New Collating Sequences |
| 4904 | 4905 | ** METHOD: sqlite3 |
| 4905 | 4906 | ** |
| @@ -4977,31 +4978,31 @@ | ||
| 4977 | 4978 | ** is unfortunate but cannot be changed without breaking backwards |
| 4978 | 4979 | ** compatibility. |
| 4979 | 4980 | ** |
| 4980 | 4981 | ** See also: [sqlite3_collation_needed()] and [sqlite3_collation_needed16()]. |
| 4981 | 4982 | */ |
| 4982 | -SQLITE_API int SQLITE_APICALL sqlite3_create_collation( | |
| 4983 | +SQLITE_API int SQLITE_STDCALL sqlite3_create_collation( | |
| 4983 | 4984 | sqlite3*, |
| 4984 | 4985 | const char *zName, |
| 4985 | 4986 | int eTextRep, |
| 4986 | 4987 | void *pArg, |
| 4987 | - int(SQLITE_CALLBACK *xCompare)(void*,int,const void*,int,const void*) | |
| 4988 | + int(*xCompare)(void*,int,const void*,int,const void*) | |
| 4988 | 4989 | ); |
| 4989 | -SQLITE_API int SQLITE_APICALL sqlite3_create_collation_v2( | |
| 4990 | +SQLITE_API int SQLITE_STDCALL sqlite3_create_collation_v2( | |
| 4990 | 4991 | sqlite3*, |
| 4991 | 4992 | const char *zName, |
| 4992 | 4993 | int eTextRep, |
| 4993 | 4994 | void *pArg, |
| 4994 | - int(SQLITE_CALLBACK *xCompare)(void*,int,const void*,int,const void*), | |
| 4995 | - void(SQLITE_CALLBACK *xDestroy)(void*) | |
| 4995 | + int(*xCompare)(void*,int,const void*,int,const void*), | |
| 4996 | + void(*xDestroy)(void*) | |
| 4996 | 4997 | ); |
| 4997 | -SQLITE_API int SQLITE_APICALL sqlite3_create_collation16( | |
| 4998 | +SQLITE_API int SQLITE_STDCALL sqlite3_create_collation16( | |
| 4998 | 4999 | sqlite3*, |
| 4999 | 5000 | const void *zName, |
| 5000 | 5001 | int eTextRep, |
| 5001 | 5002 | void *pArg, |
| 5002 | - int(SQLITE_CALLBACK *xCompare)(void*,int,const void*,int,const void*) | |
| 5003 | + int(*xCompare)(void*,int,const void*,int,const void*) | |
| 5003 | 5004 | ); |
| 5004 | 5005 | |
| 5005 | 5006 | /* |
| 5006 | 5007 | ** CAPI3REF: Collation Needed Callbacks |
| 5007 | 5008 | ** METHOD: sqlite3 |
| @@ -5027,19 +5028,19 @@ | ||
| 5027 | 5028 | ** |
| 5028 | 5029 | ** The callback function should register the desired collation using |
| 5029 | 5030 | ** [sqlite3_create_collation()], [sqlite3_create_collation16()], or |
| 5030 | 5031 | ** [sqlite3_create_collation_v2()]. |
| 5031 | 5032 | */ |
| 5032 | -SQLITE_API int SQLITE_APICALL sqlite3_collation_needed( | |
| 5033 | +SQLITE_API int SQLITE_STDCALL sqlite3_collation_needed( | |
| 5033 | 5034 | sqlite3*, |
| 5034 | 5035 | void*, |
| 5035 | - void(SQLITE_CALLBACK *)(void*,sqlite3*,int eTextRep,const char*) | |
| 5036 | + void(*)(void*,sqlite3*,int eTextRep,const char*) | |
| 5036 | 5037 | ); |
| 5037 | -SQLITE_API int SQLITE_APICALL sqlite3_collation_needed16( | |
| 5038 | +SQLITE_API int SQLITE_STDCALL sqlite3_collation_needed16( | |
| 5038 | 5039 | sqlite3*, |
| 5039 | 5040 | void*, |
| 5040 | - void(SQLITE_CALLBACK *)(void*,sqlite3*,int eTextRep,const void*) | |
| 5041 | + void(*)(void*,sqlite3*,int eTextRep,const void*) | |
| 5041 | 5042 | ); |
| 5042 | 5043 | |
| 5043 | 5044 | #ifdef SQLITE_HAS_CODEC |
| 5044 | 5045 | /* |
| 5045 | 5046 | ** Specify the key for an encrypted database. This routine should be |
| @@ -5046,15 +5047,15 @@ | ||
| 5046 | 5047 | ** called right after sqlite3_open(). |
| 5047 | 5048 | ** |
| 5048 | 5049 | ** The code to implement this API is not available in the public release |
| 5049 | 5050 | ** of SQLite. |
| 5050 | 5051 | */ |
| 5051 | -SQLITE_API int SQLITE_APICALL sqlite3_key( | |
| 5052 | +SQLITE_API int SQLITE_STDCALL sqlite3_key( | |
| 5052 | 5053 | sqlite3 *db, /* Database to be rekeyed */ |
| 5053 | 5054 | const void *pKey, int nKey /* The key */ |
| 5054 | 5055 | ); |
| 5055 | -SQLITE_API int SQLITE_APICALL sqlite3_key_v2( | |
| 5056 | +SQLITE_API int SQLITE_STDCALL sqlite3_key_v2( | |
| 5056 | 5057 | sqlite3 *db, /* Database to be rekeyed */ |
| 5057 | 5058 | const char *zDbName, /* Name of the database */ |
| 5058 | 5059 | const void *pKey, int nKey /* The key */ |
| 5059 | 5060 | ); |
| 5060 | 5061 | |
| @@ -5064,35 +5065,35 @@ | ||
| 5064 | 5065 | ** database is decrypted. |
| 5065 | 5066 | ** |
| 5066 | 5067 | ** The code to implement this API is not available in the public release |
| 5067 | 5068 | ** of SQLite. |
| 5068 | 5069 | */ |
| 5069 | -SQLITE_API int SQLITE_APICALL sqlite3_rekey( | |
| 5070 | +SQLITE_API int SQLITE_STDCALL sqlite3_rekey( | |
| 5070 | 5071 | sqlite3 *db, /* Database to be rekeyed */ |
| 5071 | 5072 | const void *pKey, int nKey /* The new key */ |
| 5072 | 5073 | ); |
| 5073 | -SQLITE_API int SQLITE_APICALL sqlite3_rekey_v2( | |
| 5074 | +SQLITE_API int SQLITE_STDCALL sqlite3_rekey_v2( | |
| 5074 | 5075 | sqlite3 *db, /* Database to be rekeyed */ |
| 5075 | 5076 | const char *zDbName, /* Name of the database */ |
| 5076 | 5077 | const void *pKey, int nKey /* The new key */ |
| 5077 | 5078 | ); |
| 5078 | 5079 | |
| 5079 | 5080 | /* |
| 5080 | 5081 | ** Specify the activation key for a SEE database. Unless |
| 5081 | 5082 | ** activated, none of the SEE routines will work. |
| 5082 | 5083 | */ |
| 5083 | -SQLITE_API void SQLITE_APICALL sqlite3_activate_see( | |
| 5084 | +SQLITE_API void SQLITE_STDCALL sqlite3_activate_see( | |
| 5084 | 5085 | const char *zPassPhrase /* Activation phrase */ |
| 5085 | 5086 | ); |
| 5086 | 5087 | #endif |
| 5087 | 5088 | |
| 5088 | 5089 | #ifdef SQLITE_ENABLE_CEROD |
| 5089 | 5090 | /* |
| 5090 | 5091 | ** Specify the activation key for a CEROD database. Unless |
| 5091 | 5092 | ** activated, none of the CEROD routines will work. |
| 5092 | 5093 | */ |
| 5093 | -SQLITE_API void SQLITE_APICALL sqlite3_activate_cerod( | |
| 5094 | +SQLITE_API void SQLITE_STDCALL sqlite3_activate_cerod( | |
| 5094 | 5095 | const char *zPassPhrase /* Activation phrase */ |
| 5095 | 5096 | ); |
| 5096 | 5097 | #endif |
| 5097 | 5098 | |
| 5098 | 5099 | /* |
| @@ -5110,11 +5111,11 @@ | ||
| 5110 | 5111 | ** method of the default [sqlite3_vfs] object. If the xSleep() method |
| 5111 | 5112 | ** of the default VFS is not implemented correctly, or not implemented at |
| 5112 | 5113 | ** all, then the behavior of sqlite3_sleep() may deviate from the description |
| 5113 | 5114 | ** in the previous paragraphs. |
| 5114 | 5115 | */ |
| 5115 | -SQLITE_API int SQLITE_APICALL sqlite3_sleep(int); | |
| 5116 | +SQLITE_API int SQLITE_STDCALL sqlite3_sleep(int); | |
| 5116 | 5117 | |
| 5117 | 5118 | /* |
| 5118 | 5119 | ** CAPI3REF: Name Of The Folder Holding Temporary Files |
| 5119 | 5120 | ** |
| 5120 | 5121 | ** ^(If this global variable is made to point to a string which is |
| @@ -5229,11 +5230,11 @@ | ||
| 5229 | 5230 | ** |
| 5230 | 5231 | ** If another thread changes the autocommit status of the database |
| 5231 | 5232 | ** connection while this routine is running, then the return value |
| 5232 | 5233 | ** is undefined. |
| 5233 | 5234 | */ |
| 5234 | -SQLITE_API int SQLITE_APICALL sqlite3_get_autocommit(sqlite3*); | |
| 5235 | +SQLITE_API int SQLITE_STDCALL sqlite3_get_autocommit(sqlite3*); | |
| 5235 | 5236 | |
| 5236 | 5237 | /* |
| 5237 | 5238 | ** CAPI3REF: Find The Database Handle Of A Prepared Statement |
| 5238 | 5239 | ** METHOD: sqlite3_stmt |
| 5239 | 5240 | ** |
| @@ -5242,11 +5243,11 @@ | ||
| 5242 | 5243 | ** returned by sqlite3_db_handle is the same [database connection] |
| 5243 | 5244 | ** that was the first argument |
| 5244 | 5245 | ** to the [sqlite3_prepare_v2()] call (or its variants) that was used to |
| 5245 | 5246 | ** create the statement in the first place. |
| 5246 | 5247 | */ |
| 5247 | -SQLITE_API sqlite3 *SQLITE_APICALL sqlite3_db_handle(sqlite3_stmt*); | |
| 5248 | +SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3_db_handle(sqlite3_stmt*); | |
| 5248 | 5249 | |
| 5249 | 5250 | /* |
| 5250 | 5251 | ** CAPI3REF: Return The Filename For A Database Connection |
| 5251 | 5252 | ** METHOD: sqlite3 |
| 5252 | 5253 | ** |
| @@ -5259,21 +5260,21 @@ | ||
| 5259 | 5260 | ** ^The filename returned by this function is the output of the |
| 5260 | 5261 | ** xFullPathname method of the [VFS]. ^In other words, the filename |
| 5261 | 5262 | ** will be an absolute pathname, even if the filename used |
| 5262 | 5263 | ** to open the database originally was a URI or relative pathname. |
| 5263 | 5264 | */ |
| 5264 | -SQLITE_API const char *SQLITE_APICALL sqlite3_db_filename(sqlite3 *db, const char *zDbName); | |
| 5265 | +SQLITE_API const char *SQLITE_STDCALL sqlite3_db_filename(sqlite3 *db, const char *zDbName); | |
| 5265 | 5266 | |
| 5266 | 5267 | /* |
| 5267 | 5268 | ** CAPI3REF: Determine if a database is read-only |
| 5268 | 5269 | ** METHOD: sqlite3 |
| 5269 | 5270 | ** |
| 5270 | 5271 | ** ^The sqlite3_db_readonly(D,N) interface returns 1 if the database N |
| 5271 | 5272 | ** of connection D is read-only, 0 if it is read/write, or -1 if N is not |
| 5272 | 5273 | ** the name of a database on connection D. |
| 5273 | 5274 | */ |
| 5274 | -SQLITE_API int SQLITE_APICALL sqlite3_db_readonly(sqlite3 *db, const char *zDbName); | |
| 5275 | +SQLITE_API int SQLITE_STDCALL sqlite3_db_readonly(sqlite3 *db, const char *zDbName); | |
| 5275 | 5276 | |
| 5276 | 5277 | /* |
| 5277 | 5278 | ** CAPI3REF: Find the next prepared statement |
| 5278 | 5279 | ** METHOD: sqlite3 |
| 5279 | 5280 | ** |
| @@ -5285,11 +5286,11 @@ | ||
| 5285 | 5286 | ** |
| 5286 | 5287 | ** The [database connection] pointer D in a call to |
| 5287 | 5288 | ** [sqlite3_next_stmt(D,S)] must refer to an open database |
| 5288 | 5289 | ** connection and in particular must not be a NULL pointer. |
| 5289 | 5290 | */ |
| 5290 | -SQLITE_API sqlite3_stmt *SQLITE_APICALL sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt); | |
| 5291 | +SQLITE_API sqlite3_stmt *SQLITE_STDCALL sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt); | |
| 5291 | 5292 | |
| 5292 | 5293 | /* |
| 5293 | 5294 | ** CAPI3REF: Commit And Rollback Notification Callbacks |
| 5294 | 5295 | ** METHOD: sqlite3 |
| 5295 | 5296 | ** |
| @@ -5334,12 +5335,12 @@ | ||
| 5334 | 5335 | ** ^The rollback callback is not invoked if a transaction is |
| 5335 | 5336 | ** automatically rolled back because the database connection is closed. |
| 5336 | 5337 | ** |
| 5337 | 5338 | ** See also the [sqlite3_update_hook()] interface. |
| 5338 | 5339 | */ |
| 5339 | -SQLITE_API void *SQLITE_APICALL sqlite3_commit_hook(sqlite3*, int(SQLITE_CALLBACK *)(void*), void*); | |
| 5340 | -SQLITE_API void *SQLITE_APICALL sqlite3_rollback_hook(sqlite3*, void(SQLITE_CALLBACK *)(void *), void*); | |
| 5340 | +SQLITE_API void *SQLITE_STDCALL sqlite3_commit_hook(sqlite3*, int(*)(void*), void*); | |
| 5341 | +SQLITE_API void *SQLITE_STDCALL sqlite3_rollback_hook(sqlite3*, void(*)(void *), void*); | |
| 5341 | 5342 | |
| 5342 | 5343 | /* |
| 5343 | 5344 | ** CAPI3REF: Data Change Notification Callbacks |
| 5344 | 5345 | ** METHOD: sqlite3 |
| 5345 | 5346 | ** |
| @@ -5386,13 +5387,13 @@ | ||
| 5386 | 5387 | ** the first call on D. |
| 5387 | 5388 | ** |
| 5388 | 5389 | ** See also the [sqlite3_commit_hook()], [sqlite3_rollback_hook()], |
| 5389 | 5390 | ** and [sqlite3_preupdate_hook()] interfaces. |
| 5390 | 5391 | */ |
| 5391 | -SQLITE_API void *SQLITE_APICALL sqlite3_update_hook( | |
| 5392 | +SQLITE_API void *SQLITE_STDCALL sqlite3_update_hook( | |
| 5392 | 5393 | sqlite3*, |
| 5393 | - void(SQLITE_CALLBACK *)(void *,int ,char const *,char const *,sqlite3_int64), | |
| 5394 | + void(*)(void *,int ,char const *,char const *,sqlite3_int64), | |
| 5394 | 5395 | void* |
| 5395 | 5396 | ); |
| 5396 | 5397 | |
| 5397 | 5398 | /* |
| 5398 | 5399 | ** CAPI3REF: Enable Or Disable Shared Pager Cache |
| @@ -5426,11 +5427,11 @@ | ||
| 5426 | 5427 | ** This interface is threadsafe on processors where writing a |
| 5427 | 5428 | ** 32-bit integer is atomic. |
| 5428 | 5429 | ** |
| 5429 | 5430 | ** See Also: [SQLite Shared-Cache Mode] |
| 5430 | 5431 | */ |
| 5431 | -SQLITE_API int SQLITE_APICALL sqlite3_enable_shared_cache(int); | |
| 5432 | +SQLITE_API int SQLITE_STDCALL sqlite3_enable_shared_cache(int); | |
| 5432 | 5433 | |
| 5433 | 5434 | /* |
| 5434 | 5435 | ** CAPI3REF: Attempt To Free Heap Memory |
| 5435 | 5436 | ** |
| 5436 | 5437 | ** ^The sqlite3_release_memory() interface attempts to free N bytes |
| @@ -5442,11 +5443,11 @@ | ||
| 5442 | 5443 | ** ^The sqlite3_release_memory() routine is a no-op returning zero |
| 5443 | 5444 | ** if SQLite is not compiled with [SQLITE_ENABLE_MEMORY_MANAGEMENT]. |
| 5444 | 5445 | ** |
| 5445 | 5446 | ** See also: [sqlite3_db_release_memory()] |
| 5446 | 5447 | */ |
| 5447 | -SQLITE_API int SQLITE_APICALL sqlite3_release_memory(int); | |
| 5448 | +SQLITE_API int SQLITE_STDCALL sqlite3_release_memory(int); | |
| 5448 | 5449 | |
| 5449 | 5450 | /* |
| 5450 | 5451 | ** CAPI3REF: Free Memory Used By A Database Connection |
| 5451 | 5452 | ** METHOD: sqlite3 |
| 5452 | 5453 | ** |
| @@ -5456,11 +5457,11 @@ | ||
| 5456 | 5457 | ** when the [SQLITE_ENABLE_MEMORY_MANAGEMENT] compile-time option is |
| 5457 | 5458 | ** omitted. |
| 5458 | 5459 | ** |
| 5459 | 5460 | ** See also: [sqlite3_release_memory()] |
| 5460 | 5461 | */ |
| 5461 | -SQLITE_API int SQLITE_APICALL sqlite3_db_release_memory(sqlite3*); | |
| 5462 | +SQLITE_API int SQLITE_STDCALL sqlite3_db_release_memory(sqlite3*); | |
| 5462 | 5463 | |
| 5463 | 5464 | /* |
| 5464 | 5465 | ** CAPI3REF: Impose A Limit On Heap Size |
| 5465 | 5466 | ** |
| 5466 | 5467 | ** ^The sqlite3_soft_heap_limit64() interface sets and/or queries the |
| @@ -5508,11 +5509,11 @@ | ||
| 5508 | 5509 | ** the use of [SQLITE_ENABLE_MEMORY_MANAGEMENT]. |
| 5509 | 5510 | ** |
| 5510 | 5511 | ** The circumstances under which SQLite will enforce the soft heap limit may |
| 5511 | 5512 | ** changes in future releases of SQLite. |
| 5512 | 5513 | */ |
| 5513 | -SQLITE_API sqlite3_int64 SQLITE_APICALL sqlite3_soft_heap_limit64(sqlite3_int64 N); | |
| 5514 | +SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_soft_heap_limit64(sqlite3_int64 N); | |
| 5514 | 5515 | |
| 5515 | 5516 | /* |
| 5516 | 5517 | ** CAPI3REF: Deprecated Soft Heap Limit Interface |
| 5517 | 5518 | ** DEPRECATED |
| 5518 | 5519 | ** |
| @@ -5519,11 +5520,11 @@ | ||
| 5519 | 5520 | ** This is a deprecated version of the [sqlite3_soft_heap_limit64()] |
| 5520 | 5521 | ** interface. This routine is provided for historical compatibility |
| 5521 | 5522 | ** only. All new applications should use the |
| 5522 | 5523 | ** [sqlite3_soft_heap_limit64()] interface rather than this one. |
| 5523 | 5524 | */ |
| 5524 | -SQLITE_API SQLITE_DEPRECATED void SQLITE_APICALL sqlite3_soft_heap_limit(int N); | |
| 5525 | +SQLITE_API SQLITE_DEPRECATED void SQLITE_STDCALL sqlite3_soft_heap_limit(int N); | |
| 5525 | 5526 | |
| 5526 | 5527 | |
| 5527 | 5528 | /* |
| 5528 | 5529 | ** CAPI3REF: Extract Metadata About A Column Of A Table |
| 5529 | 5530 | ** METHOD: sqlite3 |
| @@ -5589,11 +5590,11 @@ | ||
| 5589 | 5590 | ** |
| 5590 | 5591 | ** ^This function causes all database schemas to be read from disk and |
| 5591 | 5592 | ** parsed, if that has not already been done, and returns an error if |
| 5592 | 5593 | ** any errors are encountered while loading the schema. |
| 5593 | 5594 | */ |
| 5594 | -SQLITE_API int SQLITE_APICALL sqlite3_table_column_metadata( | |
| 5595 | +SQLITE_API int SQLITE_STDCALL sqlite3_table_column_metadata( | |
| 5595 | 5596 | sqlite3 *db, /* Connection handle */ |
| 5596 | 5597 | const char *zDbName, /* Database name or NULL */ |
| 5597 | 5598 | const char *zTableName, /* Table name */ |
| 5598 | 5599 | const char *zColumnName, /* Column name */ |
| 5599 | 5600 | char const **pzDataType, /* OUTPUT: Declared data type */ |
| @@ -5645,11 +5646,11 @@ | ||
| 5645 | 5646 | ** disabled and prevent SQL injections from giving attackers |
| 5646 | 5647 | ** access to extension loading capabilities. |
| 5647 | 5648 | ** |
| 5648 | 5649 | ** See also the [load_extension() SQL function]. |
| 5649 | 5650 | */ |
| 5650 | -SQLITE_API int SQLITE_APICALL sqlite3_load_extension( | |
| 5651 | +SQLITE_API int SQLITE_STDCALL sqlite3_load_extension( | |
| 5651 | 5652 | sqlite3 *db, /* Load the extension into this database connection */ |
| 5652 | 5653 | const char *zFile, /* Name of the shared library containing extension */ |
| 5653 | 5654 | const char *zProc, /* Entry point. Derived from zFile if 0 */ |
| 5654 | 5655 | char **pzErrMsg /* Put error message here if not 0 */ |
| 5655 | 5656 | ); |
| @@ -5668,20 +5669,20 @@ | ||
| 5668 | 5669 | ** to turn extension loading on and call it with onoff==0 to turn |
| 5669 | 5670 | ** it back off again. |
| 5670 | 5671 | ** |
| 5671 | 5672 | ** ^This interface enables or disables both the C-API |
| 5672 | 5673 | ** [sqlite3_load_extension()] and the SQL function [load_extension()]. |
| 5673 | -** Use [sqlite3_db_config](db,[SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION],..) | |
| 5674 | -** to enable or disable only the C-API. | |
| 5674 | +** ^(Use [sqlite3_db_config](db,[SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION],..) | |
| 5675 | +** to enable or disable only the C-API.)^ | |
| 5675 | 5676 | ** |
| 5676 | 5677 | ** <b>Security warning:</b> It is recommended that extension loading |
| 5677 | 5678 | ** be disabled using the [SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION] method |
| 5678 | 5679 | ** rather than this interface, so the [load_extension()] SQL function |
| 5679 | 5680 | ** remains disabled. This will prevent SQL injections from giving attackers |
| 5680 | 5681 | ** access to extension loading capabilities. |
| 5681 | 5682 | */ |
| 5682 | -SQLITE_API int SQLITE_APICALL sqlite3_enable_load_extension(sqlite3 *db, int onoff); | |
| 5683 | +SQLITE_API int SQLITE_STDCALL sqlite3_enable_load_extension(sqlite3 *db, int onoff); | |
| 5683 | 5684 | |
| 5684 | 5685 | /* |
| 5685 | 5686 | ** CAPI3REF: Automatically Load Statically Linked Extensions |
| 5686 | 5687 | ** |
| 5687 | 5688 | ** ^This interface causes the xEntryPoint() function to be invoked for |
| @@ -5715,11 +5716,11 @@ | ||
| 5715 | 5716 | ** will be called more than once for each database connection that is opened. |
| 5716 | 5717 | ** |
| 5717 | 5718 | ** See also: [sqlite3_reset_auto_extension()] |
| 5718 | 5719 | ** and [sqlite3_cancel_auto_extension()] |
| 5719 | 5720 | */ |
| 5720 | -SQLITE_API int SQLITE_APICALL sqlite3_auto_extension(void(SQLITE_CALLBACK *xEntryPoint)(void)); | |
| 5721 | +SQLITE_API int SQLITE_STDCALL sqlite3_auto_extension(void(*xEntryPoint)(void)); | |
| 5721 | 5722 | |
| 5722 | 5723 | /* |
| 5723 | 5724 | ** CAPI3REF: Cancel Automatic Extension Loading |
| 5724 | 5725 | ** |
| 5725 | 5726 | ** ^The [sqlite3_cancel_auto_extension(X)] interface unregisters the |
| @@ -5727,19 +5728,19 @@ | ||
| 5727 | 5728 | ** [sqlite3_auto_extension(X)]. ^The [sqlite3_cancel_auto_extension(X)] |
| 5728 | 5729 | ** routine returns 1 if initialization routine X was successfully |
| 5729 | 5730 | ** unregistered and it returns 0 if X was not on the list of initialization |
| 5730 | 5731 | ** routines. |
| 5731 | 5732 | */ |
| 5732 | -SQLITE_API int SQLITE_APICALL sqlite3_cancel_auto_extension(void(SQLITE_CALLBACK *xEntryPoint)(void)); | |
| 5733 | +SQLITE_API int SQLITE_STDCALL sqlite3_cancel_auto_extension(void(*xEntryPoint)(void)); | |
| 5733 | 5734 | |
| 5734 | 5735 | /* |
| 5735 | 5736 | ** CAPI3REF: Reset Automatic Extension Loading |
| 5736 | 5737 | ** |
| 5737 | 5738 | ** ^This interface disables all automatic extensions previously |
| 5738 | 5739 | ** registered using [sqlite3_auto_extension()]. |
| 5739 | 5740 | */ |
| 5740 | -SQLITE_API void SQLITE_APICALL sqlite3_reset_auto_extension(void); | |
| 5741 | +SQLITE_API void SQLITE_STDCALL sqlite3_reset_auto_extension(void); | |
| 5741 | 5742 | |
| 5742 | 5743 | /* |
| 5743 | 5744 | ** The interface to the virtual-table mechanism is currently considered |
| 5744 | 5745 | ** to be experimental. The interface might change in incompatible ways. |
| 5745 | 5746 | ** If this is a problem for you, do not use the interface at this time. |
| @@ -5772,41 +5773,41 @@ | ||
| 5772 | 5773 | ** of this structure must not change while it is registered with |
| 5773 | 5774 | ** any database connection. |
| 5774 | 5775 | */ |
| 5775 | 5776 | struct sqlite3_module { |
| 5776 | 5777 | int iVersion; |
| 5777 | - int (SQLITE_CALLBACK *xCreate)(sqlite3*, void *pAux, | |
| 5778 | - int argc, const char *const*argv, | |
| 5779 | - sqlite3_vtab **ppVTab, char**); | |
| 5780 | - int (SQLITE_CALLBACK *xConnect)(sqlite3*, void *pAux, | |
| 5781 | - int argc, const char *const*argv, | |
| 5782 | - sqlite3_vtab **ppVTab, char**); | |
| 5783 | - int (SQLITE_CALLBACK *xBestIndex)(sqlite3_vtab *pVTab, sqlite3_index_info*); | |
| 5784 | - int (SQLITE_CALLBACK *xDisconnect)(sqlite3_vtab *pVTab); | |
| 5785 | - int (SQLITE_CALLBACK *xDestroy)(sqlite3_vtab *pVTab); | |
| 5786 | - int (SQLITE_CALLBACK *xOpen)(sqlite3_vtab *pVTab, sqlite3_vtab_cursor **ppCursor); | |
| 5787 | - int (SQLITE_CALLBACK *xClose)(sqlite3_vtab_cursor*); | |
| 5788 | - int (SQLITE_CALLBACK *xFilter)(sqlite3_vtab_cursor*, int idxNum, const char *idxStr, | |
| 5789 | - int argc, sqlite3_value **argv); | |
| 5790 | - int (SQLITE_CALLBACK *xNext)(sqlite3_vtab_cursor*); | |
| 5791 | - int (SQLITE_CALLBACK *xEof)(sqlite3_vtab_cursor*); | |
| 5792 | - int (SQLITE_CALLBACK *xColumn)(sqlite3_vtab_cursor*, sqlite3_context*, int); | |
| 5793 | - int (SQLITE_CALLBACK *xRowid)(sqlite3_vtab_cursor*, sqlite3_int64 *pRowid); | |
| 5794 | - int (SQLITE_CALLBACK *xUpdate)(sqlite3_vtab *, int, sqlite3_value **, sqlite3_int64 *); | |
| 5795 | - int (SQLITE_CALLBACK *xBegin)(sqlite3_vtab *pVTab); | |
| 5796 | - int (SQLITE_CALLBACK *xSync)(sqlite3_vtab *pVTab); | |
| 5797 | - int (SQLITE_CALLBACK *xCommit)(sqlite3_vtab *pVTab); | |
| 5798 | - int (SQLITE_CALLBACK *xRollback)(sqlite3_vtab *pVTab); | |
| 5799 | - int (SQLITE_CALLBACK *xFindFunction)(sqlite3_vtab *pVtab, int nArg, const char *zName, | |
| 5800 | - void (SQLITE_CALLBACK **pxFunc)(sqlite3_context*,int,sqlite3_value**), | |
| 5801 | - void **ppArg); | |
| 5802 | - int (SQLITE_CALLBACK *xRename)(sqlite3_vtab *pVtab, const char *zNew); | |
| 5803 | - /* The methods above are in version 1 of the sqlite_module object. Those | |
| 5804 | - ** below are for version 2 and greater. */ | |
| 5805 | - int (SQLITE_CALLBACK *xSavepoint)(sqlite3_vtab *pVTab, int); | |
| 5806 | - int (SQLITE_CALLBACK *xRelease)(sqlite3_vtab *pVTab, int); | |
| 5807 | - int (SQLITE_CALLBACK *xRollbackTo)(sqlite3_vtab *pVTab, int); | |
| 5778 | + int (*xCreate)(sqlite3*, void *pAux, | |
| 5779 | + int argc, const char *const*argv, | |
| 5780 | + sqlite3_vtab **ppVTab, char**); | |
| 5781 | + int (*xConnect)(sqlite3*, void *pAux, | |
| 5782 | + int argc, const char *const*argv, | |
| 5783 | + sqlite3_vtab **ppVTab, char**); | |
| 5784 | + int (*xBestIndex)(sqlite3_vtab *pVTab, sqlite3_index_info*); | |
| 5785 | + int (*xDisconnect)(sqlite3_vtab *pVTab); | |
| 5786 | + int (*xDestroy)(sqlite3_vtab *pVTab); | |
| 5787 | + int (*xOpen)(sqlite3_vtab *pVTab, sqlite3_vtab_cursor **ppCursor); | |
| 5788 | + int (*xClose)(sqlite3_vtab_cursor*); | |
| 5789 | + int (*xFilter)(sqlite3_vtab_cursor*, int idxNum, const char *idxStr, | |
| 5790 | + int argc, sqlite3_value **argv); | |
| 5791 | + int (*xNext)(sqlite3_vtab_cursor*); | |
| 5792 | + int (*xEof)(sqlite3_vtab_cursor*); | |
| 5793 | + int (*xColumn)(sqlite3_vtab_cursor*, sqlite3_context*, int); | |
| 5794 | + int (*xRowid)(sqlite3_vtab_cursor*, sqlite3_int64 *pRowid); | |
| 5795 | + int (*xUpdate)(sqlite3_vtab *, int, sqlite3_value **, sqlite3_int64 *); | |
| 5796 | + int (*xBegin)(sqlite3_vtab *pVTab); | |
| 5797 | + int (*xSync)(sqlite3_vtab *pVTab); | |
| 5798 | + int (*xCommit)(sqlite3_vtab *pVTab); | |
| 5799 | + int (*xRollback)(sqlite3_vtab *pVTab); | |
| 5800 | + int (*xFindFunction)(sqlite3_vtab *pVtab, int nArg, const char *zName, | |
| 5801 | + void (**pxFunc)(sqlite3_context*,int,sqlite3_value**), | |
| 5802 | + void **ppArg); | |
| 5803 | + int (*xRename)(sqlite3_vtab *pVtab, const char *zNew); | |
| 5804 | + /* The methods above are in version 1 of the sqlite_module object. Those | |
| 5805 | + ** below are for version 2 and greater. */ | |
| 5806 | + int (*xSavepoint)(sqlite3_vtab *pVTab, int); | |
| 5807 | + int (*xRelease)(sqlite3_vtab *pVTab, int); | |
| 5808 | + int (*xRollbackTo)(sqlite3_vtab *pVTab, int); | |
| 5808 | 5809 | }; |
| 5809 | 5810 | |
| 5810 | 5811 | /* |
| 5811 | 5812 | ** CAPI3REF: Virtual Table Indexing Information |
| 5812 | 5813 | ** KEYWORDS: sqlite3_index_info |
| @@ -5980,22 +5981,22 @@ | ||
| 5980 | 5981 | ** be invoked if the call to sqlite3_create_module_v2() fails. |
| 5981 | 5982 | ** ^The sqlite3_create_module() |
| 5982 | 5983 | ** interface is equivalent to sqlite3_create_module_v2() with a NULL |
| 5983 | 5984 | ** destructor. |
| 5984 | 5985 | */ |
| 5985 | -SQLITE_API int SQLITE_APICALL sqlite3_create_module( | |
| 5986 | +SQLITE_API int SQLITE_STDCALL sqlite3_create_module( | |
| 5986 | 5987 | sqlite3 *db, /* SQLite connection to register module with */ |
| 5987 | 5988 | const char *zName, /* Name of the module */ |
| 5988 | 5989 | const sqlite3_module *p, /* Methods for the module */ |
| 5989 | 5990 | void *pClientData /* Client data for xCreate/xConnect */ |
| 5990 | 5991 | ); |
| 5991 | -SQLITE_API int SQLITE_APICALL sqlite3_create_module_v2( | |
| 5992 | +SQLITE_API int SQLITE_STDCALL sqlite3_create_module_v2( | |
| 5992 | 5993 | sqlite3 *db, /* SQLite connection to register module with */ |
| 5993 | 5994 | const char *zName, /* Name of the module */ |
| 5994 | 5995 | const sqlite3_module *p, /* Methods for the module */ |
| 5995 | 5996 | void *pClientData, /* Client data for xCreate/xConnect */ |
| 5996 | - void(SQLITE_CALLBACK *xDestroy)(void*) /* Module destructor function */ | |
| 5997 | + void(*xDestroy)(void*) /* Module destructor function */ | |
| 5997 | 5998 | ); |
| 5998 | 5999 | |
| 5999 | 6000 | /* |
| 6000 | 6001 | ** CAPI3REF: Virtual Table Instance Object |
| 6001 | 6002 | ** KEYWORDS: sqlite3_vtab |
| @@ -6049,11 +6050,11 @@ | ||
| 6049 | 6050 | ** ^The [xCreate] and [xConnect] methods of a |
| 6050 | 6051 | ** [virtual table module] call this interface |
| 6051 | 6052 | ** to declare the format (the names and datatypes of the columns) of |
| 6052 | 6053 | ** the virtual tables they implement. |
| 6053 | 6054 | */ |
| 6054 | -SQLITE_API int SQLITE_APICALL sqlite3_declare_vtab(sqlite3*, const char *zSQL); | |
| 6055 | +SQLITE_API int SQLITE_STDCALL sqlite3_declare_vtab(sqlite3*, const char *zSQL); | |
| 6055 | 6056 | |
| 6056 | 6057 | /* |
| 6057 | 6058 | ** CAPI3REF: Overload A Function For A Virtual Table |
| 6058 | 6059 | ** METHOD: sqlite3 |
| 6059 | 6060 | ** |
| @@ -6068,11 +6069,11 @@ | ||
| 6068 | 6069 | ** of the new function always causes an exception to be thrown. So |
| 6069 | 6070 | ** the new function is not good for anything by itself. Its only |
| 6070 | 6071 | ** purpose is to be a placeholder function that can be overloaded |
| 6071 | 6072 | ** by a [virtual table]. |
| 6072 | 6073 | */ |
| 6073 | -SQLITE_API int SQLITE_APICALL sqlite3_overload_function(sqlite3*, const char *zFuncName, int nArg); | |
| 6074 | +SQLITE_API int SQLITE_STDCALL sqlite3_overload_function(sqlite3*, const char *zFuncName, int nArg); | |
| 6074 | 6075 | |
| 6075 | 6076 | /* |
| 6076 | 6077 | ** The interface to the virtual-table mechanism defined above (back up |
| 6077 | 6078 | ** to a comment remarkably similar to this one) is currently considered |
| 6078 | 6079 | ** to be experimental. The interface might change in incompatible ways. |
| @@ -6167,11 +6168,11 @@ | ||
| 6167 | 6168 | ** zero-filled blob to read or write using the incremental-blob interface. |
| 6168 | 6169 | ** |
| 6169 | 6170 | ** To avoid a resource leak, every open [BLOB handle] should eventually |
| 6170 | 6171 | ** be released by a call to [sqlite3_blob_close()]. |
| 6171 | 6172 | */ |
| 6172 | -SQLITE_API int SQLITE_APICALL sqlite3_blob_open( | |
| 6173 | +SQLITE_API int SQLITE_STDCALL sqlite3_blob_open( | |
| 6173 | 6174 | sqlite3*, |
| 6174 | 6175 | const char *zDb, |
| 6175 | 6176 | const char *zTable, |
| 6176 | 6177 | const char *zColumn, |
| 6177 | 6178 | sqlite3_int64 iRow, |
| @@ -6200,11 +6201,11 @@ | ||
| 6200 | 6201 | ** SQLITE_ABORT. ^Calling [sqlite3_blob_bytes()] on an aborted blob handle |
| 6201 | 6202 | ** always returns zero. |
| 6202 | 6203 | ** |
| 6203 | 6204 | ** ^This function sets the database handle error code and message. |
| 6204 | 6205 | */ |
| 6205 | -SQLITE_API int SQLITE_APICALL sqlite3_blob_reopen(sqlite3_blob *, sqlite3_int64); | |
| 6206 | +SQLITE_API int SQLITE_STDCALL sqlite3_blob_reopen(sqlite3_blob *, sqlite3_int64); | |
| 6206 | 6207 | |
| 6207 | 6208 | /* |
| 6208 | 6209 | ** CAPI3REF: Close A BLOB Handle |
| 6209 | 6210 | ** DESTRUCTOR: sqlite3_blob |
| 6210 | 6211 | ** |
| @@ -6223,11 +6224,11 @@ | ||
| 6223 | 6224 | ** with a null pointer (such as would be returned by a failed call to |
| 6224 | 6225 | ** [sqlite3_blob_open()]) is a harmless no-op. ^Otherwise, if this function |
| 6225 | 6226 | ** is passed a valid open blob handle, the values returned by the |
| 6226 | 6227 | ** sqlite3_errcode() and sqlite3_errmsg() functions are set before returning. |
| 6227 | 6228 | */ |
| 6228 | -SQLITE_API int SQLITE_APICALL sqlite3_blob_close(sqlite3_blob *); | |
| 6229 | +SQLITE_API int SQLITE_STDCALL sqlite3_blob_close(sqlite3_blob *); | |
| 6229 | 6230 | |
| 6230 | 6231 | /* |
| 6231 | 6232 | ** CAPI3REF: Return The Size Of An Open BLOB |
| 6232 | 6233 | ** METHOD: sqlite3_blob |
| 6233 | 6234 | ** |
| @@ -6239,11 +6240,11 @@ | ||
| 6239 | 6240 | ** This routine only works on a [BLOB handle] which has been created |
| 6240 | 6241 | ** by a prior successful call to [sqlite3_blob_open()] and which has not |
| 6241 | 6242 | ** been closed by [sqlite3_blob_close()]. Passing any other pointer in |
| 6242 | 6243 | ** to this routine results in undefined and probably undesirable behavior. |
| 6243 | 6244 | */ |
| 6244 | -SQLITE_API int SQLITE_APICALL sqlite3_blob_bytes(sqlite3_blob *); | |
| 6245 | +SQLITE_API int SQLITE_STDCALL sqlite3_blob_bytes(sqlite3_blob *); | |
| 6245 | 6246 | |
| 6246 | 6247 | /* |
| 6247 | 6248 | ** CAPI3REF: Read Data From A BLOB Incrementally |
| 6248 | 6249 | ** METHOD: sqlite3_blob |
| 6249 | 6250 | ** |
| @@ -6268,11 +6269,11 @@ | ||
| 6268 | 6269 | ** been closed by [sqlite3_blob_close()]. Passing any other pointer in |
| 6269 | 6270 | ** to this routine results in undefined and probably undesirable behavior. |
| 6270 | 6271 | ** |
| 6271 | 6272 | ** See also: [sqlite3_blob_write()]. |
| 6272 | 6273 | */ |
| 6273 | -SQLITE_API int SQLITE_APICALL sqlite3_blob_read(sqlite3_blob *, void *Z, int N, int iOffset); | |
| 6274 | +SQLITE_API int SQLITE_STDCALL sqlite3_blob_read(sqlite3_blob *, void *Z, int N, int iOffset); | |
| 6274 | 6275 | |
| 6275 | 6276 | /* |
| 6276 | 6277 | ** CAPI3REF: Write Data Into A BLOB Incrementally |
| 6277 | 6278 | ** METHOD: sqlite3_blob |
| 6278 | 6279 | ** |
| @@ -6310,11 +6311,11 @@ | ||
| 6310 | 6311 | ** been closed by [sqlite3_blob_close()]. Passing any other pointer in |
| 6311 | 6312 | ** to this routine results in undefined and probably undesirable behavior. |
| 6312 | 6313 | ** |
| 6313 | 6314 | ** See also: [sqlite3_blob_read()]. |
| 6314 | 6315 | */ |
| 6315 | -SQLITE_API int SQLITE_APICALL sqlite3_blob_write(sqlite3_blob *, const void *z, int n, int iOffset); | |
| 6316 | +SQLITE_API int SQLITE_STDCALL sqlite3_blob_write(sqlite3_blob *, const void *z, int n, int iOffset); | |
| 6316 | 6317 | |
| 6317 | 6318 | /* |
| 6318 | 6319 | ** CAPI3REF: Virtual File System Objects |
| 6319 | 6320 | ** |
| 6320 | 6321 | ** A virtual filesystem (VFS) is an [sqlite3_vfs] object |
| @@ -6341,13 +6342,13 @@ | ||
| 6341 | 6342 | ** |
| 6342 | 6343 | ** ^Unregister a VFS with the sqlite3_vfs_unregister() interface. |
| 6343 | 6344 | ** ^(If the default VFS is unregistered, another VFS is chosen as |
| 6344 | 6345 | ** the default. The choice for the new VFS is arbitrary.)^ |
| 6345 | 6346 | */ |
| 6346 | -SQLITE_API sqlite3_vfs *SQLITE_APICALL sqlite3_vfs_find(const char *zVfsName); | |
| 6347 | -SQLITE_API int SQLITE_APICALL sqlite3_vfs_register(sqlite3_vfs*, int makeDflt); | |
| 6348 | -SQLITE_API int SQLITE_APICALL sqlite3_vfs_unregister(sqlite3_vfs*); | |
| 6347 | +SQLITE_API sqlite3_vfs *SQLITE_STDCALL sqlite3_vfs_find(const char *zVfsName); | |
| 6348 | +SQLITE_API int SQLITE_STDCALL sqlite3_vfs_register(sqlite3_vfs*, int makeDflt); | |
| 6349 | +SQLITE_API int SQLITE_STDCALL sqlite3_vfs_unregister(sqlite3_vfs*); | |
| 6349 | 6350 | |
| 6350 | 6351 | /* |
| 6351 | 6352 | ** CAPI3REF: Mutexes |
| 6352 | 6353 | ** |
| 6353 | 6354 | ** The SQLite core uses these routines for thread |
| @@ -6459,15 +6460,15 @@ | ||
| 6459 | 6460 | ** sqlite3_mutex_leave() is a NULL pointer, then all three routines |
| 6460 | 6461 | ** behave as no-ops. |
| 6461 | 6462 | ** |
| 6462 | 6463 | ** See also: [sqlite3_mutex_held()] and [sqlite3_mutex_notheld()]. |
| 6463 | 6464 | */ |
| 6464 | -SQLITE_API sqlite3_mutex *SQLITE_APICALL sqlite3_mutex_alloc(int); | |
| 6465 | -SQLITE_API void SQLITE_APICALL sqlite3_mutex_free(sqlite3_mutex*); | |
| 6466 | -SQLITE_API void SQLITE_APICALL sqlite3_mutex_enter(sqlite3_mutex*); | |
| 6467 | -SQLITE_API int SQLITE_APICALL sqlite3_mutex_try(sqlite3_mutex*); | |
| 6468 | -SQLITE_API void SQLITE_APICALL sqlite3_mutex_leave(sqlite3_mutex*); | |
| 6465 | +SQLITE_API sqlite3_mutex *SQLITE_STDCALL sqlite3_mutex_alloc(int); | |
| 6466 | +SQLITE_API void SQLITE_STDCALL sqlite3_mutex_free(sqlite3_mutex*); | |
| 6467 | +SQLITE_API void SQLITE_STDCALL sqlite3_mutex_enter(sqlite3_mutex*); | |
| 6468 | +SQLITE_API int SQLITE_STDCALL sqlite3_mutex_try(sqlite3_mutex*); | |
| 6469 | +SQLITE_API void SQLITE_STDCALL sqlite3_mutex_leave(sqlite3_mutex*); | |
| 6469 | 6470 | |
| 6470 | 6471 | /* |
| 6471 | 6472 | ** CAPI3REF: Mutex Methods Object |
| 6472 | 6473 | ** |
| 6473 | 6474 | ** An instance of this structure defines the low-level routines |
| @@ -6532,19 +6533,19 @@ | ||
| 6532 | 6533 | ** If xMutexInit fails in any way, it is expected to clean up after itself |
| 6533 | 6534 | ** prior to returning. |
| 6534 | 6535 | */ |
| 6535 | 6536 | typedef struct sqlite3_mutex_methods sqlite3_mutex_methods; |
| 6536 | 6537 | struct sqlite3_mutex_methods { |
| 6537 | - int (SQLITE_CALLBACK *xMutexInit)(void); | |
| 6538 | - int (SQLITE_CALLBACK *xMutexEnd)(void); | |
| 6539 | - sqlite3_mutex *(SQLITE_CALLBACK *xMutexAlloc)(int); | |
| 6540 | - void (SQLITE_CALLBACK *xMutexFree)(sqlite3_mutex *); | |
| 6541 | - void (SQLITE_CALLBACK *xMutexEnter)(sqlite3_mutex *); | |
| 6542 | - int (SQLITE_CALLBACK *xMutexTry)(sqlite3_mutex *); | |
| 6543 | - void (SQLITE_CALLBACK *xMutexLeave)(sqlite3_mutex *); | |
| 6544 | - int (SQLITE_CALLBACK *xMutexHeld)(sqlite3_mutex *); | |
| 6545 | - int (SQLITE_CALLBACK *xMutexNotheld)(sqlite3_mutex *); | |
| 6538 | + int (*xMutexInit)(void); | |
| 6539 | + int (*xMutexEnd)(void); | |
| 6540 | + sqlite3_mutex *(*xMutexAlloc)(int); | |
| 6541 | + void (*xMutexFree)(sqlite3_mutex *); | |
| 6542 | + void (*xMutexEnter)(sqlite3_mutex *); | |
| 6543 | + int (*xMutexTry)(sqlite3_mutex *); | |
| 6544 | + void (*xMutexLeave)(sqlite3_mutex *); | |
| 6545 | + int (*xMutexHeld)(sqlite3_mutex *); | |
| 6546 | + int (*xMutexNotheld)(sqlite3_mutex *); | |
| 6546 | 6547 | }; |
| 6547 | 6548 | |
| 6548 | 6549 | /* |
| 6549 | 6550 | ** CAPI3REF: Mutex Verification Routines |
| 6550 | 6551 | ** |
| @@ -6573,12 +6574,12 @@ | ||
| 6573 | 6574 | ** call to sqlite3_mutex_held() to fail, so a non-zero return is |
| 6574 | 6575 | ** the appropriate thing to do. The sqlite3_mutex_notheld() |
| 6575 | 6576 | ** interface should also return 1 when given a NULL pointer. |
| 6576 | 6577 | */ |
| 6577 | 6578 | #ifndef NDEBUG |
| 6578 | -SQLITE_API int SQLITE_APICALL sqlite3_mutex_held(sqlite3_mutex*); | |
| 6579 | -SQLITE_API int SQLITE_APICALL sqlite3_mutex_notheld(sqlite3_mutex*); | |
| 6579 | +SQLITE_API int SQLITE_STDCALL sqlite3_mutex_held(sqlite3_mutex*); | |
| 6580 | +SQLITE_API int SQLITE_STDCALL sqlite3_mutex_notheld(sqlite3_mutex*); | |
| 6580 | 6581 | #endif |
| 6581 | 6582 | |
| 6582 | 6583 | /* |
| 6583 | 6584 | ** CAPI3REF: Mutex Types |
| 6584 | 6585 | ** |
| @@ -6614,11 +6615,11 @@ | ||
| 6614 | 6615 | ** serializes access to the [database connection] given in the argument |
| 6615 | 6616 | ** when the [threading mode] is Serialized. |
| 6616 | 6617 | ** ^If the [threading mode] is Single-thread or Multi-thread then this |
| 6617 | 6618 | ** routine returns a NULL pointer. |
| 6618 | 6619 | */ |
| 6619 | -SQLITE_API sqlite3_mutex *SQLITE_APICALL sqlite3_db_mutex(sqlite3*); | |
| 6620 | +SQLITE_API sqlite3_mutex *SQLITE_STDCALL sqlite3_db_mutex(sqlite3*); | |
| 6620 | 6621 | |
| 6621 | 6622 | /* |
| 6622 | 6623 | ** CAPI3REF: Low-Level Control Of Database Files |
| 6623 | 6624 | ** METHOD: sqlite3 |
| 6624 | 6625 | ** |
| @@ -6649,11 +6650,11 @@ | ||
| 6649 | 6650 | ** an incorrect zDbName and an SQLITE_ERROR return from the underlying |
| 6650 | 6651 | ** xFileControl method. |
| 6651 | 6652 | ** |
| 6652 | 6653 | ** See also: [SQLITE_FCNTL_LOCKSTATE] |
| 6653 | 6654 | */ |
| 6654 | -SQLITE_API int SQLITE_APICALL sqlite3_file_control(sqlite3*, const char *zDbName, int op, void*); | |
| 6655 | +SQLITE_API int SQLITE_STDCALL sqlite3_file_control(sqlite3*, const char *zDbName, int op, void*); | |
| 6655 | 6656 | |
| 6656 | 6657 | /* |
| 6657 | 6658 | ** CAPI3REF: Testing Interface |
| 6658 | 6659 | ** |
| 6659 | 6660 | ** ^The sqlite3_test_control() interface is used to read out internal |
| @@ -6731,12 +6732,12 @@ | ||
| 6731 | 6732 | ** be represented by a 32-bit integer, then the values returned by |
| 6732 | 6733 | ** sqlite3_status() are undefined. |
| 6733 | 6734 | ** |
| 6734 | 6735 | ** See also: [sqlite3_db_status()] |
| 6735 | 6736 | */ |
| 6736 | -SQLITE_API int SQLITE_APICALL sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag); | |
| 6737 | -SQLITE_API int SQLITE_APICALL sqlite3_status64( | |
| 6737 | +SQLITE_API int SQLITE_STDCALL sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag); | |
| 6738 | +SQLITE_API int SQLITE_STDCALL sqlite3_status64( | |
| 6738 | 6739 | int op, |
| 6739 | 6740 | sqlite3_int64 *pCurrent, |
| 6740 | 6741 | sqlite3_int64 *pHighwater, |
| 6741 | 6742 | int resetFlag |
| 6742 | 6743 | ); |
| @@ -6857,11 +6858,11 @@ | ||
| 6857 | 6858 | ** ^The sqlite3_db_status() routine returns SQLITE_OK on success and a |
| 6858 | 6859 | ** non-zero [error code] on failure. |
| 6859 | 6860 | ** |
| 6860 | 6861 | ** See also: [sqlite3_status()] and [sqlite3_stmt_status()]. |
| 6861 | 6862 | */ |
| 6862 | -SQLITE_API int SQLITE_APICALL sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int resetFlg); | |
| 6863 | +SQLITE_API int SQLITE_STDCALL sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int resetFlg); | |
| 6863 | 6864 | |
| 6864 | 6865 | /* |
| 6865 | 6866 | ** CAPI3REF: Status Parameters for database connections |
| 6866 | 6867 | ** KEYWORDS: {SQLITE_DBSTATUS options} |
| 6867 | 6868 | ** |
| @@ -7000,11 +7001,11 @@ | ||
| 7000 | 7001 | ** ^If the resetFlg is true, then the counter is reset to zero after this |
| 7001 | 7002 | ** interface call returns. |
| 7002 | 7003 | ** |
| 7003 | 7004 | ** See also: [sqlite3_status()] and [sqlite3_db_status()]. |
| 7004 | 7005 | */ |
| 7005 | -SQLITE_API int SQLITE_APICALL sqlite3_stmt_status(sqlite3_stmt*, int op,int resetFlg); | |
| 7006 | +SQLITE_API int SQLITE_STDCALL sqlite3_stmt_status(sqlite3_stmt*, int op,int resetFlg); | |
| 7006 | 7007 | |
| 7007 | 7008 | /* |
| 7008 | 7009 | ** CAPI3REF: Status Parameters for prepared statements |
| 7009 | 7010 | ** KEYWORDS: {SQLITE_STMTSTATUS counter} {SQLITE_STMTSTATUS counters} |
| 7010 | 7011 | ** |
| @@ -7236,22 +7237,22 @@ | ||
| 7236 | 7237 | */ |
| 7237 | 7238 | typedef struct sqlite3_pcache_methods2 sqlite3_pcache_methods2; |
| 7238 | 7239 | struct sqlite3_pcache_methods2 { |
| 7239 | 7240 | int iVersion; |
| 7240 | 7241 | void *pArg; |
| 7241 | - int (SQLITE_CALLBACK *xInit)(void*); | |
| 7242 | - void (SQLITE_CALLBACK *xShutdown)(void*); | |
| 7243 | - sqlite3_pcache *(SQLITE_CALLBACK *xCreate)(int szPage, int szExtra, int bPurgeable); | |
| 7244 | - void (SQLITE_CALLBACK *xCachesize)(sqlite3_pcache*, int nCachesize); | |
| 7245 | - int (SQLITE_CALLBACK *xPagecount)(sqlite3_pcache*); | |
| 7246 | - sqlite3_pcache_page *(SQLITE_CALLBACK *xFetch)(sqlite3_pcache*, unsigned key, int createFlag); | |
| 7247 | - void (SQLITE_CALLBACK *xUnpin)(sqlite3_pcache*, sqlite3_pcache_page*, int discard); | |
| 7248 | - void (SQLITE_CALLBACK *xRekey)(sqlite3_pcache*, sqlite3_pcache_page*, | |
| 7242 | + int (*xInit)(void*); | |
| 7243 | + void (*xShutdown)(void*); | |
| 7244 | + sqlite3_pcache *(*xCreate)(int szPage, int szExtra, int bPurgeable); | |
| 7245 | + void (*xCachesize)(sqlite3_pcache*, int nCachesize); | |
| 7246 | + int (*xPagecount)(sqlite3_pcache*); | |
| 7247 | + sqlite3_pcache_page *(*xFetch)(sqlite3_pcache*, unsigned key, int createFlag); | |
| 7248 | + void (*xUnpin)(sqlite3_pcache*, sqlite3_pcache_page*, int discard); | |
| 7249 | + void (*xRekey)(sqlite3_pcache*, sqlite3_pcache_page*, | |
| 7249 | 7250 | unsigned oldKey, unsigned newKey); |
| 7250 | - void (SQLITE_CALLBACK *xTruncate)(sqlite3_pcache*, unsigned iLimit); | |
| 7251 | - void (SQLITE_CALLBACK *xDestroy)(sqlite3_pcache*); | |
| 7252 | - void (SQLITE_CALLBACK *xShrink)(sqlite3_pcache*); | |
| 7251 | + void (*xTruncate)(sqlite3_pcache*, unsigned iLimit); | |
| 7252 | + void (*xDestroy)(sqlite3_pcache*); | |
| 7253 | + void (*xShrink)(sqlite3_pcache*); | |
| 7253 | 7254 | }; |
| 7254 | 7255 | |
| 7255 | 7256 | /* |
| 7256 | 7257 | ** This is the obsolete pcache_methods object that has now been replaced |
| 7257 | 7258 | ** by sqlite3_pcache_methods2. This object is not used by SQLite. It is |
| @@ -7258,20 +7259,20 @@ | ||
| 7258 | 7259 | ** retained in the header file for backwards compatibility only. |
| 7259 | 7260 | */ |
| 7260 | 7261 | typedef struct sqlite3_pcache_methods sqlite3_pcache_methods; |
| 7261 | 7262 | struct sqlite3_pcache_methods { |
| 7262 | 7263 | void *pArg; |
| 7263 | - int (SQLITE_CALLBACK *xInit)(void*); | |
| 7264 | - void (SQLITE_CALLBACK *xShutdown)(void*); | |
| 7265 | - sqlite3_pcache *(SQLITE_CALLBACK *xCreate)(int szPage, int bPurgeable); | |
| 7266 | - void (SQLITE_CALLBACK *xCachesize)(sqlite3_pcache*, int nCachesize); | |
| 7267 | - int (SQLITE_CALLBACK *xPagecount)(sqlite3_pcache*); | |
| 7268 | - void *(SQLITE_CALLBACK *xFetch)(sqlite3_pcache*, unsigned key, int createFlag); | |
| 7269 | - void (SQLITE_CALLBACK *xUnpin)(sqlite3_pcache*, void*, int discard); | |
| 7270 | - void (SQLITE_CALLBACK *xRekey)(sqlite3_pcache*, void*, unsigned oldKey, unsigned newKey); | |
| 7271 | - void (SQLITE_CALLBACK *xTruncate)(sqlite3_pcache*, unsigned iLimit); | |
| 7272 | - void (SQLITE_CALLBACK *xDestroy)(sqlite3_pcache*); | |
| 7264 | + int (*xInit)(void*); | |
| 7265 | + void (*xShutdown)(void*); | |
| 7266 | + sqlite3_pcache *(*xCreate)(int szPage, int bPurgeable); | |
| 7267 | + void (*xCachesize)(sqlite3_pcache*, int nCachesize); | |
| 7268 | + int (*xPagecount)(sqlite3_pcache*); | |
| 7269 | + void *(*xFetch)(sqlite3_pcache*, unsigned key, int createFlag); | |
| 7270 | + void (*xUnpin)(sqlite3_pcache*, void*, int discard); | |
| 7271 | + void (*xRekey)(sqlite3_pcache*, void*, unsigned oldKey, unsigned newKey); | |
| 7272 | + void (*xTruncate)(sqlite3_pcache*, unsigned iLimit); | |
| 7273 | + void (*xDestroy)(sqlite3_pcache*); | |
| 7273 | 7274 | }; |
| 7274 | 7275 | |
| 7275 | 7276 | |
| 7276 | 7277 | /* |
| 7277 | 7278 | ** CAPI3REF: Online Backup Object |
| @@ -7469,20 +7470,20 @@ | ||
| 7469 | 7470 | ** However, the sqlite3_backup_remaining() and sqlite3_backup_pagecount() |
| 7470 | 7471 | ** APIs are not strictly speaking threadsafe. If they are invoked at the |
| 7471 | 7472 | ** same time as another thread is invoking sqlite3_backup_step() it is |
| 7472 | 7473 | ** possible that they return invalid values. |
| 7473 | 7474 | */ |
| 7474 | -SQLITE_API sqlite3_backup *SQLITE_APICALL sqlite3_backup_init( | |
| 7475 | +SQLITE_API sqlite3_backup *SQLITE_STDCALL sqlite3_backup_init( | |
| 7475 | 7476 | sqlite3 *pDest, /* Destination database handle */ |
| 7476 | 7477 | const char *zDestName, /* Destination database name */ |
| 7477 | 7478 | sqlite3 *pSource, /* Source database handle */ |
| 7478 | 7479 | const char *zSourceName /* Source database name */ |
| 7479 | 7480 | ); |
| 7480 | -SQLITE_API int SQLITE_APICALL sqlite3_backup_step(sqlite3_backup *p, int nPage); | |
| 7481 | -SQLITE_API int SQLITE_APICALL sqlite3_backup_finish(sqlite3_backup *p); | |
| 7482 | -SQLITE_API int SQLITE_APICALL sqlite3_backup_remaining(sqlite3_backup *p); | |
| 7483 | -SQLITE_API int SQLITE_APICALL sqlite3_backup_pagecount(sqlite3_backup *p); | |
| 7481 | +SQLITE_API int SQLITE_STDCALL sqlite3_backup_step(sqlite3_backup *p, int nPage); | |
| 7482 | +SQLITE_API int SQLITE_STDCALL sqlite3_backup_finish(sqlite3_backup *p); | |
| 7483 | +SQLITE_API int SQLITE_STDCALL sqlite3_backup_remaining(sqlite3_backup *p); | |
| 7484 | +SQLITE_API int SQLITE_STDCALL sqlite3_backup_pagecount(sqlite3_backup *p); | |
| 7484 | 7485 | |
| 7485 | 7486 | /* |
| 7486 | 7487 | ** CAPI3REF: Unlock Notification |
| 7487 | 7488 | ** METHOD: sqlite3 |
| 7488 | 7489 | ** |
| @@ -7595,13 +7596,13 @@ | ||
| 7595 | 7596 | ** by an sqlite3_step() call. ^(If there is a blocking connection, then the |
| 7596 | 7597 | ** extended error code is set to SQLITE_LOCKED_SHAREDCACHE. Otherwise, in |
| 7597 | 7598 | ** the special "DROP TABLE/INDEX" case, the extended error code is just |
| 7598 | 7599 | ** SQLITE_LOCKED.)^ |
| 7599 | 7600 | */ |
| 7600 | -SQLITE_API int SQLITE_APICALL sqlite3_unlock_notify( | |
| 7601 | +SQLITE_API int SQLITE_STDCALL sqlite3_unlock_notify( | |
| 7601 | 7602 | sqlite3 *pBlocked, /* Waiting connection */ |
| 7602 | - void (SQLITE_CALLBACK *xNotify)(void **apArg, int nArg), /* Callback function to invoke */ | |
| 7603 | + void (*xNotify)(void **apArg, int nArg), /* Callback function to invoke */ | |
| 7603 | 7604 | void *pNotifyArg /* Argument to pass to xNotify */ |
| 7604 | 7605 | ); |
| 7605 | 7606 | |
| 7606 | 7607 | |
| 7607 | 7608 | /* |
| @@ -7610,12 +7611,12 @@ | ||
| 7610 | 7611 | ** ^The [sqlite3_stricmp()] and [sqlite3_strnicmp()] APIs allow applications |
| 7611 | 7612 | ** and extensions to compare the contents of two buffers containing UTF-8 |
| 7612 | 7613 | ** strings in a case-independent fashion, using the same definition of "case |
| 7613 | 7614 | ** independence" that SQLite uses internally when comparing identifiers. |
| 7614 | 7615 | */ |
| 7615 | -SQLITE_API int SQLITE_APICALL sqlite3_stricmp(const char *, const char *); | |
| 7616 | -SQLITE_API int SQLITE_APICALL sqlite3_strnicmp(const char *, const char *, int); | |
| 7616 | +SQLITE_API int SQLITE_STDCALL sqlite3_stricmp(const char *, const char *); | |
| 7617 | +SQLITE_API int SQLITE_STDCALL sqlite3_strnicmp(const char *, const char *, int); | |
| 7617 | 7618 | |
| 7618 | 7619 | /* |
| 7619 | 7620 | ** CAPI3REF: String Globbing |
| 7620 | 7621 | * |
| 7621 | 7622 | ** ^The [sqlite3_strglob(P,X)] interface returns zero if and only if |
| @@ -7628,11 +7629,11 @@ | ||
| 7628 | 7629 | ** Note that this routine returns zero on a match and non-zero if the strings |
| 7629 | 7630 | ** do not match, the same as [sqlite3_stricmp()] and [sqlite3_strnicmp()]. |
| 7630 | 7631 | ** |
| 7631 | 7632 | ** See also: [sqlite3_strlike()]. |
| 7632 | 7633 | */ |
| 7633 | -SQLITE_API int SQLITE_APICALL sqlite3_strglob(const char *zGlob, const char *zStr); | |
| 7634 | +SQLITE_API int SQLITE_STDCALL sqlite3_strglob(const char *zGlob, const char *zStr); | |
| 7634 | 7635 | |
| 7635 | 7636 | /* |
| 7636 | 7637 | ** CAPI3REF: String LIKE Matching |
| 7637 | 7638 | * |
| 7638 | 7639 | ** ^The [sqlite3_strlike(P,X,E)] interface returns zero if and only if |
| @@ -7651,11 +7652,11 @@ | ||
| 7651 | 7652 | ** Note that this routine returns zero on a match and non-zero if the strings |
| 7652 | 7653 | ** do not match, the same as [sqlite3_stricmp()] and [sqlite3_strnicmp()]. |
| 7653 | 7654 | ** |
| 7654 | 7655 | ** See also: [sqlite3_strglob()]. |
| 7655 | 7656 | */ |
| 7656 | -SQLITE_API int SQLITE_APICALL sqlite3_strlike(const char *zGlob, const char *zStr, unsigned int cEsc); | |
| 7657 | +SQLITE_API int SQLITE_STDCALL sqlite3_strlike(const char *zGlob, const char *zStr, unsigned int cEsc); | |
| 7657 | 7658 | |
| 7658 | 7659 | /* |
| 7659 | 7660 | ** CAPI3REF: Error Logging Interface |
| 7660 | 7661 | ** |
| 7661 | 7662 | ** ^The [sqlite3_log()] interface writes a message into the [error log] |
| @@ -7710,13 +7711,13 @@ | ||
| 7710 | 7711 | ** previously registered write-ahead log callback. ^Note that the |
| 7711 | 7712 | ** [sqlite3_wal_autocheckpoint()] interface and the |
| 7712 | 7713 | ** [wal_autocheckpoint pragma] both invoke [sqlite3_wal_hook()] and will |
| 7713 | 7714 | ** overwrite any prior [sqlite3_wal_hook()] settings. |
| 7714 | 7715 | */ |
| 7715 | -SQLITE_API void *SQLITE_APICALL sqlite3_wal_hook( | |
| 7716 | +SQLITE_API void *SQLITE_STDCALL sqlite3_wal_hook( | |
| 7716 | 7717 | sqlite3*, |
| 7717 | - int(SQLITE_CALLBACK *)(void *,sqlite3*,const char*,int), | |
| 7718 | + int(*)(void *,sqlite3*,const char*,int), | |
| 7718 | 7719 | void* |
| 7719 | 7720 | ); |
| 7720 | 7721 | |
| 7721 | 7722 | /* |
| 7722 | 7723 | ** CAPI3REF: Configure an auto-checkpoint |
| @@ -7745,11 +7746,11 @@ | ||
| 7745 | 7746 | ** enabled with a threshold of 1000 or [SQLITE_DEFAULT_WAL_AUTOCHECKPOINT] |
| 7746 | 7747 | ** pages. The use of this interface |
| 7747 | 7748 | ** is only necessary if the default setting is found to be suboptimal |
| 7748 | 7749 | ** for a particular application. |
| 7749 | 7750 | */ |
| 7750 | -SQLITE_API int SQLITE_APICALL sqlite3_wal_autocheckpoint(sqlite3 *db, int N); | |
| 7751 | +SQLITE_API int SQLITE_STDCALL sqlite3_wal_autocheckpoint(sqlite3 *db, int N); | |
| 7751 | 7752 | |
| 7752 | 7753 | /* |
| 7753 | 7754 | ** CAPI3REF: Checkpoint a database |
| 7754 | 7755 | ** METHOD: sqlite3 |
| 7755 | 7756 | ** |
| @@ -7767,11 +7768,11 @@ | ||
| 7767 | 7768 | ** interface was added. This interface is retained for backwards |
| 7768 | 7769 | ** compatibility and as a convenience for applications that need to manually |
| 7769 | 7770 | ** start a callback but which do not need the full power (and corresponding |
| 7770 | 7771 | ** complication) of [sqlite3_wal_checkpoint_v2()]. |
| 7771 | 7772 | */ |
| 7772 | -SQLITE_API int SQLITE_APICALL sqlite3_wal_checkpoint(sqlite3 *db, const char *zDb); | |
| 7773 | +SQLITE_API int SQLITE_STDCALL sqlite3_wal_checkpoint(sqlite3 *db, const char *zDb); | |
| 7773 | 7774 | |
| 7774 | 7775 | /* |
| 7775 | 7776 | ** CAPI3REF: Checkpoint a database |
| 7776 | 7777 | ** METHOD: sqlite3 |
| 7777 | 7778 | ** |
| @@ -7861,11 +7862,11 @@ | ||
| 7861 | 7862 | ** [sqlite3_errcode()] and [sqlite3_errmsg()]. |
| 7862 | 7863 | ** |
| 7863 | 7864 | ** ^The [PRAGMA wal_checkpoint] command can be used to invoke this interface |
| 7864 | 7865 | ** from SQL. |
| 7865 | 7866 | */ |
| 7866 | -SQLITE_API int SQLITE_APICALL sqlite3_wal_checkpoint_v2( | |
| 7867 | +SQLITE_API int SQLITE_STDCALL sqlite3_wal_checkpoint_v2( | |
| 7867 | 7868 | sqlite3 *db, /* Database handle */ |
| 7868 | 7869 | const char *zDb, /* Name of attached database (or NULL) */ |
| 7869 | 7870 | int eMode, /* SQLITE_CHECKPOINT_* value */ |
| 7870 | 7871 | int *pnLog, /* OUT: Size of WAL log in frames */ |
| 7871 | 7872 | int *pnCkpt /* OUT: Total number of frames checkpointed */ |
| @@ -7950,11 +7951,11 @@ | ||
| 7950 | 7951 | ** value returned is one of [SQLITE_ROLLBACK], [SQLITE_IGNORE], [SQLITE_FAIL], |
| 7951 | 7952 | ** [SQLITE_ABORT], or [SQLITE_REPLACE], according to the [ON CONFLICT] mode |
| 7952 | 7953 | ** of the SQL statement that triggered the call to the [xUpdate] method of the |
| 7953 | 7954 | ** [virtual table]. |
| 7954 | 7955 | */ |
| 7955 | -SQLITE_API int SQLITE_APICALL sqlite3_vtab_on_conflict(sqlite3 *); | |
| 7956 | +SQLITE_API int SQLITE_STDCALL sqlite3_vtab_on_conflict(sqlite3 *); | |
| 7956 | 7957 | |
| 7957 | 7958 | /* |
| 7958 | 7959 | ** CAPI3REF: Conflict resolution modes |
| 7959 | 7960 | ** KEYWORDS: {conflict resolution mode} |
| 7960 | 7961 | ** |
| @@ -8055,11 +8056,11 @@ | ||
| 8055 | 8056 | ** as if the loop did not exist - it returns non-zero and leave the variable |
| 8056 | 8057 | ** that pOut points to unchanged. |
| 8057 | 8058 | ** |
| 8058 | 8059 | ** See also: [sqlite3_stmt_scanstatus_reset()] |
| 8059 | 8060 | */ |
| 8060 | -SQLITE_API int SQLITE_APICALL sqlite3_stmt_scanstatus( | |
| 8061 | +SQLITE_API int SQLITE_STDCALL sqlite3_stmt_scanstatus( | |
| 8061 | 8062 | sqlite3_stmt *pStmt, /* Prepared statement for which info desired */ |
| 8062 | 8063 | int idx, /* Index of loop to report on */ |
| 8063 | 8064 | int iScanStatusOp, /* Information desired. SQLITE_SCANSTAT_* */ |
| 8064 | 8065 | void *pOut /* Result written here */ |
| 8065 | 8066 | ); |
| @@ -8071,11 +8072,11 @@ | ||
| 8071 | 8072 | ** ^Zero all [sqlite3_stmt_scanstatus()] related event counters. |
| 8072 | 8073 | ** |
| 8073 | 8074 | ** This API is only available if the library is built with pre-processor |
| 8074 | 8075 | ** symbol [SQLITE_ENABLE_STMT_SCANSTATUS] defined. |
| 8075 | 8076 | */ |
| 8076 | -SQLITE_API void SQLITE_APICALL sqlite3_stmt_scanstatus_reset(sqlite3_stmt*); | |
| 8077 | +SQLITE_API void SQLITE_STDCALL sqlite3_stmt_scanstatus_reset(sqlite3_stmt*); | |
| 8077 | 8078 | |
| 8078 | 8079 | /* |
| 8079 | 8080 | ** CAPI3REF: Flush caches to disk mid-transaction |
| 8080 | 8081 | ** |
| 8081 | 8082 | ** ^If a write-transaction is open on [database connection] D when the |
| @@ -8103,11 +8104,11 @@ | ||
| 8103 | 8104 | ** ^Otherwise, if no error occurs, [sqlite3_db_cacheflush()] returns SQLITE_OK. |
| 8104 | 8105 | ** |
| 8105 | 8106 | ** ^This function does not set the database handle error code or message |
| 8106 | 8107 | ** returned by the [sqlite3_errcode()] and [sqlite3_errmsg()] functions. |
| 8107 | 8108 | */ |
| 8108 | -SQLITE_API int SQLITE_APICALL sqlite3_db_cacheflush(sqlite3*); | |
| 8109 | +SQLITE_API int SQLITE_STDCALL sqlite3_db_cacheflush(sqlite3*); | |
| 8109 | 8110 | |
| 8110 | 8111 | /* |
| 8111 | 8112 | ** CAPI3REF: The pre-update hook. |
| 8112 | 8113 | ** |
| 8113 | 8114 | ** ^These interfaces are only available if SQLite is compiled using the |
| @@ -8183,13 +8184,13 @@ | ||
| 8183 | 8184 | ** triggers; or 2 for changes resulting from triggers called by top-level |
| 8184 | 8185 | ** triggers; and so forth. |
| 8185 | 8186 | ** |
| 8186 | 8187 | ** See also: [sqlite3_update_hook()] |
| 8187 | 8188 | */ |
| 8188 | -SQLITE_API SQLITE_EXPERIMENTAL void *SQLITE_APICALL sqlite3_preupdate_hook( | |
| 8189 | +SQLITE_API SQLITE_EXPERIMENTAL void *SQLITE_STDCALL sqlite3_preupdate_hook( | |
| 8189 | 8190 | sqlite3 *db, |
| 8190 | - void(SQLITE_CALLBACK *xPreUpdate)( | |
| 8191 | + void(*xPreUpdate)( | |
| 8191 | 8192 | void *pCtx, /* Copy of third arg to preupdate_hook() */ |
| 8192 | 8193 | sqlite3 *db, /* Database handle */ |
| 8193 | 8194 | int op, /* SQLITE_UPDATE, DELETE or INSERT */ |
| 8194 | 8195 | char const *zDb, /* Database name */ |
| 8195 | 8196 | char const *zName, /* Table name */ |
| @@ -8196,14 +8197,14 @@ | ||
| 8196 | 8197 | sqlite3_int64 iKey1, /* Rowid of row about to be deleted/updated */ |
| 8197 | 8198 | sqlite3_int64 iKey2 /* New rowid value (for a rowid UPDATE) */ |
| 8198 | 8199 | ), |
| 8199 | 8200 | void* |
| 8200 | 8201 | ); |
| 8201 | -SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_APICALL sqlite3_preupdate_old(sqlite3 *, int, sqlite3_value **); | |
| 8202 | -SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_APICALL sqlite3_preupdate_count(sqlite3 *); | |
| 8203 | -SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_APICALL sqlite3_preupdate_depth(sqlite3 *); | |
| 8204 | -SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_APICALL sqlite3_preupdate_new(sqlite3 *, int, sqlite3_value **); | |
| 8202 | +SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_preupdate_old(sqlite3 *, int, sqlite3_value **); | |
| 8203 | +SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_preupdate_count(sqlite3 *); | |
| 8204 | +SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_preupdate_depth(sqlite3 *); | |
| 8205 | +SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_preupdate_new(sqlite3 *, int, sqlite3_value **); | |
| 8205 | 8206 | |
| 8206 | 8207 | /* |
| 8207 | 8208 | ** CAPI3REF: Low-level system error code |
| 8208 | 8209 | ** |
| 8209 | 8210 | ** ^Attempt to return the underlying operating system error code or error |
| @@ -8211,11 +8212,11 @@ | ||
| 8211 | 8212 | ** The return value is OS-dependent. For example, on unix systems, after |
| 8212 | 8213 | ** [sqlite3_open_v2()] returns [SQLITE_CANTOPEN], this interface could be |
| 8213 | 8214 | ** called to get back the underlying "errno" that caused the problem, such |
| 8214 | 8215 | ** as ENOSPC, EAUTH, EISDIR, and so forth. |
| 8215 | 8216 | */ |
| 8216 | -SQLITE_API int SQLITE_APICALL sqlite3_system_errno(sqlite3*); | |
| 8217 | +SQLITE_API int SQLITE_STDCALL sqlite3_system_errno(sqlite3*); | |
| 8217 | 8218 | |
| 8218 | 8219 | /* |
| 8219 | 8220 | ** CAPI3REF: Database Snapshot |
| 8220 | 8221 | ** KEYWORDS: {snapshot} |
| 8221 | 8222 | ** EXPERIMENTAL |
| @@ -8261,11 +8262,11 @@ | ||
| 8261 | 8262 | ** to avoid a memory leak. |
| 8262 | 8263 | ** |
| 8263 | 8264 | ** The [sqlite3_snapshot_get()] interface is only available when the |
| 8264 | 8265 | ** SQLITE_ENABLE_SNAPSHOT compile-time option is used. |
| 8265 | 8266 | */ |
| 8266 | -SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_APICALL sqlite3_snapshot_get( | |
| 8267 | +SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_snapshot_get( | |
| 8267 | 8268 | sqlite3 *db, |
| 8268 | 8269 | const char *zSchema, |
| 8269 | 8270 | sqlite3_snapshot **ppSnapshot |
| 8270 | 8271 | ); |
| 8271 | 8272 | |
| @@ -8299,11 +8300,11 @@ | ||
| 8299 | 8300 | ** database connection in order to make it ready to use snapshots.) |
| 8300 | 8301 | ** |
| 8301 | 8302 | ** The [sqlite3_snapshot_open()] interface is only available when the |
| 8302 | 8303 | ** SQLITE_ENABLE_SNAPSHOT compile-time option is used. |
| 8303 | 8304 | */ |
| 8304 | -SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_APICALL sqlite3_snapshot_open( | |
| 8305 | +SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_snapshot_open( | |
| 8305 | 8306 | sqlite3 *db, |
| 8306 | 8307 | const char *zSchema, |
| 8307 | 8308 | sqlite3_snapshot *pSnapshot |
| 8308 | 8309 | ); |
| 8309 | 8310 | |
| @@ -8316,11 +8317,11 @@ | ||
| 8316 | 8317 | ** using this routine to avoid a memory leak. |
| 8317 | 8318 | ** |
| 8318 | 8319 | ** The [sqlite3_snapshot_free()] interface is only available when the |
| 8319 | 8320 | ** SQLITE_ENABLE_SNAPSHOT compile-time option is used. |
| 8320 | 8321 | */ |
| 8321 | -SQLITE_API SQLITE_EXPERIMENTAL void SQLITE_APICALL sqlite3_snapshot_free(sqlite3_snapshot*); | |
| 8322 | +SQLITE_API SQLITE_EXPERIMENTAL void SQLITE_STDCALL sqlite3_snapshot_free(sqlite3_snapshot*); | |
| 8322 | 8323 | |
| 8323 | 8324 | /* |
| 8324 | 8325 | ** CAPI3REF: Compare the ages of two snapshot handles. |
| 8325 | 8326 | ** EXPERIMENTAL |
| 8326 | 8327 | ** |
| @@ -8340,11 +8341,11 @@ | ||
| 8340 | 8341 | ** |
| 8341 | 8342 | ** Otherwise, this API returns a negative value if P1 refers to an older |
| 8342 | 8343 | ** snapshot than P2, zero if the two handles refer to the same database |
| 8343 | 8344 | ** snapshot, and a positive value if P1 is a newer snapshot than P2. |
| 8344 | 8345 | */ |
| 8345 | -SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_APICALL sqlite3_snapshot_cmp( | |
| 8346 | +SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_snapshot_cmp( | |
| 8346 | 8347 | sqlite3_snapshot *p1, |
| 8347 | 8348 | sqlite3_snapshot *p2 |
| 8348 | 8349 | ); |
| 8349 | 8350 | |
| 8350 | 8351 | /* |
| @@ -8398,14 +8399,14 @@ | ||
| 8398 | 8399 | ** Register a geometry callback named zGeom that can be used as part of an |
| 8399 | 8400 | ** R-Tree geometry query as follows: |
| 8400 | 8401 | ** |
| 8401 | 8402 | ** SELECT ... FROM <rtree> WHERE <rtree col> MATCH $zGeom(... params ...) |
| 8402 | 8403 | */ |
| 8403 | -SQLITE_API int SQLITE_APICALL sqlite3_rtree_geometry_callback( | |
| 8404 | +SQLITE_API int SQLITE_STDCALL sqlite3_rtree_geometry_callback( | |
| 8404 | 8405 | sqlite3 *db, |
| 8405 | 8406 | const char *zGeom, |
| 8406 | - int (SQLITE_CALLBACK *xGeom)(sqlite3_rtree_geometry*, int, sqlite3_rtree_dbl*,int*), | |
| 8407 | + int (*xGeom)(sqlite3_rtree_geometry*, int, sqlite3_rtree_dbl*,int*), | |
| 8407 | 8408 | void *pContext |
| 8408 | 8409 | ); |
| 8409 | 8410 | |
| 8410 | 8411 | |
| 8411 | 8412 | /* |
| @@ -8415,25 +8416,25 @@ | ||
| 8415 | 8416 | struct sqlite3_rtree_geometry { |
| 8416 | 8417 | void *pContext; /* Copy of pContext passed to s_r_g_c() */ |
| 8417 | 8418 | int nParam; /* Size of array aParam[] */ |
| 8418 | 8419 | sqlite3_rtree_dbl *aParam; /* Parameters passed to SQL geom function */ |
| 8419 | 8420 | void *pUser; /* Callback implementation user data */ |
| 8420 | - void (SQLITE_CALLBACK *xDelUser)(void *); /* Called by SQLite to clean up pUser */ | |
| 8421 | + void (*xDelUser)(void *); /* Called by SQLite to clean up pUser */ | |
| 8421 | 8422 | }; |
| 8422 | 8423 | |
| 8423 | 8424 | /* |
| 8424 | 8425 | ** Register a 2nd-generation geometry callback named zScore that can be |
| 8425 | 8426 | ** used as part of an R-Tree geometry query as follows: |
| 8426 | 8427 | ** |
| 8427 | 8428 | ** SELECT ... FROM <rtree> WHERE <rtree col> MATCH $zQueryFunc(... params ...) |
| 8428 | 8429 | */ |
| 8429 | -SQLITE_API int SQLITE_APICALL sqlite3_rtree_query_callback( | |
| 8430 | +SQLITE_API int SQLITE_STDCALL sqlite3_rtree_query_callback( | |
| 8430 | 8431 | sqlite3 *db, |
| 8431 | 8432 | const char *zQueryFunc, |
| 8432 | - int (SQLITE_CALLBACK *xQueryFunc)(sqlite3_rtree_query_info*), | |
| 8433 | + int (*xQueryFunc)(sqlite3_rtree_query_info*), | |
| 8433 | 8434 | void *pContext, |
| 8434 | - void (SQLITE_CALLBACK *xDestructor)(void*) | |
| 8435 | + void (*xDestructor)(void*) | |
| 8435 | 8436 | ); |
| 8436 | 8437 | |
| 8437 | 8438 | |
| 8438 | 8439 | /* |
| 8439 | 8440 | ** A pointer to a structure of the following type is passed as the |
| @@ -8447,11 +8448,11 @@ | ||
| 8447 | 8448 | struct sqlite3_rtree_query_info { |
| 8448 | 8449 | void *pContext; /* pContext from when function registered */ |
| 8449 | 8450 | int nParam; /* Number of function parameters */ |
| 8450 | 8451 | sqlite3_rtree_dbl *aParam; /* value of function parameters */ |
| 8451 | 8452 | void *pUser; /* callback can use this, if desired */ |
| 8452 | - void (SQLITE_CALLBACK *xDelUser)(void*); /* function to free pUser */ | |
| 8453 | + void (*xDelUser)(void*); /* function to free pUser */ | |
| 8453 | 8454 | sqlite3_rtree_dbl *aCoord; /* Coordinates of node or entry to check */ |
| 8454 | 8455 | unsigned int *anQueue; /* Number of pending entries in the queue */ |
| 8455 | 8456 | int nCoord; /* Number of coordinates */ |
| 8456 | 8457 | int iLevel; /* Level of current node or entry */ |
| 8457 | 8458 | int mxLevel; /* The largest iLevel value in the tree */ |
| @@ -8643,11 +8644,11 @@ | ||
| 8643 | 8644 | ** If xFilter returns 0, changes is not tracked. Note that once a table is |
| 8644 | 8645 | ** attached, xFilter will not be called again. |
| 8645 | 8646 | */ |
| 8646 | 8647 | void sqlite3session_table_filter( |
| 8647 | 8648 | sqlite3_session *pSession, /* Session object */ |
| 8648 | - int(SQLITE_CALLBACK *xFilter)( | |
| 8649 | + int(*xFilter)( | |
| 8649 | 8650 | void *pCtx, /* Copy of third arg to _filter_table() */ |
| 8650 | 8651 | const char *zTab /* Table name */ |
| 8651 | 8652 | ), |
| 8652 | 8653 | void *pCtx /* First argument passed to xFilter */ |
| 8653 | 8654 | ); |
| @@ -9218,11 +9219,11 @@ | ||
| 9218 | 9219 | ** An sqlite3_changegroup object is used to combine two or more changesets |
| 9219 | 9220 | ** (or patchsets) into a single changeset (or patchset). A single changegroup |
| 9220 | 9221 | ** object may combine changesets or patchsets, but not both. The output is |
| 9221 | 9222 | ** always in the same format as the input. |
| 9222 | 9223 | ** |
| 9223 | -** If successful, this function returns SQLITE_OK and populates (SQLITE_CALLBACK *pp) with | |
| 9224 | +** If successful, this function returns SQLITE_OK and populates (*pp) with | |
| 9224 | 9225 | ** a pointer to a new sqlite3_changegroup object before returning. The caller |
| 9225 | 9226 | ** should eventually free the returned object using a call to |
| 9226 | 9227 | ** sqlite3changegroup_delete(). If an error occurs, an SQLite error code |
| 9227 | 9228 | ** (i.e. SQLITE_NOMEM) is returned and *pp is set to NULL. |
| 9228 | 9229 | ** |
| @@ -9338,11 +9339,11 @@ | ||
| 9338 | 9339 | ** changes for tables that do not appear in the first changeset, they are |
| 9339 | 9340 | ** appended onto the end of the output changeset, again in the order in |
| 9340 | 9341 | ** which they are first encountered. |
| 9341 | 9342 | ** |
| 9342 | 9343 | ** If an error occurs, an SQLite error code is returned and the output |
| 9343 | -** variables (SQLITE_CALLBACK *pnData) and (*ppData) are set to 0. Otherwise, SQLITE_OK | |
| 9344 | +** variables (*pnData) and (*ppData) are set to 0. Otherwise, SQLITE_OK | |
| 9344 | 9345 | ** is returned and the output variables are set to the size of and a |
| 9345 | 9346 | ** pointer to the output buffer, respectively. In this case it is the |
| 9346 | 9347 | ** responsibility of the caller to eventually free the buffer using a |
| 9347 | 9348 | ** call to sqlite3_free(). |
| 9348 | 9349 | */ |
| @@ -9495,15 +9496,15 @@ | ||
| 9495 | 9496 | */ |
| 9496 | 9497 | int sqlite3changeset_apply( |
| 9497 | 9498 | sqlite3 *db, /* Apply change to "main" db of this handle */ |
| 9498 | 9499 | int nChangeset, /* Size of changeset in bytes */ |
| 9499 | 9500 | void *pChangeset, /* Changeset blob */ |
| 9500 | - int(SQLITE_CALLBACK *xFilter)( | |
| 9501 | + int(*xFilter)( | |
| 9501 | 9502 | void *pCtx, /* Copy of sixth arg to _apply() */ |
| 9502 | 9503 | const char *zTab /* Table name */ |
| 9503 | 9504 | ), |
| 9504 | - int(SQLITE_CALLBACK *xConflict)( | |
| 9505 | + int(*xConflict)( | |
| 9505 | 9506 | void *pCtx, /* Copy of sixth arg to _apply() */ |
| 9506 | 9507 | int eConflict, /* DATA, MISSING, CONFLICT, CONSTRAINT */ |
| 9507 | 9508 | sqlite3_changeset_iter *p /* Handle describing change and conflict */ |
| 9508 | 9509 | ), |
| 9509 | 9510 | void *pCtx /* First argument passed to xConflict */ |
| @@ -9640,20 +9641,20 @@ | ||
| 9640 | 9641 | ** </pre> |
| 9641 | 9642 | ** |
| 9642 | 9643 | ** Is replaced by: |
| 9643 | 9644 | ** |
| 9644 | 9645 | ** <pre> |
| 9645 | -** int (SQLITE_CALLBACK *xInput)(void *pIn, void *pData, int *pnData), | |
| 9646 | +** int (*xInput)(void *pIn, void *pData, int *pnData), | |
| 9646 | 9647 | ** void *pIn, |
| 9647 | 9648 | ** </pre> |
| 9648 | 9649 | ** |
| 9649 | 9650 | ** Each time the xInput callback is invoked by the sessions module, the first |
| 9650 | 9651 | ** argument passed is a copy of the supplied pIn context pointer. The second |
| 9651 | -** argument, pData, points to a buffer (SQLITE_CALLBACK *pnData) bytes in size. Assuming no | |
| 9652 | -** error occurs the xInput method should copy up to (SQLITE_CALLBACK *pnData) bytes of data | |
| 9653 | -** into the buffer and set (SQLITE_CALLBACK *pnData) to the actual number of bytes copied | |
| 9654 | -** before returning SQLITE_OK. If the input is completely exhausted, (SQLITE_CALLBACK *pnData) | |
| 9652 | +** argument, pData, points to a buffer (*pnData) bytes in size. Assuming no | |
| 9653 | +** error occurs the xInput method should copy up to (*pnData) bytes of data | |
| 9654 | +** into the buffer and set (*pnData) to the actual number of bytes copied | |
| 9655 | +** before returning SQLITE_OK. If the input is completely exhausted, (*pnData) | |
| 9655 | 9656 | ** should be set to zero to indicate this. Or, if an error occurs, an SQLite |
| 9656 | 9657 | ** error code should be returned. In all cases, if an xInput callback returns |
| 9657 | 9658 | ** an error, all processing is abandoned and the streaming API function |
| 9658 | 9659 | ** returns a copy of the error code to the caller. |
| 9659 | 9660 | ** |
| @@ -9674,11 +9675,11 @@ | ||
| 9674 | 9675 | ** </pre> |
| 9675 | 9676 | ** |
| 9676 | 9677 | ** Is replaced by: |
| 9677 | 9678 | ** |
| 9678 | 9679 | ** <pre> |
| 9679 | -** int (SQLITE_CALLBACK *xOutput)(void *pOut, const void *pData, int nData), | |
| 9680 | +** int (*xOutput)(void *pOut, const void *pData, int nData), | |
| 9680 | 9681 | ** void *pOut |
| 9681 | 9682 | ** </pre> |
| 9682 | 9683 | ** |
| 9683 | 9684 | ** The xOutput callback is invoked zero or more times to return data to |
| 9684 | 9685 | ** the application. The first parameter passed to each call is a copy of the |
| @@ -9694,58 +9695,58 @@ | ||
| 9694 | 9695 | ** parameter set to a value less than or equal to zero. Other than this, |
| 9695 | 9696 | ** no guarantees are made as to the size of the chunks of data returned. |
| 9696 | 9697 | */ |
| 9697 | 9698 | int sqlite3changeset_apply_strm( |
| 9698 | 9699 | sqlite3 *db, /* Apply change to "main" db of this handle */ |
| 9699 | - int (SQLITE_CALLBACK *xInput)(void *pIn, void *pData, int *pnData), /* Input function */ | |
| 9700 | + int (*xInput)(void *pIn, void *pData, int *pnData), /* Input function */ | |
| 9700 | 9701 | void *pIn, /* First arg for xInput */ |
| 9701 | - int(SQLITE_CALLBACK *xFilter)( | |
| 9702 | + int(*xFilter)( | |
| 9702 | 9703 | void *pCtx, /* Copy of sixth arg to _apply() */ |
| 9703 | 9704 | const char *zTab /* Table name */ |
| 9704 | 9705 | ), |
| 9705 | - int(SQLITE_CALLBACK *xConflict)( | |
| 9706 | + int(*xConflict)( | |
| 9706 | 9707 | void *pCtx, /* Copy of sixth arg to _apply() */ |
| 9707 | 9708 | int eConflict, /* DATA, MISSING, CONFLICT, CONSTRAINT */ |
| 9708 | 9709 | sqlite3_changeset_iter *p /* Handle describing change and conflict */ |
| 9709 | 9710 | ), |
| 9710 | 9711 | void *pCtx /* First argument passed to xConflict */ |
| 9711 | 9712 | ); |
| 9712 | 9713 | int sqlite3changeset_concat_strm( |
| 9713 | - int (SQLITE_CALLBACK *xInputA)(void *pIn, void *pData, int *pnData), | |
| 9714 | + int (*xInputA)(void *pIn, void *pData, int *pnData), | |
| 9714 | 9715 | void *pInA, |
| 9715 | - int (SQLITE_CALLBACK *xInputB)(void *pIn, void *pData, int *pnData), | |
| 9716 | + int (*xInputB)(void *pIn, void *pData, int *pnData), | |
| 9716 | 9717 | void *pInB, |
| 9717 | - int (SQLITE_CALLBACK *xOutput)(void *pOut, const void *pData, int nData), | |
| 9718 | + int (*xOutput)(void *pOut, const void *pData, int nData), | |
| 9718 | 9719 | void *pOut |
| 9719 | 9720 | ); |
| 9720 | 9721 | int sqlite3changeset_invert_strm( |
| 9721 | - int (SQLITE_CALLBACK *xInput)(void *pIn, void *pData, int *pnData), | |
| 9722 | + int (*xInput)(void *pIn, void *pData, int *pnData), | |
| 9722 | 9723 | void *pIn, |
| 9723 | - int (SQLITE_CALLBACK *xOutput)(void *pOut, const void *pData, int nData), | |
| 9724 | + int (*xOutput)(void *pOut, const void *pData, int nData), | |
| 9724 | 9725 | void *pOut |
| 9725 | 9726 | ); |
| 9726 | 9727 | int sqlite3changeset_start_strm( |
| 9727 | 9728 | sqlite3_changeset_iter **pp, |
| 9728 | - int (SQLITE_CALLBACK *xInput)(void *pIn, void *pData, int *pnData), | |
| 9729 | + int (*xInput)(void *pIn, void *pData, int *pnData), | |
| 9729 | 9730 | void *pIn |
| 9730 | 9731 | ); |
| 9731 | 9732 | int sqlite3session_changeset_strm( |
| 9732 | 9733 | sqlite3_session *pSession, |
| 9733 | - int (SQLITE_CALLBACK *xOutput)(void *pOut, const void *pData, int nData), | |
| 9734 | + int (*xOutput)(void *pOut, const void *pData, int nData), | |
| 9734 | 9735 | void *pOut |
| 9735 | 9736 | ); |
| 9736 | 9737 | int sqlite3session_patchset_strm( |
| 9737 | 9738 | sqlite3_session *pSession, |
| 9738 | - int (SQLITE_CALLBACK *xOutput)(void *pOut, const void *pData, int nData), | |
| 9739 | + int (*xOutput)(void *pOut, const void *pData, int nData), | |
| 9739 | 9740 | void *pOut |
| 9740 | 9741 | ); |
| 9741 | 9742 | int sqlite3changegroup_add_strm(sqlite3_changegroup*, |
| 9742 | - int (SQLITE_CALLBACK *xInput)(void *pIn, void *pData, int *pnData), | |
| 9743 | + int (*xInput)(void *pIn, void *pData, int *pnData), | |
| 9743 | 9744 | void *pIn |
| 9744 | 9745 | ); |
| 9745 | 9746 | int sqlite3changegroup_output_strm(sqlite3_changegroup*, |
| 9746 | - int (SQLITE_CALLBACK *xOutput)(void *pOut, const void *pData, int nData), | |
| 9747 | + int (*xOutput)(void *pOut, const void *pData, int nData), | |
| 9747 | 9748 | void *pOut |
| 9748 | 9749 | ); |
| 9749 | 9750 | |
| 9750 | 9751 | |
| 9751 | 9752 | /* |
| @@ -9796,11 +9797,11 @@ | ||
| 9796 | 9797 | |
| 9797 | 9798 | typedef struct Fts5ExtensionApi Fts5ExtensionApi; |
| 9798 | 9799 | typedef struct Fts5Context Fts5Context; |
| 9799 | 9800 | typedef struct Fts5PhraseIter Fts5PhraseIter; |
| 9800 | 9801 | |
| 9801 | -typedef void (SQLITE_CALLBACK *fts5_extension_function)( | |
| 9802 | +typedef void (*fts5_extension_function)( | |
| 9802 | 9803 | const Fts5ExtensionApi *pApi, /* API offered by current FTS version */ |
| 9803 | 9804 | Fts5Context *pFts, /* First arg to pass to pApi functions */ |
| 9804 | 9805 | sqlite3_context *pCtx, /* Context for returning result/error */ |
| 9805 | 9806 | int nVal, /* Number of values in apVal[] array */ |
| 9806 | 9807 | sqlite3_value **apVal /* Array of trailing arguments */ |
| @@ -9847,15 +9848,15 @@ | ||
| 9847 | 9848 | ** This function may be quite inefficient if used with an FTS5 table |
| 9848 | 9849 | ** created with the "columnsize=0" option. |
| 9849 | 9850 | ** |
| 9850 | 9851 | ** xColumnText: |
| 9851 | 9852 | ** This function attempts to retrieve the text of column iCol of the |
| 9852 | -** current document. If successful, (SQLITE_CALLBACK *pz) is set to point to a buffer | |
| 9853 | -** containing the text in utf-8 encoding, (SQLITE_CALLBACK *pn) is set to the size in bytes | |
| 9853 | +** current document. If successful, (*pz) is set to point to a buffer | |
| 9854 | +** containing the text in utf-8 encoding, (*pn) is set to the size in bytes | |
| 9854 | 9855 | ** (not characters) of the buffer and SQLITE_OK is returned. Otherwise, |
| 9855 | 9856 | ** if an error occurs, an SQLite error code is returned and the final values |
| 9856 | -** of (SQLITE_CALLBACK *pz) and (*pn) are undefined. | |
| 9857 | +** of (*pz) and (*pn) are undefined. | |
| 9857 | 9858 | ** |
| 9858 | 9859 | ** xPhraseCount: |
| 9859 | 9860 | ** Returns the number of phrases in the current query expression. |
| 9860 | 9861 | ** |
| 9861 | 9862 | ** xPhraseSize: |
| @@ -9960,11 +9961,11 @@ | ||
| 9960 | 9961 | ** xRowCount(pFts5, pnRow) |
| 9961 | 9962 | ** |
| 9962 | 9963 | ** This function is used to retrieve the total number of rows in the table. |
| 9963 | 9964 | ** In other words, the same value that would be returned by: |
| 9964 | 9965 | ** |
| 9965 | -** SELECT count(SQLITE_CALLBACK *) FROM ftstable; | |
| 9966 | +** SELECT count(*) FROM ftstable; | |
| 9966 | 9967 | ** |
| 9967 | 9968 | ** xPhraseFirst() |
| 9968 | 9969 | ** This function is used, along with type Fts5PhraseIter and the xPhraseNext |
| 9969 | 9970 | ** method, to iterate through all instances of a single query phrase within |
| 9970 | 9971 | ** the current row. This is the same information as is accessible via the |
| @@ -10027,43 +10028,43 @@ | ||
| 10027 | 10028 | ** See xPhraseFirstColumn above. |
| 10028 | 10029 | */ |
| 10029 | 10030 | struct Fts5ExtensionApi { |
| 10030 | 10031 | int iVersion; /* Currently always set to 3 */ |
| 10031 | 10032 | |
| 10032 | - void *(SQLITE_CALLBACK *xUserData)(Fts5Context*); | |
| 10033 | + void *(*xUserData)(Fts5Context*); | |
| 10033 | 10034 | |
| 10034 | - int (SQLITE_CALLBACK *xColumnCount)(Fts5Context*); | |
| 10035 | - int (SQLITE_CALLBACK *xRowCount)(Fts5Context*, sqlite3_int64 *pnRow); | |
| 10036 | - int (SQLITE_CALLBACK *xColumnTotalSize)(Fts5Context*, int iCol, sqlite3_int64 *pnToken); | |
| 10035 | + int (*xColumnCount)(Fts5Context*); | |
| 10036 | + int (*xRowCount)(Fts5Context*, sqlite3_int64 *pnRow); | |
| 10037 | + int (*xColumnTotalSize)(Fts5Context*, int iCol, sqlite3_int64 *pnToken); | |
| 10037 | 10038 | |
| 10038 | - int (SQLITE_CALLBACK *xTokenize)(Fts5Context*, | |
| 10039 | + int (*xTokenize)(Fts5Context*, | |
| 10039 | 10040 | const char *pText, int nText, /* Text to tokenize */ |
| 10040 | 10041 | void *pCtx, /* Context passed to xToken() */ |
| 10041 | - int (SQLITE_CALLBACK *xToken)(void*, int, const char*, int, int, int) /* Callback */ | |
| 10042 | - ); | |
| 10043 | - | |
| 10044 | - int (SQLITE_CALLBACK *xPhraseCount)(Fts5Context*); | |
| 10045 | - int (SQLITE_CALLBACK *xPhraseSize)(Fts5Context*, int iPhrase); | |
| 10046 | - | |
| 10047 | - int (SQLITE_CALLBACK *xInstCount)(Fts5Context*, int *pnInst); | |
| 10048 | - int (SQLITE_CALLBACK *xInst)(Fts5Context*, int iIdx, int *piPhrase, int *piCol, int *piOff); | |
| 10049 | - | |
| 10050 | - sqlite3_int64 (SQLITE_CALLBACK *xRowid)(Fts5Context*); | |
| 10051 | - int (SQLITE_CALLBACK *xColumnText)(Fts5Context*, int iCol, const char **pz, int *pn); | |
| 10052 | - int (SQLITE_CALLBACK *xColumnSize)(Fts5Context*, int iCol, int *pnToken); | |
| 10053 | - | |
| 10054 | - int (SQLITE_CALLBACK *xQueryPhrase)(Fts5Context*, int iPhrase, void *pUserData, | |
| 10055 | - int(SQLITE_CALLBACK *)(const Fts5ExtensionApi*,Fts5Context*,void*) | |
| 10056 | - ); | |
| 10057 | - int (SQLITE_CALLBACK *xSetAuxdata)(Fts5Context*, void *pAux, void(*xDelete)(void*)); | |
| 10058 | - void *(SQLITE_CALLBACK *xGetAuxdata)(Fts5Context*, int bClear); | |
| 10059 | - | |
| 10060 | - int (SQLITE_CALLBACK *xPhraseFirst)(Fts5Context*, int iPhrase, Fts5PhraseIter*, int*, int*); | |
| 10061 | - void (SQLITE_CALLBACK *xPhraseNext)(Fts5Context*, Fts5PhraseIter*, int *piCol, int *piOff); | |
| 10062 | - | |
| 10063 | - int (SQLITE_CALLBACK *xPhraseFirstColumn)(Fts5Context*, int iPhrase, Fts5PhraseIter*, int*); | |
| 10064 | - void (SQLITE_CALLBACK *xPhraseNextColumn)(Fts5Context*, Fts5PhraseIter*, int *piCol); | |
| 10042 | + int (*xToken)(void*, int, const char*, int, int, int) /* Callback */ | |
| 10043 | + ); | |
| 10044 | + | |
| 10045 | + int (*xPhraseCount)(Fts5Context*); | |
| 10046 | + int (*xPhraseSize)(Fts5Context*, int iPhrase); | |
| 10047 | + | |
| 10048 | + int (*xInstCount)(Fts5Context*, int *pnInst); | |
| 10049 | + int (*xInst)(Fts5Context*, int iIdx, int *piPhrase, int *piCol, int *piOff); | |
| 10050 | + | |
| 10051 | + sqlite3_int64 (*xRowid)(Fts5Context*); | |
| 10052 | + int (*xColumnText)(Fts5Context*, int iCol, const char **pz, int *pn); | |
| 10053 | + int (*xColumnSize)(Fts5Context*, int iCol, int *pnToken); | |
| 10054 | + | |
| 10055 | + int (*xQueryPhrase)(Fts5Context*, int iPhrase, void *pUserData, | |
| 10056 | + int(*)(const Fts5ExtensionApi*,Fts5Context*,void*) | |
| 10057 | + ); | |
| 10058 | + int (*xSetAuxdata)(Fts5Context*, void *pAux, void(*xDelete)(void*)); | |
| 10059 | + void *(*xGetAuxdata)(Fts5Context*, int bClear); | |
| 10060 | + | |
| 10061 | + int (*xPhraseFirst)(Fts5Context*, int iPhrase, Fts5PhraseIter*, int*, int*); | |
| 10062 | + void (*xPhraseNext)(Fts5Context*, Fts5PhraseIter*, int *piCol, int *piOff); | |
| 10063 | + | |
| 10064 | + int (*xPhraseFirstColumn)(Fts5Context*, int iPhrase, Fts5PhraseIter*, int*); | |
| 10065 | + void (*xPhraseNextColumn)(Fts5Context*, Fts5PhraseIter*, int *piCol); | |
| 10065 | 10066 | }; |
| 10066 | 10067 | |
| 10067 | 10068 | /* |
| 10068 | 10069 | ** CUSTOM AUXILIARY FUNCTIONS |
| 10069 | 10070 | *************************************************************************/ |
| @@ -10087,11 +10088,11 @@ | ||
| 10087 | 10088 | ** The second and third arguments are an array of nul-terminated strings |
| 10088 | 10089 | ** containing the tokenizer arguments, if any, specified following the |
| 10089 | 10090 | ** tokenizer name as part of the CREATE VIRTUAL TABLE statement used |
| 10090 | 10091 | ** to create the FTS5 table. |
| 10091 | 10092 | ** |
| 10092 | -** The final argument is an output variable. If successful, (SQLITE_CALLBACK *ppOut) | |
| 10093 | +** The final argument is an output variable. If successful, (*ppOut) | |
| 10093 | 10094 | ** should be set to point to the new tokenizer handle and SQLITE_OK |
| 10094 | 10095 | ** returned. If an error occurs, some value other than SQLITE_OK should |
| 10095 | 10096 | ** be returned. In this case, fts5 assumes that the final value of *ppOut |
| 10096 | 10097 | ** is undefined. |
| 10097 | 10098 | ** |
| @@ -10261,17 +10262,17 @@ | ||
| 10261 | 10262 | ** inefficient. |
| 10262 | 10263 | */ |
| 10263 | 10264 | typedef struct Fts5Tokenizer Fts5Tokenizer; |
| 10264 | 10265 | typedef struct fts5_tokenizer fts5_tokenizer; |
| 10265 | 10266 | struct fts5_tokenizer { |
| 10266 | - int (SQLITE_CALLBACK *xCreate)(void*, const char **azArg, int nArg, Fts5Tokenizer **ppOut); | |
| 10267 | - void (SQLITE_CALLBACK *xDelete)(Fts5Tokenizer*); | |
| 10268 | - int (SQLITE_CALLBACK *xTokenize)(Fts5Tokenizer*, | |
| 10267 | + int (*xCreate)(void*, const char **azArg, int nArg, Fts5Tokenizer **ppOut); | |
| 10268 | + void (*xDelete)(Fts5Tokenizer*); | |
| 10269 | + int (*xTokenize)(Fts5Tokenizer*, | |
| 10269 | 10270 | void *pCtx, |
| 10270 | 10271 | int flags, /* Mask of FTS5_TOKENIZE_* flags */ |
| 10271 | 10272 | const char *pText, int nText, |
| 10272 | - int (SQLITE_CALLBACK *xToken)( | |
| 10273 | + int (*xToken)( | |
| 10273 | 10274 | void *pCtx, /* Copy of 2nd argument to xTokenize() */ |
| 10274 | 10275 | int tflags, /* Mask of FTS5_TOKEN_* flags */ |
| 10275 | 10276 | const char *pToken, /* Pointer to buffer containing token */ |
| 10276 | 10277 | int nToken, /* Size of token in bytes */ |
| 10277 | 10278 | int iStart, /* Byte offset of token within input text */ |
| @@ -10300,33 +10301,33 @@ | ||
| 10300 | 10301 | typedef struct fts5_api fts5_api; |
| 10301 | 10302 | struct fts5_api { |
| 10302 | 10303 | int iVersion; /* Currently always set to 2 */ |
| 10303 | 10304 | |
| 10304 | 10305 | /* Create a new tokenizer */ |
| 10305 | - int (SQLITE_CALLBACK *xCreateTokenizer)( | |
| 10306 | + int (*xCreateTokenizer)( | |
| 10306 | 10307 | fts5_api *pApi, |
| 10307 | 10308 | const char *zName, |
| 10308 | 10309 | void *pContext, |
| 10309 | 10310 | fts5_tokenizer *pTokenizer, |
| 10310 | - void (SQLITE_CALLBACK *xDestroy)(void*) | |
| 10311 | + void (*xDestroy)(void*) | |
| 10311 | 10312 | ); |
| 10312 | 10313 | |
| 10313 | 10314 | /* Find an existing tokenizer */ |
| 10314 | - int (SQLITE_CALLBACK *xFindTokenizer)( | |
| 10315 | + int (*xFindTokenizer)( | |
| 10315 | 10316 | fts5_api *pApi, |
| 10316 | 10317 | const char *zName, |
| 10317 | 10318 | void **ppContext, |
| 10318 | 10319 | fts5_tokenizer *pTokenizer |
| 10319 | 10320 | ); |
| 10320 | 10321 | |
| 10321 | 10322 | /* Create a new auxiliary function */ |
| 10322 | - int (SQLITE_CALLBACK *xCreateFunction)( | |
| 10323 | + int (*xCreateFunction)( | |
| 10323 | 10324 | fts5_api *pApi, |
| 10324 | 10325 | const char *zName, |
| 10325 | 10326 | void *pContext, |
| 10326 | 10327 | fts5_extension_function xFunction, |
| 10327 | - void (SQLITE_CALLBACK *xDestroy)(void*) | |
| 10328 | + void (*xDestroy)(void*) | |
| 10328 | 10329 | ); |
| 10329 | 10330 | }; |
| 10330 | 10331 | |
| 10331 | 10332 | /* |
| 10332 | 10333 | ** END OF REGISTRATION API |
| 10333 | 10334 |
| --- src/sqlite3.h | |
| +++ src/sqlite3.h | |
| @@ -120,11 +120,11 @@ | |
| 120 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 121 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 122 | */ |
| 123 | #define SQLITE_VERSION "3.14.0" |
| 124 | #define SQLITE_VERSION_NUMBER 3014000 |
| 125 | #define SQLITE_SOURCE_ID "2016-08-02 08:45:26 7c38a79cdd42aaa45715aea330d10ca859098837" |
| 126 | |
| 127 | /* |
| 128 | ** CAPI3REF: Run-Time Library Version Numbers |
| 129 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 130 | ** |
| @@ -153,13 +153,13 @@ | |
| 153 | ** [SQLITE_SOURCE_ID] C preprocessor macro. |
| 154 | ** |
| 155 | ** See also: [sqlite_version()] and [sqlite_source_id()]. |
| 156 | */ |
| 157 | SQLITE_API SQLITE_EXTERN const char sqlite3_version[]; |
| 158 | SQLITE_API const char *SQLITE_APICALL sqlite3_libversion(void); |
| 159 | SQLITE_API const char *SQLITE_APICALL sqlite3_sourceid(void); |
| 160 | SQLITE_API int SQLITE_APICALL sqlite3_libversion_number(void); |
| 161 | |
| 162 | /* |
| 163 | ** CAPI3REF: Run-Time Library Compilation Options Diagnostics |
| 164 | ** |
| 165 | ** ^The sqlite3_compileoption_used() function returns 0 or 1 |
| @@ -180,12 +180,12 @@ | |
| 180 | ** |
| 181 | ** See also: SQL functions [sqlite_compileoption_used()] and |
| 182 | ** [sqlite_compileoption_get()] and the [compile_options pragma]. |
| 183 | */ |
| 184 | #ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS |
| 185 | SQLITE_API int SQLITE_APICALL sqlite3_compileoption_used(const char *zOptName); |
| 186 | SQLITE_API const char *SQLITE_APICALL sqlite3_compileoption_get(int N); |
| 187 | #endif |
| 188 | |
| 189 | /* |
| 190 | ** CAPI3REF: Test To See If The Library Is Threadsafe |
| 191 | ** |
| @@ -220,11 +220,11 @@ | |
| 220 | ** sqlite3_config(). In other words, the return value from sqlite3_threadsafe() |
| 221 | ** is unchanged by calls to sqlite3_config().)^ |
| 222 | ** |
| 223 | ** See the [threading mode] documentation for additional information. |
| 224 | */ |
| 225 | SQLITE_API int SQLITE_APICALL sqlite3_threadsafe(void); |
| 226 | |
| 227 | /* |
| 228 | ** CAPI3REF: Database Connection Handle |
| 229 | ** KEYWORDS: {database connection} {database connections} |
| 230 | ** |
| @@ -317,19 +317,19 @@ | |
| 317 | ** from [sqlite3_open()], [sqlite3_open16()], or |
| 318 | ** [sqlite3_open_v2()], and not previously closed. |
| 319 | ** ^Calling sqlite3_close() or sqlite3_close_v2() with a NULL pointer |
| 320 | ** argument is a harmless no-op. |
| 321 | */ |
| 322 | SQLITE_API int SQLITE_APICALL sqlite3_close(sqlite3*); |
| 323 | SQLITE_API int SQLITE_APICALL sqlite3_close_v2(sqlite3*); |
| 324 | |
| 325 | /* |
| 326 | ** The type for a callback function. |
| 327 | ** This is legacy and deprecated. It is included for historical |
| 328 | ** compatibility and is not documented. |
| 329 | */ |
| 330 | typedef int (SQLITE_CALLBACK *sqlite3_callback)(void*,int,char**, char**); |
| 331 | |
| 332 | /* |
| 333 | ** CAPI3REF: One-Step Query Execution Interface |
| 334 | ** METHOD: sqlite3 |
| 335 | ** |
| @@ -389,14 +389,14 @@ | |
| 389 | ** the 1st parameter to sqlite3_exec() while sqlite3_exec() is running. |
| 390 | ** <li> The application must not modify the SQL statement text passed into |
| 391 | ** the 2nd parameter of sqlite3_exec() while sqlite3_exec() is running. |
| 392 | ** </ul> |
| 393 | */ |
| 394 | SQLITE_API int SQLITE_APICALL sqlite3_exec( |
| 395 | sqlite3*, /* An open database */ |
| 396 | const char *sql, /* SQL to be evaluated */ |
| 397 | int (SQLITE_CALLBACK *callback)(void*,int,char**,char**), /* Callback function */ |
| 398 | void *, /* 1st argument to callback */ |
| 399 | char **errmsg /* Error msg written here */ |
| 400 | ); |
| 401 | |
| 402 | /* |
| @@ -740,30 +740,30 @@ | |
| 740 | ** database corruption. |
| 741 | */ |
| 742 | typedef struct sqlite3_io_methods sqlite3_io_methods; |
| 743 | struct sqlite3_io_methods { |
| 744 | int iVersion; |
| 745 | int (SQLITE_CALLBACK *xClose)(sqlite3_file*); |
| 746 | int (SQLITE_CALLBACK *xRead)(sqlite3_file*, void*, int iAmt, sqlite3_int64 iOfst); |
| 747 | int (SQLITE_CALLBACK *xWrite)(sqlite3_file*, const void*, int iAmt, sqlite3_int64 iOfst); |
| 748 | int (SQLITE_CALLBACK *xTruncate)(sqlite3_file*, sqlite3_int64 size); |
| 749 | int (SQLITE_CALLBACK *xSync)(sqlite3_file*, int flags); |
| 750 | int (SQLITE_CALLBACK *xFileSize)(sqlite3_file*, sqlite3_int64 *pSize); |
| 751 | int (SQLITE_CALLBACK *xLock)(sqlite3_file*, int); |
| 752 | int (SQLITE_CALLBACK *xUnlock)(sqlite3_file*, int); |
| 753 | int (SQLITE_CALLBACK *xCheckReservedLock)(sqlite3_file*, int *pResOut); |
| 754 | int (SQLITE_CALLBACK *xFileControl)(sqlite3_file*, int op, void *pArg); |
| 755 | int (SQLITE_CALLBACK *xSectorSize)(sqlite3_file*); |
| 756 | int (SQLITE_CALLBACK *xDeviceCharacteristics)(sqlite3_file*); |
| 757 | /* Methods above are valid for version 1 */ |
| 758 | int (SQLITE_CALLBACK *xShmMap)(sqlite3_file*, int iPg, int pgsz, int, void volatile**); |
| 759 | int (SQLITE_CALLBACK *xShmLock)(sqlite3_file*, int offset, int n, int flags); |
| 760 | void (SQLITE_CALLBACK *xShmBarrier)(sqlite3_file*); |
| 761 | int (SQLITE_CALLBACK *xShmUnmap)(sqlite3_file*, int deleteFlag); |
| 762 | /* Methods above are valid for version 2 */ |
| 763 | int (SQLITE_CALLBACK *xFetch)(sqlite3_file*, sqlite3_int64 iOfst, int iAmt, void **pp); |
| 764 | int (SQLITE_CALLBACK *xUnfetch)(sqlite3_file*, sqlite3_int64 iOfst, void *p); |
| 765 | /* Methods above are valid for version 3 */ |
| 766 | /* Additional methods may be added in future releases */ |
| 767 | }; |
| 768 | |
| 769 | /* |
| @@ -935,11 +935,11 @@ | |
| 935 | ** ^The [SQLITE_FCNTL_BUSYHANDLER] |
| 936 | ** file-control may be invoked by SQLite on the database file handle |
| 937 | ** shortly after it is opened in order to provide a custom VFS with access |
| 938 | ** to the connections busy-handler callback. The argument is of type (void **) |
| 939 | ** - an array of two (void *) values. The first (void *) actually points |
| 940 | ** to a function of type (int (SQLITE_CALLBACK *)(void *)). In order to invoke the connections |
| 941 | ** busy-handler, this function should be invoked with the second (void *) in |
| 942 | ** the array as the only argument. If it returns non-zero, then the operation |
| 943 | ** should be retried. If it returns zero, the custom VFS should abandon the |
| 944 | ** current operation. |
| 945 | ** |
| @@ -1211,43 +1211,43 @@ | |
| 1211 | ** or all of these interfaces to be NULL or for their behavior to change |
| 1212 | ** from one release to the next. Applications must not attempt to access |
| 1213 | ** any of these methods if the iVersion of the VFS is less than 3. |
| 1214 | */ |
| 1215 | typedef struct sqlite3_vfs sqlite3_vfs; |
| 1216 | typedef void (SQLITE_SYSAPI *sqlite3_syscall_ptr)(void); |
| 1217 | struct sqlite3_vfs { |
| 1218 | int iVersion; /* Structure version number (currently 3) */ |
| 1219 | int szOsFile; /* Size of subclassed sqlite3_file */ |
| 1220 | int mxPathname; /* Maximum file pathname length */ |
| 1221 | sqlite3_vfs *pNext; /* Next registered VFS */ |
| 1222 | const char *zName; /* Name of this virtual file system */ |
| 1223 | void *pAppData; /* Pointer to application-specific data */ |
| 1224 | int (SQLITE_CALLBACK *xOpen)(sqlite3_vfs*, const char *zName, sqlite3_file*, |
| 1225 | int flags, int *pOutFlags); |
| 1226 | int (SQLITE_CALLBACK *xDelete)(sqlite3_vfs*, const char *zName, int syncDir); |
| 1227 | int (SQLITE_CALLBACK *xAccess)(sqlite3_vfs*, const char *zName, int flags, int *pResOut); |
| 1228 | int (SQLITE_CALLBACK *xFullPathname)(sqlite3_vfs*, const char *zName, int nOut, char *zOut); |
| 1229 | void *(SQLITE_CALLBACK *xDlOpen)(sqlite3_vfs*, const char *zFilename); |
| 1230 | void (SQLITE_CALLBACK *xDlError)(sqlite3_vfs*, int nByte, char *zErrMsg); |
| 1231 | void (SQLITE_CALLBACK *(*xDlSym)(sqlite3_vfs*,void*, const char *zSymbol))(void); |
| 1232 | void (SQLITE_CALLBACK *xDlClose)(sqlite3_vfs*, void*); |
| 1233 | int (SQLITE_CALLBACK *xRandomness)(sqlite3_vfs*, int nByte, char *zOut); |
| 1234 | int (SQLITE_CALLBACK *xSleep)(sqlite3_vfs*, int microseconds); |
| 1235 | int (SQLITE_CALLBACK *xCurrentTime)(sqlite3_vfs*, double*); |
| 1236 | int (SQLITE_CALLBACK *xGetLastError)(sqlite3_vfs*, int, char *); |
| 1237 | /* |
| 1238 | ** The methods above are in version 1 of the sqlite_vfs object |
| 1239 | ** definition. Those that follow are added in version 2 or later |
| 1240 | */ |
| 1241 | int (SQLITE_CALLBACK *xCurrentTimeInt64)(sqlite3_vfs*, sqlite3_int64*); |
| 1242 | /* |
| 1243 | ** The methods above are in versions 1 and 2 of the sqlite_vfs object. |
| 1244 | ** Those below are for version 3 and greater. |
| 1245 | */ |
| 1246 | int (SQLITE_CALLBACK *xSetSystemCall)(sqlite3_vfs*, const char *zName, sqlite3_syscall_ptr); |
| 1247 | sqlite3_syscall_ptr (SQLITE_CALLBACK *xGetSystemCall)(sqlite3_vfs*, const char *zName); |
| 1248 | const char *(SQLITE_CALLBACK *xNextSystemCall)(sqlite3_vfs*, const char *zName); |
| 1249 | /* |
| 1250 | ** The methods above are in versions 1 through 3 of the sqlite_vfs object. |
| 1251 | ** New fields may be appended in future versions. The iVersion |
| 1252 | ** value will increment whenever this happens. |
| 1253 | */ |
| @@ -1388,14 +1388,14 @@ | |
| 1388 | ** sqlite3_os_init() and sqlite3_os_end(). An application-supplied |
| 1389 | ** implementation of sqlite3_os_init() or sqlite3_os_end() |
| 1390 | ** must return [SQLITE_OK] on success and some other [error code] upon |
| 1391 | ** failure. |
| 1392 | */ |
| 1393 | SQLITE_API int SQLITE_APICALL sqlite3_initialize(void); |
| 1394 | SQLITE_API int SQLITE_APICALL sqlite3_shutdown(void); |
| 1395 | SQLITE_API int SQLITE_APICALL sqlite3_os_init(void); |
| 1396 | SQLITE_API int SQLITE_APICALL sqlite3_os_end(void); |
| 1397 | |
| 1398 | /* |
| 1399 | ** CAPI3REF: Configuring The SQLite Library |
| 1400 | ** |
| 1401 | ** The sqlite3_config() interface is used to make global configuration |
| @@ -1510,17 +1510,17 @@ | |
| 1510 | ** SQLite will never invoke xInit() more than once without an intervening |
| 1511 | ** call to xShutdown(). |
| 1512 | */ |
| 1513 | typedef struct sqlite3_mem_methods sqlite3_mem_methods; |
| 1514 | struct sqlite3_mem_methods { |
| 1515 | void *(SQLITE_CALLBACK *xMalloc)(int); /* Memory allocation function */ |
| 1516 | void (SQLITE_CALLBACK *xFree)(void*); /* Free a prior allocation */ |
| 1517 | void *(SQLITE_CALLBACK *xRealloc)(void*,int); /* Resize an allocation */ |
| 1518 | int (SQLITE_CALLBACK *xSize)(void*); /* Return the size of an allocation */ |
| 1519 | int (SQLITE_CALLBACK *xRoundup)(int); /* Round up request size to allocation size */ |
| 1520 | int (SQLITE_CALLBACK *xInit)(void*); /* Initialize the memory allocator */ |
| 1521 | void (SQLITE_CALLBACK *xShutdown)(void*); /* Deinitialize the memory allocator */ |
| 1522 | void *pAppData; /* Argument to xInit() and xShutdown() */ |
| 1523 | }; |
| 1524 | |
| 1525 | /* |
| 1526 | ** CAPI3REF: Configuration Options |
| @@ -1733,11 +1733,11 @@ | |
| 1733 | ** |
| 1734 | ** [[SQLITE_CONFIG_LOG]] <dt>SQLITE_CONFIG_LOG</dt> |
| 1735 | ** <dd> The SQLITE_CONFIG_LOG option is used to configure the SQLite |
| 1736 | ** global [error log]. |
| 1737 | ** (^The SQLITE_CONFIG_LOG option takes two arguments: a pointer to a |
| 1738 | ** function with a call signature of void(SQLITE_CALLBACK *)(void*,int,const char*), |
| 1739 | ** and a pointer to void. ^If the function pointer is not NULL, it is |
| 1740 | ** invoked by [sqlite3_log()] to process each logging event. ^If the |
| 1741 | ** function pointer is NULL, the [sqlite3_log()] interface becomes a no-op. |
| 1742 | ** ^The void pointer that is the second argument to SQLITE_CONFIG_LOG is |
| 1743 | ** passed through as the first parameter to the application-defined logger |
| @@ -1786,11 +1786,11 @@ | |
| 1786 | ** |
| 1787 | ** [[SQLITE_CONFIG_SQLLOG]] |
| 1788 | ** <dt>SQLITE_CONFIG_SQLLOG |
| 1789 | ** <dd>This option is only available if sqlite is compiled with the |
| 1790 | ** [SQLITE_ENABLE_SQLLOG] pre-processor macro defined. The first argument should |
| 1791 | ** be a pointer to a function of type void(SQLITE_CALLBACK *)(void*,sqlite3*,const char*, int). |
| 1792 | ** The second should be of type (void*). The callback is invoked by the library |
| 1793 | ** in three separate circumstances, identified by the value passed as the |
| 1794 | ** fourth parameter. If the fourth parameter is 0, then the database connection |
| 1795 | ** passed as the second argument has just been opened. The third argument |
| 1796 | ** points to a buffer containing the name of the main database file. If the |
| @@ -1984,11 +1984,11 @@ | |
| 1984 | ** |
| 1985 | ** ^The sqlite3_extended_result_codes() routine enables or disables the |
| 1986 | ** [extended result codes] feature of SQLite. ^The extended result |
| 1987 | ** codes are disabled by default for historical compatibility. |
| 1988 | */ |
| 1989 | SQLITE_API int SQLITE_APICALL sqlite3_extended_result_codes(sqlite3*, int onoff); |
| 1990 | |
| 1991 | /* |
| 1992 | ** CAPI3REF: Last Insert Rowid |
| 1993 | ** METHOD: sqlite3 |
| 1994 | ** |
| @@ -2036,11 +2036,11 @@ | |
| 2036 | ** function is running and thus changes the last insert [rowid], |
| 2037 | ** then the value returned by [sqlite3_last_insert_rowid()] is |
| 2038 | ** unpredictable and might not equal either the old or the new |
| 2039 | ** last insert [rowid]. |
| 2040 | */ |
| 2041 | SQLITE_API sqlite3_int64 SQLITE_APICALL sqlite3_last_insert_rowid(sqlite3*); |
| 2042 | |
| 2043 | /* |
| 2044 | ** CAPI3REF: Count The Number Of Rows Modified |
| 2045 | ** METHOD: sqlite3 |
| 2046 | ** |
| @@ -2089,11 +2089,11 @@ | |
| 2089 | ** |
| 2090 | ** If a separate thread makes changes on the same database connection |
| 2091 | ** while [sqlite3_changes()] is running then the value returned |
| 2092 | ** is unpredictable and not meaningful. |
| 2093 | */ |
| 2094 | SQLITE_API int SQLITE_APICALL sqlite3_changes(sqlite3*); |
| 2095 | |
| 2096 | /* |
| 2097 | ** CAPI3REF: Total Number Of Rows Modified |
| 2098 | ** METHOD: sqlite3 |
| 2099 | ** |
| @@ -2113,11 +2113,11 @@ | |
| 2113 | ** |
| 2114 | ** If a separate thread makes changes on the same database connection |
| 2115 | ** while [sqlite3_total_changes()] is running then the value |
| 2116 | ** returned is unpredictable and not meaningful. |
| 2117 | */ |
| 2118 | SQLITE_API int SQLITE_APICALL sqlite3_total_changes(sqlite3*); |
| 2119 | |
| 2120 | /* |
| 2121 | ** CAPI3REF: Interrupt A Long-Running Query |
| 2122 | ** METHOD: sqlite3 |
| 2123 | ** |
| @@ -2153,11 +2153,11 @@ | |
| 2153 | ** that are started after the sqlite3_interrupt() call returns. |
| 2154 | ** |
| 2155 | ** If the database connection closes while [sqlite3_interrupt()] |
| 2156 | ** is running then bad things will likely happen. |
| 2157 | */ |
| 2158 | SQLITE_API void SQLITE_APICALL sqlite3_interrupt(sqlite3*); |
| 2159 | |
| 2160 | /* |
| 2161 | ** CAPI3REF: Determine If An SQL Statement Is Complete |
| 2162 | ** |
| 2163 | ** These routines are useful during command-line input to determine if the |
| @@ -2188,12 +2188,12 @@ | |
| 2188 | ** UTF-8 string. |
| 2189 | ** |
| 2190 | ** The input to [sqlite3_complete16()] must be a zero-terminated |
| 2191 | ** UTF-16 string in native byte order. |
| 2192 | */ |
| 2193 | SQLITE_API int SQLITE_APICALL sqlite3_complete(const char *sql); |
| 2194 | SQLITE_API int SQLITE_APICALL sqlite3_complete16(const void *sql); |
| 2195 | |
| 2196 | /* |
| 2197 | ** CAPI3REF: Register A Callback To Handle SQLITE_BUSY Errors |
| 2198 | ** KEYWORDS: {busy-handler callback} {busy handler} |
| 2199 | ** METHOD: sqlite3 |
| @@ -2250,11 +2250,11 @@ | |
| 2250 | ** result in undefined behavior. |
| 2251 | ** |
| 2252 | ** A busy handler must not close the database connection |
| 2253 | ** or [prepared statement] that invoked the busy handler. |
| 2254 | */ |
| 2255 | SQLITE_API int SQLITE_APICALL sqlite3_busy_handler(sqlite3*,int(SQLITE_CALLBACK *)(void*,int),void*); |
| 2256 | |
| 2257 | /* |
| 2258 | ** CAPI3REF: Set A Busy Timeout |
| 2259 | ** METHOD: sqlite3 |
| 2260 | ** |
| @@ -2273,11 +2273,11 @@ | |
| 2273 | ** was defined (using [sqlite3_busy_handler()]) prior to calling |
| 2274 | ** this routine, that other busy handler is cleared.)^ |
| 2275 | ** |
| 2276 | ** See also: [PRAGMA busy_timeout] |
| 2277 | */ |
| 2278 | SQLITE_API int SQLITE_APICALL sqlite3_busy_timeout(sqlite3*, int ms); |
| 2279 | |
| 2280 | /* |
| 2281 | ** CAPI3REF: Convenience Routines For Running Queries |
| 2282 | ** METHOD: sqlite3 |
| 2283 | ** |
| @@ -2348,19 +2348,19 @@ | |
| 2348 | ** interface defined here. As a consequence, errors that occur in the |
| 2349 | ** wrapper layer outside of the internal [sqlite3_exec()] call are not |
| 2350 | ** reflected in subsequent calls to [sqlite3_errcode()] or |
| 2351 | ** [sqlite3_errmsg()]. |
| 2352 | */ |
| 2353 | SQLITE_API int SQLITE_APICALL sqlite3_get_table( |
| 2354 | sqlite3 *db, /* An open database */ |
| 2355 | const char *zSql, /* SQL to be evaluated */ |
| 2356 | char ***pazResult, /* Results of the query */ |
| 2357 | int *pnRow, /* Number of result rows written here */ |
| 2358 | int *pnColumn, /* Number of result columns written here */ |
| 2359 | char **pzErrmsg /* Error msg written here */ |
| 2360 | ); |
| 2361 | SQLITE_API void SQLITE_APICALL sqlite3_free_table(char **result); |
| 2362 | |
| 2363 | /* |
| 2364 | ** CAPI3REF: Formatted String Printing Functions |
| 2365 | ** |
| 2366 | ** These routines are work-alikes of the "printf()" family of functions |
| @@ -2463,13 +2463,13 @@ | |
| 2463 | ** ^(The "%z" formatting option works like "%s" but with the |
| 2464 | ** addition that after the string has been read and copied into |
| 2465 | ** the result, [sqlite3_free()] is called on the input string.)^ |
| 2466 | */ |
| 2467 | SQLITE_API char *SQLITE_CDECL sqlite3_mprintf(const char*,...); |
| 2468 | SQLITE_API char *SQLITE_APICALL sqlite3_vmprintf(const char*, va_list); |
| 2469 | SQLITE_API char *SQLITE_CDECL sqlite3_snprintf(int,char*,const char*, ...); |
| 2470 | SQLITE_API char *SQLITE_APICALL sqlite3_vsnprintf(int,char*,const char*, va_list); |
| 2471 | |
| 2472 | /* |
| 2473 | ** CAPI3REF: Memory Allocation Subsystem |
| 2474 | ** |
| 2475 | ** The SQLite core uses these three routines for all of its own |
| @@ -2555,16 +2555,16 @@ | |
| 2555 | ** |
| 2556 | ** The application must not read or write any part of |
| 2557 | ** a block of memory after it has been released using |
| 2558 | ** [sqlite3_free()] or [sqlite3_realloc()]. |
| 2559 | */ |
| 2560 | SQLITE_API void *SQLITE_APICALL sqlite3_malloc(int); |
| 2561 | SQLITE_API void *SQLITE_APICALL sqlite3_malloc64(sqlite3_uint64); |
| 2562 | SQLITE_API void *SQLITE_APICALL sqlite3_realloc(void*, int); |
| 2563 | SQLITE_API void *SQLITE_APICALL sqlite3_realloc64(void*, sqlite3_uint64); |
| 2564 | SQLITE_API void SQLITE_APICALL sqlite3_free(void*); |
| 2565 | SQLITE_API sqlite3_uint64 SQLITE_APICALL sqlite3_msize(void*); |
| 2566 | |
| 2567 | /* |
| 2568 | ** CAPI3REF: Memory Allocator Statistics |
| 2569 | ** |
| 2570 | ** SQLite provides these two interfaces for reporting on the status |
| @@ -2585,12 +2585,12 @@ | |
| 2585 | ** [sqlite3_memory_used()] if and only if the parameter to |
| 2586 | ** [sqlite3_memory_highwater()] is true. ^The value returned |
| 2587 | ** by [sqlite3_memory_highwater(1)] is the high-water mark |
| 2588 | ** prior to the reset. |
| 2589 | */ |
| 2590 | SQLITE_API sqlite3_int64 SQLITE_APICALL sqlite3_memory_used(void); |
| 2591 | SQLITE_API sqlite3_int64 SQLITE_APICALL sqlite3_memory_highwater(int resetFlag); |
| 2592 | |
| 2593 | /* |
| 2594 | ** CAPI3REF: Pseudo-Random Number Generator |
| 2595 | ** |
| 2596 | ** SQLite contains a high-quality pseudo-random number generator (PRNG) used to |
| @@ -2609,11 +2609,11 @@ | |
| 2609 | ** ^If the previous call to this routine had an N of 1 or more and a |
| 2610 | ** non-NULL P then the pseudo-randomness is generated |
| 2611 | ** internally and without recourse to the [sqlite3_vfs] xRandomness |
| 2612 | ** method. |
| 2613 | */ |
| 2614 | SQLITE_API void SQLITE_APICALL sqlite3_randomness(int N, void *P); |
| 2615 | |
| 2616 | /* |
| 2617 | ** CAPI3REF: Compile-Time Authorization Callbacks |
| 2618 | ** METHOD: sqlite3 |
| 2619 | ** |
| @@ -2692,13 +2692,13 @@ | |
| 2692 | ** [sqlite3_prepare()] or its variants. Authorization is not |
| 2693 | ** performed during statement evaluation in [sqlite3_step()], unless |
| 2694 | ** as stated in the previous paragraph, sqlite3_step() invokes |
| 2695 | ** sqlite3_prepare_v2() to reprepare a statement after a schema change. |
| 2696 | */ |
| 2697 | SQLITE_API int SQLITE_APICALL sqlite3_set_authorizer( |
| 2698 | sqlite3*, |
| 2699 | int (SQLITE_CALLBACK *xAuth)(void*,int,const char*,const char*,const char*,const char*), |
| 2700 | void *pUserData |
| 2701 | ); |
| 2702 | |
| 2703 | /* |
| 2704 | ** CAPI3REF: Authorizer Return Codes |
| @@ -2800,14 +2800,14 @@ | |
| 2800 | ** digits in the time are meaningless. Future versions of SQLite |
| 2801 | ** might provide greater resolution on the profiler callback. The |
| 2802 | ** sqlite3_profile() function is considered experimental and is |
| 2803 | ** subject to change in future versions of SQLite. |
| 2804 | */ |
| 2805 | SQLITE_API SQLITE_DEPRECATED void *SQLITE_APICALL sqlite3_trace(sqlite3*, |
| 2806 | void(SQLITE_CALLBACK *xTrace)(void*,const char*), void*); |
| 2807 | SQLITE_API SQLITE_DEPRECATED void *SQLITE_APICALL sqlite3_profile(sqlite3*, |
| 2808 | void(SQLITE_CALLBACK *xProfile)(void*,const char*,sqlite3_uint64), void*); |
| 2809 | |
| 2810 | /* |
| 2811 | ** CAPI3REF: SQL Trace Event Codes |
| 2812 | ** KEYWORDS: SQLITE_TRACE |
| 2813 | ** |
| @@ -2891,14 +2891,14 @@ | |
| 2891 | ** |
| 2892 | ** The sqlite3_trace_v2() interface is intended to replace the legacy |
| 2893 | ** interfaces [sqlite3_trace()] and [sqlite3_profile()], both of which |
| 2894 | ** are deprecated. |
| 2895 | */ |
| 2896 | SQLITE_API int SQLITE_APICALL sqlite3_trace_v2( |
| 2897 | sqlite3*, |
| 2898 | unsigned uMask, |
| 2899 | int(SQLITE_CALLBACK *xCallback)(unsigned,void*,void*,void*), |
| 2900 | void *pCtx |
| 2901 | ); |
| 2902 | |
| 2903 | /* |
| 2904 | ** CAPI3REF: Query Progress Callbacks |
| @@ -2930,11 +2930,11 @@ | |
| 2930 | ** the database connection that invoked the progress handler. |
| 2931 | ** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their |
| 2932 | ** database connections for the meaning of "modify" in this paragraph. |
| 2933 | ** |
| 2934 | */ |
| 2935 | SQLITE_API void SQLITE_APICALL sqlite3_progress_handler(sqlite3*, int, int(SQLITE_CALLBACK *)(void*), void*); |
| 2936 | |
| 2937 | /* |
| 2938 | ** CAPI3REF: Opening A New Database Connection |
| 2939 | ** CONSTRUCTOR: sqlite3 |
| 2940 | ** |
| @@ -3159,19 +3159,19 @@ | |
| 3159 | ** prior to calling sqlite3_open() or sqlite3_open_v2(). Otherwise, various |
| 3160 | ** features that require the use of temporary files may fail. |
| 3161 | ** |
| 3162 | ** See also: [sqlite3_temp_directory] |
| 3163 | */ |
| 3164 | SQLITE_API int SQLITE_APICALL sqlite3_open( |
| 3165 | const char *filename, /* Database filename (UTF-8) */ |
| 3166 | sqlite3 **ppDb /* OUT: SQLite db handle */ |
| 3167 | ); |
| 3168 | SQLITE_API int SQLITE_APICALL sqlite3_open16( |
| 3169 | const void *filename, /* Database filename (UTF-16) */ |
| 3170 | sqlite3 **ppDb /* OUT: SQLite db handle */ |
| 3171 | ); |
| 3172 | SQLITE_API int SQLITE_APICALL sqlite3_open_v2( |
| 3173 | const char *filename, /* Database filename (UTF-8) */ |
| 3174 | sqlite3 **ppDb, /* OUT: SQLite db handle */ |
| 3175 | int flags, /* Flags */ |
| 3176 | const char *zVfs /* Name of VFS module to use */ |
| 3177 | ); |
| @@ -3213,13 +3213,13 @@ | |
| 3213 | ** sqlite3_uri_boolean(F,P,B) returns B. If F is not a NULL pointer and |
| 3214 | ** is not a database file pathname pointer that SQLite passed into the xOpen |
| 3215 | ** VFS method, then the behavior of this routine is undefined and probably |
| 3216 | ** undesirable. |
| 3217 | */ |
| 3218 | SQLITE_API const char *SQLITE_APICALL sqlite3_uri_parameter(const char *zFilename, const char *zParam); |
| 3219 | SQLITE_API int SQLITE_APICALL sqlite3_uri_boolean(const char *zFile, const char *zParam, int bDefault); |
| 3220 | SQLITE_API sqlite3_int64 SQLITE_APICALL sqlite3_uri_int64(const char*, const char*, sqlite3_int64); |
| 3221 | |
| 3222 | |
| 3223 | /* |
| 3224 | ** CAPI3REF: Error Codes And Messages |
| 3225 | ** METHOD: sqlite3 |
| @@ -3259,15 +3259,15 @@ | |
| 3259 | ** |
| 3260 | ** If an interface fails with SQLITE_MISUSE, that means the interface |
| 3261 | ** was invoked incorrectly by the application. In that case, the |
| 3262 | ** error code and message may or may not be set. |
| 3263 | */ |
| 3264 | SQLITE_API int SQLITE_APICALL sqlite3_errcode(sqlite3 *db); |
| 3265 | SQLITE_API int SQLITE_APICALL sqlite3_extended_errcode(sqlite3 *db); |
| 3266 | SQLITE_API const char *SQLITE_APICALL sqlite3_errmsg(sqlite3*); |
| 3267 | SQLITE_API const void *SQLITE_APICALL sqlite3_errmsg16(sqlite3*); |
| 3268 | SQLITE_API const char *SQLITE_APICALL sqlite3_errstr(int); |
| 3269 | |
| 3270 | /* |
| 3271 | ** CAPI3REF: Prepared Statement Object |
| 3272 | ** KEYWORDS: {prepared statement} {prepared statements} |
| 3273 | ** |
| @@ -3331,11 +3331,11 @@ | |
| 3331 | ** created by an untrusted script can be contained using the |
| 3332 | ** [max_page_count] [PRAGMA]. |
| 3333 | ** |
| 3334 | ** New run-time limit categories may be added in future releases. |
| 3335 | */ |
| 3336 | SQLITE_API int SQLITE_APICALL sqlite3_limit(sqlite3*, int id, int newVal); |
| 3337 | |
| 3338 | /* |
| 3339 | ** CAPI3REF: Run-Time Limit Categories |
| 3340 | ** KEYWORDS: {limit category} {*limit categories} |
| 3341 | ** |
| @@ -3483,32 +3483,32 @@ | |
| 3483 | ** or [GLOB] operator or if the parameter is compared to an indexed column |
| 3484 | ** and the [SQLITE_ENABLE_STAT3] compile-time option is enabled. |
| 3485 | ** </li> |
| 3486 | ** </ol> |
| 3487 | */ |
| 3488 | SQLITE_API int SQLITE_APICALL sqlite3_prepare( |
| 3489 | sqlite3 *db, /* Database handle */ |
| 3490 | const char *zSql, /* SQL statement, UTF-8 encoded */ |
| 3491 | int nByte, /* Maximum length of zSql in bytes. */ |
| 3492 | sqlite3_stmt **ppStmt, /* OUT: Statement handle */ |
| 3493 | const char **pzTail /* OUT: Pointer to unused portion of zSql */ |
| 3494 | ); |
| 3495 | SQLITE_API int SQLITE_APICALL sqlite3_prepare_v2( |
| 3496 | sqlite3 *db, /* Database handle */ |
| 3497 | const char *zSql, /* SQL statement, UTF-8 encoded */ |
| 3498 | int nByte, /* Maximum length of zSql in bytes. */ |
| 3499 | sqlite3_stmt **ppStmt, /* OUT: Statement handle */ |
| 3500 | const char **pzTail /* OUT: Pointer to unused portion of zSql */ |
| 3501 | ); |
| 3502 | SQLITE_API int SQLITE_APICALL sqlite3_prepare16( |
| 3503 | sqlite3 *db, /* Database handle */ |
| 3504 | const void *zSql, /* SQL statement, UTF-16 encoded */ |
| 3505 | int nByte, /* Maximum length of zSql in bytes. */ |
| 3506 | sqlite3_stmt **ppStmt, /* OUT: Statement handle */ |
| 3507 | const void **pzTail /* OUT: Pointer to unused portion of zSql */ |
| 3508 | ); |
| 3509 | SQLITE_API int SQLITE_APICALL sqlite3_prepare16_v2( |
| 3510 | sqlite3 *db, /* Database handle */ |
| 3511 | const void *zSql, /* SQL statement, UTF-16 encoded */ |
| 3512 | int nByte, /* Maximum length of zSql in bytes. */ |
| 3513 | sqlite3_stmt **ppStmt, /* OUT: Statement handle */ |
| 3514 | const void **pzTail /* OUT: Pointer to unused portion of zSql */ |
| @@ -3543,12 +3543,12 @@ | |
| 3543 | ** automatically freed when the prepared statement is finalized. |
| 3544 | ** ^The string returned by sqlite3_expanded_sql(P), on the other hand, |
| 3545 | ** is obtained from [sqlite3_malloc()] and must be free by the application |
| 3546 | ** by passing it to [sqlite3_free()]. |
| 3547 | */ |
| 3548 | SQLITE_API const char *SQLITE_APICALL sqlite3_sql(sqlite3_stmt *pStmt); |
| 3549 | SQLITE_API char *SQLITE_APICALL sqlite3_expanded_sql(sqlite3_stmt *pStmt); |
| 3550 | |
| 3551 | /* |
| 3552 | ** CAPI3REF: Determine If An SQL Statement Writes The Database |
| 3553 | ** METHOD: sqlite3_stmt |
| 3554 | ** |
| @@ -3576,11 +3576,11 @@ | |
| 3576 | ** database. ^The [ATTACH] and [DETACH] statements also cause |
| 3577 | ** sqlite3_stmt_readonly() to return true since, while those statements |
| 3578 | ** change the configuration of a database connection, they do not make |
| 3579 | ** changes to the content of the database files on disk. |
| 3580 | */ |
| 3581 | SQLITE_API int SQLITE_APICALL sqlite3_stmt_readonly(sqlite3_stmt *pStmt); |
| 3582 | |
| 3583 | /* |
| 3584 | ** CAPI3REF: Determine If A Prepared Statement Has Been Reset |
| 3585 | ** METHOD: sqlite3_stmt |
| 3586 | ** |
| @@ -3597,11 +3597,11 @@ | |
| 3597 | ** to locate all prepared statements associated with a database |
| 3598 | ** connection that are in need of being reset. This can be used, |
| 3599 | ** for example, in diagnostic routines to search for prepared |
| 3600 | ** statements that are holding a transaction open. |
| 3601 | */ |
| 3602 | SQLITE_API int SQLITE_APICALL sqlite3_stmt_busy(sqlite3_stmt*); |
| 3603 | |
| 3604 | /* |
| 3605 | ** CAPI3REF: Dynamically Typed Value Object |
| 3606 | ** KEYWORDS: {protected sqlite3_value} {unprotected sqlite3_value} |
| 3607 | ** |
| @@ -3761,24 +3761,24 @@ | |
| 3761 | ** index is out of range. ^[SQLITE_NOMEM] is returned if malloc() fails. |
| 3762 | ** |
| 3763 | ** See also: [sqlite3_bind_parameter_count()], |
| 3764 | ** [sqlite3_bind_parameter_name()], and [sqlite3_bind_parameter_index()]. |
| 3765 | */ |
| 3766 | SQLITE_API int SQLITE_APICALL sqlite3_bind_blob(sqlite3_stmt*, int, const void*, int n, void(SQLITE_CALLBACK *)(void*)); |
| 3767 | SQLITE_API int SQLITE_APICALL sqlite3_bind_blob64(sqlite3_stmt*, int, const void*, sqlite3_uint64, |
| 3768 | void(SQLITE_CALLBACK *)(void*)); |
| 3769 | SQLITE_API int SQLITE_APICALL sqlite3_bind_double(sqlite3_stmt*, int, double); |
| 3770 | SQLITE_API int SQLITE_APICALL sqlite3_bind_int(sqlite3_stmt*, int, int); |
| 3771 | SQLITE_API int SQLITE_APICALL sqlite3_bind_int64(sqlite3_stmt*, int, sqlite3_int64); |
| 3772 | SQLITE_API int SQLITE_APICALL sqlite3_bind_null(sqlite3_stmt*, int); |
| 3773 | SQLITE_API int SQLITE_APICALL sqlite3_bind_text(sqlite3_stmt*,int,const char*,int,void(SQLITE_CALLBACK *)(void*)); |
| 3774 | SQLITE_API int SQLITE_APICALL sqlite3_bind_text16(sqlite3_stmt*, int, const void*, int, void(SQLITE_CALLBACK *)(void*)); |
| 3775 | SQLITE_API int SQLITE_APICALL sqlite3_bind_text64(sqlite3_stmt*, int, const char*, sqlite3_uint64, |
| 3776 | void(SQLITE_CALLBACK *)(void*), unsigned char encoding); |
| 3777 | SQLITE_API int SQLITE_APICALL sqlite3_bind_value(sqlite3_stmt*, int, const sqlite3_value*); |
| 3778 | SQLITE_API int SQLITE_APICALL sqlite3_bind_zeroblob(sqlite3_stmt*, int, int n); |
| 3779 | SQLITE_API int SQLITE_APICALL sqlite3_bind_zeroblob64(sqlite3_stmt*, int, sqlite3_uint64); |
| 3780 | |
| 3781 | /* |
| 3782 | ** CAPI3REF: Number Of SQL Parameters |
| 3783 | ** METHOD: sqlite3_stmt |
| 3784 | ** |
| @@ -3795,11 +3795,11 @@ | |
| 3795 | ** |
| 3796 | ** See also: [sqlite3_bind_blob|sqlite3_bind()], |
| 3797 | ** [sqlite3_bind_parameter_name()], and |
| 3798 | ** [sqlite3_bind_parameter_index()]. |
| 3799 | */ |
| 3800 | SQLITE_API int SQLITE_APICALL sqlite3_bind_parameter_count(sqlite3_stmt*); |
| 3801 | |
| 3802 | /* |
| 3803 | ** CAPI3REF: Name Of A Host Parameter |
| 3804 | ** METHOD: sqlite3_stmt |
| 3805 | ** |
| @@ -3823,11 +3823,11 @@ | |
| 3823 | ** |
| 3824 | ** See also: [sqlite3_bind_blob|sqlite3_bind()], |
| 3825 | ** [sqlite3_bind_parameter_count()], and |
| 3826 | ** [sqlite3_bind_parameter_index()]. |
| 3827 | */ |
| 3828 | SQLITE_API const char *SQLITE_APICALL sqlite3_bind_parameter_name(sqlite3_stmt*, int); |
| 3829 | |
| 3830 | /* |
| 3831 | ** CAPI3REF: Index Of A Parameter With A Given Name |
| 3832 | ** METHOD: sqlite3_stmt |
| 3833 | ** |
| @@ -3840,21 +3840,21 @@ | |
| 3840 | ** |
| 3841 | ** See also: [sqlite3_bind_blob|sqlite3_bind()], |
| 3842 | ** [sqlite3_bind_parameter_count()], and |
| 3843 | ** [sqlite3_bind_parameter_name()]. |
| 3844 | */ |
| 3845 | SQLITE_API int SQLITE_APICALL sqlite3_bind_parameter_index(sqlite3_stmt*, const char *zName); |
| 3846 | |
| 3847 | /* |
| 3848 | ** CAPI3REF: Reset All Bindings On A Prepared Statement |
| 3849 | ** METHOD: sqlite3_stmt |
| 3850 | ** |
| 3851 | ** ^Contrary to the intuition of many, [sqlite3_reset()] does not reset |
| 3852 | ** the [sqlite3_bind_blob | bindings] on a [prepared statement]. |
| 3853 | ** ^Use this routine to reset all host parameters to NULL. |
| 3854 | */ |
| 3855 | SQLITE_API int SQLITE_APICALL sqlite3_clear_bindings(sqlite3_stmt*); |
| 3856 | |
| 3857 | /* |
| 3858 | ** CAPI3REF: Number Of Columns In A Result Set |
| 3859 | ** METHOD: sqlite3_stmt |
| 3860 | ** |
| @@ -3862,11 +3862,11 @@ | |
| 3862 | ** [prepared statement]. ^This routine returns 0 if pStmt is an SQL |
| 3863 | ** statement that does not return data (for example an [UPDATE]). |
| 3864 | ** |
| 3865 | ** See also: [sqlite3_data_count()] |
| 3866 | */ |
| 3867 | SQLITE_API int SQLITE_APICALL sqlite3_column_count(sqlite3_stmt *pStmt); |
| 3868 | |
| 3869 | /* |
| 3870 | ** CAPI3REF: Column Names In A Result Set |
| 3871 | ** METHOD: sqlite3_stmt |
| 3872 | ** |
| @@ -3891,12 +3891,12 @@ | |
| 3891 | ** ^The name of a result column is the value of the "AS" clause for |
| 3892 | ** that column, if there is an AS clause. If there is no AS clause |
| 3893 | ** then the name of the column is unspecified and may change from |
| 3894 | ** one release of SQLite to the next. |
| 3895 | */ |
| 3896 | SQLITE_API const char *SQLITE_APICALL sqlite3_column_name(sqlite3_stmt*, int N); |
| 3897 | SQLITE_API const void *SQLITE_APICALL sqlite3_column_name16(sqlite3_stmt*, int N); |
| 3898 | |
| 3899 | /* |
| 3900 | ** CAPI3REF: Source Of Data In A Query Result |
| 3901 | ** METHOD: sqlite3_stmt |
| 3902 | ** |
| @@ -3940,16 +3940,16 @@ | |
| 3940 | ** If two or more threads call one or more |
| 3941 | ** [sqlite3_column_database_name | column metadata interfaces] |
| 3942 | ** for the same [prepared statement] and result column |
| 3943 | ** at the same time then the results are undefined. |
| 3944 | */ |
| 3945 | SQLITE_API const char *SQLITE_APICALL sqlite3_column_database_name(sqlite3_stmt*,int); |
| 3946 | SQLITE_API const void *SQLITE_APICALL sqlite3_column_database_name16(sqlite3_stmt*,int); |
| 3947 | SQLITE_API const char *SQLITE_APICALL sqlite3_column_table_name(sqlite3_stmt*,int); |
| 3948 | SQLITE_API const void *SQLITE_APICALL sqlite3_column_table_name16(sqlite3_stmt*,int); |
| 3949 | SQLITE_API const char *SQLITE_APICALL sqlite3_column_origin_name(sqlite3_stmt*,int); |
| 3950 | SQLITE_API const void *SQLITE_APICALL sqlite3_column_origin_name16(sqlite3_stmt*,int); |
| 3951 | |
| 3952 | /* |
| 3953 | ** CAPI3REF: Declared Datatype Of A Query Result |
| 3954 | ** METHOD: sqlite3_stmt |
| 3955 | ** |
| @@ -3977,12 +3977,12 @@ | |
| 3977 | ** data stored in that column is of the declared type. SQLite is |
| 3978 | ** strongly typed, but the typing is dynamic not static. ^Type |
| 3979 | ** is associated with individual values, not with the containers |
| 3980 | ** used to hold those values. |
| 3981 | */ |
| 3982 | SQLITE_API const char *SQLITE_APICALL sqlite3_column_decltype(sqlite3_stmt*,int); |
| 3983 | SQLITE_API const void *SQLITE_APICALL sqlite3_column_decltype16(sqlite3_stmt*,int); |
| 3984 | |
| 3985 | /* |
| 3986 | ** CAPI3REF: Evaluate An SQL Statement |
| 3987 | ** METHOD: sqlite3_stmt |
| 3988 | ** |
| @@ -4058,11 +4058,11 @@ | |
| 4058 | ** using either [sqlite3_prepare_v2()] or [sqlite3_prepare16_v2()] instead |
| 4059 | ** of the legacy [sqlite3_prepare()] and [sqlite3_prepare16()] interfaces, |
| 4060 | ** then the more specific [error codes] are returned directly |
| 4061 | ** by sqlite3_step(). The use of the "v2" interface is recommended. |
| 4062 | */ |
| 4063 | SQLITE_API int SQLITE_APICALL sqlite3_step(sqlite3_stmt*); |
| 4064 | |
| 4065 | /* |
| 4066 | ** CAPI3REF: Number of columns in a result set |
| 4067 | ** METHOD: sqlite3_stmt |
| 4068 | ** |
| @@ -4079,11 +4079,11 @@ | |
| 4079 | ** where it always returns zero since each step of that multi-step |
| 4080 | ** pragma returns 0 columns of data. |
| 4081 | ** |
| 4082 | ** See also: [sqlite3_column_count()] |
| 4083 | */ |
| 4084 | SQLITE_API int SQLITE_APICALL sqlite3_data_count(sqlite3_stmt *pStmt); |
| 4085 | |
| 4086 | /* |
| 4087 | ** CAPI3REF: Fundamental Datatypes |
| 4088 | ** KEYWORDS: SQLITE_TEXT |
| 4089 | ** |
| @@ -4269,20 +4269,20 @@ | |
| 4269 | ** of these routines, a default value is returned. The default value |
| 4270 | ** is either the integer 0, the floating point number 0.0, or a NULL |
| 4271 | ** pointer. Subsequent calls to [sqlite3_errcode()] will return |
| 4272 | ** [SQLITE_NOMEM].)^ |
| 4273 | */ |
| 4274 | SQLITE_API const void *SQLITE_APICALL sqlite3_column_blob(sqlite3_stmt*, int iCol); |
| 4275 | SQLITE_API int SQLITE_APICALL sqlite3_column_bytes(sqlite3_stmt*, int iCol); |
| 4276 | SQLITE_API int SQLITE_APICALL sqlite3_column_bytes16(sqlite3_stmt*, int iCol); |
| 4277 | SQLITE_API double SQLITE_APICALL sqlite3_column_double(sqlite3_stmt*, int iCol); |
| 4278 | SQLITE_API int SQLITE_APICALL sqlite3_column_int(sqlite3_stmt*, int iCol); |
| 4279 | SQLITE_API sqlite3_int64 SQLITE_APICALL sqlite3_column_int64(sqlite3_stmt*, int iCol); |
| 4280 | SQLITE_API const unsigned char *SQLITE_APICALL sqlite3_column_text(sqlite3_stmt*, int iCol); |
| 4281 | SQLITE_API const void *SQLITE_APICALL sqlite3_column_text16(sqlite3_stmt*, int iCol); |
| 4282 | SQLITE_API int SQLITE_APICALL sqlite3_column_type(sqlite3_stmt*, int iCol); |
| 4283 | SQLITE_API sqlite3_value *SQLITE_APICALL sqlite3_column_value(sqlite3_stmt*, int iCol); |
| 4284 | |
| 4285 | /* |
| 4286 | ** CAPI3REF: Destroy A Prepared Statement Object |
| 4287 | ** DESTRUCTOR: sqlite3_stmt |
| 4288 | ** |
| @@ -4306,11 +4306,11 @@ | |
| 4306 | ** resource leaks. It is a grievous error for the application to try to use |
| 4307 | ** a prepared statement after it has been finalized. Any use of a prepared |
| 4308 | ** statement after it has been finalized can result in undefined and |
| 4309 | ** undesirable behavior such as segfaults and heap corruption. |
| 4310 | */ |
| 4311 | SQLITE_API int SQLITE_APICALL sqlite3_finalize(sqlite3_stmt *pStmt); |
| 4312 | |
| 4313 | /* |
| 4314 | ** CAPI3REF: Reset A Prepared Statement Object |
| 4315 | ** METHOD: sqlite3_stmt |
| 4316 | ** |
| @@ -4333,11 +4333,11 @@ | |
| 4333 | ** [sqlite3_reset(S)] returns an appropriate [error code]. |
| 4334 | ** |
| 4335 | ** ^The [sqlite3_reset(S)] interface does not change the values |
| 4336 | ** of any [sqlite3_bind_blob|bindings] on the [prepared statement] S. |
| 4337 | */ |
| 4338 | SQLITE_API int SQLITE_APICALL sqlite3_reset(sqlite3_stmt *pStmt); |
| 4339 | |
| 4340 | /* |
| 4341 | ** CAPI3REF: Create Or Redefine SQL Functions |
| 4342 | ** KEYWORDS: {function creation routines} |
| 4343 | ** KEYWORDS: {application-defined SQL function} |
| @@ -4433,40 +4433,40 @@ | |
| 4433 | ** ^An application-defined function is permitted to call other |
| 4434 | ** SQLite interfaces. However, such calls must not |
| 4435 | ** close the database connection nor finalize or reset the prepared |
| 4436 | ** statement in which the function is running. |
| 4437 | */ |
| 4438 | SQLITE_API int SQLITE_APICALL sqlite3_create_function( |
| 4439 | sqlite3 *db, |
| 4440 | const char *zFunctionName, |
| 4441 | int nArg, |
| 4442 | int eTextRep, |
| 4443 | void *pApp, |
| 4444 | void (SQLITE_CALLBACK *xFunc)(sqlite3_context*,int,sqlite3_value**), |
| 4445 | void (SQLITE_CALLBACK *xStep)(sqlite3_context*,int,sqlite3_value**), |
| 4446 | void (SQLITE_CALLBACK *xFinal)(sqlite3_context*) |
| 4447 | ); |
| 4448 | SQLITE_API int SQLITE_APICALL sqlite3_create_function16( |
| 4449 | sqlite3 *db, |
| 4450 | const void *zFunctionName, |
| 4451 | int nArg, |
| 4452 | int eTextRep, |
| 4453 | void *pApp, |
| 4454 | void (SQLITE_CALLBACK *xFunc)(sqlite3_context*,int,sqlite3_value**), |
| 4455 | void (SQLITE_CALLBACK *xStep)(sqlite3_context*,int,sqlite3_value**), |
| 4456 | void (SQLITE_CALLBACK *xFinal)(sqlite3_context*) |
| 4457 | ); |
| 4458 | SQLITE_API int SQLITE_APICALL sqlite3_create_function_v2( |
| 4459 | sqlite3 *db, |
| 4460 | const char *zFunctionName, |
| 4461 | int nArg, |
| 4462 | int eTextRep, |
| 4463 | void *pApp, |
| 4464 | void (SQLITE_CALLBACK *xFunc)(sqlite3_context*,int,sqlite3_value**), |
| 4465 | void (SQLITE_CALLBACK *xStep)(sqlite3_context*,int,sqlite3_value**), |
| 4466 | void (SQLITE_CALLBACK *xFinal)(sqlite3_context*), |
| 4467 | void(SQLITE_CALLBACK *xDestroy)(void*) |
| 4468 | ); |
| 4469 | |
| 4470 | /* |
| 4471 | ** CAPI3REF: Text Encodings |
| 4472 | ** |
| @@ -4499,16 +4499,16 @@ | |
| 4499 | ** to be supported. However, new applications should avoid |
| 4500 | ** the use of these functions. To encourage programmers to avoid |
| 4501 | ** these functions, we will not explain what they do. |
| 4502 | */ |
| 4503 | #ifndef SQLITE_OMIT_DEPRECATED |
| 4504 | SQLITE_API SQLITE_DEPRECATED int SQLITE_APICALL sqlite3_aggregate_count(sqlite3_context*); |
| 4505 | SQLITE_API SQLITE_DEPRECATED int SQLITE_APICALL sqlite3_expired(sqlite3_stmt*); |
| 4506 | SQLITE_API SQLITE_DEPRECATED int SQLITE_APICALL sqlite3_transfer_bindings(sqlite3_stmt*, sqlite3_stmt*); |
| 4507 | SQLITE_API SQLITE_DEPRECATED int SQLITE_APICALL sqlite3_global_recover(void); |
| 4508 | SQLITE_API SQLITE_DEPRECATED void SQLITE_APICALL sqlite3_thread_cleanup(void); |
| 4509 | SQLITE_API SQLITE_DEPRECATED int SQLITE_APICALL sqlite3_memory_alarm(void(SQLITE_CALLBACK *)(void*,sqlite3_int64,int), |
| 4510 | void*,sqlite3_int64); |
| 4511 | #endif |
| 4512 | |
| 4513 | /* |
| 4514 | ** CAPI3REF: Obtaining SQL Values |
| @@ -4554,22 +4554,22 @@ | |
| 4554 | ** or [sqlite3_value_text16()]. |
| 4555 | ** |
| 4556 | ** These routines must be called from the same thread as |
| 4557 | ** the SQL function that supplied the [sqlite3_value*] parameters. |
| 4558 | */ |
| 4559 | SQLITE_API const void *SQLITE_APICALL sqlite3_value_blob(sqlite3_value*); |
| 4560 | SQLITE_API int SQLITE_APICALL sqlite3_value_bytes(sqlite3_value*); |
| 4561 | SQLITE_API int SQLITE_APICALL sqlite3_value_bytes16(sqlite3_value*); |
| 4562 | SQLITE_API double SQLITE_APICALL sqlite3_value_double(sqlite3_value*); |
| 4563 | SQLITE_API int SQLITE_APICALL sqlite3_value_int(sqlite3_value*); |
| 4564 | SQLITE_API sqlite3_int64 SQLITE_APICALL sqlite3_value_int64(sqlite3_value*); |
| 4565 | SQLITE_API const unsigned char *SQLITE_APICALL sqlite3_value_text(sqlite3_value*); |
| 4566 | SQLITE_API const void *SQLITE_APICALL sqlite3_value_text16(sqlite3_value*); |
| 4567 | SQLITE_API const void *SQLITE_APICALL sqlite3_value_text16le(sqlite3_value*); |
| 4568 | SQLITE_API const void *SQLITE_APICALL sqlite3_value_text16be(sqlite3_value*); |
| 4569 | SQLITE_API int SQLITE_APICALL sqlite3_value_type(sqlite3_value*); |
| 4570 | SQLITE_API int SQLITE_APICALL sqlite3_value_numeric_type(sqlite3_value*); |
| 4571 | |
| 4572 | /* |
| 4573 | ** CAPI3REF: Finding The Subtype Of SQL Values |
| 4574 | ** METHOD: sqlite3_value |
| 4575 | ** |
| @@ -4581,11 +4581,11 @@ | |
| 4581 | ** |
| 4582 | ** SQLite makes no use of subtype itself. It merely passes the subtype |
| 4583 | ** from the result of one [application-defined SQL function] into the |
| 4584 | ** input of another. |
| 4585 | */ |
| 4586 | SQLITE_API unsigned int SQLITE_APICALL sqlite3_value_subtype(sqlite3_value*); |
| 4587 | |
| 4588 | /* |
| 4589 | ** CAPI3REF: Copy And Free SQL Values |
| 4590 | ** METHOD: sqlite3_value |
| 4591 | ** |
| @@ -4597,12 +4597,12 @@ | |
| 4597 | ** |
| 4598 | ** ^The sqlite3_value_free(V) interface frees an [sqlite3_value] object |
| 4599 | ** previously obtained from [sqlite3_value_dup()]. ^If V is a NULL pointer |
| 4600 | ** then sqlite3_value_free(V) is a harmless no-op. |
| 4601 | */ |
| 4602 | SQLITE_API sqlite3_value *SQLITE_APICALL sqlite3_value_dup(const sqlite3_value*); |
| 4603 | SQLITE_API void SQLITE_APICALL sqlite3_value_free(sqlite3_value*); |
| 4604 | |
| 4605 | /* |
| 4606 | ** CAPI3REF: Obtain Aggregate Function Context |
| 4607 | ** METHOD: sqlite3_context |
| 4608 | ** |
| @@ -4643,11 +4643,11 @@ | |
| 4643 | ** function. |
| 4644 | ** |
| 4645 | ** This routine must be called from the same thread in which |
| 4646 | ** the aggregate SQL function is running. |
| 4647 | */ |
| 4648 | SQLITE_API void *SQLITE_APICALL sqlite3_aggregate_context(sqlite3_context*, int nBytes); |
| 4649 | |
| 4650 | /* |
| 4651 | ** CAPI3REF: User Data For Functions |
| 4652 | ** METHOD: sqlite3_context |
| 4653 | ** |
| @@ -4658,11 +4658,11 @@ | |
| 4658 | ** registered the application defined function. |
| 4659 | ** |
| 4660 | ** This routine must be called from the same thread in which |
| 4661 | ** the application-defined function is running. |
| 4662 | */ |
| 4663 | SQLITE_API void *SQLITE_APICALL sqlite3_user_data(sqlite3_context*); |
| 4664 | |
| 4665 | /* |
| 4666 | ** CAPI3REF: Database Connection For Functions |
| 4667 | ** METHOD: sqlite3_context |
| 4668 | ** |
| @@ -4670,11 +4670,11 @@ | |
| 4670 | ** the pointer to the [database connection] (the 1st parameter) |
| 4671 | ** of the [sqlite3_create_function()] |
| 4672 | ** and [sqlite3_create_function16()] routines that originally |
| 4673 | ** registered the application defined function. |
| 4674 | */ |
| 4675 | SQLITE_API sqlite3 *SQLITE_APICALL sqlite3_context_db_handle(sqlite3_context*); |
| 4676 | |
| 4677 | /* |
| 4678 | ** CAPI3REF: Function Auxiliary Data |
| 4679 | ** METHOD: sqlite3_context |
| 4680 | ** |
| @@ -4702,16 +4702,17 @@ | |
| 4702 | ** NULL if the metadata has been discarded. |
| 4703 | ** ^After each call to sqlite3_set_auxdata(C,N,P,X) where X is not NULL, |
| 4704 | ** SQLite will invoke the destructor function X with parameter P exactly |
| 4705 | ** once, when the metadata is discarded. |
| 4706 | ** SQLite is free to discard the metadata at any time, including: <ul> |
| 4707 | ** <li> when the corresponding function parameter changes, or |
| 4708 | ** <li> when [sqlite3_reset()] or [sqlite3_finalize()] is called for the |
| 4709 | ** SQL statement, or |
| 4710 | ** <li> when sqlite3_set_auxdata() is invoked again on the same parameter, or |
| 4711 | ** <li> during the original sqlite3_set_auxdata() call when a memory |
| 4712 | ** allocation error occurs. </ul>)^ |
| 4713 | ** |
| 4714 | ** Note the last bullet in particular. The destructor X in |
| 4715 | ** sqlite3_set_auxdata(C,N,P,X) might be called immediately, before the |
| 4716 | ** sqlite3_set_auxdata() interface even returns. Hence sqlite3_set_auxdata() |
| 4717 | ** should be called near the end of the function implementation and the |
| @@ -4723,12 +4724,12 @@ | |
| 4723 | ** values and [parameters] and expressions composed from the same.)^ |
| 4724 | ** |
| 4725 | ** These routines must be called from the same thread in which |
| 4726 | ** the SQL function is running. |
| 4727 | */ |
| 4728 | SQLITE_API void *SQLITE_APICALL sqlite3_get_auxdata(sqlite3_context*, int N); |
| 4729 | SQLITE_API void SQLITE_APICALL sqlite3_set_auxdata(sqlite3_context*, int N, void*, void (SQLITE_CALLBACK *)(void*)); |
| 4730 | |
| 4731 | |
| 4732 | /* |
| 4733 | ** CAPI3REF: Constants Defining Special Destructor Behavior |
| 4734 | ** |
| @@ -4741,11 +4742,11 @@ | |
| 4741 | ** the content before returning. |
| 4742 | ** |
| 4743 | ** The typedef is necessary to work around problems in certain |
| 4744 | ** C++ compilers. |
| 4745 | */ |
| 4746 | typedef void (SQLITE_CALLBACK *sqlite3_destructor_type)(void*); |
| 4747 | #define SQLITE_STATIC ((sqlite3_destructor_type)0) |
| 4748 | #define SQLITE_TRANSIENT ((sqlite3_destructor_type)-1) |
| 4749 | |
| 4750 | /* |
| 4751 | ** CAPI3REF: Setting The Result Of An SQL Function |
| @@ -4860,31 +4861,31 @@ | |
| 4860 | ** |
| 4861 | ** If these routines are called from within the different thread |
| 4862 | ** than the one containing the application-defined function that received |
| 4863 | ** the [sqlite3_context] pointer, the results are undefined. |
| 4864 | */ |
| 4865 | SQLITE_API void SQLITE_APICALL sqlite3_result_blob(sqlite3_context*, const void*, int, void(SQLITE_CALLBACK *)(void*)); |
| 4866 | SQLITE_API void SQLITE_APICALL sqlite3_result_blob64(sqlite3_context*,const void*, |
| 4867 | sqlite3_uint64,void(SQLITE_CALLBACK *)(void*)); |
| 4868 | SQLITE_API void SQLITE_APICALL sqlite3_result_double(sqlite3_context*, double); |
| 4869 | SQLITE_API void SQLITE_APICALL sqlite3_result_error(sqlite3_context*, const char*, int); |
| 4870 | SQLITE_API void SQLITE_APICALL sqlite3_result_error16(sqlite3_context*, const void*, int); |
| 4871 | SQLITE_API void SQLITE_APICALL sqlite3_result_error_toobig(sqlite3_context*); |
| 4872 | SQLITE_API void SQLITE_APICALL sqlite3_result_error_nomem(sqlite3_context*); |
| 4873 | SQLITE_API void SQLITE_APICALL sqlite3_result_error_code(sqlite3_context*, int); |
| 4874 | SQLITE_API void SQLITE_APICALL sqlite3_result_int(sqlite3_context*, int); |
| 4875 | SQLITE_API void SQLITE_APICALL sqlite3_result_int64(sqlite3_context*, sqlite3_int64); |
| 4876 | SQLITE_API void SQLITE_APICALL sqlite3_result_null(sqlite3_context*); |
| 4877 | SQLITE_API void SQLITE_APICALL sqlite3_result_text(sqlite3_context*, const char*, int, void(SQLITE_CALLBACK *)(void*)); |
| 4878 | SQLITE_API void SQLITE_APICALL sqlite3_result_text64(sqlite3_context*, const char*,sqlite3_uint64, |
| 4879 | void(SQLITE_CALLBACK *)(void*), unsigned char encoding); |
| 4880 | SQLITE_API void SQLITE_APICALL sqlite3_result_text16(sqlite3_context*, const void*, int, void(SQLITE_CALLBACK *)(void*)); |
| 4881 | SQLITE_API void SQLITE_APICALL sqlite3_result_text16le(sqlite3_context*, const void*, int,void(SQLITE_CALLBACK *)(void*)); |
| 4882 | SQLITE_API void SQLITE_APICALL sqlite3_result_text16be(sqlite3_context*, const void*, int,void(SQLITE_CALLBACK *)(void*)); |
| 4883 | SQLITE_API void SQLITE_APICALL sqlite3_result_value(sqlite3_context*, sqlite3_value*); |
| 4884 | SQLITE_API void SQLITE_APICALL sqlite3_result_zeroblob(sqlite3_context*, int n); |
| 4885 | SQLITE_API int SQLITE_APICALL sqlite3_result_zeroblob64(sqlite3_context*, sqlite3_uint64 n); |
| 4886 | |
| 4887 | |
| 4888 | /* |
| 4889 | ** CAPI3REF: Setting The Subtype Of An SQL Function |
| 4890 | ** METHOD: sqlite3_context |
| @@ -4895,11 +4896,11 @@ | |
| 4895 | ** of the subtype T are preserved in current versions of SQLite; |
| 4896 | ** higher order bits are discarded. |
| 4897 | ** The number of subtype bytes preserved by SQLite might increase |
| 4898 | ** in future releases of SQLite. |
| 4899 | */ |
| 4900 | SQLITE_API void SQLITE_APICALL sqlite3_result_subtype(sqlite3_context*,unsigned int); |
| 4901 | |
| 4902 | /* |
| 4903 | ** CAPI3REF: Define New Collating Sequences |
| 4904 | ** METHOD: sqlite3 |
| 4905 | ** |
| @@ -4977,31 +4978,31 @@ | |
| 4977 | ** is unfortunate but cannot be changed without breaking backwards |
| 4978 | ** compatibility. |
| 4979 | ** |
| 4980 | ** See also: [sqlite3_collation_needed()] and [sqlite3_collation_needed16()]. |
| 4981 | */ |
| 4982 | SQLITE_API int SQLITE_APICALL sqlite3_create_collation( |
| 4983 | sqlite3*, |
| 4984 | const char *zName, |
| 4985 | int eTextRep, |
| 4986 | void *pArg, |
| 4987 | int(SQLITE_CALLBACK *xCompare)(void*,int,const void*,int,const void*) |
| 4988 | ); |
| 4989 | SQLITE_API int SQLITE_APICALL sqlite3_create_collation_v2( |
| 4990 | sqlite3*, |
| 4991 | const char *zName, |
| 4992 | int eTextRep, |
| 4993 | void *pArg, |
| 4994 | int(SQLITE_CALLBACK *xCompare)(void*,int,const void*,int,const void*), |
| 4995 | void(SQLITE_CALLBACK *xDestroy)(void*) |
| 4996 | ); |
| 4997 | SQLITE_API int SQLITE_APICALL sqlite3_create_collation16( |
| 4998 | sqlite3*, |
| 4999 | const void *zName, |
| 5000 | int eTextRep, |
| 5001 | void *pArg, |
| 5002 | int(SQLITE_CALLBACK *xCompare)(void*,int,const void*,int,const void*) |
| 5003 | ); |
| 5004 | |
| 5005 | /* |
| 5006 | ** CAPI3REF: Collation Needed Callbacks |
| 5007 | ** METHOD: sqlite3 |
| @@ -5027,19 +5028,19 @@ | |
| 5027 | ** |
| 5028 | ** The callback function should register the desired collation using |
| 5029 | ** [sqlite3_create_collation()], [sqlite3_create_collation16()], or |
| 5030 | ** [sqlite3_create_collation_v2()]. |
| 5031 | */ |
| 5032 | SQLITE_API int SQLITE_APICALL sqlite3_collation_needed( |
| 5033 | sqlite3*, |
| 5034 | void*, |
| 5035 | void(SQLITE_CALLBACK *)(void*,sqlite3*,int eTextRep,const char*) |
| 5036 | ); |
| 5037 | SQLITE_API int SQLITE_APICALL sqlite3_collation_needed16( |
| 5038 | sqlite3*, |
| 5039 | void*, |
| 5040 | void(SQLITE_CALLBACK *)(void*,sqlite3*,int eTextRep,const void*) |
| 5041 | ); |
| 5042 | |
| 5043 | #ifdef SQLITE_HAS_CODEC |
| 5044 | /* |
| 5045 | ** Specify the key for an encrypted database. This routine should be |
| @@ -5046,15 +5047,15 @@ | |
| 5046 | ** called right after sqlite3_open(). |
| 5047 | ** |
| 5048 | ** The code to implement this API is not available in the public release |
| 5049 | ** of SQLite. |
| 5050 | */ |
| 5051 | SQLITE_API int SQLITE_APICALL sqlite3_key( |
| 5052 | sqlite3 *db, /* Database to be rekeyed */ |
| 5053 | const void *pKey, int nKey /* The key */ |
| 5054 | ); |
| 5055 | SQLITE_API int SQLITE_APICALL sqlite3_key_v2( |
| 5056 | sqlite3 *db, /* Database to be rekeyed */ |
| 5057 | const char *zDbName, /* Name of the database */ |
| 5058 | const void *pKey, int nKey /* The key */ |
| 5059 | ); |
| 5060 | |
| @@ -5064,35 +5065,35 @@ | |
| 5064 | ** database is decrypted. |
| 5065 | ** |
| 5066 | ** The code to implement this API is not available in the public release |
| 5067 | ** of SQLite. |
| 5068 | */ |
| 5069 | SQLITE_API int SQLITE_APICALL sqlite3_rekey( |
| 5070 | sqlite3 *db, /* Database to be rekeyed */ |
| 5071 | const void *pKey, int nKey /* The new key */ |
| 5072 | ); |
| 5073 | SQLITE_API int SQLITE_APICALL sqlite3_rekey_v2( |
| 5074 | sqlite3 *db, /* Database to be rekeyed */ |
| 5075 | const char *zDbName, /* Name of the database */ |
| 5076 | const void *pKey, int nKey /* The new key */ |
| 5077 | ); |
| 5078 | |
| 5079 | /* |
| 5080 | ** Specify the activation key for a SEE database. Unless |
| 5081 | ** activated, none of the SEE routines will work. |
| 5082 | */ |
| 5083 | SQLITE_API void SQLITE_APICALL sqlite3_activate_see( |
| 5084 | const char *zPassPhrase /* Activation phrase */ |
| 5085 | ); |
| 5086 | #endif |
| 5087 | |
| 5088 | #ifdef SQLITE_ENABLE_CEROD |
| 5089 | /* |
| 5090 | ** Specify the activation key for a CEROD database. Unless |
| 5091 | ** activated, none of the CEROD routines will work. |
| 5092 | */ |
| 5093 | SQLITE_API void SQLITE_APICALL sqlite3_activate_cerod( |
| 5094 | const char *zPassPhrase /* Activation phrase */ |
| 5095 | ); |
| 5096 | #endif |
| 5097 | |
| 5098 | /* |
| @@ -5110,11 +5111,11 @@ | |
| 5110 | ** method of the default [sqlite3_vfs] object. If the xSleep() method |
| 5111 | ** of the default VFS is not implemented correctly, or not implemented at |
| 5112 | ** all, then the behavior of sqlite3_sleep() may deviate from the description |
| 5113 | ** in the previous paragraphs. |
| 5114 | */ |
| 5115 | SQLITE_API int SQLITE_APICALL sqlite3_sleep(int); |
| 5116 | |
| 5117 | /* |
| 5118 | ** CAPI3REF: Name Of The Folder Holding Temporary Files |
| 5119 | ** |
| 5120 | ** ^(If this global variable is made to point to a string which is |
| @@ -5229,11 +5230,11 @@ | |
| 5229 | ** |
| 5230 | ** If another thread changes the autocommit status of the database |
| 5231 | ** connection while this routine is running, then the return value |
| 5232 | ** is undefined. |
| 5233 | */ |
| 5234 | SQLITE_API int SQLITE_APICALL sqlite3_get_autocommit(sqlite3*); |
| 5235 | |
| 5236 | /* |
| 5237 | ** CAPI3REF: Find The Database Handle Of A Prepared Statement |
| 5238 | ** METHOD: sqlite3_stmt |
| 5239 | ** |
| @@ -5242,11 +5243,11 @@ | |
| 5242 | ** returned by sqlite3_db_handle is the same [database connection] |
| 5243 | ** that was the first argument |
| 5244 | ** to the [sqlite3_prepare_v2()] call (or its variants) that was used to |
| 5245 | ** create the statement in the first place. |
| 5246 | */ |
| 5247 | SQLITE_API sqlite3 *SQLITE_APICALL sqlite3_db_handle(sqlite3_stmt*); |
| 5248 | |
| 5249 | /* |
| 5250 | ** CAPI3REF: Return The Filename For A Database Connection |
| 5251 | ** METHOD: sqlite3 |
| 5252 | ** |
| @@ -5259,21 +5260,21 @@ | |
| 5259 | ** ^The filename returned by this function is the output of the |
| 5260 | ** xFullPathname method of the [VFS]. ^In other words, the filename |
| 5261 | ** will be an absolute pathname, even if the filename used |
| 5262 | ** to open the database originally was a URI or relative pathname. |
| 5263 | */ |
| 5264 | SQLITE_API const char *SQLITE_APICALL sqlite3_db_filename(sqlite3 *db, const char *zDbName); |
| 5265 | |
| 5266 | /* |
| 5267 | ** CAPI3REF: Determine if a database is read-only |
| 5268 | ** METHOD: sqlite3 |
| 5269 | ** |
| 5270 | ** ^The sqlite3_db_readonly(D,N) interface returns 1 if the database N |
| 5271 | ** of connection D is read-only, 0 if it is read/write, or -1 if N is not |
| 5272 | ** the name of a database on connection D. |
| 5273 | */ |
| 5274 | SQLITE_API int SQLITE_APICALL sqlite3_db_readonly(sqlite3 *db, const char *zDbName); |
| 5275 | |
| 5276 | /* |
| 5277 | ** CAPI3REF: Find the next prepared statement |
| 5278 | ** METHOD: sqlite3 |
| 5279 | ** |
| @@ -5285,11 +5286,11 @@ | |
| 5285 | ** |
| 5286 | ** The [database connection] pointer D in a call to |
| 5287 | ** [sqlite3_next_stmt(D,S)] must refer to an open database |
| 5288 | ** connection and in particular must not be a NULL pointer. |
| 5289 | */ |
| 5290 | SQLITE_API sqlite3_stmt *SQLITE_APICALL sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt); |
| 5291 | |
| 5292 | /* |
| 5293 | ** CAPI3REF: Commit And Rollback Notification Callbacks |
| 5294 | ** METHOD: sqlite3 |
| 5295 | ** |
| @@ -5334,12 +5335,12 @@ | |
| 5334 | ** ^The rollback callback is not invoked if a transaction is |
| 5335 | ** automatically rolled back because the database connection is closed. |
| 5336 | ** |
| 5337 | ** See also the [sqlite3_update_hook()] interface. |
| 5338 | */ |
| 5339 | SQLITE_API void *SQLITE_APICALL sqlite3_commit_hook(sqlite3*, int(SQLITE_CALLBACK *)(void*), void*); |
| 5340 | SQLITE_API void *SQLITE_APICALL sqlite3_rollback_hook(sqlite3*, void(SQLITE_CALLBACK *)(void *), void*); |
| 5341 | |
| 5342 | /* |
| 5343 | ** CAPI3REF: Data Change Notification Callbacks |
| 5344 | ** METHOD: sqlite3 |
| 5345 | ** |
| @@ -5386,13 +5387,13 @@ | |
| 5386 | ** the first call on D. |
| 5387 | ** |
| 5388 | ** See also the [sqlite3_commit_hook()], [sqlite3_rollback_hook()], |
| 5389 | ** and [sqlite3_preupdate_hook()] interfaces. |
| 5390 | */ |
| 5391 | SQLITE_API void *SQLITE_APICALL sqlite3_update_hook( |
| 5392 | sqlite3*, |
| 5393 | void(SQLITE_CALLBACK *)(void *,int ,char const *,char const *,sqlite3_int64), |
| 5394 | void* |
| 5395 | ); |
| 5396 | |
| 5397 | /* |
| 5398 | ** CAPI3REF: Enable Or Disable Shared Pager Cache |
| @@ -5426,11 +5427,11 @@ | |
| 5426 | ** This interface is threadsafe on processors where writing a |
| 5427 | ** 32-bit integer is atomic. |
| 5428 | ** |
| 5429 | ** See Also: [SQLite Shared-Cache Mode] |
| 5430 | */ |
| 5431 | SQLITE_API int SQLITE_APICALL sqlite3_enable_shared_cache(int); |
| 5432 | |
| 5433 | /* |
| 5434 | ** CAPI3REF: Attempt To Free Heap Memory |
| 5435 | ** |
| 5436 | ** ^The sqlite3_release_memory() interface attempts to free N bytes |
| @@ -5442,11 +5443,11 @@ | |
| 5442 | ** ^The sqlite3_release_memory() routine is a no-op returning zero |
| 5443 | ** if SQLite is not compiled with [SQLITE_ENABLE_MEMORY_MANAGEMENT]. |
| 5444 | ** |
| 5445 | ** See also: [sqlite3_db_release_memory()] |
| 5446 | */ |
| 5447 | SQLITE_API int SQLITE_APICALL sqlite3_release_memory(int); |
| 5448 | |
| 5449 | /* |
| 5450 | ** CAPI3REF: Free Memory Used By A Database Connection |
| 5451 | ** METHOD: sqlite3 |
| 5452 | ** |
| @@ -5456,11 +5457,11 @@ | |
| 5456 | ** when the [SQLITE_ENABLE_MEMORY_MANAGEMENT] compile-time option is |
| 5457 | ** omitted. |
| 5458 | ** |
| 5459 | ** See also: [sqlite3_release_memory()] |
| 5460 | */ |
| 5461 | SQLITE_API int SQLITE_APICALL sqlite3_db_release_memory(sqlite3*); |
| 5462 | |
| 5463 | /* |
| 5464 | ** CAPI3REF: Impose A Limit On Heap Size |
| 5465 | ** |
| 5466 | ** ^The sqlite3_soft_heap_limit64() interface sets and/or queries the |
| @@ -5508,11 +5509,11 @@ | |
| 5508 | ** the use of [SQLITE_ENABLE_MEMORY_MANAGEMENT]. |
| 5509 | ** |
| 5510 | ** The circumstances under which SQLite will enforce the soft heap limit may |
| 5511 | ** changes in future releases of SQLite. |
| 5512 | */ |
| 5513 | SQLITE_API sqlite3_int64 SQLITE_APICALL sqlite3_soft_heap_limit64(sqlite3_int64 N); |
| 5514 | |
| 5515 | /* |
| 5516 | ** CAPI3REF: Deprecated Soft Heap Limit Interface |
| 5517 | ** DEPRECATED |
| 5518 | ** |
| @@ -5519,11 +5520,11 @@ | |
| 5519 | ** This is a deprecated version of the [sqlite3_soft_heap_limit64()] |
| 5520 | ** interface. This routine is provided for historical compatibility |
| 5521 | ** only. All new applications should use the |
| 5522 | ** [sqlite3_soft_heap_limit64()] interface rather than this one. |
| 5523 | */ |
| 5524 | SQLITE_API SQLITE_DEPRECATED void SQLITE_APICALL sqlite3_soft_heap_limit(int N); |
| 5525 | |
| 5526 | |
| 5527 | /* |
| 5528 | ** CAPI3REF: Extract Metadata About A Column Of A Table |
| 5529 | ** METHOD: sqlite3 |
| @@ -5589,11 +5590,11 @@ | |
| 5589 | ** |
| 5590 | ** ^This function causes all database schemas to be read from disk and |
| 5591 | ** parsed, if that has not already been done, and returns an error if |
| 5592 | ** any errors are encountered while loading the schema. |
| 5593 | */ |
| 5594 | SQLITE_API int SQLITE_APICALL sqlite3_table_column_metadata( |
| 5595 | sqlite3 *db, /* Connection handle */ |
| 5596 | const char *zDbName, /* Database name or NULL */ |
| 5597 | const char *zTableName, /* Table name */ |
| 5598 | const char *zColumnName, /* Column name */ |
| 5599 | char const **pzDataType, /* OUTPUT: Declared data type */ |
| @@ -5645,11 +5646,11 @@ | |
| 5645 | ** disabled and prevent SQL injections from giving attackers |
| 5646 | ** access to extension loading capabilities. |
| 5647 | ** |
| 5648 | ** See also the [load_extension() SQL function]. |
| 5649 | */ |
| 5650 | SQLITE_API int SQLITE_APICALL sqlite3_load_extension( |
| 5651 | sqlite3 *db, /* Load the extension into this database connection */ |
| 5652 | const char *zFile, /* Name of the shared library containing extension */ |
| 5653 | const char *zProc, /* Entry point. Derived from zFile if 0 */ |
| 5654 | char **pzErrMsg /* Put error message here if not 0 */ |
| 5655 | ); |
| @@ -5668,20 +5669,20 @@ | |
| 5668 | ** to turn extension loading on and call it with onoff==0 to turn |
| 5669 | ** it back off again. |
| 5670 | ** |
| 5671 | ** ^This interface enables or disables both the C-API |
| 5672 | ** [sqlite3_load_extension()] and the SQL function [load_extension()]. |
| 5673 | ** Use [sqlite3_db_config](db,[SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION],..) |
| 5674 | ** to enable or disable only the C-API. |
| 5675 | ** |
| 5676 | ** <b>Security warning:</b> It is recommended that extension loading |
| 5677 | ** be disabled using the [SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION] method |
| 5678 | ** rather than this interface, so the [load_extension()] SQL function |
| 5679 | ** remains disabled. This will prevent SQL injections from giving attackers |
| 5680 | ** access to extension loading capabilities. |
| 5681 | */ |
| 5682 | SQLITE_API int SQLITE_APICALL sqlite3_enable_load_extension(sqlite3 *db, int onoff); |
| 5683 | |
| 5684 | /* |
| 5685 | ** CAPI3REF: Automatically Load Statically Linked Extensions |
| 5686 | ** |
| 5687 | ** ^This interface causes the xEntryPoint() function to be invoked for |
| @@ -5715,11 +5716,11 @@ | |
| 5715 | ** will be called more than once for each database connection that is opened. |
| 5716 | ** |
| 5717 | ** See also: [sqlite3_reset_auto_extension()] |
| 5718 | ** and [sqlite3_cancel_auto_extension()] |
| 5719 | */ |
| 5720 | SQLITE_API int SQLITE_APICALL sqlite3_auto_extension(void(SQLITE_CALLBACK *xEntryPoint)(void)); |
| 5721 | |
| 5722 | /* |
| 5723 | ** CAPI3REF: Cancel Automatic Extension Loading |
| 5724 | ** |
| 5725 | ** ^The [sqlite3_cancel_auto_extension(X)] interface unregisters the |
| @@ -5727,19 +5728,19 @@ | |
| 5727 | ** [sqlite3_auto_extension(X)]. ^The [sqlite3_cancel_auto_extension(X)] |
| 5728 | ** routine returns 1 if initialization routine X was successfully |
| 5729 | ** unregistered and it returns 0 if X was not on the list of initialization |
| 5730 | ** routines. |
| 5731 | */ |
| 5732 | SQLITE_API int SQLITE_APICALL sqlite3_cancel_auto_extension(void(SQLITE_CALLBACK *xEntryPoint)(void)); |
| 5733 | |
| 5734 | /* |
| 5735 | ** CAPI3REF: Reset Automatic Extension Loading |
| 5736 | ** |
| 5737 | ** ^This interface disables all automatic extensions previously |
| 5738 | ** registered using [sqlite3_auto_extension()]. |
| 5739 | */ |
| 5740 | SQLITE_API void SQLITE_APICALL sqlite3_reset_auto_extension(void); |
| 5741 | |
| 5742 | /* |
| 5743 | ** The interface to the virtual-table mechanism is currently considered |
| 5744 | ** to be experimental. The interface might change in incompatible ways. |
| 5745 | ** If this is a problem for you, do not use the interface at this time. |
| @@ -5772,41 +5773,41 @@ | |
| 5772 | ** of this structure must not change while it is registered with |
| 5773 | ** any database connection. |
| 5774 | */ |
| 5775 | struct sqlite3_module { |
| 5776 | int iVersion; |
| 5777 | int (SQLITE_CALLBACK *xCreate)(sqlite3*, void *pAux, |
| 5778 | int argc, const char *const*argv, |
| 5779 | sqlite3_vtab **ppVTab, char**); |
| 5780 | int (SQLITE_CALLBACK *xConnect)(sqlite3*, void *pAux, |
| 5781 | int argc, const char *const*argv, |
| 5782 | sqlite3_vtab **ppVTab, char**); |
| 5783 | int (SQLITE_CALLBACK *xBestIndex)(sqlite3_vtab *pVTab, sqlite3_index_info*); |
| 5784 | int (SQLITE_CALLBACK *xDisconnect)(sqlite3_vtab *pVTab); |
| 5785 | int (SQLITE_CALLBACK *xDestroy)(sqlite3_vtab *pVTab); |
| 5786 | int (SQLITE_CALLBACK *xOpen)(sqlite3_vtab *pVTab, sqlite3_vtab_cursor **ppCursor); |
| 5787 | int (SQLITE_CALLBACK *xClose)(sqlite3_vtab_cursor*); |
| 5788 | int (SQLITE_CALLBACK *xFilter)(sqlite3_vtab_cursor*, int idxNum, const char *idxStr, |
| 5789 | int argc, sqlite3_value **argv); |
| 5790 | int (SQLITE_CALLBACK *xNext)(sqlite3_vtab_cursor*); |
| 5791 | int (SQLITE_CALLBACK *xEof)(sqlite3_vtab_cursor*); |
| 5792 | int (SQLITE_CALLBACK *xColumn)(sqlite3_vtab_cursor*, sqlite3_context*, int); |
| 5793 | int (SQLITE_CALLBACK *xRowid)(sqlite3_vtab_cursor*, sqlite3_int64 *pRowid); |
| 5794 | int (SQLITE_CALLBACK *xUpdate)(sqlite3_vtab *, int, sqlite3_value **, sqlite3_int64 *); |
| 5795 | int (SQLITE_CALLBACK *xBegin)(sqlite3_vtab *pVTab); |
| 5796 | int (SQLITE_CALLBACK *xSync)(sqlite3_vtab *pVTab); |
| 5797 | int (SQLITE_CALLBACK *xCommit)(sqlite3_vtab *pVTab); |
| 5798 | int (SQLITE_CALLBACK *xRollback)(sqlite3_vtab *pVTab); |
| 5799 | int (SQLITE_CALLBACK *xFindFunction)(sqlite3_vtab *pVtab, int nArg, const char *zName, |
| 5800 | void (SQLITE_CALLBACK **pxFunc)(sqlite3_context*,int,sqlite3_value**), |
| 5801 | void **ppArg); |
| 5802 | int (SQLITE_CALLBACK *xRename)(sqlite3_vtab *pVtab, const char *zNew); |
| 5803 | /* The methods above are in version 1 of the sqlite_module object. Those |
| 5804 | ** below are for version 2 and greater. */ |
| 5805 | int (SQLITE_CALLBACK *xSavepoint)(sqlite3_vtab *pVTab, int); |
| 5806 | int (SQLITE_CALLBACK *xRelease)(sqlite3_vtab *pVTab, int); |
| 5807 | int (SQLITE_CALLBACK *xRollbackTo)(sqlite3_vtab *pVTab, int); |
| 5808 | }; |
| 5809 | |
| 5810 | /* |
| 5811 | ** CAPI3REF: Virtual Table Indexing Information |
| 5812 | ** KEYWORDS: sqlite3_index_info |
| @@ -5980,22 +5981,22 @@ | |
| 5980 | ** be invoked if the call to sqlite3_create_module_v2() fails. |
| 5981 | ** ^The sqlite3_create_module() |
| 5982 | ** interface is equivalent to sqlite3_create_module_v2() with a NULL |
| 5983 | ** destructor. |
| 5984 | */ |
| 5985 | SQLITE_API int SQLITE_APICALL sqlite3_create_module( |
| 5986 | sqlite3 *db, /* SQLite connection to register module with */ |
| 5987 | const char *zName, /* Name of the module */ |
| 5988 | const sqlite3_module *p, /* Methods for the module */ |
| 5989 | void *pClientData /* Client data for xCreate/xConnect */ |
| 5990 | ); |
| 5991 | SQLITE_API int SQLITE_APICALL sqlite3_create_module_v2( |
| 5992 | sqlite3 *db, /* SQLite connection to register module with */ |
| 5993 | const char *zName, /* Name of the module */ |
| 5994 | const sqlite3_module *p, /* Methods for the module */ |
| 5995 | void *pClientData, /* Client data for xCreate/xConnect */ |
| 5996 | void(SQLITE_CALLBACK *xDestroy)(void*) /* Module destructor function */ |
| 5997 | ); |
| 5998 | |
| 5999 | /* |
| 6000 | ** CAPI3REF: Virtual Table Instance Object |
| 6001 | ** KEYWORDS: sqlite3_vtab |
| @@ -6049,11 +6050,11 @@ | |
| 6049 | ** ^The [xCreate] and [xConnect] methods of a |
| 6050 | ** [virtual table module] call this interface |
| 6051 | ** to declare the format (the names and datatypes of the columns) of |
| 6052 | ** the virtual tables they implement. |
| 6053 | */ |
| 6054 | SQLITE_API int SQLITE_APICALL sqlite3_declare_vtab(sqlite3*, const char *zSQL); |
| 6055 | |
| 6056 | /* |
| 6057 | ** CAPI3REF: Overload A Function For A Virtual Table |
| 6058 | ** METHOD: sqlite3 |
| 6059 | ** |
| @@ -6068,11 +6069,11 @@ | |
| 6068 | ** of the new function always causes an exception to be thrown. So |
| 6069 | ** the new function is not good for anything by itself. Its only |
| 6070 | ** purpose is to be a placeholder function that can be overloaded |
| 6071 | ** by a [virtual table]. |
| 6072 | */ |
| 6073 | SQLITE_API int SQLITE_APICALL sqlite3_overload_function(sqlite3*, const char *zFuncName, int nArg); |
| 6074 | |
| 6075 | /* |
| 6076 | ** The interface to the virtual-table mechanism defined above (back up |
| 6077 | ** to a comment remarkably similar to this one) is currently considered |
| 6078 | ** to be experimental. The interface might change in incompatible ways. |
| @@ -6167,11 +6168,11 @@ | |
| 6167 | ** zero-filled blob to read or write using the incremental-blob interface. |
| 6168 | ** |
| 6169 | ** To avoid a resource leak, every open [BLOB handle] should eventually |
| 6170 | ** be released by a call to [sqlite3_blob_close()]. |
| 6171 | */ |
| 6172 | SQLITE_API int SQLITE_APICALL sqlite3_blob_open( |
| 6173 | sqlite3*, |
| 6174 | const char *zDb, |
| 6175 | const char *zTable, |
| 6176 | const char *zColumn, |
| 6177 | sqlite3_int64 iRow, |
| @@ -6200,11 +6201,11 @@ | |
| 6200 | ** SQLITE_ABORT. ^Calling [sqlite3_blob_bytes()] on an aborted blob handle |
| 6201 | ** always returns zero. |
| 6202 | ** |
| 6203 | ** ^This function sets the database handle error code and message. |
| 6204 | */ |
| 6205 | SQLITE_API int SQLITE_APICALL sqlite3_blob_reopen(sqlite3_blob *, sqlite3_int64); |
| 6206 | |
| 6207 | /* |
| 6208 | ** CAPI3REF: Close A BLOB Handle |
| 6209 | ** DESTRUCTOR: sqlite3_blob |
| 6210 | ** |
| @@ -6223,11 +6224,11 @@ | |
| 6223 | ** with a null pointer (such as would be returned by a failed call to |
| 6224 | ** [sqlite3_blob_open()]) is a harmless no-op. ^Otherwise, if this function |
| 6225 | ** is passed a valid open blob handle, the values returned by the |
| 6226 | ** sqlite3_errcode() and sqlite3_errmsg() functions are set before returning. |
| 6227 | */ |
| 6228 | SQLITE_API int SQLITE_APICALL sqlite3_blob_close(sqlite3_blob *); |
| 6229 | |
| 6230 | /* |
| 6231 | ** CAPI3REF: Return The Size Of An Open BLOB |
| 6232 | ** METHOD: sqlite3_blob |
| 6233 | ** |
| @@ -6239,11 +6240,11 @@ | |
| 6239 | ** This routine only works on a [BLOB handle] which has been created |
| 6240 | ** by a prior successful call to [sqlite3_blob_open()] and which has not |
| 6241 | ** been closed by [sqlite3_blob_close()]. Passing any other pointer in |
| 6242 | ** to this routine results in undefined and probably undesirable behavior. |
| 6243 | */ |
| 6244 | SQLITE_API int SQLITE_APICALL sqlite3_blob_bytes(sqlite3_blob *); |
| 6245 | |
| 6246 | /* |
| 6247 | ** CAPI3REF: Read Data From A BLOB Incrementally |
| 6248 | ** METHOD: sqlite3_blob |
| 6249 | ** |
| @@ -6268,11 +6269,11 @@ | |
| 6268 | ** been closed by [sqlite3_blob_close()]. Passing any other pointer in |
| 6269 | ** to this routine results in undefined and probably undesirable behavior. |
| 6270 | ** |
| 6271 | ** See also: [sqlite3_blob_write()]. |
| 6272 | */ |
| 6273 | SQLITE_API int SQLITE_APICALL sqlite3_blob_read(sqlite3_blob *, void *Z, int N, int iOffset); |
| 6274 | |
| 6275 | /* |
| 6276 | ** CAPI3REF: Write Data Into A BLOB Incrementally |
| 6277 | ** METHOD: sqlite3_blob |
| 6278 | ** |
| @@ -6310,11 +6311,11 @@ | |
| 6310 | ** been closed by [sqlite3_blob_close()]. Passing any other pointer in |
| 6311 | ** to this routine results in undefined and probably undesirable behavior. |
| 6312 | ** |
| 6313 | ** See also: [sqlite3_blob_read()]. |
| 6314 | */ |
| 6315 | SQLITE_API int SQLITE_APICALL sqlite3_blob_write(sqlite3_blob *, const void *z, int n, int iOffset); |
| 6316 | |
| 6317 | /* |
| 6318 | ** CAPI3REF: Virtual File System Objects |
| 6319 | ** |
| 6320 | ** A virtual filesystem (VFS) is an [sqlite3_vfs] object |
| @@ -6341,13 +6342,13 @@ | |
| 6341 | ** |
| 6342 | ** ^Unregister a VFS with the sqlite3_vfs_unregister() interface. |
| 6343 | ** ^(If the default VFS is unregistered, another VFS is chosen as |
| 6344 | ** the default. The choice for the new VFS is arbitrary.)^ |
| 6345 | */ |
| 6346 | SQLITE_API sqlite3_vfs *SQLITE_APICALL sqlite3_vfs_find(const char *zVfsName); |
| 6347 | SQLITE_API int SQLITE_APICALL sqlite3_vfs_register(sqlite3_vfs*, int makeDflt); |
| 6348 | SQLITE_API int SQLITE_APICALL sqlite3_vfs_unregister(sqlite3_vfs*); |
| 6349 | |
| 6350 | /* |
| 6351 | ** CAPI3REF: Mutexes |
| 6352 | ** |
| 6353 | ** The SQLite core uses these routines for thread |
| @@ -6459,15 +6460,15 @@ | |
| 6459 | ** sqlite3_mutex_leave() is a NULL pointer, then all three routines |
| 6460 | ** behave as no-ops. |
| 6461 | ** |
| 6462 | ** See also: [sqlite3_mutex_held()] and [sqlite3_mutex_notheld()]. |
| 6463 | */ |
| 6464 | SQLITE_API sqlite3_mutex *SQLITE_APICALL sqlite3_mutex_alloc(int); |
| 6465 | SQLITE_API void SQLITE_APICALL sqlite3_mutex_free(sqlite3_mutex*); |
| 6466 | SQLITE_API void SQLITE_APICALL sqlite3_mutex_enter(sqlite3_mutex*); |
| 6467 | SQLITE_API int SQLITE_APICALL sqlite3_mutex_try(sqlite3_mutex*); |
| 6468 | SQLITE_API void SQLITE_APICALL sqlite3_mutex_leave(sqlite3_mutex*); |
| 6469 | |
| 6470 | /* |
| 6471 | ** CAPI3REF: Mutex Methods Object |
| 6472 | ** |
| 6473 | ** An instance of this structure defines the low-level routines |
| @@ -6532,19 +6533,19 @@ | |
| 6532 | ** If xMutexInit fails in any way, it is expected to clean up after itself |
| 6533 | ** prior to returning. |
| 6534 | */ |
| 6535 | typedef struct sqlite3_mutex_methods sqlite3_mutex_methods; |
| 6536 | struct sqlite3_mutex_methods { |
| 6537 | int (SQLITE_CALLBACK *xMutexInit)(void); |
| 6538 | int (SQLITE_CALLBACK *xMutexEnd)(void); |
| 6539 | sqlite3_mutex *(SQLITE_CALLBACK *xMutexAlloc)(int); |
| 6540 | void (SQLITE_CALLBACK *xMutexFree)(sqlite3_mutex *); |
| 6541 | void (SQLITE_CALLBACK *xMutexEnter)(sqlite3_mutex *); |
| 6542 | int (SQLITE_CALLBACK *xMutexTry)(sqlite3_mutex *); |
| 6543 | void (SQLITE_CALLBACK *xMutexLeave)(sqlite3_mutex *); |
| 6544 | int (SQLITE_CALLBACK *xMutexHeld)(sqlite3_mutex *); |
| 6545 | int (SQLITE_CALLBACK *xMutexNotheld)(sqlite3_mutex *); |
| 6546 | }; |
| 6547 | |
| 6548 | /* |
| 6549 | ** CAPI3REF: Mutex Verification Routines |
| 6550 | ** |
| @@ -6573,12 +6574,12 @@ | |
| 6573 | ** call to sqlite3_mutex_held() to fail, so a non-zero return is |
| 6574 | ** the appropriate thing to do. The sqlite3_mutex_notheld() |
| 6575 | ** interface should also return 1 when given a NULL pointer. |
| 6576 | */ |
| 6577 | #ifndef NDEBUG |
| 6578 | SQLITE_API int SQLITE_APICALL sqlite3_mutex_held(sqlite3_mutex*); |
| 6579 | SQLITE_API int SQLITE_APICALL sqlite3_mutex_notheld(sqlite3_mutex*); |
| 6580 | #endif |
| 6581 | |
| 6582 | /* |
| 6583 | ** CAPI3REF: Mutex Types |
| 6584 | ** |
| @@ -6614,11 +6615,11 @@ | |
| 6614 | ** serializes access to the [database connection] given in the argument |
| 6615 | ** when the [threading mode] is Serialized. |
| 6616 | ** ^If the [threading mode] is Single-thread or Multi-thread then this |
| 6617 | ** routine returns a NULL pointer. |
| 6618 | */ |
| 6619 | SQLITE_API sqlite3_mutex *SQLITE_APICALL sqlite3_db_mutex(sqlite3*); |
| 6620 | |
| 6621 | /* |
| 6622 | ** CAPI3REF: Low-Level Control Of Database Files |
| 6623 | ** METHOD: sqlite3 |
| 6624 | ** |
| @@ -6649,11 +6650,11 @@ | |
| 6649 | ** an incorrect zDbName and an SQLITE_ERROR return from the underlying |
| 6650 | ** xFileControl method. |
| 6651 | ** |
| 6652 | ** See also: [SQLITE_FCNTL_LOCKSTATE] |
| 6653 | */ |
| 6654 | SQLITE_API int SQLITE_APICALL sqlite3_file_control(sqlite3*, const char *zDbName, int op, void*); |
| 6655 | |
| 6656 | /* |
| 6657 | ** CAPI3REF: Testing Interface |
| 6658 | ** |
| 6659 | ** ^The sqlite3_test_control() interface is used to read out internal |
| @@ -6731,12 +6732,12 @@ | |
| 6731 | ** be represented by a 32-bit integer, then the values returned by |
| 6732 | ** sqlite3_status() are undefined. |
| 6733 | ** |
| 6734 | ** See also: [sqlite3_db_status()] |
| 6735 | */ |
| 6736 | SQLITE_API int SQLITE_APICALL sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag); |
| 6737 | SQLITE_API int SQLITE_APICALL sqlite3_status64( |
| 6738 | int op, |
| 6739 | sqlite3_int64 *pCurrent, |
| 6740 | sqlite3_int64 *pHighwater, |
| 6741 | int resetFlag |
| 6742 | ); |
| @@ -6857,11 +6858,11 @@ | |
| 6857 | ** ^The sqlite3_db_status() routine returns SQLITE_OK on success and a |
| 6858 | ** non-zero [error code] on failure. |
| 6859 | ** |
| 6860 | ** See also: [sqlite3_status()] and [sqlite3_stmt_status()]. |
| 6861 | */ |
| 6862 | SQLITE_API int SQLITE_APICALL sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int resetFlg); |
| 6863 | |
| 6864 | /* |
| 6865 | ** CAPI3REF: Status Parameters for database connections |
| 6866 | ** KEYWORDS: {SQLITE_DBSTATUS options} |
| 6867 | ** |
| @@ -7000,11 +7001,11 @@ | |
| 7000 | ** ^If the resetFlg is true, then the counter is reset to zero after this |
| 7001 | ** interface call returns. |
| 7002 | ** |
| 7003 | ** See also: [sqlite3_status()] and [sqlite3_db_status()]. |
| 7004 | */ |
| 7005 | SQLITE_API int SQLITE_APICALL sqlite3_stmt_status(sqlite3_stmt*, int op,int resetFlg); |
| 7006 | |
| 7007 | /* |
| 7008 | ** CAPI3REF: Status Parameters for prepared statements |
| 7009 | ** KEYWORDS: {SQLITE_STMTSTATUS counter} {SQLITE_STMTSTATUS counters} |
| 7010 | ** |
| @@ -7236,22 +7237,22 @@ | |
| 7236 | */ |
| 7237 | typedef struct sqlite3_pcache_methods2 sqlite3_pcache_methods2; |
| 7238 | struct sqlite3_pcache_methods2 { |
| 7239 | int iVersion; |
| 7240 | void *pArg; |
| 7241 | int (SQLITE_CALLBACK *xInit)(void*); |
| 7242 | void (SQLITE_CALLBACK *xShutdown)(void*); |
| 7243 | sqlite3_pcache *(SQLITE_CALLBACK *xCreate)(int szPage, int szExtra, int bPurgeable); |
| 7244 | void (SQLITE_CALLBACK *xCachesize)(sqlite3_pcache*, int nCachesize); |
| 7245 | int (SQLITE_CALLBACK *xPagecount)(sqlite3_pcache*); |
| 7246 | sqlite3_pcache_page *(SQLITE_CALLBACK *xFetch)(sqlite3_pcache*, unsigned key, int createFlag); |
| 7247 | void (SQLITE_CALLBACK *xUnpin)(sqlite3_pcache*, sqlite3_pcache_page*, int discard); |
| 7248 | void (SQLITE_CALLBACK *xRekey)(sqlite3_pcache*, sqlite3_pcache_page*, |
| 7249 | unsigned oldKey, unsigned newKey); |
| 7250 | void (SQLITE_CALLBACK *xTruncate)(sqlite3_pcache*, unsigned iLimit); |
| 7251 | void (SQLITE_CALLBACK *xDestroy)(sqlite3_pcache*); |
| 7252 | void (SQLITE_CALLBACK *xShrink)(sqlite3_pcache*); |
| 7253 | }; |
| 7254 | |
| 7255 | /* |
| 7256 | ** This is the obsolete pcache_methods object that has now been replaced |
| 7257 | ** by sqlite3_pcache_methods2. This object is not used by SQLite. It is |
| @@ -7258,20 +7259,20 @@ | |
| 7258 | ** retained in the header file for backwards compatibility only. |
| 7259 | */ |
| 7260 | typedef struct sqlite3_pcache_methods sqlite3_pcache_methods; |
| 7261 | struct sqlite3_pcache_methods { |
| 7262 | void *pArg; |
| 7263 | int (SQLITE_CALLBACK *xInit)(void*); |
| 7264 | void (SQLITE_CALLBACK *xShutdown)(void*); |
| 7265 | sqlite3_pcache *(SQLITE_CALLBACK *xCreate)(int szPage, int bPurgeable); |
| 7266 | void (SQLITE_CALLBACK *xCachesize)(sqlite3_pcache*, int nCachesize); |
| 7267 | int (SQLITE_CALLBACK *xPagecount)(sqlite3_pcache*); |
| 7268 | void *(SQLITE_CALLBACK *xFetch)(sqlite3_pcache*, unsigned key, int createFlag); |
| 7269 | void (SQLITE_CALLBACK *xUnpin)(sqlite3_pcache*, void*, int discard); |
| 7270 | void (SQLITE_CALLBACK *xRekey)(sqlite3_pcache*, void*, unsigned oldKey, unsigned newKey); |
| 7271 | void (SQLITE_CALLBACK *xTruncate)(sqlite3_pcache*, unsigned iLimit); |
| 7272 | void (SQLITE_CALLBACK *xDestroy)(sqlite3_pcache*); |
| 7273 | }; |
| 7274 | |
| 7275 | |
| 7276 | /* |
| 7277 | ** CAPI3REF: Online Backup Object |
| @@ -7469,20 +7470,20 @@ | |
| 7469 | ** However, the sqlite3_backup_remaining() and sqlite3_backup_pagecount() |
| 7470 | ** APIs are not strictly speaking threadsafe. If they are invoked at the |
| 7471 | ** same time as another thread is invoking sqlite3_backup_step() it is |
| 7472 | ** possible that they return invalid values. |
| 7473 | */ |
| 7474 | SQLITE_API sqlite3_backup *SQLITE_APICALL sqlite3_backup_init( |
| 7475 | sqlite3 *pDest, /* Destination database handle */ |
| 7476 | const char *zDestName, /* Destination database name */ |
| 7477 | sqlite3 *pSource, /* Source database handle */ |
| 7478 | const char *zSourceName /* Source database name */ |
| 7479 | ); |
| 7480 | SQLITE_API int SQLITE_APICALL sqlite3_backup_step(sqlite3_backup *p, int nPage); |
| 7481 | SQLITE_API int SQLITE_APICALL sqlite3_backup_finish(sqlite3_backup *p); |
| 7482 | SQLITE_API int SQLITE_APICALL sqlite3_backup_remaining(sqlite3_backup *p); |
| 7483 | SQLITE_API int SQLITE_APICALL sqlite3_backup_pagecount(sqlite3_backup *p); |
| 7484 | |
| 7485 | /* |
| 7486 | ** CAPI3REF: Unlock Notification |
| 7487 | ** METHOD: sqlite3 |
| 7488 | ** |
| @@ -7595,13 +7596,13 @@ | |
| 7595 | ** by an sqlite3_step() call. ^(If there is a blocking connection, then the |
| 7596 | ** extended error code is set to SQLITE_LOCKED_SHAREDCACHE. Otherwise, in |
| 7597 | ** the special "DROP TABLE/INDEX" case, the extended error code is just |
| 7598 | ** SQLITE_LOCKED.)^ |
| 7599 | */ |
| 7600 | SQLITE_API int SQLITE_APICALL sqlite3_unlock_notify( |
| 7601 | sqlite3 *pBlocked, /* Waiting connection */ |
| 7602 | void (SQLITE_CALLBACK *xNotify)(void **apArg, int nArg), /* Callback function to invoke */ |
| 7603 | void *pNotifyArg /* Argument to pass to xNotify */ |
| 7604 | ); |
| 7605 | |
| 7606 | |
| 7607 | /* |
| @@ -7610,12 +7611,12 @@ | |
| 7610 | ** ^The [sqlite3_stricmp()] and [sqlite3_strnicmp()] APIs allow applications |
| 7611 | ** and extensions to compare the contents of two buffers containing UTF-8 |
| 7612 | ** strings in a case-independent fashion, using the same definition of "case |
| 7613 | ** independence" that SQLite uses internally when comparing identifiers. |
| 7614 | */ |
| 7615 | SQLITE_API int SQLITE_APICALL sqlite3_stricmp(const char *, const char *); |
| 7616 | SQLITE_API int SQLITE_APICALL sqlite3_strnicmp(const char *, const char *, int); |
| 7617 | |
| 7618 | /* |
| 7619 | ** CAPI3REF: String Globbing |
| 7620 | * |
| 7621 | ** ^The [sqlite3_strglob(P,X)] interface returns zero if and only if |
| @@ -7628,11 +7629,11 @@ | |
| 7628 | ** Note that this routine returns zero on a match and non-zero if the strings |
| 7629 | ** do not match, the same as [sqlite3_stricmp()] and [sqlite3_strnicmp()]. |
| 7630 | ** |
| 7631 | ** See also: [sqlite3_strlike()]. |
| 7632 | */ |
| 7633 | SQLITE_API int SQLITE_APICALL sqlite3_strglob(const char *zGlob, const char *zStr); |
| 7634 | |
| 7635 | /* |
| 7636 | ** CAPI3REF: String LIKE Matching |
| 7637 | * |
| 7638 | ** ^The [sqlite3_strlike(P,X,E)] interface returns zero if and only if |
| @@ -7651,11 +7652,11 @@ | |
| 7651 | ** Note that this routine returns zero on a match and non-zero if the strings |
| 7652 | ** do not match, the same as [sqlite3_stricmp()] and [sqlite3_strnicmp()]. |
| 7653 | ** |
| 7654 | ** See also: [sqlite3_strglob()]. |
| 7655 | */ |
| 7656 | SQLITE_API int SQLITE_APICALL sqlite3_strlike(const char *zGlob, const char *zStr, unsigned int cEsc); |
| 7657 | |
| 7658 | /* |
| 7659 | ** CAPI3REF: Error Logging Interface |
| 7660 | ** |
| 7661 | ** ^The [sqlite3_log()] interface writes a message into the [error log] |
| @@ -7710,13 +7711,13 @@ | |
| 7710 | ** previously registered write-ahead log callback. ^Note that the |
| 7711 | ** [sqlite3_wal_autocheckpoint()] interface and the |
| 7712 | ** [wal_autocheckpoint pragma] both invoke [sqlite3_wal_hook()] and will |
| 7713 | ** overwrite any prior [sqlite3_wal_hook()] settings. |
| 7714 | */ |
| 7715 | SQLITE_API void *SQLITE_APICALL sqlite3_wal_hook( |
| 7716 | sqlite3*, |
| 7717 | int(SQLITE_CALLBACK *)(void *,sqlite3*,const char*,int), |
| 7718 | void* |
| 7719 | ); |
| 7720 | |
| 7721 | /* |
| 7722 | ** CAPI3REF: Configure an auto-checkpoint |
| @@ -7745,11 +7746,11 @@ | |
| 7745 | ** enabled with a threshold of 1000 or [SQLITE_DEFAULT_WAL_AUTOCHECKPOINT] |
| 7746 | ** pages. The use of this interface |
| 7747 | ** is only necessary if the default setting is found to be suboptimal |
| 7748 | ** for a particular application. |
| 7749 | */ |
| 7750 | SQLITE_API int SQLITE_APICALL sqlite3_wal_autocheckpoint(sqlite3 *db, int N); |
| 7751 | |
| 7752 | /* |
| 7753 | ** CAPI3REF: Checkpoint a database |
| 7754 | ** METHOD: sqlite3 |
| 7755 | ** |
| @@ -7767,11 +7768,11 @@ | |
| 7767 | ** interface was added. This interface is retained for backwards |
| 7768 | ** compatibility and as a convenience for applications that need to manually |
| 7769 | ** start a callback but which do not need the full power (and corresponding |
| 7770 | ** complication) of [sqlite3_wal_checkpoint_v2()]. |
| 7771 | */ |
| 7772 | SQLITE_API int SQLITE_APICALL sqlite3_wal_checkpoint(sqlite3 *db, const char *zDb); |
| 7773 | |
| 7774 | /* |
| 7775 | ** CAPI3REF: Checkpoint a database |
| 7776 | ** METHOD: sqlite3 |
| 7777 | ** |
| @@ -7861,11 +7862,11 @@ | |
| 7861 | ** [sqlite3_errcode()] and [sqlite3_errmsg()]. |
| 7862 | ** |
| 7863 | ** ^The [PRAGMA wal_checkpoint] command can be used to invoke this interface |
| 7864 | ** from SQL. |
| 7865 | */ |
| 7866 | SQLITE_API int SQLITE_APICALL sqlite3_wal_checkpoint_v2( |
| 7867 | sqlite3 *db, /* Database handle */ |
| 7868 | const char *zDb, /* Name of attached database (or NULL) */ |
| 7869 | int eMode, /* SQLITE_CHECKPOINT_* value */ |
| 7870 | int *pnLog, /* OUT: Size of WAL log in frames */ |
| 7871 | int *pnCkpt /* OUT: Total number of frames checkpointed */ |
| @@ -7950,11 +7951,11 @@ | |
| 7950 | ** value returned is one of [SQLITE_ROLLBACK], [SQLITE_IGNORE], [SQLITE_FAIL], |
| 7951 | ** [SQLITE_ABORT], or [SQLITE_REPLACE], according to the [ON CONFLICT] mode |
| 7952 | ** of the SQL statement that triggered the call to the [xUpdate] method of the |
| 7953 | ** [virtual table]. |
| 7954 | */ |
| 7955 | SQLITE_API int SQLITE_APICALL sqlite3_vtab_on_conflict(sqlite3 *); |
| 7956 | |
| 7957 | /* |
| 7958 | ** CAPI3REF: Conflict resolution modes |
| 7959 | ** KEYWORDS: {conflict resolution mode} |
| 7960 | ** |
| @@ -8055,11 +8056,11 @@ | |
| 8055 | ** as if the loop did not exist - it returns non-zero and leave the variable |
| 8056 | ** that pOut points to unchanged. |
| 8057 | ** |
| 8058 | ** See also: [sqlite3_stmt_scanstatus_reset()] |
| 8059 | */ |
| 8060 | SQLITE_API int SQLITE_APICALL sqlite3_stmt_scanstatus( |
| 8061 | sqlite3_stmt *pStmt, /* Prepared statement for which info desired */ |
| 8062 | int idx, /* Index of loop to report on */ |
| 8063 | int iScanStatusOp, /* Information desired. SQLITE_SCANSTAT_* */ |
| 8064 | void *pOut /* Result written here */ |
| 8065 | ); |
| @@ -8071,11 +8072,11 @@ | |
| 8071 | ** ^Zero all [sqlite3_stmt_scanstatus()] related event counters. |
| 8072 | ** |
| 8073 | ** This API is only available if the library is built with pre-processor |
| 8074 | ** symbol [SQLITE_ENABLE_STMT_SCANSTATUS] defined. |
| 8075 | */ |
| 8076 | SQLITE_API void SQLITE_APICALL sqlite3_stmt_scanstatus_reset(sqlite3_stmt*); |
| 8077 | |
| 8078 | /* |
| 8079 | ** CAPI3REF: Flush caches to disk mid-transaction |
| 8080 | ** |
| 8081 | ** ^If a write-transaction is open on [database connection] D when the |
| @@ -8103,11 +8104,11 @@ | |
| 8103 | ** ^Otherwise, if no error occurs, [sqlite3_db_cacheflush()] returns SQLITE_OK. |
| 8104 | ** |
| 8105 | ** ^This function does not set the database handle error code or message |
| 8106 | ** returned by the [sqlite3_errcode()] and [sqlite3_errmsg()] functions. |
| 8107 | */ |
| 8108 | SQLITE_API int SQLITE_APICALL sqlite3_db_cacheflush(sqlite3*); |
| 8109 | |
| 8110 | /* |
| 8111 | ** CAPI3REF: The pre-update hook. |
| 8112 | ** |
| 8113 | ** ^These interfaces are only available if SQLite is compiled using the |
| @@ -8183,13 +8184,13 @@ | |
| 8183 | ** triggers; or 2 for changes resulting from triggers called by top-level |
| 8184 | ** triggers; and so forth. |
| 8185 | ** |
| 8186 | ** See also: [sqlite3_update_hook()] |
| 8187 | */ |
| 8188 | SQLITE_API SQLITE_EXPERIMENTAL void *SQLITE_APICALL sqlite3_preupdate_hook( |
| 8189 | sqlite3 *db, |
| 8190 | void(SQLITE_CALLBACK *xPreUpdate)( |
| 8191 | void *pCtx, /* Copy of third arg to preupdate_hook() */ |
| 8192 | sqlite3 *db, /* Database handle */ |
| 8193 | int op, /* SQLITE_UPDATE, DELETE or INSERT */ |
| 8194 | char const *zDb, /* Database name */ |
| 8195 | char const *zName, /* Table name */ |
| @@ -8196,14 +8197,14 @@ | |
| 8196 | sqlite3_int64 iKey1, /* Rowid of row about to be deleted/updated */ |
| 8197 | sqlite3_int64 iKey2 /* New rowid value (for a rowid UPDATE) */ |
| 8198 | ), |
| 8199 | void* |
| 8200 | ); |
| 8201 | SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_APICALL sqlite3_preupdate_old(sqlite3 *, int, sqlite3_value **); |
| 8202 | SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_APICALL sqlite3_preupdate_count(sqlite3 *); |
| 8203 | SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_APICALL sqlite3_preupdate_depth(sqlite3 *); |
| 8204 | SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_APICALL sqlite3_preupdate_new(sqlite3 *, int, sqlite3_value **); |
| 8205 | |
| 8206 | /* |
| 8207 | ** CAPI3REF: Low-level system error code |
| 8208 | ** |
| 8209 | ** ^Attempt to return the underlying operating system error code or error |
| @@ -8211,11 +8212,11 @@ | |
| 8211 | ** The return value is OS-dependent. For example, on unix systems, after |
| 8212 | ** [sqlite3_open_v2()] returns [SQLITE_CANTOPEN], this interface could be |
| 8213 | ** called to get back the underlying "errno" that caused the problem, such |
| 8214 | ** as ENOSPC, EAUTH, EISDIR, and so forth. |
| 8215 | */ |
| 8216 | SQLITE_API int SQLITE_APICALL sqlite3_system_errno(sqlite3*); |
| 8217 | |
| 8218 | /* |
| 8219 | ** CAPI3REF: Database Snapshot |
| 8220 | ** KEYWORDS: {snapshot} |
| 8221 | ** EXPERIMENTAL |
| @@ -8261,11 +8262,11 @@ | |
| 8261 | ** to avoid a memory leak. |
| 8262 | ** |
| 8263 | ** The [sqlite3_snapshot_get()] interface is only available when the |
| 8264 | ** SQLITE_ENABLE_SNAPSHOT compile-time option is used. |
| 8265 | */ |
| 8266 | SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_APICALL sqlite3_snapshot_get( |
| 8267 | sqlite3 *db, |
| 8268 | const char *zSchema, |
| 8269 | sqlite3_snapshot **ppSnapshot |
| 8270 | ); |
| 8271 | |
| @@ -8299,11 +8300,11 @@ | |
| 8299 | ** database connection in order to make it ready to use snapshots.) |
| 8300 | ** |
| 8301 | ** The [sqlite3_snapshot_open()] interface is only available when the |
| 8302 | ** SQLITE_ENABLE_SNAPSHOT compile-time option is used. |
| 8303 | */ |
| 8304 | SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_APICALL sqlite3_snapshot_open( |
| 8305 | sqlite3 *db, |
| 8306 | const char *zSchema, |
| 8307 | sqlite3_snapshot *pSnapshot |
| 8308 | ); |
| 8309 | |
| @@ -8316,11 +8317,11 @@ | |
| 8316 | ** using this routine to avoid a memory leak. |
| 8317 | ** |
| 8318 | ** The [sqlite3_snapshot_free()] interface is only available when the |
| 8319 | ** SQLITE_ENABLE_SNAPSHOT compile-time option is used. |
| 8320 | */ |
| 8321 | SQLITE_API SQLITE_EXPERIMENTAL void SQLITE_APICALL sqlite3_snapshot_free(sqlite3_snapshot*); |
| 8322 | |
| 8323 | /* |
| 8324 | ** CAPI3REF: Compare the ages of two snapshot handles. |
| 8325 | ** EXPERIMENTAL |
| 8326 | ** |
| @@ -8340,11 +8341,11 @@ | |
| 8340 | ** |
| 8341 | ** Otherwise, this API returns a negative value if P1 refers to an older |
| 8342 | ** snapshot than P2, zero if the two handles refer to the same database |
| 8343 | ** snapshot, and a positive value if P1 is a newer snapshot than P2. |
| 8344 | */ |
| 8345 | SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_APICALL sqlite3_snapshot_cmp( |
| 8346 | sqlite3_snapshot *p1, |
| 8347 | sqlite3_snapshot *p2 |
| 8348 | ); |
| 8349 | |
| 8350 | /* |
| @@ -8398,14 +8399,14 @@ | |
| 8398 | ** Register a geometry callback named zGeom that can be used as part of an |
| 8399 | ** R-Tree geometry query as follows: |
| 8400 | ** |
| 8401 | ** SELECT ... FROM <rtree> WHERE <rtree col> MATCH $zGeom(... params ...) |
| 8402 | */ |
| 8403 | SQLITE_API int SQLITE_APICALL sqlite3_rtree_geometry_callback( |
| 8404 | sqlite3 *db, |
| 8405 | const char *zGeom, |
| 8406 | int (SQLITE_CALLBACK *xGeom)(sqlite3_rtree_geometry*, int, sqlite3_rtree_dbl*,int*), |
| 8407 | void *pContext |
| 8408 | ); |
| 8409 | |
| 8410 | |
| 8411 | /* |
| @@ -8415,25 +8416,25 @@ | |
| 8415 | struct sqlite3_rtree_geometry { |
| 8416 | void *pContext; /* Copy of pContext passed to s_r_g_c() */ |
| 8417 | int nParam; /* Size of array aParam[] */ |
| 8418 | sqlite3_rtree_dbl *aParam; /* Parameters passed to SQL geom function */ |
| 8419 | void *pUser; /* Callback implementation user data */ |
| 8420 | void (SQLITE_CALLBACK *xDelUser)(void *); /* Called by SQLite to clean up pUser */ |
| 8421 | }; |
| 8422 | |
| 8423 | /* |
| 8424 | ** Register a 2nd-generation geometry callback named zScore that can be |
| 8425 | ** used as part of an R-Tree geometry query as follows: |
| 8426 | ** |
| 8427 | ** SELECT ... FROM <rtree> WHERE <rtree col> MATCH $zQueryFunc(... params ...) |
| 8428 | */ |
| 8429 | SQLITE_API int SQLITE_APICALL sqlite3_rtree_query_callback( |
| 8430 | sqlite3 *db, |
| 8431 | const char *zQueryFunc, |
| 8432 | int (SQLITE_CALLBACK *xQueryFunc)(sqlite3_rtree_query_info*), |
| 8433 | void *pContext, |
| 8434 | void (SQLITE_CALLBACK *xDestructor)(void*) |
| 8435 | ); |
| 8436 | |
| 8437 | |
| 8438 | /* |
| 8439 | ** A pointer to a structure of the following type is passed as the |
| @@ -8447,11 +8448,11 @@ | |
| 8447 | struct sqlite3_rtree_query_info { |
| 8448 | void *pContext; /* pContext from when function registered */ |
| 8449 | int nParam; /* Number of function parameters */ |
| 8450 | sqlite3_rtree_dbl *aParam; /* value of function parameters */ |
| 8451 | void *pUser; /* callback can use this, if desired */ |
| 8452 | void (SQLITE_CALLBACK *xDelUser)(void*); /* function to free pUser */ |
| 8453 | sqlite3_rtree_dbl *aCoord; /* Coordinates of node or entry to check */ |
| 8454 | unsigned int *anQueue; /* Number of pending entries in the queue */ |
| 8455 | int nCoord; /* Number of coordinates */ |
| 8456 | int iLevel; /* Level of current node or entry */ |
| 8457 | int mxLevel; /* The largest iLevel value in the tree */ |
| @@ -8643,11 +8644,11 @@ | |
| 8643 | ** If xFilter returns 0, changes is not tracked. Note that once a table is |
| 8644 | ** attached, xFilter will not be called again. |
| 8645 | */ |
| 8646 | void sqlite3session_table_filter( |
| 8647 | sqlite3_session *pSession, /* Session object */ |
| 8648 | int(SQLITE_CALLBACK *xFilter)( |
| 8649 | void *pCtx, /* Copy of third arg to _filter_table() */ |
| 8650 | const char *zTab /* Table name */ |
| 8651 | ), |
| 8652 | void *pCtx /* First argument passed to xFilter */ |
| 8653 | ); |
| @@ -9218,11 +9219,11 @@ | |
| 9218 | ** An sqlite3_changegroup object is used to combine two or more changesets |
| 9219 | ** (or patchsets) into a single changeset (or patchset). A single changegroup |
| 9220 | ** object may combine changesets or patchsets, but not both. The output is |
| 9221 | ** always in the same format as the input. |
| 9222 | ** |
| 9223 | ** If successful, this function returns SQLITE_OK and populates (SQLITE_CALLBACK *pp) with |
| 9224 | ** a pointer to a new sqlite3_changegroup object before returning. The caller |
| 9225 | ** should eventually free the returned object using a call to |
| 9226 | ** sqlite3changegroup_delete(). If an error occurs, an SQLite error code |
| 9227 | ** (i.e. SQLITE_NOMEM) is returned and *pp is set to NULL. |
| 9228 | ** |
| @@ -9338,11 +9339,11 @@ | |
| 9338 | ** changes for tables that do not appear in the first changeset, they are |
| 9339 | ** appended onto the end of the output changeset, again in the order in |
| 9340 | ** which they are first encountered. |
| 9341 | ** |
| 9342 | ** If an error occurs, an SQLite error code is returned and the output |
| 9343 | ** variables (SQLITE_CALLBACK *pnData) and (*ppData) are set to 0. Otherwise, SQLITE_OK |
| 9344 | ** is returned and the output variables are set to the size of and a |
| 9345 | ** pointer to the output buffer, respectively. In this case it is the |
| 9346 | ** responsibility of the caller to eventually free the buffer using a |
| 9347 | ** call to sqlite3_free(). |
| 9348 | */ |
| @@ -9495,15 +9496,15 @@ | |
| 9495 | */ |
| 9496 | int sqlite3changeset_apply( |
| 9497 | sqlite3 *db, /* Apply change to "main" db of this handle */ |
| 9498 | int nChangeset, /* Size of changeset in bytes */ |
| 9499 | void *pChangeset, /* Changeset blob */ |
| 9500 | int(SQLITE_CALLBACK *xFilter)( |
| 9501 | void *pCtx, /* Copy of sixth arg to _apply() */ |
| 9502 | const char *zTab /* Table name */ |
| 9503 | ), |
| 9504 | int(SQLITE_CALLBACK *xConflict)( |
| 9505 | void *pCtx, /* Copy of sixth arg to _apply() */ |
| 9506 | int eConflict, /* DATA, MISSING, CONFLICT, CONSTRAINT */ |
| 9507 | sqlite3_changeset_iter *p /* Handle describing change and conflict */ |
| 9508 | ), |
| 9509 | void *pCtx /* First argument passed to xConflict */ |
| @@ -9640,20 +9641,20 @@ | |
| 9640 | ** </pre> |
| 9641 | ** |
| 9642 | ** Is replaced by: |
| 9643 | ** |
| 9644 | ** <pre> |
| 9645 | ** int (SQLITE_CALLBACK *xInput)(void *pIn, void *pData, int *pnData), |
| 9646 | ** void *pIn, |
| 9647 | ** </pre> |
| 9648 | ** |
| 9649 | ** Each time the xInput callback is invoked by the sessions module, the first |
| 9650 | ** argument passed is a copy of the supplied pIn context pointer. The second |
| 9651 | ** argument, pData, points to a buffer (SQLITE_CALLBACK *pnData) bytes in size. Assuming no |
| 9652 | ** error occurs the xInput method should copy up to (SQLITE_CALLBACK *pnData) bytes of data |
| 9653 | ** into the buffer and set (SQLITE_CALLBACK *pnData) to the actual number of bytes copied |
| 9654 | ** before returning SQLITE_OK. If the input is completely exhausted, (SQLITE_CALLBACK *pnData) |
| 9655 | ** should be set to zero to indicate this. Or, if an error occurs, an SQLite |
| 9656 | ** error code should be returned. In all cases, if an xInput callback returns |
| 9657 | ** an error, all processing is abandoned and the streaming API function |
| 9658 | ** returns a copy of the error code to the caller. |
| 9659 | ** |
| @@ -9674,11 +9675,11 @@ | |
| 9674 | ** </pre> |
| 9675 | ** |
| 9676 | ** Is replaced by: |
| 9677 | ** |
| 9678 | ** <pre> |
| 9679 | ** int (SQLITE_CALLBACK *xOutput)(void *pOut, const void *pData, int nData), |
| 9680 | ** void *pOut |
| 9681 | ** </pre> |
| 9682 | ** |
| 9683 | ** The xOutput callback is invoked zero or more times to return data to |
| 9684 | ** the application. The first parameter passed to each call is a copy of the |
| @@ -9694,58 +9695,58 @@ | |
| 9694 | ** parameter set to a value less than or equal to zero. Other than this, |
| 9695 | ** no guarantees are made as to the size of the chunks of data returned. |
| 9696 | */ |
| 9697 | int sqlite3changeset_apply_strm( |
| 9698 | sqlite3 *db, /* Apply change to "main" db of this handle */ |
| 9699 | int (SQLITE_CALLBACK *xInput)(void *pIn, void *pData, int *pnData), /* Input function */ |
| 9700 | void *pIn, /* First arg for xInput */ |
| 9701 | int(SQLITE_CALLBACK *xFilter)( |
| 9702 | void *pCtx, /* Copy of sixth arg to _apply() */ |
| 9703 | const char *zTab /* Table name */ |
| 9704 | ), |
| 9705 | int(SQLITE_CALLBACK *xConflict)( |
| 9706 | void *pCtx, /* Copy of sixth arg to _apply() */ |
| 9707 | int eConflict, /* DATA, MISSING, CONFLICT, CONSTRAINT */ |
| 9708 | sqlite3_changeset_iter *p /* Handle describing change and conflict */ |
| 9709 | ), |
| 9710 | void *pCtx /* First argument passed to xConflict */ |
| 9711 | ); |
| 9712 | int sqlite3changeset_concat_strm( |
| 9713 | int (SQLITE_CALLBACK *xInputA)(void *pIn, void *pData, int *pnData), |
| 9714 | void *pInA, |
| 9715 | int (SQLITE_CALLBACK *xInputB)(void *pIn, void *pData, int *pnData), |
| 9716 | void *pInB, |
| 9717 | int (SQLITE_CALLBACK *xOutput)(void *pOut, const void *pData, int nData), |
| 9718 | void *pOut |
| 9719 | ); |
| 9720 | int sqlite3changeset_invert_strm( |
| 9721 | int (SQLITE_CALLBACK *xInput)(void *pIn, void *pData, int *pnData), |
| 9722 | void *pIn, |
| 9723 | int (SQLITE_CALLBACK *xOutput)(void *pOut, const void *pData, int nData), |
| 9724 | void *pOut |
| 9725 | ); |
| 9726 | int sqlite3changeset_start_strm( |
| 9727 | sqlite3_changeset_iter **pp, |
| 9728 | int (SQLITE_CALLBACK *xInput)(void *pIn, void *pData, int *pnData), |
| 9729 | void *pIn |
| 9730 | ); |
| 9731 | int sqlite3session_changeset_strm( |
| 9732 | sqlite3_session *pSession, |
| 9733 | int (SQLITE_CALLBACK *xOutput)(void *pOut, const void *pData, int nData), |
| 9734 | void *pOut |
| 9735 | ); |
| 9736 | int sqlite3session_patchset_strm( |
| 9737 | sqlite3_session *pSession, |
| 9738 | int (SQLITE_CALLBACK *xOutput)(void *pOut, const void *pData, int nData), |
| 9739 | void *pOut |
| 9740 | ); |
| 9741 | int sqlite3changegroup_add_strm(sqlite3_changegroup*, |
| 9742 | int (SQLITE_CALLBACK *xInput)(void *pIn, void *pData, int *pnData), |
| 9743 | void *pIn |
| 9744 | ); |
| 9745 | int sqlite3changegroup_output_strm(sqlite3_changegroup*, |
| 9746 | int (SQLITE_CALLBACK *xOutput)(void *pOut, const void *pData, int nData), |
| 9747 | void *pOut |
| 9748 | ); |
| 9749 | |
| 9750 | |
| 9751 | /* |
| @@ -9796,11 +9797,11 @@ | |
| 9796 | |
| 9797 | typedef struct Fts5ExtensionApi Fts5ExtensionApi; |
| 9798 | typedef struct Fts5Context Fts5Context; |
| 9799 | typedef struct Fts5PhraseIter Fts5PhraseIter; |
| 9800 | |
| 9801 | typedef void (SQLITE_CALLBACK *fts5_extension_function)( |
| 9802 | const Fts5ExtensionApi *pApi, /* API offered by current FTS version */ |
| 9803 | Fts5Context *pFts, /* First arg to pass to pApi functions */ |
| 9804 | sqlite3_context *pCtx, /* Context for returning result/error */ |
| 9805 | int nVal, /* Number of values in apVal[] array */ |
| 9806 | sqlite3_value **apVal /* Array of trailing arguments */ |
| @@ -9847,15 +9848,15 @@ | |
| 9847 | ** This function may be quite inefficient if used with an FTS5 table |
| 9848 | ** created with the "columnsize=0" option. |
| 9849 | ** |
| 9850 | ** xColumnText: |
| 9851 | ** This function attempts to retrieve the text of column iCol of the |
| 9852 | ** current document. If successful, (SQLITE_CALLBACK *pz) is set to point to a buffer |
| 9853 | ** containing the text in utf-8 encoding, (SQLITE_CALLBACK *pn) is set to the size in bytes |
| 9854 | ** (not characters) of the buffer and SQLITE_OK is returned. Otherwise, |
| 9855 | ** if an error occurs, an SQLite error code is returned and the final values |
| 9856 | ** of (SQLITE_CALLBACK *pz) and (*pn) are undefined. |
| 9857 | ** |
| 9858 | ** xPhraseCount: |
| 9859 | ** Returns the number of phrases in the current query expression. |
| 9860 | ** |
| 9861 | ** xPhraseSize: |
| @@ -9960,11 +9961,11 @@ | |
| 9960 | ** xRowCount(pFts5, pnRow) |
| 9961 | ** |
| 9962 | ** This function is used to retrieve the total number of rows in the table. |
| 9963 | ** In other words, the same value that would be returned by: |
| 9964 | ** |
| 9965 | ** SELECT count(SQLITE_CALLBACK *) FROM ftstable; |
| 9966 | ** |
| 9967 | ** xPhraseFirst() |
| 9968 | ** This function is used, along with type Fts5PhraseIter and the xPhraseNext |
| 9969 | ** method, to iterate through all instances of a single query phrase within |
| 9970 | ** the current row. This is the same information as is accessible via the |
| @@ -10027,43 +10028,43 @@ | |
| 10027 | ** See xPhraseFirstColumn above. |
| 10028 | */ |
| 10029 | struct Fts5ExtensionApi { |
| 10030 | int iVersion; /* Currently always set to 3 */ |
| 10031 | |
| 10032 | void *(SQLITE_CALLBACK *xUserData)(Fts5Context*); |
| 10033 | |
| 10034 | int (SQLITE_CALLBACK *xColumnCount)(Fts5Context*); |
| 10035 | int (SQLITE_CALLBACK *xRowCount)(Fts5Context*, sqlite3_int64 *pnRow); |
| 10036 | int (SQLITE_CALLBACK *xColumnTotalSize)(Fts5Context*, int iCol, sqlite3_int64 *pnToken); |
| 10037 | |
| 10038 | int (SQLITE_CALLBACK *xTokenize)(Fts5Context*, |
| 10039 | const char *pText, int nText, /* Text to tokenize */ |
| 10040 | void *pCtx, /* Context passed to xToken() */ |
| 10041 | int (SQLITE_CALLBACK *xToken)(void*, int, const char*, int, int, int) /* Callback */ |
| 10042 | ); |
| 10043 | |
| 10044 | int (SQLITE_CALLBACK *xPhraseCount)(Fts5Context*); |
| 10045 | int (SQLITE_CALLBACK *xPhraseSize)(Fts5Context*, int iPhrase); |
| 10046 | |
| 10047 | int (SQLITE_CALLBACK *xInstCount)(Fts5Context*, int *pnInst); |
| 10048 | int (SQLITE_CALLBACK *xInst)(Fts5Context*, int iIdx, int *piPhrase, int *piCol, int *piOff); |
| 10049 | |
| 10050 | sqlite3_int64 (SQLITE_CALLBACK *xRowid)(Fts5Context*); |
| 10051 | int (SQLITE_CALLBACK *xColumnText)(Fts5Context*, int iCol, const char **pz, int *pn); |
| 10052 | int (SQLITE_CALLBACK *xColumnSize)(Fts5Context*, int iCol, int *pnToken); |
| 10053 | |
| 10054 | int (SQLITE_CALLBACK *xQueryPhrase)(Fts5Context*, int iPhrase, void *pUserData, |
| 10055 | int(SQLITE_CALLBACK *)(const Fts5ExtensionApi*,Fts5Context*,void*) |
| 10056 | ); |
| 10057 | int (SQLITE_CALLBACK *xSetAuxdata)(Fts5Context*, void *pAux, void(*xDelete)(void*)); |
| 10058 | void *(SQLITE_CALLBACK *xGetAuxdata)(Fts5Context*, int bClear); |
| 10059 | |
| 10060 | int (SQLITE_CALLBACK *xPhraseFirst)(Fts5Context*, int iPhrase, Fts5PhraseIter*, int*, int*); |
| 10061 | void (SQLITE_CALLBACK *xPhraseNext)(Fts5Context*, Fts5PhraseIter*, int *piCol, int *piOff); |
| 10062 | |
| 10063 | int (SQLITE_CALLBACK *xPhraseFirstColumn)(Fts5Context*, int iPhrase, Fts5PhraseIter*, int*); |
| 10064 | void (SQLITE_CALLBACK *xPhraseNextColumn)(Fts5Context*, Fts5PhraseIter*, int *piCol); |
| 10065 | }; |
| 10066 | |
| 10067 | /* |
| 10068 | ** CUSTOM AUXILIARY FUNCTIONS |
| 10069 | *************************************************************************/ |
| @@ -10087,11 +10088,11 @@ | |
| 10087 | ** The second and third arguments are an array of nul-terminated strings |
| 10088 | ** containing the tokenizer arguments, if any, specified following the |
| 10089 | ** tokenizer name as part of the CREATE VIRTUAL TABLE statement used |
| 10090 | ** to create the FTS5 table. |
| 10091 | ** |
| 10092 | ** The final argument is an output variable. If successful, (SQLITE_CALLBACK *ppOut) |
| 10093 | ** should be set to point to the new tokenizer handle and SQLITE_OK |
| 10094 | ** returned. If an error occurs, some value other than SQLITE_OK should |
| 10095 | ** be returned. In this case, fts5 assumes that the final value of *ppOut |
| 10096 | ** is undefined. |
| 10097 | ** |
| @@ -10261,17 +10262,17 @@ | |
| 10261 | ** inefficient. |
| 10262 | */ |
| 10263 | typedef struct Fts5Tokenizer Fts5Tokenizer; |
| 10264 | typedef struct fts5_tokenizer fts5_tokenizer; |
| 10265 | struct fts5_tokenizer { |
| 10266 | int (SQLITE_CALLBACK *xCreate)(void*, const char **azArg, int nArg, Fts5Tokenizer **ppOut); |
| 10267 | void (SQLITE_CALLBACK *xDelete)(Fts5Tokenizer*); |
| 10268 | int (SQLITE_CALLBACK *xTokenize)(Fts5Tokenizer*, |
| 10269 | void *pCtx, |
| 10270 | int flags, /* Mask of FTS5_TOKENIZE_* flags */ |
| 10271 | const char *pText, int nText, |
| 10272 | int (SQLITE_CALLBACK *xToken)( |
| 10273 | void *pCtx, /* Copy of 2nd argument to xTokenize() */ |
| 10274 | int tflags, /* Mask of FTS5_TOKEN_* flags */ |
| 10275 | const char *pToken, /* Pointer to buffer containing token */ |
| 10276 | int nToken, /* Size of token in bytes */ |
| 10277 | int iStart, /* Byte offset of token within input text */ |
| @@ -10300,33 +10301,33 @@ | |
| 10300 | typedef struct fts5_api fts5_api; |
| 10301 | struct fts5_api { |
| 10302 | int iVersion; /* Currently always set to 2 */ |
| 10303 | |
| 10304 | /* Create a new tokenizer */ |
| 10305 | int (SQLITE_CALLBACK *xCreateTokenizer)( |
| 10306 | fts5_api *pApi, |
| 10307 | const char *zName, |
| 10308 | void *pContext, |
| 10309 | fts5_tokenizer *pTokenizer, |
| 10310 | void (SQLITE_CALLBACK *xDestroy)(void*) |
| 10311 | ); |
| 10312 | |
| 10313 | /* Find an existing tokenizer */ |
| 10314 | int (SQLITE_CALLBACK *xFindTokenizer)( |
| 10315 | fts5_api *pApi, |
| 10316 | const char *zName, |
| 10317 | void **ppContext, |
| 10318 | fts5_tokenizer *pTokenizer |
| 10319 | ); |
| 10320 | |
| 10321 | /* Create a new auxiliary function */ |
| 10322 | int (SQLITE_CALLBACK *xCreateFunction)( |
| 10323 | fts5_api *pApi, |
| 10324 | const char *zName, |
| 10325 | void *pContext, |
| 10326 | fts5_extension_function xFunction, |
| 10327 | void (SQLITE_CALLBACK *xDestroy)(void*) |
| 10328 | ); |
| 10329 | }; |
| 10330 | |
| 10331 | /* |
| 10332 | ** END OF REGISTRATION API |
| 10333 |
| --- src/sqlite3.h | |
| +++ src/sqlite3.h | |
| @@ -120,11 +120,11 @@ | |
| 120 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 121 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 122 | */ |
| 123 | #define SQLITE_VERSION "3.14.0" |
| 124 | #define SQLITE_VERSION_NUMBER 3014000 |
| 125 | #define SQLITE_SOURCE_ID "2016-08-04 13:23:28 9adda385267d1a0ecff259b42a284913668441a2" |
| 126 | |
| 127 | /* |
| 128 | ** CAPI3REF: Run-Time Library Version Numbers |
| 129 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 130 | ** |
| @@ -153,13 +153,13 @@ | |
| 153 | ** [SQLITE_SOURCE_ID] C preprocessor macro. |
| 154 | ** |
| 155 | ** See also: [sqlite_version()] and [sqlite_source_id()]. |
| 156 | */ |
| 157 | SQLITE_API SQLITE_EXTERN const char sqlite3_version[]; |
| 158 | SQLITE_API const char *SQLITE_STDCALL sqlite3_libversion(void); |
| 159 | SQLITE_API const char *SQLITE_STDCALL sqlite3_sourceid(void); |
| 160 | SQLITE_API int SQLITE_STDCALL sqlite3_libversion_number(void); |
| 161 | |
| 162 | /* |
| 163 | ** CAPI3REF: Run-Time Library Compilation Options Diagnostics |
| 164 | ** |
| 165 | ** ^The sqlite3_compileoption_used() function returns 0 or 1 |
| @@ -180,12 +180,12 @@ | |
| 180 | ** |
| 181 | ** See also: SQL functions [sqlite_compileoption_used()] and |
| 182 | ** [sqlite_compileoption_get()] and the [compile_options pragma]. |
| 183 | */ |
| 184 | #ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS |
| 185 | SQLITE_API int SQLITE_STDCALL sqlite3_compileoption_used(const char *zOptName); |
| 186 | SQLITE_API const char *SQLITE_STDCALL sqlite3_compileoption_get(int N); |
| 187 | #endif |
| 188 | |
| 189 | /* |
| 190 | ** CAPI3REF: Test To See If The Library Is Threadsafe |
| 191 | ** |
| @@ -220,11 +220,11 @@ | |
| 220 | ** sqlite3_config(). In other words, the return value from sqlite3_threadsafe() |
| 221 | ** is unchanged by calls to sqlite3_config().)^ |
| 222 | ** |
| 223 | ** See the [threading mode] documentation for additional information. |
| 224 | */ |
| 225 | SQLITE_API int SQLITE_STDCALL sqlite3_threadsafe(void); |
| 226 | |
| 227 | /* |
| 228 | ** CAPI3REF: Database Connection Handle |
| 229 | ** KEYWORDS: {database connection} {database connections} |
| 230 | ** |
| @@ -317,19 +317,19 @@ | |
| 317 | ** from [sqlite3_open()], [sqlite3_open16()], or |
| 318 | ** [sqlite3_open_v2()], and not previously closed. |
| 319 | ** ^Calling sqlite3_close() or sqlite3_close_v2() with a NULL pointer |
| 320 | ** argument is a harmless no-op. |
| 321 | */ |
| 322 | SQLITE_API int SQLITE_STDCALL sqlite3_close(sqlite3*); |
| 323 | SQLITE_API int SQLITE_STDCALL sqlite3_close_v2(sqlite3*); |
| 324 | |
| 325 | /* |
| 326 | ** The type for a callback function. |
| 327 | ** This is legacy and deprecated. It is included for historical |
| 328 | ** compatibility and is not documented. |
| 329 | */ |
| 330 | typedef int (*sqlite3_callback)(void*,int,char**, char**); |
| 331 | |
| 332 | /* |
| 333 | ** CAPI3REF: One-Step Query Execution Interface |
| 334 | ** METHOD: sqlite3 |
| 335 | ** |
| @@ -389,14 +389,14 @@ | |
| 389 | ** the 1st parameter to sqlite3_exec() while sqlite3_exec() is running. |
| 390 | ** <li> The application must not modify the SQL statement text passed into |
| 391 | ** the 2nd parameter of sqlite3_exec() while sqlite3_exec() is running. |
| 392 | ** </ul> |
| 393 | */ |
| 394 | SQLITE_API int SQLITE_STDCALL sqlite3_exec( |
| 395 | sqlite3*, /* An open database */ |
| 396 | const char *sql, /* SQL to be evaluated */ |
| 397 | int (*callback)(void*,int,char**,char**), /* Callback function */ |
| 398 | void *, /* 1st argument to callback */ |
| 399 | char **errmsg /* Error msg written here */ |
| 400 | ); |
| 401 | |
| 402 | /* |
| @@ -740,30 +740,30 @@ | |
| 740 | ** database corruption. |
| 741 | */ |
| 742 | typedef struct sqlite3_io_methods sqlite3_io_methods; |
| 743 | struct sqlite3_io_methods { |
| 744 | int iVersion; |
| 745 | int (*xClose)(sqlite3_file*); |
| 746 | int (*xRead)(sqlite3_file*, void*, int iAmt, sqlite3_int64 iOfst); |
| 747 | int (*xWrite)(sqlite3_file*, const void*, int iAmt, sqlite3_int64 iOfst); |
| 748 | int (*xTruncate)(sqlite3_file*, sqlite3_int64 size); |
| 749 | int (*xSync)(sqlite3_file*, int flags); |
| 750 | int (*xFileSize)(sqlite3_file*, sqlite3_int64 *pSize); |
| 751 | int (*xLock)(sqlite3_file*, int); |
| 752 | int (*xUnlock)(sqlite3_file*, int); |
| 753 | int (*xCheckReservedLock)(sqlite3_file*, int *pResOut); |
| 754 | int (*xFileControl)(sqlite3_file*, int op, void *pArg); |
| 755 | int (*xSectorSize)(sqlite3_file*); |
| 756 | int (*xDeviceCharacteristics)(sqlite3_file*); |
| 757 | /* Methods above are valid for version 1 */ |
| 758 | int (*xShmMap)(sqlite3_file*, int iPg, int pgsz, int, void volatile**); |
| 759 | int (*xShmLock)(sqlite3_file*, int offset, int n, int flags); |
| 760 | void (*xShmBarrier)(sqlite3_file*); |
| 761 | int (*xShmUnmap)(sqlite3_file*, int deleteFlag); |
| 762 | /* Methods above are valid for version 2 */ |
| 763 | int (*xFetch)(sqlite3_file*, sqlite3_int64 iOfst, int iAmt, void **pp); |
| 764 | int (*xUnfetch)(sqlite3_file*, sqlite3_int64 iOfst, void *p); |
| 765 | /* Methods above are valid for version 3 */ |
| 766 | /* Additional methods may be added in future releases */ |
| 767 | }; |
| 768 | |
| 769 | /* |
| @@ -935,11 +935,11 @@ | |
| 935 | ** ^The [SQLITE_FCNTL_BUSYHANDLER] |
| 936 | ** file-control may be invoked by SQLite on the database file handle |
| 937 | ** shortly after it is opened in order to provide a custom VFS with access |
| 938 | ** to the connections busy-handler callback. The argument is of type (void **) |
| 939 | ** - an array of two (void *) values. The first (void *) actually points |
| 940 | ** to a function of type (int (*)(void *)). In order to invoke the connections |
| 941 | ** busy-handler, this function should be invoked with the second (void *) in |
| 942 | ** the array as the only argument. If it returns non-zero, then the operation |
| 943 | ** should be retried. If it returns zero, the custom VFS should abandon the |
| 944 | ** current operation. |
| 945 | ** |
| @@ -1211,43 +1211,43 @@ | |
| 1211 | ** or all of these interfaces to be NULL or for their behavior to change |
| 1212 | ** from one release to the next. Applications must not attempt to access |
| 1213 | ** any of these methods if the iVersion of the VFS is less than 3. |
| 1214 | */ |
| 1215 | typedef struct sqlite3_vfs sqlite3_vfs; |
| 1216 | typedef void (*sqlite3_syscall_ptr)(void); |
| 1217 | struct sqlite3_vfs { |
| 1218 | int iVersion; /* Structure version number (currently 3) */ |
| 1219 | int szOsFile; /* Size of subclassed sqlite3_file */ |
| 1220 | int mxPathname; /* Maximum file pathname length */ |
| 1221 | sqlite3_vfs *pNext; /* Next registered VFS */ |
| 1222 | const char *zName; /* Name of this virtual file system */ |
| 1223 | void *pAppData; /* Pointer to application-specific data */ |
| 1224 | int (*xOpen)(sqlite3_vfs*, const char *zName, sqlite3_file*, |
| 1225 | int flags, int *pOutFlags); |
| 1226 | int (*xDelete)(sqlite3_vfs*, const char *zName, int syncDir); |
| 1227 | int (*xAccess)(sqlite3_vfs*, const char *zName, int flags, int *pResOut); |
| 1228 | int (*xFullPathname)(sqlite3_vfs*, const char *zName, int nOut, char *zOut); |
| 1229 | void *(*xDlOpen)(sqlite3_vfs*, const char *zFilename); |
| 1230 | void (*xDlError)(sqlite3_vfs*, int nByte, char *zErrMsg); |
| 1231 | void (*(*xDlSym)(sqlite3_vfs*,void*, const char *zSymbol))(void); |
| 1232 | void (*xDlClose)(sqlite3_vfs*, void*); |
| 1233 | int (*xRandomness)(sqlite3_vfs*, int nByte, char *zOut); |
| 1234 | int (*xSleep)(sqlite3_vfs*, int microseconds); |
| 1235 | int (*xCurrentTime)(sqlite3_vfs*, double*); |
| 1236 | int (*xGetLastError)(sqlite3_vfs*, int, char *); |
| 1237 | /* |
| 1238 | ** The methods above are in version 1 of the sqlite_vfs object |
| 1239 | ** definition. Those that follow are added in version 2 or later |
| 1240 | */ |
| 1241 | int (*xCurrentTimeInt64)(sqlite3_vfs*, sqlite3_int64*); |
| 1242 | /* |
| 1243 | ** The methods above are in versions 1 and 2 of the sqlite_vfs object. |
| 1244 | ** Those below are for version 3 and greater. |
| 1245 | */ |
| 1246 | int (*xSetSystemCall)(sqlite3_vfs*, const char *zName, sqlite3_syscall_ptr); |
| 1247 | sqlite3_syscall_ptr (*xGetSystemCall)(sqlite3_vfs*, const char *zName); |
| 1248 | const char *(*xNextSystemCall)(sqlite3_vfs*, const char *zName); |
| 1249 | /* |
| 1250 | ** The methods above are in versions 1 through 3 of the sqlite_vfs object. |
| 1251 | ** New fields may be appended in future versions. The iVersion |
| 1252 | ** value will increment whenever this happens. |
| 1253 | */ |
| @@ -1388,14 +1388,14 @@ | |
| 1388 | ** sqlite3_os_init() and sqlite3_os_end(). An application-supplied |
| 1389 | ** implementation of sqlite3_os_init() or sqlite3_os_end() |
| 1390 | ** must return [SQLITE_OK] on success and some other [error code] upon |
| 1391 | ** failure. |
| 1392 | */ |
| 1393 | SQLITE_API int SQLITE_STDCALL sqlite3_initialize(void); |
| 1394 | SQLITE_API int SQLITE_STDCALL sqlite3_shutdown(void); |
| 1395 | SQLITE_API int SQLITE_STDCALL sqlite3_os_init(void); |
| 1396 | SQLITE_API int SQLITE_STDCALL sqlite3_os_end(void); |
| 1397 | |
| 1398 | /* |
| 1399 | ** CAPI3REF: Configuring The SQLite Library |
| 1400 | ** |
| 1401 | ** The sqlite3_config() interface is used to make global configuration |
| @@ -1510,17 +1510,17 @@ | |
| 1510 | ** SQLite will never invoke xInit() more than once without an intervening |
| 1511 | ** call to xShutdown(). |
| 1512 | */ |
| 1513 | typedef struct sqlite3_mem_methods sqlite3_mem_methods; |
| 1514 | struct sqlite3_mem_methods { |
| 1515 | void *(*xMalloc)(int); /* Memory allocation function */ |
| 1516 | void (*xFree)(void*); /* Free a prior allocation */ |
| 1517 | void *(*xRealloc)(void*,int); /* Resize an allocation */ |
| 1518 | int (*xSize)(void*); /* Return the size of an allocation */ |
| 1519 | int (*xRoundup)(int); /* Round up request size to allocation size */ |
| 1520 | int (*xInit)(void*); /* Initialize the memory allocator */ |
| 1521 | void (*xShutdown)(void*); /* Deinitialize the memory allocator */ |
| 1522 | void *pAppData; /* Argument to xInit() and xShutdown() */ |
| 1523 | }; |
| 1524 | |
| 1525 | /* |
| 1526 | ** CAPI3REF: Configuration Options |
| @@ -1733,11 +1733,11 @@ | |
| 1733 | ** |
| 1734 | ** [[SQLITE_CONFIG_LOG]] <dt>SQLITE_CONFIG_LOG</dt> |
| 1735 | ** <dd> The SQLITE_CONFIG_LOG option is used to configure the SQLite |
| 1736 | ** global [error log]. |
| 1737 | ** (^The SQLITE_CONFIG_LOG option takes two arguments: a pointer to a |
| 1738 | ** function with a call signature of void(*)(void*,int,const char*), |
| 1739 | ** and a pointer to void. ^If the function pointer is not NULL, it is |
| 1740 | ** invoked by [sqlite3_log()] to process each logging event. ^If the |
| 1741 | ** function pointer is NULL, the [sqlite3_log()] interface becomes a no-op. |
| 1742 | ** ^The void pointer that is the second argument to SQLITE_CONFIG_LOG is |
| 1743 | ** passed through as the first parameter to the application-defined logger |
| @@ -1786,11 +1786,11 @@ | |
| 1786 | ** |
| 1787 | ** [[SQLITE_CONFIG_SQLLOG]] |
| 1788 | ** <dt>SQLITE_CONFIG_SQLLOG |
| 1789 | ** <dd>This option is only available if sqlite is compiled with the |
| 1790 | ** [SQLITE_ENABLE_SQLLOG] pre-processor macro defined. The first argument should |
| 1791 | ** be a pointer to a function of type void(*)(void*,sqlite3*,const char*, int). |
| 1792 | ** The second should be of type (void*). The callback is invoked by the library |
| 1793 | ** in three separate circumstances, identified by the value passed as the |
| 1794 | ** fourth parameter. If the fourth parameter is 0, then the database connection |
| 1795 | ** passed as the second argument has just been opened. The third argument |
| 1796 | ** points to a buffer containing the name of the main database file. If the |
| @@ -1984,11 +1984,11 @@ | |
| 1984 | ** |
| 1985 | ** ^The sqlite3_extended_result_codes() routine enables or disables the |
| 1986 | ** [extended result codes] feature of SQLite. ^The extended result |
| 1987 | ** codes are disabled by default for historical compatibility. |
| 1988 | */ |
| 1989 | SQLITE_API int SQLITE_STDCALL sqlite3_extended_result_codes(sqlite3*, int onoff); |
| 1990 | |
| 1991 | /* |
| 1992 | ** CAPI3REF: Last Insert Rowid |
| 1993 | ** METHOD: sqlite3 |
| 1994 | ** |
| @@ -2036,11 +2036,11 @@ | |
| 2036 | ** function is running and thus changes the last insert [rowid], |
| 2037 | ** then the value returned by [sqlite3_last_insert_rowid()] is |
| 2038 | ** unpredictable and might not equal either the old or the new |
| 2039 | ** last insert [rowid]. |
| 2040 | */ |
| 2041 | SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_last_insert_rowid(sqlite3*); |
| 2042 | |
| 2043 | /* |
| 2044 | ** CAPI3REF: Count The Number Of Rows Modified |
| 2045 | ** METHOD: sqlite3 |
| 2046 | ** |
| @@ -2089,11 +2089,11 @@ | |
| 2089 | ** |
| 2090 | ** If a separate thread makes changes on the same database connection |
| 2091 | ** while [sqlite3_changes()] is running then the value returned |
| 2092 | ** is unpredictable and not meaningful. |
| 2093 | */ |
| 2094 | SQLITE_API int SQLITE_STDCALL sqlite3_changes(sqlite3*); |
| 2095 | |
| 2096 | /* |
| 2097 | ** CAPI3REF: Total Number Of Rows Modified |
| 2098 | ** METHOD: sqlite3 |
| 2099 | ** |
| @@ -2113,11 +2113,11 @@ | |
| 2113 | ** |
| 2114 | ** If a separate thread makes changes on the same database connection |
| 2115 | ** while [sqlite3_total_changes()] is running then the value |
| 2116 | ** returned is unpredictable and not meaningful. |
| 2117 | */ |
| 2118 | SQLITE_API int SQLITE_STDCALL sqlite3_total_changes(sqlite3*); |
| 2119 | |
| 2120 | /* |
| 2121 | ** CAPI3REF: Interrupt A Long-Running Query |
| 2122 | ** METHOD: sqlite3 |
| 2123 | ** |
| @@ -2153,11 +2153,11 @@ | |
| 2153 | ** that are started after the sqlite3_interrupt() call returns. |
| 2154 | ** |
| 2155 | ** If the database connection closes while [sqlite3_interrupt()] |
| 2156 | ** is running then bad things will likely happen. |
| 2157 | */ |
| 2158 | SQLITE_API void SQLITE_STDCALL sqlite3_interrupt(sqlite3*); |
| 2159 | |
| 2160 | /* |
| 2161 | ** CAPI3REF: Determine If An SQL Statement Is Complete |
| 2162 | ** |
| 2163 | ** These routines are useful during command-line input to determine if the |
| @@ -2188,12 +2188,12 @@ | |
| 2188 | ** UTF-8 string. |
| 2189 | ** |
| 2190 | ** The input to [sqlite3_complete16()] must be a zero-terminated |
| 2191 | ** UTF-16 string in native byte order. |
| 2192 | */ |
| 2193 | SQLITE_API int SQLITE_STDCALL sqlite3_complete(const char *sql); |
| 2194 | SQLITE_API int SQLITE_STDCALL sqlite3_complete16(const void *sql); |
| 2195 | |
| 2196 | /* |
| 2197 | ** CAPI3REF: Register A Callback To Handle SQLITE_BUSY Errors |
| 2198 | ** KEYWORDS: {busy-handler callback} {busy handler} |
| 2199 | ** METHOD: sqlite3 |
| @@ -2250,11 +2250,11 @@ | |
| 2250 | ** result in undefined behavior. |
| 2251 | ** |
| 2252 | ** A busy handler must not close the database connection |
| 2253 | ** or [prepared statement] that invoked the busy handler. |
| 2254 | */ |
| 2255 | SQLITE_API int SQLITE_STDCALL sqlite3_busy_handler(sqlite3*,int(*)(void*,int),void*); |
| 2256 | |
| 2257 | /* |
| 2258 | ** CAPI3REF: Set A Busy Timeout |
| 2259 | ** METHOD: sqlite3 |
| 2260 | ** |
| @@ -2273,11 +2273,11 @@ | |
| 2273 | ** was defined (using [sqlite3_busy_handler()]) prior to calling |
| 2274 | ** this routine, that other busy handler is cleared.)^ |
| 2275 | ** |
| 2276 | ** See also: [PRAGMA busy_timeout] |
| 2277 | */ |
| 2278 | SQLITE_API int SQLITE_STDCALL sqlite3_busy_timeout(sqlite3*, int ms); |
| 2279 | |
| 2280 | /* |
| 2281 | ** CAPI3REF: Convenience Routines For Running Queries |
| 2282 | ** METHOD: sqlite3 |
| 2283 | ** |
| @@ -2348,19 +2348,19 @@ | |
| 2348 | ** interface defined here. As a consequence, errors that occur in the |
| 2349 | ** wrapper layer outside of the internal [sqlite3_exec()] call are not |
| 2350 | ** reflected in subsequent calls to [sqlite3_errcode()] or |
| 2351 | ** [sqlite3_errmsg()]. |
| 2352 | */ |
| 2353 | SQLITE_API int SQLITE_STDCALL sqlite3_get_table( |
| 2354 | sqlite3 *db, /* An open database */ |
| 2355 | const char *zSql, /* SQL to be evaluated */ |
| 2356 | char ***pazResult, /* Results of the query */ |
| 2357 | int *pnRow, /* Number of result rows written here */ |
| 2358 | int *pnColumn, /* Number of result columns written here */ |
| 2359 | char **pzErrmsg /* Error msg written here */ |
| 2360 | ); |
| 2361 | SQLITE_API void SQLITE_STDCALL sqlite3_free_table(char **result); |
| 2362 | |
| 2363 | /* |
| 2364 | ** CAPI3REF: Formatted String Printing Functions |
| 2365 | ** |
| 2366 | ** These routines are work-alikes of the "printf()" family of functions |
| @@ -2463,13 +2463,13 @@ | |
| 2463 | ** ^(The "%z" formatting option works like "%s" but with the |
| 2464 | ** addition that after the string has been read and copied into |
| 2465 | ** the result, [sqlite3_free()] is called on the input string.)^ |
| 2466 | */ |
| 2467 | SQLITE_API char *SQLITE_CDECL sqlite3_mprintf(const char*,...); |
| 2468 | SQLITE_API char *SQLITE_STDCALL sqlite3_vmprintf(const char*, va_list); |
| 2469 | SQLITE_API char *SQLITE_CDECL sqlite3_snprintf(int,char*,const char*, ...); |
| 2470 | SQLITE_API char *SQLITE_STDCALL sqlite3_vsnprintf(int,char*,const char*, va_list); |
| 2471 | |
| 2472 | /* |
| 2473 | ** CAPI3REF: Memory Allocation Subsystem |
| 2474 | ** |
| 2475 | ** The SQLite core uses these three routines for all of its own |
| @@ -2555,16 +2555,16 @@ | |
| 2555 | ** |
| 2556 | ** The application must not read or write any part of |
| 2557 | ** a block of memory after it has been released using |
| 2558 | ** [sqlite3_free()] or [sqlite3_realloc()]. |
| 2559 | */ |
| 2560 | SQLITE_API void *SQLITE_STDCALL sqlite3_malloc(int); |
| 2561 | SQLITE_API void *SQLITE_STDCALL sqlite3_malloc64(sqlite3_uint64); |
| 2562 | SQLITE_API void *SQLITE_STDCALL sqlite3_realloc(void*, int); |
| 2563 | SQLITE_API void *SQLITE_STDCALL sqlite3_realloc64(void*, sqlite3_uint64); |
| 2564 | SQLITE_API void SQLITE_STDCALL sqlite3_free(void*); |
| 2565 | SQLITE_API sqlite3_uint64 SQLITE_STDCALL sqlite3_msize(void*); |
| 2566 | |
| 2567 | /* |
| 2568 | ** CAPI3REF: Memory Allocator Statistics |
| 2569 | ** |
| 2570 | ** SQLite provides these two interfaces for reporting on the status |
| @@ -2585,12 +2585,12 @@ | |
| 2585 | ** [sqlite3_memory_used()] if and only if the parameter to |
| 2586 | ** [sqlite3_memory_highwater()] is true. ^The value returned |
| 2587 | ** by [sqlite3_memory_highwater(1)] is the high-water mark |
| 2588 | ** prior to the reset. |
| 2589 | */ |
| 2590 | SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_memory_used(void); |
| 2591 | SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_memory_highwater(int resetFlag); |
| 2592 | |
| 2593 | /* |
| 2594 | ** CAPI3REF: Pseudo-Random Number Generator |
| 2595 | ** |
| 2596 | ** SQLite contains a high-quality pseudo-random number generator (PRNG) used to |
| @@ -2609,11 +2609,11 @@ | |
| 2609 | ** ^If the previous call to this routine had an N of 1 or more and a |
| 2610 | ** non-NULL P then the pseudo-randomness is generated |
| 2611 | ** internally and without recourse to the [sqlite3_vfs] xRandomness |
| 2612 | ** method. |
| 2613 | */ |
| 2614 | SQLITE_API void SQLITE_STDCALL sqlite3_randomness(int N, void *P); |
| 2615 | |
| 2616 | /* |
| 2617 | ** CAPI3REF: Compile-Time Authorization Callbacks |
| 2618 | ** METHOD: sqlite3 |
| 2619 | ** |
| @@ -2692,13 +2692,13 @@ | |
| 2692 | ** [sqlite3_prepare()] or its variants. Authorization is not |
| 2693 | ** performed during statement evaluation in [sqlite3_step()], unless |
| 2694 | ** as stated in the previous paragraph, sqlite3_step() invokes |
| 2695 | ** sqlite3_prepare_v2() to reprepare a statement after a schema change. |
| 2696 | */ |
| 2697 | SQLITE_API int SQLITE_STDCALL sqlite3_set_authorizer( |
| 2698 | sqlite3*, |
| 2699 | int (*xAuth)(void*,int,const char*,const char*,const char*,const char*), |
| 2700 | void *pUserData |
| 2701 | ); |
| 2702 | |
| 2703 | /* |
| 2704 | ** CAPI3REF: Authorizer Return Codes |
| @@ -2800,14 +2800,14 @@ | |
| 2800 | ** digits in the time are meaningless. Future versions of SQLite |
| 2801 | ** might provide greater resolution on the profiler callback. The |
| 2802 | ** sqlite3_profile() function is considered experimental and is |
| 2803 | ** subject to change in future versions of SQLite. |
| 2804 | */ |
| 2805 | SQLITE_API SQLITE_DEPRECATED void *SQLITE_STDCALL sqlite3_trace(sqlite3*, |
| 2806 | void(*xTrace)(void*,const char*), void*); |
| 2807 | SQLITE_API SQLITE_DEPRECATED void *SQLITE_STDCALL sqlite3_profile(sqlite3*, |
| 2808 | void(*xProfile)(void*,const char*,sqlite3_uint64), void*); |
| 2809 | |
| 2810 | /* |
| 2811 | ** CAPI3REF: SQL Trace Event Codes |
| 2812 | ** KEYWORDS: SQLITE_TRACE |
| 2813 | ** |
| @@ -2891,14 +2891,14 @@ | |
| 2891 | ** |
| 2892 | ** The sqlite3_trace_v2() interface is intended to replace the legacy |
| 2893 | ** interfaces [sqlite3_trace()] and [sqlite3_profile()], both of which |
| 2894 | ** are deprecated. |
| 2895 | */ |
| 2896 | SQLITE_API int SQLITE_STDCALL sqlite3_trace_v2( |
| 2897 | sqlite3*, |
| 2898 | unsigned uMask, |
| 2899 | int(*xCallback)(unsigned,void*,void*,void*), |
| 2900 | void *pCtx |
| 2901 | ); |
| 2902 | |
| 2903 | /* |
| 2904 | ** CAPI3REF: Query Progress Callbacks |
| @@ -2930,11 +2930,11 @@ | |
| 2930 | ** the database connection that invoked the progress handler. |
| 2931 | ** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their |
| 2932 | ** database connections for the meaning of "modify" in this paragraph. |
| 2933 | ** |
| 2934 | */ |
| 2935 | SQLITE_API void SQLITE_STDCALL sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*); |
| 2936 | |
| 2937 | /* |
| 2938 | ** CAPI3REF: Opening A New Database Connection |
| 2939 | ** CONSTRUCTOR: sqlite3 |
| 2940 | ** |
| @@ -3159,19 +3159,19 @@ | |
| 3159 | ** prior to calling sqlite3_open() or sqlite3_open_v2(). Otherwise, various |
| 3160 | ** features that require the use of temporary files may fail. |
| 3161 | ** |
| 3162 | ** See also: [sqlite3_temp_directory] |
| 3163 | */ |
| 3164 | SQLITE_API int SQLITE_STDCALL sqlite3_open( |
| 3165 | const char *filename, /* Database filename (UTF-8) */ |
| 3166 | sqlite3 **ppDb /* OUT: SQLite db handle */ |
| 3167 | ); |
| 3168 | SQLITE_API int SQLITE_STDCALL sqlite3_open16( |
| 3169 | const void *filename, /* Database filename (UTF-16) */ |
| 3170 | sqlite3 **ppDb /* OUT: SQLite db handle */ |
| 3171 | ); |
| 3172 | SQLITE_API int SQLITE_STDCALL sqlite3_open_v2( |
| 3173 | const char *filename, /* Database filename (UTF-8) */ |
| 3174 | sqlite3 **ppDb, /* OUT: SQLite db handle */ |
| 3175 | int flags, /* Flags */ |
| 3176 | const char *zVfs /* Name of VFS module to use */ |
| 3177 | ); |
| @@ -3213,13 +3213,13 @@ | |
| 3213 | ** sqlite3_uri_boolean(F,P,B) returns B. If F is not a NULL pointer and |
| 3214 | ** is not a database file pathname pointer that SQLite passed into the xOpen |
| 3215 | ** VFS method, then the behavior of this routine is undefined and probably |
| 3216 | ** undesirable. |
| 3217 | */ |
| 3218 | SQLITE_API const char *SQLITE_STDCALL sqlite3_uri_parameter(const char *zFilename, const char *zParam); |
| 3219 | SQLITE_API int SQLITE_STDCALL sqlite3_uri_boolean(const char *zFile, const char *zParam, int bDefault); |
| 3220 | SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_uri_int64(const char*, const char*, sqlite3_int64); |
| 3221 | |
| 3222 | |
| 3223 | /* |
| 3224 | ** CAPI3REF: Error Codes And Messages |
| 3225 | ** METHOD: sqlite3 |
| @@ -3259,15 +3259,15 @@ | |
| 3259 | ** |
| 3260 | ** If an interface fails with SQLITE_MISUSE, that means the interface |
| 3261 | ** was invoked incorrectly by the application. In that case, the |
| 3262 | ** error code and message may or may not be set. |
| 3263 | */ |
| 3264 | SQLITE_API int SQLITE_STDCALL sqlite3_errcode(sqlite3 *db); |
| 3265 | SQLITE_API int SQLITE_STDCALL sqlite3_extended_errcode(sqlite3 *db); |
| 3266 | SQLITE_API const char *SQLITE_STDCALL sqlite3_errmsg(sqlite3*); |
| 3267 | SQLITE_API const void *SQLITE_STDCALL sqlite3_errmsg16(sqlite3*); |
| 3268 | SQLITE_API const char *SQLITE_STDCALL sqlite3_errstr(int); |
| 3269 | |
| 3270 | /* |
| 3271 | ** CAPI3REF: Prepared Statement Object |
| 3272 | ** KEYWORDS: {prepared statement} {prepared statements} |
| 3273 | ** |
| @@ -3331,11 +3331,11 @@ | |
| 3331 | ** created by an untrusted script can be contained using the |
| 3332 | ** [max_page_count] [PRAGMA]. |
| 3333 | ** |
| 3334 | ** New run-time limit categories may be added in future releases. |
| 3335 | */ |
| 3336 | SQLITE_API int SQLITE_STDCALL sqlite3_limit(sqlite3*, int id, int newVal); |
| 3337 | |
| 3338 | /* |
| 3339 | ** CAPI3REF: Run-Time Limit Categories |
| 3340 | ** KEYWORDS: {limit category} {*limit categories} |
| 3341 | ** |
| @@ -3483,32 +3483,32 @@ | |
| 3483 | ** or [GLOB] operator or if the parameter is compared to an indexed column |
| 3484 | ** and the [SQLITE_ENABLE_STAT3] compile-time option is enabled. |
| 3485 | ** </li> |
| 3486 | ** </ol> |
| 3487 | */ |
| 3488 | SQLITE_API int SQLITE_STDCALL sqlite3_prepare( |
| 3489 | sqlite3 *db, /* Database handle */ |
| 3490 | const char *zSql, /* SQL statement, UTF-8 encoded */ |
| 3491 | int nByte, /* Maximum length of zSql in bytes. */ |
| 3492 | sqlite3_stmt **ppStmt, /* OUT: Statement handle */ |
| 3493 | const char **pzTail /* OUT: Pointer to unused portion of zSql */ |
| 3494 | ); |
| 3495 | SQLITE_API int SQLITE_STDCALL sqlite3_prepare_v2( |
| 3496 | sqlite3 *db, /* Database handle */ |
| 3497 | const char *zSql, /* SQL statement, UTF-8 encoded */ |
| 3498 | int nByte, /* Maximum length of zSql in bytes. */ |
| 3499 | sqlite3_stmt **ppStmt, /* OUT: Statement handle */ |
| 3500 | const char **pzTail /* OUT: Pointer to unused portion of zSql */ |
| 3501 | ); |
| 3502 | SQLITE_API int SQLITE_STDCALL sqlite3_prepare16( |
| 3503 | sqlite3 *db, /* Database handle */ |
| 3504 | const void *zSql, /* SQL statement, UTF-16 encoded */ |
| 3505 | int nByte, /* Maximum length of zSql in bytes. */ |
| 3506 | sqlite3_stmt **ppStmt, /* OUT: Statement handle */ |
| 3507 | const void **pzTail /* OUT: Pointer to unused portion of zSql */ |
| 3508 | ); |
| 3509 | SQLITE_API int SQLITE_STDCALL sqlite3_prepare16_v2( |
| 3510 | sqlite3 *db, /* Database handle */ |
| 3511 | const void *zSql, /* SQL statement, UTF-16 encoded */ |
| 3512 | int nByte, /* Maximum length of zSql in bytes. */ |
| 3513 | sqlite3_stmt **ppStmt, /* OUT: Statement handle */ |
| 3514 | const void **pzTail /* OUT: Pointer to unused portion of zSql */ |
| @@ -3543,12 +3543,12 @@ | |
| 3543 | ** automatically freed when the prepared statement is finalized. |
| 3544 | ** ^The string returned by sqlite3_expanded_sql(P), on the other hand, |
| 3545 | ** is obtained from [sqlite3_malloc()] and must be free by the application |
| 3546 | ** by passing it to [sqlite3_free()]. |
| 3547 | */ |
| 3548 | SQLITE_API const char *SQLITE_STDCALL sqlite3_sql(sqlite3_stmt *pStmt); |
| 3549 | SQLITE_API char *SQLITE_STDCALL sqlite3_expanded_sql(sqlite3_stmt *pStmt); |
| 3550 | |
| 3551 | /* |
| 3552 | ** CAPI3REF: Determine If An SQL Statement Writes The Database |
| 3553 | ** METHOD: sqlite3_stmt |
| 3554 | ** |
| @@ -3576,11 +3576,11 @@ | |
| 3576 | ** database. ^The [ATTACH] and [DETACH] statements also cause |
| 3577 | ** sqlite3_stmt_readonly() to return true since, while those statements |
| 3578 | ** change the configuration of a database connection, they do not make |
| 3579 | ** changes to the content of the database files on disk. |
| 3580 | */ |
| 3581 | SQLITE_API int SQLITE_STDCALL sqlite3_stmt_readonly(sqlite3_stmt *pStmt); |
| 3582 | |
| 3583 | /* |
| 3584 | ** CAPI3REF: Determine If A Prepared Statement Has Been Reset |
| 3585 | ** METHOD: sqlite3_stmt |
| 3586 | ** |
| @@ -3597,11 +3597,11 @@ | |
| 3597 | ** to locate all prepared statements associated with a database |
| 3598 | ** connection that are in need of being reset. This can be used, |
| 3599 | ** for example, in diagnostic routines to search for prepared |
| 3600 | ** statements that are holding a transaction open. |
| 3601 | */ |
| 3602 | SQLITE_API int SQLITE_STDCALL sqlite3_stmt_busy(sqlite3_stmt*); |
| 3603 | |
| 3604 | /* |
| 3605 | ** CAPI3REF: Dynamically Typed Value Object |
| 3606 | ** KEYWORDS: {protected sqlite3_value} {unprotected sqlite3_value} |
| 3607 | ** |
| @@ -3761,24 +3761,24 @@ | |
| 3761 | ** index is out of range. ^[SQLITE_NOMEM] is returned if malloc() fails. |
| 3762 | ** |
| 3763 | ** See also: [sqlite3_bind_parameter_count()], |
| 3764 | ** [sqlite3_bind_parameter_name()], and [sqlite3_bind_parameter_index()]. |
| 3765 | */ |
| 3766 | SQLITE_API int SQLITE_STDCALL sqlite3_bind_blob(sqlite3_stmt*, int, const void*, int n, void(*)(void*)); |
| 3767 | SQLITE_API int SQLITE_STDCALL sqlite3_bind_blob64(sqlite3_stmt*, int, const void*, sqlite3_uint64, |
| 3768 | void(*)(void*)); |
| 3769 | SQLITE_API int SQLITE_STDCALL sqlite3_bind_double(sqlite3_stmt*, int, double); |
| 3770 | SQLITE_API int SQLITE_STDCALL sqlite3_bind_int(sqlite3_stmt*, int, int); |
| 3771 | SQLITE_API int SQLITE_STDCALL sqlite3_bind_int64(sqlite3_stmt*, int, sqlite3_int64); |
| 3772 | SQLITE_API int SQLITE_STDCALL sqlite3_bind_null(sqlite3_stmt*, int); |
| 3773 | SQLITE_API int SQLITE_STDCALL sqlite3_bind_text(sqlite3_stmt*,int,const char*,int,void(*)(void*)); |
| 3774 | SQLITE_API int SQLITE_STDCALL sqlite3_bind_text16(sqlite3_stmt*, int, const void*, int, void(*)(void*)); |
| 3775 | SQLITE_API int SQLITE_STDCALL sqlite3_bind_text64(sqlite3_stmt*, int, const char*, sqlite3_uint64, |
| 3776 | void(*)(void*), unsigned char encoding); |
| 3777 | SQLITE_API int SQLITE_STDCALL sqlite3_bind_value(sqlite3_stmt*, int, const sqlite3_value*); |
| 3778 | SQLITE_API int SQLITE_STDCALL sqlite3_bind_zeroblob(sqlite3_stmt*, int, int n); |
| 3779 | SQLITE_API int SQLITE_STDCALL sqlite3_bind_zeroblob64(sqlite3_stmt*, int, sqlite3_uint64); |
| 3780 | |
| 3781 | /* |
| 3782 | ** CAPI3REF: Number Of SQL Parameters |
| 3783 | ** METHOD: sqlite3_stmt |
| 3784 | ** |
| @@ -3795,11 +3795,11 @@ | |
| 3795 | ** |
| 3796 | ** See also: [sqlite3_bind_blob|sqlite3_bind()], |
| 3797 | ** [sqlite3_bind_parameter_name()], and |
| 3798 | ** [sqlite3_bind_parameter_index()]. |
| 3799 | */ |
| 3800 | SQLITE_API int SQLITE_STDCALL sqlite3_bind_parameter_count(sqlite3_stmt*); |
| 3801 | |
| 3802 | /* |
| 3803 | ** CAPI3REF: Name Of A Host Parameter |
| 3804 | ** METHOD: sqlite3_stmt |
| 3805 | ** |
| @@ -3823,11 +3823,11 @@ | |
| 3823 | ** |
| 3824 | ** See also: [sqlite3_bind_blob|sqlite3_bind()], |
| 3825 | ** [sqlite3_bind_parameter_count()], and |
| 3826 | ** [sqlite3_bind_parameter_index()]. |
| 3827 | */ |
| 3828 | SQLITE_API const char *SQLITE_STDCALL sqlite3_bind_parameter_name(sqlite3_stmt*, int); |
| 3829 | |
| 3830 | /* |
| 3831 | ** CAPI3REF: Index Of A Parameter With A Given Name |
| 3832 | ** METHOD: sqlite3_stmt |
| 3833 | ** |
| @@ -3840,21 +3840,21 @@ | |
| 3840 | ** |
| 3841 | ** See also: [sqlite3_bind_blob|sqlite3_bind()], |
| 3842 | ** [sqlite3_bind_parameter_count()], and |
| 3843 | ** [sqlite3_bind_parameter_name()]. |
| 3844 | */ |
| 3845 | SQLITE_API int SQLITE_STDCALL sqlite3_bind_parameter_index(sqlite3_stmt*, const char *zName); |
| 3846 | |
| 3847 | /* |
| 3848 | ** CAPI3REF: Reset All Bindings On A Prepared Statement |
| 3849 | ** METHOD: sqlite3_stmt |
| 3850 | ** |
| 3851 | ** ^Contrary to the intuition of many, [sqlite3_reset()] does not reset |
| 3852 | ** the [sqlite3_bind_blob | bindings] on a [prepared statement]. |
| 3853 | ** ^Use this routine to reset all host parameters to NULL. |
| 3854 | */ |
| 3855 | SQLITE_API int SQLITE_STDCALL sqlite3_clear_bindings(sqlite3_stmt*); |
| 3856 | |
| 3857 | /* |
| 3858 | ** CAPI3REF: Number Of Columns In A Result Set |
| 3859 | ** METHOD: sqlite3_stmt |
| 3860 | ** |
| @@ -3862,11 +3862,11 @@ | |
| 3862 | ** [prepared statement]. ^This routine returns 0 if pStmt is an SQL |
| 3863 | ** statement that does not return data (for example an [UPDATE]). |
| 3864 | ** |
| 3865 | ** See also: [sqlite3_data_count()] |
| 3866 | */ |
| 3867 | SQLITE_API int SQLITE_STDCALL sqlite3_column_count(sqlite3_stmt *pStmt); |
| 3868 | |
| 3869 | /* |
| 3870 | ** CAPI3REF: Column Names In A Result Set |
| 3871 | ** METHOD: sqlite3_stmt |
| 3872 | ** |
| @@ -3891,12 +3891,12 @@ | |
| 3891 | ** ^The name of a result column is the value of the "AS" clause for |
| 3892 | ** that column, if there is an AS clause. If there is no AS clause |
| 3893 | ** then the name of the column is unspecified and may change from |
| 3894 | ** one release of SQLite to the next. |
| 3895 | */ |
| 3896 | SQLITE_API const char *SQLITE_STDCALL sqlite3_column_name(sqlite3_stmt*, int N); |
| 3897 | SQLITE_API const void *SQLITE_STDCALL sqlite3_column_name16(sqlite3_stmt*, int N); |
| 3898 | |
| 3899 | /* |
| 3900 | ** CAPI3REF: Source Of Data In A Query Result |
| 3901 | ** METHOD: sqlite3_stmt |
| 3902 | ** |
| @@ -3940,16 +3940,16 @@ | |
| 3940 | ** If two or more threads call one or more |
| 3941 | ** [sqlite3_column_database_name | column metadata interfaces] |
| 3942 | ** for the same [prepared statement] and result column |
| 3943 | ** at the same time then the results are undefined. |
| 3944 | */ |
| 3945 | SQLITE_API const char *SQLITE_STDCALL sqlite3_column_database_name(sqlite3_stmt*,int); |
| 3946 | SQLITE_API const void *SQLITE_STDCALL sqlite3_column_database_name16(sqlite3_stmt*,int); |
| 3947 | SQLITE_API const char *SQLITE_STDCALL sqlite3_column_table_name(sqlite3_stmt*,int); |
| 3948 | SQLITE_API const void *SQLITE_STDCALL sqlite3_column_table_name16(sqlite3_stmt*,int); |
| 3949 | SQLITE_API const char *SQLITE_STDCALL sqlite3_column_origin_name(sqlite3_stmt*,int); |
| 3950 | SQLITE_API const void *SQLITE_STDCALL sqlite3_column_origin_name16(sqlite3_stmt*,int); |
| 3951 | |
| 3952 | /* |
| 3953 | ** CAPI3REF: Declared Datatype Of A Query Result |
| 3954 | ** METHOD: sqlite3_stmt |
| 3955 | ** |
| @@ -3977,12 +3977,12 @@ | |
| 3977 | ** data stored in that column is of the declared type. SQLite is |
| 3978 | ** strongly typed, but the typing is dynamic not static. ^Type |
| 3979 | ** is associated with individual values, not with the containers |
| 3980 | ** used to hold those values. |
| 3981 | */ |
| 3982 | SQLITE_API const char *SQLITE_STDCALL sqlite3_column_decltype(sqlite3_stmt*,int); |
| 3983 | SQLITE_API const void *SQLITE_STDCALL sqlite3_column_decltype16(sqlite3_stmt*,int); |
| 3984 | |
| 3985 | /* |
| 3986 | ** CAPI3REF: Evaluate An SQL Statement |
| 3987 | ** METHOD: sqlite3_stmt |
| 3988 | ** |
| @@ -4058,11 +4058,11 @@ | |
| 4058 | ** using either [sqlite3_prepare_v2()] or [sqlite3_prepare16_v2()] instead |
| 4059 | ** of the legacy [sqlite3_prepare()] and [sqlite3_prepare16()] interfaces, |
| 4060 | ** then the more specific [error codes] are returned directly |
| 4061 | ** by sqlite3_step(). The use of the "v2" interface is recommended. |
| 4062 | */ |
| 4063 | SQLITE_API int SQLITE_STDCALL sqlite3_step(sqlite3_stmt*); |
| 4064 | |
| 4065 | /* |
| 4066 | ** CAPI3REF: Number of columns in a result set |
| 4067 | ** METHOD: sqlite3_stmt |
| 4068 | ** |
| @@ -4079,11 +4079,11 @@ | |
| 4079 | ** where it always returns zero since each step of that multi-step |
| 4080 | ** pragma returns 0 columns of data. |
| 4081 | ** |
| 4082 | ** See also: [sqlite3_column_count()] |
| 4083 | */ |
| 4084 | SQLITE_API int SQLITE_STDCALL sqlite3_data_count(sqlite3_stmt *pStmt); |
| 4085 | |
| 4086 | /* |
| 4087 | ** CAPI3REF: Fundamental Datatypes |
| 4088 | ** KEYWORDS: SQLITE_TEXT |
| 4089 | ** |
| @@ -4269,20 +4269,20 @@ | |
| 4269 | ** of these routines, a default value is returned. The default value |
| 4270 | ** is either the integer 0, the floating point number 0.0, or a NULL |
| 4271 | ** pointer. Subsequent calls to [sqlite3_errcode()] will return |
| 4272 | ** [SQLITE_NOMEM].)^ |
| 4273 | */ |
| 4274 | SQLITE_API const void *SQLITE_STDCALL sqlite3_column_blob(sqlite3_stmt*, int iCol); |
| 4275 | SQLITE_API int SQLITE_STDCALL sqlite3_column_bytes(sqlite3_stmt*, int iCol); |
| 4276 | SQLITE_API int SQLITE_STDCALL sqlite3_column_bytes16(sqlite3_stmt*, int iCol); |
| 4277 | SQLITE_API double SQLITE_STDCALL sqlite3_column_double(sqlite3_stmt*, int iCol); |
| 4278 | SQLITE_API int SQLITE_STDCALL sqlite3_column_int(sqlite3_stmt*, int iCol); |
| 4279 | SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_column_int64(sqlite3_stmt*, int iCol); |
| 4280 | SQLITE_API const unsigned char *SQLITE_STDCALL sqlite3_column_text(sqlite3_stmt*, int iCol); |
| 4281 | SQLITE_API const void *SQLITE_STDCALL sqlite3_column_text16(sqlite3_stmt*, int iCol); |
| 4282 | SQLITE_API int SQLITE_STDCALL sqlite3_column_type(sqlite3_stmt*, int iCol); |
| 4283 | SQLITE_API sqlite3_value *SQLITE_STDCALL sqlite3_column_value(sqlite3_stmt*, int iCol); |
| 4284 | |
| 4285 | /* |
| 4286 | ** CAPI3REF: Destroy A Prepared Statement Object |
| 4287 | ** DESTRUCTOR: sqlite3_stmt |
| 4288 | ** |
| @@ -4306,11 +4306,11 @@ | |
| 4306 | ** resource leaks. It is a grievous error for the application to try to use |
| 4307 | ** a prepared statement after it has been finalized. Any use of a prepared |
| 4308 | ** statement after it has been finalized can result in undefined and |
| 4309 | ** undesirable behavior such as segfaults and heap corruption. |
| 4310 | */ |
| 4311 | SQLITE_API int SQLITE_STDCALL sqlite3_finalize(sqlite3_stmt *pStmt); |
| 4312 | |
| 4313 | /* |
| 4314 | ** CAPI3REF: Reset A Prepared Statement Object |
| 4315 | ** METHOD: sqlite3_stmt |
| 4316 | ** |
| @@ -4333,11 +4333,11 @@ | |
| 4333 | ** [sqlite3_reset(S)] returns an appropriate [error code]. |
| 4334 | ** |
| 4335 | ** ^The [sqlite3_reset(S)] interface does not change the values |
| 4336 | ** of any [sqlite3_bind_blob|bindings] on the [prepared statement] S. |
| 4337 | */ |
| 4338 | SQLITE_API int SQLITE_STDCALL sqlite3_reset(sqlite3_stmt *pStmt); |
| 4339 | |
| 4340 | /* |
| 4341 | ** CAPI3REF: Create Or Redefine SQL Functions |
| 4342 | ** KEYWORDS: {function creation routines} |
| 4343 | ** KEYWORDS: {application-defined SQL function} |
| @@ -4433,40 +4433,40 @@ | |
| 4433 | ** ^An application-defined function is permitted to call other |
| 4434 | ** SQLite interfaces. However, such calls must not |
| 4435 | ** close the database connection nor finalize or reset the prepared |
| 4436 | ** statement in which the function is running. |
| 4437 | */ |
| 4438 | SQLITE_API int SQLITE_STDCALL sqlite3_create_function( |
| 4439 | sqlite3 *db, |
| 4440 | const char *zFunctionName, |
| 4441 | int nArg, |
| 4442 | int eTextRep, |
| 4443 | void *pApp, |
| 4444 | void (*xFunc)(sqlite3_context*,int,sqlite3_value**), |
| 4445 | void (*xStep)(sqlite3_context*,int,sqlite3_value**), |
| 4446 | void (*xFinal)(sqlite3_context*) |
| 4447 | ); |
| 4448 | SQLITE_API int SQLITE_STDCALL sqlite3_create_function16( |
| 4449 | sqlite3 *db, |
| 4450 | const void *zFunctionName, |
| 4451 | int nArg, |
| 4452 | int eTextRep, |
| 4453 | void *pApp, |
| 4454 | void (*xFunc)(sqlite3_context*,int,sqlite3_value**), |
| 4455 | void (*xStep)(sqlite3_context*,int,sqlite3_value**), |
| 4456 | void (*xFinal)(sqlite3_context*) |
| 4457 | ); |
| 4458 | SQLITE_API int SQLITE_STDCALL sqlite3_create_function_v2( |
| 4459 | sqlite3 *db, |
| 4460 | const char *zFunctionName, |
| 4461 | int nArg, |
| 4462 | int eTextRep, |
| 4463 | void *pApp, |
| 4464 | void (*xFunc)(sqlite3_context*,int,sqlite3_value**), |
| 4465 | void (*xStep)(sqlite3_context*,int,sqlite3_value**), |
| 4466 | void (*xFinal)(sqlite3_context*), |
| 4467 | void(*xDestroy)(void*) |
| 4468 | ); |
| 4469 | |
| 4470 | /* |
| 4471 | ** CAPI3REF: Text Encodings |
| 4472 | ** |
| @@ -4499,16 +4499,16 @@ | |
| 4499 | ** to be supported. However, new applications should avoid |
| 4500 | ** the use of these functions. To encourage programmers to avoid |
| 4501 | ** these functions, we will not explain what they do. |
| 4502 | */ |
| 4503 | #ifndef SQLITE_OMIT_DEPRECATED |
| 4504 | SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_aggregate_count(sqlite3_context*); |
| 4505 | SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_expired(sqlite3_stmt*); |
| 4506 | SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_transfer_bindings(sqlite3_stmt*, sqlite3_stmt*); |
| 4507 | SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_global_recover(void); |
| 4508 | SQLITE_API SQLITE_DEPRECATED void SQLITE_STDCALL sqlite3_thread_cleanup(void); |
| 4509 | SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_memory_alarm(void(*)(void*,sqlite3_int64,int), |
| 4510 | void*,sqlite3_int64); |
| 4511 | #endif |
| 4512 | |
| 4513 | /* |
| 4514 | ** CAPI3REF: Obtaining SQL Values |
| @@ -4554,22 +4554,22 @@ | |
| 4554 | ** or [sqlite3_value_text16()]. |
| 4555 | ** |
| 4556 | ** These routines must be called from the same thread as |
| 4557 | ** the SQL function that supplied the [sqlite3_value*] parameters. |
| 4558 | */ |
| 4559 | SQLITE_API const void *SQLITE_STDCALL sqlite3_value_blob(sqlite3_value*); |
| 4560 | SQLITE_API int SQLITE_STDCALL sqlite3_value_bytes(sqlite3_value*); |
| 4561 | SQLITE_API int SQLITE_STDCALL sqlite3_value_bytes16(sqlite3_value*); |
| 4562 | SQLITE_API double SQLITE_STDCALL sqlite3_value_double(sqlite3_value*); |
| 4563 | SQLITE_API int SQLITE_STDCALL sqlite3_value_int(sqlite3_value*); |
| 4564 | SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_value_int64(sqlite3_value*); |
| 4565 | SQLITE_API const unsigned char *SQLITE_STDCALL sqlite3_value_text(sqlite3_value*); |
| 4566 | SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16(sqlite3_value*); |
| 4567 | SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16le(sqlite3_value*); |
| 4568 | SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16be(sqlite3_value*); |
| 4569 | SQLITE_API int SQLITE_STDCALL sqlite3_value_type(sqlite3_value*); |
| 4570 | SQLITE_API int SQLITE_STDCALL sqlite3_value_numeric_type(sqlite3_value*); |
| 4571 | |
| 4572 | /* |
| 4573 | ** CAPI3REF: Finding The Subtype Of SQL Values |
| 4574 | ** METHOD: sqlite3_value |
| 4575 | ** |
| @@ -4581,11 +4581,11 @@ | |
| 4581 | ** |
| 4582 | ** SQLite makes no use of subtype itself. It merely passes the subtype |
| 4583 | ** from the result of one [application-defined SQL function] into the |
| 4584 | ** input of another. |
| 4585 | */ |
| 4586 | SQLITE_API unsigned int SQLITE_STDCALL sqlite3_value_subtype(sqlite3_value*); |
| 4587 | |
| 4588 | /* |
| 4589 | ** CAPI3REF: Copy And Free SQL Values |
| 4590 | ** METHOD: sqlite3_value |
| 4591 | ** |
| @@ -4597,12 +4597,12 @@ | |
| 4597 | ** |
| 4598 | ** ^The sqlite3_value_free(V) interface frees an [sqlite3_value] object |
| 4599 | ** previously obtained from [sqlite3_value_dup()]. ^If V is a NULL pointer |
| 4600 | ** then sqlite3_value_free(V) is a harmless no-op. |
| 4601 | */ |
| 4602 | SQLITE_API sqlite3_value *SQLITE_STDCALL sqlite3_value_dup(const sqlite3_value*); |
| 4603 | SQLITE_API void SQLITE_STDCALL sqlite3_value_free(sqlite3_value*); |
| 4604 | |
| 4605 | /* |
| 4606 | ** CAPI3REF: Obtain Aggregate Function Context |
| 4607 | ** METHOD: sqlite3_context |
| 4608 | ** |
| @@ -4643,11 +4643,11 @@ | |
| 4643 | ** function. |
| 4644 | ** |
| 4645 | ** This routine must be called from the same thread in which |
| 4646 | ** the aggregate SQL function is running. |
| 4647 | */ |
| 4648 | SQLITE_API void *SQLITE_STDCALL sqlite3_aggregate_context(sqlite3_context*, int nBytes); |
| 4649 | |
| 4650 | /* |
| 4651 | ** CAPI3REF: User Data For Functions |
| 4652 | ** METHOD: sqlite3_context |
| 4653 | ** |
| @@ -4658,11 +4658,11 @@ | |
| 4658 | ** registered the application defined function. |
| 4659 | ** |
| 4660 | ** This routine must be called from the same thread in which |
| 4661 | ** the application-defined function is running. |
| 4662 | */ |
| 4663 | SQLITE_API void *SQLITE_STDCALL sqlite3_user_data(sqlite3_context*); |
| 4664 | |
| 4665 | /* |
| 4666 | ** CAPI3REF: Database Connection For Functions |
| 4667 | ** METHOD: sqlite3_context |
| 4668 | ** |
| @@ -4670,11 +4670,11 @@ | |
| 4670 | ** the pointer to the [database connection] (the 1st parameter) |
| 4671 | ** of the [sqlite3_create_function()] |
| 4672 | ** and [sqlite3_create_function16()] routines that originally |
| 4673 | ** registered the application defined function. |
| 4674 | */ |
| 4675 | SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3_context_db_handle(sqlite3_context*); |
| 4676 | |
| 4677 | /* |
| 4678 | ** CAPI3REF: Function Auxiliary Data |
| 4679 | ** METHOD: sqlite3_context |
| 4680 | ** |
| @@ -4702,16 +4702,17 @@ | |
| 4702 | ** NULL if the metadata has been discarded. |
| 4703 | ** ^After each call to sqlite3_set_auxdata(C,N,P,X) where X is not NULL, |
| 4704 | ** SQLite will invoke the destructor function X with parameter P exactly |
| 4705 | ** once, when the metadata is discarded. |
| 4706 | ** SQLite is free to discard the metadata at any time, including: <ul> |
| 4707 | ** <li> ^(when the corresponding function parameter changes)^, or |
| 4708 | ** <li> ^(when [sqlite3_reset()] or [sqlite3_finalize()] is called for the |
| 4709 | ** SQL statement)^, or |
| 4710 | ** <li> ^(when sqlite3_set_auxdata() is invoked again on the same |
| 4711 | ** parameter)^, or |
| 4712 | ** <li> ^(during the original sqlite3_set_auxdata() call when a memory |
| 4713 | ** allocation error occurs.)^ </ul> |
| 4714 | ** |
| 4715 | ** Note the last bullet in particular. The destructor X in |
| 4716 | ** sqlite3_set_auxdata(C,N,P,X) might be called immediately, before the |
| 4717 | ** sqlite3_set_auxdata() interface even returns. Hence sqlite3_set_auxdata() |
| 4718 | ** should be called near the end of the function implementation and the |
| @@ -4723,12 +4724,12 @@ | |
| 4724 | ** values and [parameters] and expressions composed from the same.)^ |
| 4725 | ** |
| 4726 | ** These routines must be called from the same thread in which |
| 4727 | ** the SQL function is running. |
| 4728 | */ |
| 4729 | SQLITE_API void *SQLITE_STDCALL sqlite3_get_auxdata(sqlite3_context*, int N); |
| 4730 | SQLITE_API void SQLITE_STDCALL sqlite3_set_auxdata(sqlite3_context*, int N, void*, void (*)(void*)); |
| 4731 | |
| 4732 | |
| 4733 | /* |
| 4734 | ** CAPI3REF: Constants Defining Special Destructor Behavior |
| 4735 | ** |
| @@ -4741,11 +4742,11 @@ | |
| 4742 | ** the content before returning. |
| 4743 | ** |
| 4744 | ** The typedef is necessary to work around problems in certain |
| 4745 | ** C++ compilers. |
| 4746 | */ |
| 4747 | typedef void (*sqlite3_destructor_type)(void*); |
| 4748 | #define SQLITE_STATIC ((sqlite3_destructor_type)0) |
| 4749 | #define SQLITE_TRANSIENT ((sqlite3_destructor_type)-1) |
| 4750 | |
| 4751 | /* |
| 4752 | ** CAPI3REF: Setting The Result Of An SQL Function |
| @@ -4860,31 +4861,31 @@ | |
| 4861 | ** |
| 4862 | ** If these routines are called from within the different thread |
| 4863 | ** than the one containing the application-defined function that received |
| 4864 | ** the [sqlite3_context] pointer, the results are undefined. |
| 4865 | */ |
| 4866 | SQLITE_API void SQLITE_STDCALL sqlite3_result_blob(sqlite3_context*, const void*, int, void(*)(void*)); |
| 4867 | SQLITE_API void SQLITE_STDCALL sqlite3_result_blob64(sqlite3_context*,const void*, |
| 4868 | sqlite3_uint64,void(*)(void*)); |
| 4869 | SQLITE_API void SQLITE_STDCALL sqlite3_result_double(sqlite3_context*, double); |
| 4870 | SQLITE_API void SQLITE_STDCALL sqlite3_result_error(sqlite3_context*, const char*, int); |
| 4871 | SQLITE_API void SQLITE_STDCALL sqlite3_result_error16(sqlite3_context*, const void*, int); |
| 4872 | SQLITE_API void SQLITE_STDCALL sqlite3_result_error_toobig(sqlite3_context*); |
| 4873 | SQLITE_API void SQLITE_STDCALL sqlite3_result_error_nomem(sqlite3_context*); |
| 4874 | SQLITE_API void SQLITE_STDCALL sqlite3_result_error_code(sqlite3_context*, int); |
| 4875 | SQLITE_API void SQLITE_STDCALL sqlite3_result_int(sqlite3_context*, int); |
| 4876 | SQLITE_API void SQLITE_STDCALL sqlite3_result_int64(sqlite3_context*, sqlite3_int64); |
| 4877 | SQLITE_API void SQLITE_STDCALL sqlite3_result_null(sqlite3_context*); |
| 4878 | SQLITE_API void SQLITE_STDCALL sqlite3_result_text(sqlite3_context*, const char*, int, void(*)(void*)); |
| 4879 | SQLITE_API void SQLITE_STDCALL sqlite3_result_text64(sqlite3_context*, const char*,sqlite3_uint64, |
| 4880 | void(*)(void*), unsigned char encoding); |
| 4881 | SQLITE_API void SQLITE_STDCALL sqlite3_result_text16(sqlite3_context*, const void*, int, void(*)(void*)); |
| 4882 | SQLITE_API void SQLITE_STDCALL sqlite3_result_text16le(sqlite3_context*, const void*, int,void(*)(void*)); |
| 4883 | SQLITE_API void SQLITE_STDCALL sqlite3_result_text16be(sqlite3_context*, const void*, int,void(*)(void*)); |
| 4884 | SQLITE_API void SQLITE_STDCALL sqlite3_result_value(sqlite3_context*, sqlite3_value*); |
| 4885 | SQLITE_API void SQLITE_STDCALL sqlite3_result_zeroblob(sqlite3_context*, int n); |
| 4886 | SQLITE_API int SQLITE_STDCALL sqlite3_result_zeroblob64(sqlite3_context*, sqlite3_uint64 n); |
| 4887 | |
| 4888 | |
| 4889 | /* |
| 4890 | ** CAPI3REF: Setting The Subtype Of An SQL Function |
| 4891 | ** METHOD: sqlite3_context |
| @@ -4895,11 +4896,11 @@ | |
| 4896 | ** of the subtype T are preserved in current versions of SQLite; |
| 4897 | ** higher order bits are discarded. |
| 4898 | ** The number of subtype bytes preserved by SQLite might increase |
| 4899 | ** in future releases of SQLite. |
| 4900 | */ |
| 4901 | SQLITE_API void SQLITE_STDCALL sqlite3_result_subtype(sqlite3_context*,unsigned int); |
| 4902 | |
| 4903 | /* |
| 4904 | ** CAPI3REF: Define New Collating Sequences |
| 4905 | ** METHOD: sqlite3 |
| 4906 | ** |
| @@ -4977,31 +4978,31 @@ | |
| 4978 | ** is unfortunate but cannot be changed without breaking backwards |
| 4979 | ** compatibility. |
| 4980 | ** |
| 4981 | ** See also: [sqlite3_collation_needed()] and [sqlite3_collation_needed16()]. |
| 4982 | */ |
| 4983 | SQLITE_API int SQLITE_STDCALL sqlite3_create_collation( |
| 4984 | sqlite3*, |
| 4985 | const char *zName, |
| 4986 | int eTextRep, |
| 4987 | void *pArg, |
| 4988 | int(*xCompare)(void*,int,const void*,int,const void*) |
| 4989 | ); |
| 4990 | SQLITE_API int SQLITE_STDCALL sqlite3_create_collation_v2( |
| 4991 | sqlite3*, |
| 4992 | const char *zName, |
| 4993 | int eTextRep, |
| 4994 | void *pArg, |
| 4995 | int(*xCompare)(void*,int,const void*,int,const void*), |
| 4996 | void(*xDestroy)(void*) |
| 4997 | ); |
| 4998 | SQLITE_API int SQLITE_STDCALL sqlite3_create_collation16( |
| 4999 | sqlite3*, |
| 5000 | const void *zName, |
| 5001 | int eTextRep, |
| 5002 | void *pArg, |
| 5003 | int(*xCompare)(void*,int,const void*,int,const void*) |
| 5004 | ); |
| 5005 | |
| 5006 | /* |
| 5007 | ** CAPI3REF: Collation Needed Callbacks |
| 5008 | ** METHOD: sqlite3 |
| @@ -5027,19 +5028,19 @@ | |
| 5028 | ** |
| 5029 | ** The callback function should register the desired collation using |
| 5030 | ** [sqlite3_create_collation()], [sqlite3_create_collation16()], or |
| 5031 | ** [sqlite3_create_collation_v2()]. |
| 5032 | */ |
| 5033 | SQLITE_API int SQLITE_STDCALL sqlite3_collation_needed( |
| 5034 | sqlite3*, |
| 5035 | void*, |
| 5036 | void(*)(void*,sqlite3*,int eTextRep,const char*) |
| 5037 | ); |
| 5038 | SQLITE_API int SQLITE_STDCALL sqlite3_collation_needed16( |
| 5039 | sqlite3*, |
| 5040 | void*, |
| 5041 | void(*)(void*,sqlite3*,int eTextRep,const void*) |
| 5042 | ); |
| 5043 | |
| 5044 | #ifdef SQLITE_HAS_CODEC |
| 5045 | /* |
| 5046 | ** Specify the key for an encrypted database. This routine should be |
| @@ -5046,15 +5047,15 @@ | |
| 5047 | ** called right after sqlite3_open(). |
| 5048 | ** |
| 5049 | ** The code to implement this API is not available in the public release |
| 5050 | ** of SQLite. |
| 5051 | */ |
| 5052 | SQLITE_API int SQLITE_STDCALL sqlite3_key( |
| 5053 | sqlite3 *db, /* Database to be rekeyed */ |
| 5054 | const void *pKey, int nKey /* The key */ |
| 5055 | ); |
| 5056 | SQLITE_API int SQLITE_STDCALL sqlite3_key_v2( |
| 5057 | sqlite3 *db, /* Database to be rekeyed */ |
| 5058 | const char *zDbName, /* Name of the database */ |
| 5059 | const void *pKey, int nKey /* The key */ |
| 5060 | ); |
| 5061 | |
| @@ -5064,35 +5065,35 @@ | |
| 5065 | ** database is decrypted. |
| 5066 | ** |
| 5067 | ** The code to implement this API is not available in the public release |
| 5068 | ** of SQLite. |
| 5069 | */ |
| 5070 | SQLITE_API int SQLITE_STDCALL sqlite3_rekey( |
| 5071 | sqlite3 *db, /* Database to be rekeyed */ |
| 5072 | const void *pKey, int nKey /* The new key */ |
| 5073 | ); |
| 5074 | SQLITE_API int SQLITE_STDCALL sqlite3_rekey_v2( |
| 5075 | sqlite3 *db, /* Database to be rekeyed */ |
| 5076 | const char *zDbName, /* Name of the database */ |
| 5077 | const void *pKey, int nKey /* The new key */ |
| 5078 | ); |
| 5079 | |
| 5080 | /* |
| 5081 | ** Specify the activation key for a SEE database. Unless |
| 5082 | ** activated, none of the SEE routines will work. |
| 5083 | */ |
| 5084 | SQLITE_API void SQLITE_STDCALL sqlite3_activate_see( |
| 5085 | const char *zPassPhrase /* Activation phrase */ |
| 5086 | ); |
| 5087 | #endif |
| 5088 | |
| 5089 | #ifdef SQLITE_ENABLE_CEROD |
| 5090 | /* |
| 5091 | ** Specify the activation key for a CEROD database. Unless |
| 5092 | ** activated, none of the CEROD routines will work. |
| 5093 | */ |
| 5094 | SQLITE_API void SQLITE_STDCALL sqlite3_activate_cerod( |
| 5095 | const char *zPassPhrase /* Activation phrase */ |
| 5096 | ); |
| 5097 | #endif |
| 5098 | |
| 5099 | /* |
| @@ -5110,11 +5111,11 @@ | |
| 5111 | ** method of the default [sqlite3_vfs] object. If the xSleep() method |
| 5112 | ** of the default VFS is not implemented correctly, or not implemented at |
| 5113 | ** all, then the behavior of sqlite3_sleep() may deviate from the description |
| 5114 | ** in the previous paragraphs. |
| 5115 | */ |
| 5116 | SQLITE_API int SQLITE_STDCALL sqlite3_sleep(int); |
| 5117 | |
| 5118 | /* |
| 5119 | ** CAPI3REF: Name Of The Folder Holding Temporary Files |
| 5120 | ** |
| 5121 | ** ^(If this global variable is made to point to a string which is |
| @@ -5229,11 +5230,11 @@ | |
| 5230 | ** |
| 5231 | ** If another thread changes the autocommit status of the database |
| 5232 | ** connection while this routine is running, then the return value |
| 5233 | ** is undefined. |
| 5234 | */ |
| 5235 | SQLITE_API int SQLITE_STDCALL sqlite3_get_autocommit(sqlite3*); |
| 5236 | |
| 5237 | /* |
| 5238 | ** CAPI3REF: Find The Database Handle Of A Prepared Statement |
| 5239 | ** METHOD: sqlite3_stmt |
| 5240 | ** |
| @@ -5242,11 +5243,11 @@ | |
| 5243 | ** returned by sqlite3_db_handle is the same [database connection] |
| 5244 | ** that was the first argument |
| 5245 | ** to the [sqlite3_prepare_v2()] call (or its variants) that was used to |
| 5246 | ** create the statement in the first place. |
| 5247 | */ |
| 5248 | SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3_db_handle(sqlite3_stmt*); |
| 5249 | |
| 5250 | /* |
| 5251 | ** CAPI3REF: Return The Filename For A Database Connection |
| 5252 | ** METHOD: sqlite3 |
| 5253 | ** |
| @@ -5259,21 +5260,21 @@ | |
| 5260 | ** ^The filename returned by this function is the output of the |
| 5261 | ** xFullPathname method of the [VFS]. ^In other words, the filename |
| 5262 | ** will be an absolute pathname, even if the filename used |
| 5263 | ** to open the database originally was a URI or relative pathname. |
| 5264 | */ |
| 5265 | SQLITE_API const char *SQLITE_STDCALL sqlite3_db_filename(sqlite3 *db, const char *zDbName); |
| 5266 | |
| 5267 | /* |
| 5268 | ** CAPI3REF: Determine if a database is read-only |
| 5269 | ** METHOD: sqlite3 |
| 5270 | ** |
| 5271 | ** ^The sqlite3_db_readonly(D,N) interface returns 1 if the database N |
| 5272 | ** of connection D is read-only, 0 if it is read/write, or -1 if N is not |
| 5273 | ** the name of a database on connection D. |
| 5274 | */ |
| 5275 | SQLITE_API int SQLITE_STDCALL sqlite3_db_readonly(sqlite3 *db, const char *zDbName); |
| 5276 | |
| 5277 | /* |
| 5278 | ** CAPI3REF: Find the next prepared statement |
| 5279 | ** METHOD: sqlite3 |
| 5280 | ** |
| @@ -5285,11 +5286,11 @@ | |
| 5286 | ** |
| 5287 | ** The [database connection] pointer D in a call to |
| 5288 | ** [sqlite3_next_stmt(D,S)] must refer to an open database |
| 5289 | ** connection and in particular must not be a NULL pointer. |
| 5290 | */ |
| 5291 | SQLITE_API sqlite3_stmt *SQLITE_STDCALL sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt); |
| 5292 | |
| 5293 | /* |
| 5294 | ** CAPI3REF: Commit And Rollback Notification Callbacks |
| 5295 | ** METHOD: sqlite3 |
| 5296 | ** |
| @@ -5334,12 +5335,12 @@ | |
| 5335 | ** ^The rollback callback is not invoked if a transaction is |
| 5336 | ** automatically rolled back because the database connection is closed. |
| 5337 | ** |
| 5338 | ** See also the [sqlite3_update_hook()] interface. |
| 5339 | */ |
| 5340 | SQLITE_API void *SQLITE_STDCALL sqlite3_commit_hook(sqlite3*, int(*)(void*), void*); |
| 5341 | SQLITE_API void *SQLITE_STDCALL sqlite3_rollback_hook(sqlite3*, void(*)(void *), void*); |
| 5342 | |
| 5343 | /* |
| 5344 | ** CAPI3REF: Data Change Notification Callbacks |
| 5345 | ** METHOD: sqlite3 |
| 5346 | ** |
| @@ -5386,13 +5387,13 @@ | |
| 5387 | ** the first call on D. |
| 5388 | ** |
| 5389 | ** See also the [sqlite3_commit_hook()], [sqlite3_rollback_hook()], |
| 5390 | ** and [sqlite3_preupdate_hook()] interfaces. |
| 5391 | */ |
| 5392 | SQLITE_API void *SQLITE_STDCALL sqlite3_update_hook( |
| 5393 | sqlite3*, |
| 5394 | void(*)(void *,int ,char const *,char const *,sqlite3_int64), |
| 5395 | void* |
| 5396 | ); |
| 5397 | |
| 5398 | /* |
| 5399 | ** CAPI3REF: Enable Or Disable Shared Pager Cache |
| @@ -5426,11 +5427,11 @@ | |
| 5427 | ** This interface is threadsafe on processors where writing a |
| 5428 | ** 32-bit integer is atomic. |
| 5429 | ** |
| 5430 | ** See Also: [SQLite Shared-Cache Mode] |
| 5431 | */ |
| 5432 | SQLITE_API int SQLITE_STDCALL sqlite3_enable_shared_cache(int); |
| 5433 | |
| 5434 | /* |
| 5435 | ** CAPI3REF: Attempt To Free Heap Memory |
| 5436 | ** |
| 5437 | ** ^The sqlite3_release_memory() interface attempts to free N bytes |
| @@ -5442,11 +5443,11 @@ | |
| 5443 | ** ^The sqlite3_release_memory() routine is a no-op returning zero |
| 5444 | ** if SQLite is not compiled with [SQLITE_ENABLE_MEMORY_MANAGEMENT]. |
| 5445 | ** |
| 5446 | ** See also: [sqlite3_db_release_memory()] |
| 5447 | */ |
| 5448 | SQLITE_API int SQLITE_STDCALL sqlite3_release_memory(int); |
| 5449 | |
| 5450 | /* |
| 5451 | ** CAPI3REF: Free Memory Used By A Database Connection |
| 5452 | ** METHOD: sqlite3 |
| 5453 | ** |
| @@ -5456,11 +5457,11 @@ | |
| 5457 | ** when the [SQLITE_ENABLE_MEMORY_MANAGEMENT] compile-time option is |
| 5458 | ** omitted. |
| 5459 | ** |
| 5460 | ** See also: [sqlite3_release_memory()] |
| 5461 | */ |
| 5462 | SQLITE_API int SQLITE_STDCALL sqlite3_db_release_memory(sqlite3*); |
| 5463 | |
| 5464 | /* |
| 5465 | ** CAPI3REF: Impose A Limit On Heap Size |
| 5466 | ** |
| 5467 | ** ^The sqlite3_soft_heap_limit64() interface sets and/or queries the |
| @@ -5508,11 +5509,11 @@ | |
| 5509 | ** the use of [SQLITE_ENABLE_MEMORY_MANAGEMENT]. |
| 5510 | ** |
| 5511 | ** The circumstances under which SQLite will enforce the soft heap limit may |
| 5512 | ** changes in future releases of SQLite. |
| 5513 | */ |
| 5514 | SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_soft_heap_limit64(sqlite3_int64 N); |
| 5515 | |
| 5516 | /* |
| 5517 | ** CAPI3REF: Deprecated Soft Heap Limit Interface |
| 5518 | ** DEPRECATED |
| 5519 | ** |
| @@ -5519,11 +5520,11 @@ | |
| 5520 | ** This is a deprecated version of the [sqlite3_soft_heap_limit64()] |
| 5521 | ** interface. This routine is provided for historical compatibility |
| 5522 | ** only. All new applications should use the |
| 5523 | ** [sqlite3_soft_heap_limit64()] interface rather than this one. |
| 5524 | */ |
| 5525 | SQLITE_API SQLITE_DEPRECATED void SQLITE_STDCALL sqlite3_soft_heap_limit(int N); |
| 5526 | |
| 5527 | |
| 5528 | /* |
| 5529 | ** CAPI3REF: Extract Metadata About A Column Of A Table |
| 5530 | ** METHOD: sqlite3 |
| @@ -5589,11 +5590,11 @@ | |
| 5590 | ** |
| 5591 | ** ^This function causes all database schemas to be read from disk and |
| 5592 | ** parsed, if that has not already been done, and returns an error if |
| 5593 | ** any errors are encountered while loading the schema. |
| 5594 | */ |
| 5595 | SQLITE_API int SQLITE_STDCALL sqlite3_table_column_metadata( |
| 5596 | sqlite3 *db, /* Connection handle */ |
| 5597 | const char *zDbName, /* Database name or NULL */ |
| 5598 | const char *zTableName, /* Table name */ |
| 5599 | const char *zColumnName, /* Column name */ |
| 5600 | char const **pzDataType, /* OUTPUT: Declared data type */ |
| @@ -5645,11 +5646,11 @@ | |
| 5646 | ** disabled and prevent SQL injections from giving attackers |
| 5647 | ** access to extension loading capabilities. |
| 5648 | ** |
| 5649 | ** See also the [load_extension() SQL function]. |
| 5650 | */ |
| 5651 | SQLITE_API int SQLITE_STDCALL sqlite3_load_extension( |
| 5652 | sqlite3 *db, /* Load the extension into this database connection */ |
| 5653 | const char *zFile, /* Name of the shared library containing extension */ |
| 5654 | const char *zProc, /* Entry point. Derived from zFile if 0 */ |
| 5655 | char **pzErrMsg /* Put error message here if not 0 */ |
| 5656 | ); |
| @@ -5668,20 +5669,20 @@ | |
| 5669 | ** to turn extension loading on and call it with onoff==0 to turn |
| 5670 | ** it back off again. |
| 5671 | ** |
| 5672 | ** ^This interface enables or disables both the C-API |
| 5673 | ** [sqlite3_load_extension()] and the SQL function [load_extension()]. |
| 5674 | ** ^(Use [sqlite3_db_config](db,[SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION],..) |
| 5675 | ** to enable or disable only the C-API.)^ |
| 5676 | ** |
| 5677 | ** <b>Security warning:</b> It is recommended that extension loading |
| 5678 | ** be disabled using the [SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION] method |
| 5679 | ** rather than this interface, so the [load_extension()] SQL function |
| 5680 | ** remains disabled. This will prevent SQL injections from giving attackers |
| 5681 | ** access to extension loading capabilities. |
| 5682 | */ |
| 5683 | SQLITE_API int SQLITE_STDCALL sqlite3_enable_load_extension(sqlite3 *db, int onoff); |
| 5684 | |
| 5685 | /* |
| 5686 | ** CAPI3REF: Automatically Load Statically Linked Extensions |
| 5687 | ** |
| 5688 | ** ^This interface causes the xEntryPoint() function to be invoked for |
| @@ -5715,11 +5716,11 @@ | |
| 5716 | ** will be called more than once for each database connection that is opened. |
| 5717 | ** |
| 5718 | ** See also: [sqlite3_reset_auto_extension()] |
| 5719 | ** and [sqlite3_cancel_auto_extension()] |
| 5720 | */ |
| 5721 | SQLITE_API int SQLITE_STDCALL sqlite3_auto_extension(void(*xEntryPoint)(void)); |
| 5722 | |
| 5723 | /* |
| 5724 | ** CAPI3REF: Cancel Automatic Extension Loading |
| 5725 | ** |
| 5726 | ** ^The [sqlite3_cancel_auto_extension(X)] interface unregisters the |
| @@ -5727,19 +5728,19 @@ | |
| 5728 | ** [sqlite3_auto_extension(X)]. ^The [sqlite3_cancel_auto_extension(X)] |
| 5729 | ** routine returns 1 if initialization routine X was successfully |
| 5730 | ** unregistered and it returns 0 if X was not on the list of initialization |
| 5731 | ** routines. |
| 5732 | */ |
| 5733 | SQLITE_API int SQLITE_STDCALL sqlite3_cancel_auto_extension(void(*xEntryPoint)(void)); |
| 5734 | |
| 5735 | /* |
| 5736 | ** CAPI3REF: Reset Automatic Extension Loading |
| 5737 | ** |
| 5738 | ** ^This interface disables all automatic extensions previously |
| 5739 | ** registered using [sqlite3_auto_extension()]. |
| 5740 | */ |
| 5741 | SQLITE_API void SQLITE_STDCALL sqlite3_reset_auto_extension(void); |
| 5742 | |
| 5743 | /* |
| 5744 | ** The interface to the virtual-table mechanism is currently considered |
| 5745 | ** to be experimental. The interface might change in incompatible ways. |
| 5746 | ** If this is a problem for you, do not use the interface at this time. |
| @@ -5772,41 +5773,41 @@ | |
| 5773 | ** of this structure must not change while it is registered with |
| 5774 | ** any database connection. |
| 5775 | */ |
| 5776 | struct sqlite3_module { |
| 5777 | int iVersion; |
| 5778 | int (*xCreate)(sqlite3*, void *pAux, |
| 5779 | int argc, const char *const*argv, |
| 5780 | sqlite3_vtab **ppVTab, char**); |
| 5781 | int (*xConnect)(sqlite3*, void *pAux, |
| 5782 | int argc, const char *const*argv, |
| 5783 | sqlite3_vtab **ppVTab, char**); |
| 5784 | int (*xBestIndex)(sqlite3_vtab *pVTab, sqlite3_index_info*); |
| 5785 | int (*xDisconnect)(sqlite3_vtab *pVTab); |
| 5786 | int (*xDestroy)(sqlite3_vtab *pVTab); |
| 5787 | int (*xOpen)(sqlite3_vtab *pVTab, sqlite3_vtab_cursor **ppCursor); |
| 5788 | int (*xClose)(sqlite3_vtab_cursor*); |
| 5789 | int (*xFilter)(sqlite3_vtab_cursor*, int idxNum, const char *idxStr, |
| 5790 | int argc, sqlite3_value **argv); |
| 5791 | int (*xNext)(sqlite3_vtab_cursor*); |
| 5792 | int (*xEof)(sqlite3_vtab_cursor*); |
| 5793 | int (*xColumn)(sqlite3_vtab_cursor*, sqlite3_context*, int); |
| 5794 | int (*xRowid)(sqlite3_vtab_cursor*, sqlite3_int64 *pRowid); |
| 5795 | int (*xUpdate)(sqlite3_vtab *, int, sqlite3_value **, sqlite3_int64 *); |
| 5796 | int (*xBegin)(sqlite3_vtab *pVTab); |
| 5797 | int (*xSync)(sqlite3_vtab *pVTab); |
| 5798 | int (*xCommit)(sqlite3_vtab *pVTab); |
| 5799 | int (*xRollback)(sqlite3_vtab *pVTab); |
| 5800 | int (*xFindFunction)(sqlite3_vtab *pVtab, int nArg, const char *zName, |
| 5801 | void (**pxFunc)(sqlite3_context*,int,sqlite3_value**), |
| 5802 | void **ppArg); |
| 5803 | int (*xRename)(sqlite3_vtab *pVtab, const char *zNew); |
| 5804 | /* The methods above are in version 1 of the sqlite_module object. Those |
| 5805 | ** below are for version 2 and greater. */ |
| 5806 | int (*xSavepoint)(sqlite3_vtab *pVTab, int); |
| 5807 | int (*xRelease)(sqlite3_vtab *pVTab, int); |
| 5808 | int (*xRollbackTo)(sqlite3_vtab *pVTab, int); |
| 5809 | }; |
| 5810 | |
| 5811 | /* |
| 5812 | ** CAPI3REF: Virtual Table Indexing Information |
| 5813 | ** KEYWORDS: sqlite3_index_info |
| @@ -5980,22 +5981,22 @@ | |
| 5981 | ** be invoked if the call to sqlite3_create_module_v2() fails. |
| 5982 | ** ^The sqlite3_create_module() |
| 5983 | ** interface is equivalent to sqlite3_create_module_v2() with a NULL |
| 5984 | ** destructor. |
| 5985 | */ |
| 5986 | SQLITE_API int SQLITE_STDCALL sqlite3_create_module( |
| 5987 | sqlite3 *db, /* SQLite connection to register module with */ |
| 5988 | const char *zName, /* Name of the module */ |
| 5989 | const sqlite3_module *p, /* Methods for the module */ |
| 5990 | void *pClientData /* Client data for xCreate/xConnect */ |
| 5991 | ); |
| 5992 | SQLITE_API int SQLITE_STDCALL sqlite3_create_module_v2( |
| 5993 | sqlite3 *db, /* SQLite connection to register module with */ |
| 5994 | const char *zName, /* Name of the module */ |
| 5995 | const sqlite3_module *p, /* Methods for the module */ |
| 5996 | void *pClientData, /* Client data for xCreate/xConnect */ |
| 5997 | void(*xDestroy)(void*) /* Module destructor function */ |
| 5998 | ); |
| 5999 | |
| 6000 | /* |
| 6001 | ** CAPI3REF: Virtual Table Instance Object |
| 6002 | ** KEYWORDS: sqlite3_vtab |
| @@ -6049,11 +6050,11 @@ | |
| 6050 | ** ^The [xCreate] and [xConnect] methods of a |
| 6051 | ** [virtual table module] call this interface |
| 6052 | ** to declare the format (the names and datatypes of the columns) of |
| 6053 | ** the virtual tables they implement. |
| 6054 | */ |
| 6055 | SQLITE_API int SQLITE_STDCALL sqlite3_declare_vtab(sqlite3*, const char *zSQL); |
| 6056 | |
| 6057 | /* |
| 6058 | ** CAPI3REF: Overload A Function For A Virtual Table |
| 6059 | ** METHOD: sqlite3 |
| 6060 | ** |
| @@ -6068,11 +6069,11 @@ | |
| 6069 | ** of the new function always causes an exception to be thrown. So |
| 6070 | ** the new function is not good for anything by itself. Its only |
| 6071 | ** purpose is to be a placeholder function that can be overloaded |
| 6072 | ** by a [virtual table]. |
| 6073 | */ |
| 6074 | SQLITE_API int SQLITE_STDCALL sqlite3_overload_function(sqlite3*, const char *zFuncName, int nArg); |
| 6075 | |
| 6076 | /* |
| 6077 | ** The interface to the virtual-table mechanism defined above (back up |
| 6078 | ** to a comment remarkably similar to this one) is currently considered |
| 6079 | ** to be experimental. The interface might change in incompatible ways. |
| @@ -6167,11 +6168,11 @@ | |
| 6168 | ** zero-filled blob to read or write using the incremental-blob interface. |
| 6169 | ** |
| 6170 | ** To avoid a resource leak, every open [BLOB handle] should eventually |
| 6171 | ** be released by a call to [sqlite3_blob_close()]. |
| 6172 | */ |
| 6173 | SQLITE_API int SQLITE_STDCALL sqlite3_blob_open( |
| 6174 | sqlite3*, |
| 6175 | const char *zDb, |
| 6176 | const char *zTable, |
| 6177 | const char *zColumn, |
| 6178 | sqlite3_int64 iRow, |
| @@ -6200,11 +6201,11 @@ | |
| 6201 | ** SQLITE_ABORT. ^Calling [sqlite3_blob_bytes()] on an aborted blob handle |
| 6202 | ** always returns zero. |
| 6203 | ** |
| 6204 | ** ^This function sets the database handle error code and message. |
| 6205 | */ |
| 6206 | SQLITE_API int SQLITE_STDCALL sqlite3_blob_reopen(sqlite3_blob *, sqlite3_int64); |
| 6207 | |
| 6208 | /* |
| 6209 | ** CAPI3REF: Close A BLOB Handle |
| 6210 | ** DESTRUCTOR: sqlite3_blob |
| 6211 | ** |
| @@ -6223,11 +6224,11 @@ | |
| 6224 | ** with a null pointer (such as would be returned by a failed call to |
| 6225 | ** [sqlite3_blob_open()]) is a harmless no-op. ^Otherwise, if this function |
| 6226 | ** is passed a valid open blob handle, the values returned by the |
| 6227 | ** sqlite3_errcode() and sqlite3_errmsg() functions are set before returning. |
| 6228 | */ |
| 6229 | SQLITE_API int SQLITE_STDCALL sqlite3_blob_close(sqlite3_blob *); |
| 6230 | |
| 6231 | /* |
| 6232 | ** CAPI3REF: Return The Size Of An Open BLOB |
| 6233 | ** METHOD: sqlite3_blob |
| 6234 | ** |
| @@ -6239,11 +6240,11 @@ | |
| 6240 | ** This routine only works on a [BLOB handle] which has been created |
| 6241 | ** by a prior successful call to [sqlite3_blob_open()] and which has not |
| 6242 | ** been closed by [sqlite3_blob_close()]. Passing any other pointer in |
| 6243 | ** to this routine results in undefined and probably undesirable behavior. |
| 6244 | */ |
| 6245 | SQLITE_API int SQLITE_STDCALL sqlite3_blob_bytes(sqlite3_blob *); |
| 6246 | |
| 6247 | /* |
| 6248 | ** CAPI3REF: Read Data From A BLOB Incrementally |
| 6249 | ** METHOD: sqlite3_blob |
| 6250 | ** |
| @@ -6268,11 +6269,11 @@ | |
| 6269 | ** been closed by [sqlite3_blob_close()]. Passing any other pointer in |
| 6270 | ** to this routine results in undefined and probably undesirable behavior. |
| 6271 | ** |
| 6272 | ** See also: [sqlite3_blob_write()]. |
| 6273 | */ |
| 6274 | SQLITE_API int SQLITE_STDCALL sqlite3_blob_read(sqlite3_blob *, void *Z, int N, int iOffset); |
| 6275 | |
| 6276 | /* |
| 6277 | ** CAPI3REF: Write Data Into A BLOB Incrementally |
| 6278 | ** METHOD: sqlite3_blob |
| 6279 | ** |
| @@ -6310,11 +6311,11 @@ | |
| 6311 | ** been closed by [sqlite3_blob_close()]. Passing any other pointer in |
| 6312 | ** to this routine results in undefined and probably undesirable behavior. |
| 6313 | ** |
| 6314 | ** See also: [sqlite3_blob_read()]. |
| 6315 | */ |
| 6316 | SQLITE_API int SQLITE_STDCALL sqlite3_blob_write(sqlite3_blob *, const void *z, int n, int iOffset); |
| 6317 | |
| 6318 | /* |
| 6319 | ** CAPI3REF: Virtual File System Objects |
| 6320 | ** |
| 6321 | ** A virtual filesystem (VFS) is an [sqlite3_vfs] object |
| @@ -6341,13 +6342,13 @@ | |
| 6342 | ** |
| 6343 | ** ^Unregister a VFS with the sqlite3_vfs_unregister() interface. |
| 6344 | ** ^(If the default VFS is unregistered, another VFS is chosen as |
| 6345 | ** the default. The choice for the new VFS is arbitrary.)^ |
| 6346 | */ |
| 6347 | SQLITE_API sqlite3_vfs *SQLITE_STDCALL sqlite3_vfs_find(const char *zVfsName); |
| 6348 | SQLITE_API int SQLITE_STDCALL sqlite3_vfs_register(sqlite3_vfs*, int makeDflt); |
| 6349 | SQLITE_API int SQLITE_STDCALL sqlite3_vfs_unregister(sqlite3_vfs*); |
| 6350 | |
| 6351 | /* |
| 6352 | ** CAPI3REF: Mutexes |
| 6353 | ** |
| 6354 | ** The SQLite core uses these routines for thread |
| @@ -6459,15 +6460,15 @@ | |
| 6460 | ** sqlite3_mutex_leave() is a NULL pointer, then all three routines |
| 6461 | ** behave as no-ops. |
| 6462 | ** |
| 6463 | ** See also: [sqlite3_mutex_held()] and [sqlite3_mutex_notheld()]. |
| 6464 | */ |
| 6465 | SQLITE_API sqlite3_mutex *SQLITE_STDCALL sqlite3_mutex_alloc(int); |
| 6466 | SQLITE_API void SQLITE_STDCALL sqlite3_mutex_free(sqlite3_mutex*); |
| 6467 | SQLITE_API void SQLITE_STDCALL sqlite3_mutex_enter(sqlite3_mutex*); |
| 6468 | SQLITE_API int SQLITE_STDCALL sqlite3_mutex_try(sqlite3_mutex*); |
| 6469 | SQLITE_API void SQLITE_STDCALL sqlite3_mutex_leave(sqlite3_mutex*); |
| 6470 | |
| 6471 | /* |
| 6472 | ** CAPI3REF: Mutex Methods Object |
| 6473 | ** |
| 6474 | ** An instance of this structure defines the low-level routines |
| @@ -6532,19 +6533,19 @@ | |
| 6533 | ** If xMutexInit fails in any way, it is expected to clean up after itself |
| 6534 | ** prior to returning. |
| 6535 | */ |
| 6536 | typedef struct sqlite3_mutex_methods sqlite3_mutex_methods; |
| 6537 | struct sqlite3_mutex_methods { |
| 6538 | int (*xMutexInit)(void); |
| 6539 | int (*xMutexEnd)(void); |
| 6540 | sqlite3_mutex *(*xMutexAlloc)(int); |
| 6541 | void (*xMutexFree)(sqlite3_mutex *); |
| 6542 | void (*xMutexEnter)(sqlite3_mutex *); |
| 6543 | int (*xMutexTry)(sqlite3_mutex *); |
| 6544 | void (*xMutexLeave)(sqlite3_mutex *); |
| 6545 | int (*xMutexHeld)(sqlite3_mutex *); |
| 6546 | int (*xMutexNotheld)(sqlite3_mutex *); |
| 6547 | }; |
| 6548 | |
| 6549 | /* |
| 6550 | ** CAPI3REF: Mutex Verification Routines |
| 6551 | ** |
| @@ -6573,12 +6574,12 @@ | |
| 6574 | ** call to sqlite3_mutex_held() to fail, so a non-zero return is |
| 6575 | ** the appropriate thing to do. The sqlite3_mutex_notheld() |
| 6576 | ** interface should also return 1 when given a NULL pointer. |
| 6577 | */ |
| 6578 | #ifndef NDEBUG |
| 6579 | SQLITE_API int SQLITE_STDCALL sqlite3_mutex_held(sqlite3_mutex*); |
| 6580 | SQLITE_API int SQLITE_STDCALL sqlite3_mutex_notheld(sqlite3_mutex*); |
| 6581 | #endif |
| 6582 | |
| 6583 | /* |
| 6584 | ** CAPI3REF: Mutex Types |
| 6585 | ** |
| @@ -6614,11 +6615,11 @@ | |
| 6615 | ** serializes access to the [database connection] given in the argument |
| 6616 | ** when the [threading mode] is Serialized. |
| 6617 | ** ^If the [threading mode] is Single-thread or Multi-thread then this |
| 6618 | ** routine returns a NULL pointer. |
| 6619 | */ |
| 6620 | SQLITE_API sqlite3_mutex *SQLITE_STDCALL sqlite3_db_mutex(sqlite3*); |
| 6621 | |
| 6622 | /* |
| 6623 | ** CAPI3REF: Low-Level Control Of Database Files |
| 6624 | ** METHOD: sqlite3 |
| 6625 | ** |
| @@ -6649,11 +6650,11 @@ | |
| 6650 | ** an incorrect zDbName and an SQLITE_ERROR return from the underlying |
| 6651 | ** xFileControl method. |
| 6652 | ** |
| 6653 | ** See also: [SQLITE_FCNTL_LOCKSTATE] |
| 6654 | */ |
| 6655 | SQLITE_API int SQLITE_STDCALL sqlite3_file_control(sqlite3*, const char *zDbName, int op, void*); |
| 6656 | |
| 6657 | /* |
| 6658 | ** CAPI3REF: Testing Interface |
| 6659 | ** |
| 6660 | ** ^The sqlite3_test_control() interface is used to read out internal |
| @@ -6731,12 +6732,12 @@ | |
| 6732 | ** be represented by a 32-bit integer, then the values returned by |
| 6733 | ** sqlite3_status() are undefined. |
| 6734 | ** |
| 6735 | ** See also: [sqlite3_db_status()] |
| 6736 | */ |
| 6737 | SQLITE_API int SQLITE_STDCALL sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag); |
| 6738 | SQLITE_API int SQLITE_STDCALL sqlite3_status64( |
| 6739 | int op, |
| 6740 | sqlite3_int64 *pCurrent, |
| 6741 | sqlite3_int64 *pHighwater, |
| 6742 | int resetFlag |
| 6743 | ); |
| @@ -6857,11 +6858,11 @@ | |
| 6858 | ** ^The sqlite3_db_status() routine returns SQLITE_OK on success and a |
| 6859 | ** non-zero [error code] on failure. |
| 6860 | ** |
| 6861 | ** See also: [sqlite3_status()] and [sqlite3_stmt_status()]. |
| 6862 | */ |
| 6863 | SQLITE_API int SQLITE_STDCALL sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int resetFlg); |
| 6864 | |
| 6865 | /* |
| 6866 | ** CAPI3REF: Status Parameters for database connections |
| 6867 | ** KEYWORDS: {SQLITE_DBSTATUS options} |
| 6868 | ** |
| @@ -7000,11 +7001,11 @@ | |
| 7001 | ** ^If the resetFlg is true, then the counter is reset to zero after this |
| 7002 | ** interface call returns. |
| 7003 | ** |
| 7004 | ** See also: [sqlite3_status()] and [sqlite3_db_status()]. |
| 7005 | */ |
| 7006 | SQLITE_API int SQLITE_STDCALL sqlite3_stmt_status(sqlite3_stmt*, int op,int resetFlg); |
| 7007 | |
| 7008 | /* |
| 7009 | ** CAPI3REF: Status Parameters for prepared statements |
| 7010 | ** KEYWORDS: {SQLITE_STMTSTATUS counter} {SQLITE_STMTSTATUS counters} |
| 7011 | ** |
| @@ -7236,22 +7237,22 @@ | |
| 7237 | */ |
| 7238 | typedef struct sqlite3_pcache_methods2 sqlite3_pcache_methods2; |
| 7239 | struct sqlite3_pcache_methods2 { |
| 7240 | int iVersion; |
| 7241 | void *pArg; |
| 7242 | int (*xInit)(void*); |
| 7243 | void (*xShutdown)(void*); |
| 7244 | sqlite3_pcache *(*xCreate)(int szPage, int szExtra, int bPurgeable); |
| 7245 | void (*xCachesize)(sqlite3_pcache*, int nCachesize); |
| 7246 | int (*xPagecount)(sqlite3_pcache*); |
| 7247 | sqlite3_pcache_page *(*xFetch)(sqlite3_pcache*, unsigned key, int createFlag); |
| 7248 | void (*xUnpin)(sqlite3_pcache*, sqlite3_pcache_page*, int discard); |
| 7249 | void (*xRekey)(sqlite3_pcache*, sqlite3_pcache_page*, |
| 7250 | unsigned oldKey, unsigned newKey); |
| 7251 | void (*xTruncate)(sqlite3_pcache*, unsigned iLimit); |
| 7252 | void (*xDestroy)(sqlite3_pcache*); |
| 7253 | void (*xShrink)(sqlite3_pcache*); |
| 7254 | }; |
| 7255 | |
| 7256 | /* |
| 7257 | ** This is the obsolete pcache_methods object that has now been replaced |
| 7258 | ** by sqlite3_pcache_methods2. This object is not used by SQLite. It is |
| @@ -7258,20 +7259,20 @@ | |
| 7259 | ** retained in the header file for backwards compatibility only. |
| 7260 | */ |
| 7261 | typedef struct sqlite3_pcache_methods sqlite3_pcache_methods; |
| 7262 | struct sqlite3_pcache_methods { |
| 7263 | void *pArg; |
| 7264 | int (*xInit)(void*); |
| 7265 | void (*xShutdown)(void*); |
| 7266 | sqlite3_pcache *(*xCreate)(int szPage, int bPurgeable); |
| 7267 | void (*xCachesize)(sqlite3_pcache*, int nCachesize); |
| 7268 | int (*xPagecount)(sqlite3_pcache*); |
| 7269 | void *(*xFetch)(sqlite3_pcache*, unsigned key, int createFlag); |
| 7270 | void (*xUnpin)(sqlite3_pcache*, void*, int discard); |
| 7271 | void (*xRekey)(sqlite3_pcache*, void*, unsigned oldKey, unsigned newKey); |
| 7272 | void (*xTruncate)(sqlite3_pcache*, unsigned iLimit); |
| 7273 | void (*xDestroy)(sqlite3_pcache*); |
| 7274 | }; |
| 7275 | |
| 7276 | |
| 7277 | /* |
| 7278 | ** CAPI3REF: Online Backup Object |
| @@ -7469,20 +7470,20 @@ | |
| 7470 | ** However, the sqlite3_backup_remaining() and sqlite3_backup_pagecount() |
| 7471 | ** APIs are not strictly speaking threadsafe. If they are invoked at the |
| 7472 | ** same time as another thread is invoking sqlite3_backup_step() it is |
| 7473 | ** possible that they return invalid values. |
| 7474 | */ |
| 7475 | SQLITE_API sqlite3_backup *SQLITE_STDCALL sqlite3_backup_init( |
| 7476 | sqlite3 *pDest, /* Destination database handle */ |
| 7477 | const char *zDestName, /* Destination database name */ |
| 7478 | sqlite3 *pSource, /* Source database handle */ |
| 7479 | const char *zSourceName /* Source database name */ |
| 7480 | ); |
| 7481 | SQLITE_API int SQLITE_STDCALL sqlite3_backup_step(sqlite3_backup *p, int nPage); |
| 7482 | SQLITE_API int SQLITE_STDCALL sqlite3_backup_finish(sqlite3_backup *p); |
| 7483 | SQLITE_API int SQLITE_STDCALL sqlite3_backup_remaining(sqlite3_backup *p); |
| 7484 | SQLITE_API int SQLITE_STDCALL sqlite3_backup_pagecount(sqlite3_backup *p); |
| 7485 | |
| 7486 | /* |
| 7487 | ** CAPI3REF: Unlock Notification |
| 7488 | ** METHOD: sqlite3 |
| 7489 | ** |
| @@ -7595,13 +7596,13 @@ | |
| 7596 | ** by an sqlite3_step() call. ^(If there is a blocking connection, then the |
| 7597 | ** extended error code is set to SQLITE_LOCKED_SHAREDCACHE. Otherwise, in |
| 7598 | ** the special "DROP TABLE/INDEX" case, the extended error code is just |
| 7599 | ** SQLITE_LOCKED.)^ |
| 7600 | */ |
| 7601 | SQLITE_API int SQLITE_STDCALL sqlite3_unlock_notify( |
| 7602 | sqlite3 *pBlocked, /* Waiting connection */ |
| 7603 | void (*xNotify)(void **apArg, int nArg), /* Callback function to invoke */ |
| 7604 | void *pNotifyArg /* Argument to pass to xNotify */ |
| 7605 | ); |
| 7606 | |
| 7607 | |
| 7608 | /* |
| @@ -7610,12 +7611,12 @@ | |
| 7611 | ** ^The [sqlite3_stricmp()] and [sqlite3_strnicmp()] APIs allow applications |
| 7612 | ** and extensions to compare the contents of two buffers containing UTF-8 |
| 7613 | ** strings in a case-independent fashion, using the same definition of "case |
| 7614 | ** independence" that SQLite uses internally when comparing identifiers. |
| 7615 | */ |
| 7616 | SQLITE_API int SQLITE_STDCALL sqlite3_stricmp(const char *, const char *); |
| 7617 | SQLITE_API int SQLITE_STDCALL sqlite3_strnicmp(const char *, const char *, int); |
| 7618 | |
| 7619 | /* |
| 7620 | ** CAPI3REF: String Globbing |
| 7621 | * |
| 7622 | ** ^The [sqlite3_strglob(P,X)] interface returns zero if and only if |
| @@ -7628,11 +7629,11 @@ | |
| 7629 | ** Note that this routine returns zero on a match and non-zero if the strings |
| 7630 | ** do not match, the same as [sqlite3_stricmp()] and [sqlite3_strnicmp()]. |
| 7631 | ** |
| 7632 | ** See also: [sqlite3_strlike()]. |
| 7633 | */ |
| 7634 | SQLITE_API int SQLITE_STDCALL sqlite3_strglob(const char *zGlob, const char *zStr); |
| 7635 | |
| 7636 | /* |
| 7637 | ** CAPI3REF: String LIKE Matching |
| 7638 | * |
| 7639 | ** ^The [sqlite3_strlike(P,X,E)] interface returns zero if and only if |
| @@ -7651,11 +7652,11 @@ | |
| 7652 | ** Note that this routine returns zero on a match and non-zero if the strings |
| 7653 | ** do not match, the same as [sqlite3_stricmp()] and [sqlite3_strnicmp()]. |
| 7654 | ** |
| 7655 | ** See also: [sqlite3_strglob()]. |
| 7656 | */ |
| 7657 | SQLITE_API int SQLITE_STDCALL sqlite3_strlike(const char *zGlob, const char *zStr, unsigned int cEsc); |
| 7658 | |
| 7659 | /* |
| 7660 | ** CAPI3REF: Error Logging Interface |
| 7661 | ** |
| 7662 | ** ^The [sqlite3_log()] interface writes a message into the [error log] |
| @@ -7710,13 +7711,13 @@ | |
| 7711 | ** previously registered write-ahead log callback. ^Note that the |
| 7712 | ** [sqlite3_wal_autocheckpoint()] interface and the |
| 7713 | ** [wal_autocheckpoint pragma] both invoke [sqlite3_wal_hook()] and will |
| 7714 | ** overwrite any prior [sqlite3_wal_hook()] settings. |
| 7715 | */ |
| 7716 | SQLITE_API void *SQLITE_STDCALL sqlite3_wal_hook( |
| 7717 | sqlite3*, |
| 7718 | int(*)(void *,sqlite3*,const char*,int), |
| 7719 | void* |
| 7720 | ); |
| 7721 | |
| 7722 | /* |
| 7723 | ** CAPI3REF: Configure an auto-checkpoint |
| @@ -7745,11 +7746,11 @@ | |
| 7746 | ** enabled with a threshold of 1000 or [SQLITE_DEFAULT_WAL_AUTOCHECKPOINT] |
| 7747 | ** pages. The use of this interface |
| 7748 | ** is only necessary if the default setting is found to be suboptimal |
| 7749 | ** for a particular application. |
| 7750 | */ |
| 7751 | SQLITE_API int SQLITE_STDCALL sqlite3_wal_autocheckpoint(sqlite3 *db, int N); |
| 7752 | |
| 7753 | /* |
| 7754 | ** CAPI3REF: Checkpoint a database |
| 7755 | ** METHOD: sqlite3 |
| 7756 | ** |
| @@ -7767,11 +7768,11 @@ | |
| 7768 | ** interface was added. This interface is retained for backwards |
| 7769 | ** compatibility and as a convenience for applications that need to manually |
| 7770 | ** start a callback but which do not need the full power (and corresponding |
| 7771 | ** complication) of [sqlite3_wal_checkpoint_v2()]. |
| 7772 | */ |
| 7773 | SQLITE_API int SQLITE_STDCALL sqlite3_wal_checkpoint(sqlite3 *db, const char *zDb); |
| 7774 | |
| 7775 | /* |
| 7776 | ** CAPI3REF: Checkpoint a database |
| 7777 | ** METHOD: sqlite3 |
| 7778 | ** |
| @@ -7861,11 +7862,11 @@ | |
| 7862 | ** [sqlite3_errcode()] and [sqlite3_errmsg()]. |
| 7863 | ** |
| 7864 | ** ^The [PRAGMA wal_checkpoint] command can be used to invoke this interface |
| 7865 | ** from SQL. |
| 7866 | */ |
| 7867 | SQLITE_API int SQLITE_STDCALL sqlite3_wal_checkpoint_v2( |
| 7868 | sqlite3 *db, /* Database handle */ |
| 7869 | const char *zDb, /* Name of attached database (or NULL) */ |
| 7870 | int eMode, /* SQLITE_CHECKPOINT_* value */ |
| 7871 | int *pnLog, /* OUT: Size of WAL log in frames */ |
| 7872 | int *pnCkpt /* OUT: Total number of frames checkpointed */ |
| @@ -7950,11 +7951,11 @@ | |
| 7951 | ** value returned is one of [SQLITE_ROLLBACK], [SQLITE_IGNORE], [SQLITE_FAIL], |
| 7952 | ** [SQLITE_ABORT], or [SQLITE_REPLACE], according to the [ON CONFLICT] mode |
| 7953 | ** of the SQL statement that triggered the call to the [xUpdate] method of the |
| 7954 | ** [virtual table]. |
| 7955 | */ |
| 7956 | SQLITE_API int SQLITE_STDCALL sqlite3_vtab_on_conflict(sqlite3 *); |
| 7957 | |
| 7958 | /* |
| 7959 | ** CAPI3REF: Conflict resolution modes |
| 7960 | ** KEYWORDS: {conflict resolution mode} |
| 7961 | ** |
| @@ -8055,11 +8056,11 @@ | |
| 8056 | ** as if the loop did not exist - it returns non-zero and leave the variable |
| 8057 | ** that pOut points to unchanged. |
| 8058 | ** |
| 8059 | ** See also: [sqlite3_stmt_scanstatus_reset()] |
| 8060 | */ |
| 8061 | SQLITE_API int SQLITE_STDCALL sqlite3_stmt_scanstatus( |
| 8062 | sqlite3_stmt *pStmt, /* Prepared statement for which info desired */ |
| 8063 | int idx, /* Index of loop to report on */ |
| 8064 | int iScanStatusOp, /* Information desired. SQLITE_SCANSTAT_* */ |
| 8065 | void *pOut /* Result written here */ |
| 8066 | ); |
| @@ -8071,11 +8072,11 @@ | |
| 8072 | ** ^Zero all [sqlite3_stmt_scanstatus()] related event counters. |
| 8073 | ** |
| 8074 | ** This API is only available if the library is built with pre-processor |
| 8075 | ** symbol [SQLITE_ENABLE_STMT_SCANSTATUS] defined. |
| 8076 | */ |
| 8077 | SQLITE_API void SQLITE_STDCALL sqlite3_stmt_scanstatus_reset(sqlite3_stmt*); |
| 8078 | |
| 8079 | /* |
| 8080 | ** CAPI3REF: Flush caches to disk mid-transaction |
| 8081 | ** |
| 8082 | ** ^If a write-transaction is open on [database connection] D when the |
| @@ -8103,11 +8104,11 @@ | |
| 8104 | ** ^Otherwise, if no error occurs, [sqlite3_db_cacheflush()] returns SQLITE_OK. |
| 8105 | ** |
| 8106 | ** ^This function does not set the database handle error code or message |
| 8107 | ** returned by the [sqlite3_errcode()] and [sqlite3_errmsg()] functions. |
| 8108 | */ |
| 8109 | SQLITE_API int SQLITE_STDCALL sqlite3_db_cacheflush(sqlite3*); |
| 8110 | |
| 8111 | /* |
| 8112 | ** CAPI3REF: The pre-update hook. |
| 8113 | ** |
| 8114 | ** ^These interfaces are only available if SQLite is compiled using the |
| @@ -8183,13 +8184,13 @@ | |
| 8184 | ** triggers; or 2 for changes resulting from triggers called by top-level |
| 8185 | ** triggers; and so forth. |
| 8186 | ** |
| 8187 | ** See also: [sqlite3_update_hook()] |
| 8188 | */ |
| 8189 | SQLITE_API SQLITE_EXPERIMENTAL void *SQLITE_STDCALL sqlite3_preupdate_hook( |
| 8190 | sqlite3 *db, |
| 8191 | void(*xPreUpdate)( |
| 8192 | void *pCtx, /* Copy of third arg to preupdate_hook() */ |
| 8193 | sqlite3 *db, /* Database handle */ |
| 8194 | int op, /* SQLITE_UPDATE, DELETE or INSERT */ |
| 8195 | char const *zDb, /* Database name */ |
| 8196 | char const *zName, /* Table name */ |
| @@ -8196,14 +8197,14 @@ | |
| 8197 | sqlite3_int64 iKey1, /* Rowid of row about to be deleted/updated */ |
| 8198 | sqlite3_int64 iKey2 /* New rowid value (for a rowid UPDATE) */ |
| 8199 | ), |
| 8200 | void* |
| 8201 | ); |
| 8202 | SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_preupdate_old(sqlite3 *, int, sqlite3_value **); |
| 8203 | SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_preupdate_count(sqlite3 *); |
| 8204 | SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_preupdate_depth(sqlite3 *); |
| 8205 | SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_preupdate_new(sqlite3 *, int, sqlite3_value **); |
| 8206 | |
| 8207 | /* |
| 8208 | ** CAPI3REF: Low-level system error code |
| 8209 | ** |
| 8210 | ** ^Attempt to return the underlying operating system error code or error |
| @@ -8211,11 +8212,11 @@ | |
| 8212 | ** The return value is OS-dependent. For example, on unix systems, after |
| 8213 | ** [sqlite3_open_v2()] returns [SQLITE_CANTOPEN], this interface could be |
| 8214 | ** called to get back the underlying "errno" that caused the problem, such |
| 8215 | ** as ENOSPC, EAUTH, EISDIR, and so forth. |
| 8216 | */ |
| 8217 | SQLITE_API int SQLITE_STDCALL sqlite3_system_errno(sqlite3*); |
| 8218 | |
| 8219 | /* |
| 8220 | ** CAPI3REF: Database Snapshot |
| 8221 | ** KEYWORDS: {snapshot} |
| 8222 | ** EXPERIMENTAL |
| @@ -8261,11 +8262,11 @@ | |
| 8262 | ** to avoid a memory leak. |
| 8263 | ** |
| 8264 | ** The [sqlite3_snapshot_get()] interface is only available when the |
| 8265 | ** SQLITE_ENABLE_SNAPSHOT compile-time option is used. |
| 8266 | */ |
| 8267 | SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_snapshot_get( |
| 8268 | sqlite3 *db, |
| 8269 | const char *zSchema, |
| 8270 | sqlite3_snapshot **ppSnapshot |
| 8271 | ); |
| 8272 | |
| @@ -8299,11 +8300,11 @@ | |
| 8300 | ** database connection in order to make it ready to use snapshots.) |
| 8301 | ** |
| 8302 | ** The [sqlite3_snapshot_open()] interface is only available when the |
| 8303 | ** SQLITE_ENABLE_SNAPSHOT compile-time option is used. |
| 8304 | */ |
| 8305 | SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_snapshot_open( |
| 8306 | sqlite3 *db, |
| 8307 | const char *zSchema, |
| 8308 | sqlite3_snapshot *pSnapshot |
| 8309 | ); |
| 8310 | |
| @@ -8316,11 +8317,11 @@ | |
| 8317 | ** using this routine to avoid a memory leak. |
| 8318 | ** |
| 8319 | ** The [sqlite3_snapshot_free()] interface is only available when the |
| 8320 | ** SQLITE_ENABLE_SNAPSHOT compile-time option is used. |
| 8321 | */ |
| 8322 | SQLITE_API SQLITE_EXPERIMENTAL void SQLITE_STDCALL sqlite3_snapshot_free(sqlite3_snapshot*); |
| 8323 | |
| 8324 | /* |
| 8325 | ** CAPI3REF: Compare the ages of two snapshot handles. |
| 8326 | ** EXPERIMENTAL |
| 8327 | ** |
| @@ -8340,11 +8341,11 @@ | |
| 8341 | ** |
| 8342 | ** Otherwise, this API returns a negative value if P1 refers to an older |
| 8343 | ** snapshot than P2, zero if the two handles refer to the same database |
| 8344 | ** snapshot, and a positive value if P1 is a newer snapshot than P2. |
| 8345 | */ |
| 8346 | SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_snapshot_cmp( |
| 8347 | sqlite3_snapshot *p1, |
| 8348 | sqlite3_snapshot *p2 |
| 8349 | ); |
| 8350 | |
| 8351 | /* |
| @@ -8398,14 +8399,14 @@ | |
| 8399 | ** Register a geometry callback named zGeom that can be used as part of an |
| 8400 | ** R-Tree geometry query as follows: |
| 8401 | ** |
| 8402 | ** SELECT ... FROM <rtree> WHERE <rtree col> MATCH $zGeom(... params ...) |
| 8403 | */ |
| 8404 | SQLITE_API int SQLITE_STDCALL sqlite3_rtree_geometry_callback( |
| 8405 | sqlite3 *db, |
| 8406 | const char *zGeom, |
| 8407 | int (*xGeom)(sqlite3_rtree_geometry*, int, sqlite3_rtree_dbl*,int*), |
| 8408 | void *pContext |
| 8409 | ); |
| 8410 | |
| 8411 | |
| 8412 | /* |
| @@ -8415,25 +8416,25 @@ | |
| 8416 | struct sqlite3_rtree_geometry { |
| 8417 | void *pContext; /* Copy of pContext passed to s_r_g_c() */ |
| 8418 | int nParam; /* Size of array aParam[] */ |
| 8419 | sqlite3_rtree_dbl *aParam; /* Parameters passed to SQL geom function */ |
| 8420 | void *pUser; /* Callback implementation user data */ |
| 8421 | void (*xDelUser)(void *); /* Called by SQLite to clean up pUser */ |
| 8422 | }; |
| 8423 | |
| 8424 | /* |
| 8425 | ** Register a 2nd-generation geometry callback named zScore that can be |
| 8426 | ** used as part of an R-Tree geometry query as follows: |
| 8427 | ** |
| 8428 | ** SELECT ... FROM <rtree> WHERE <rtree col> MATCH $zQueryFunc(... params ...) |
| 8429 | */ |
| 8430 | SQLITE_API int SQLITE_STDCALL sqlite3_rtree_query_callback( |
| 8431 | sqlite3 *db, |
| 8432 | const char *zQueryFunc, |
| 8433 | int (*xQueryFunc)(sqlite3_rtree_query_info*), |
| 8434 | void *pContext, |
| 8435 | void (*xDestructor)(void*) |
| 8436 | ); |
| 8437 | |
| 8438 | |
| 8439 | /* |
| 8440 | ** A pointer to a structure of the following type is passed as the |
| @@ -8447,11 +8448,11 @@ | |
| 8448 | struct sqlite3_rtree_query_info { |
| 8449 | void *pContext; /* pContext from when function registered */ |
| 8450 | int nParam; /* Number of function parameters */ |
| 8451 | sqlite3_rtree_dbl *aParam; /* value of function parameters */ |
| 8452 | void *pUser; /* callback can use this, if desired */ |
| 8453 | void (*xDelUser)(void*); /* function to free pUser */ |
| 8454 | sqlite3_rtree_dbl *aCoord; /* Coordinates of node or entry to check */ |
| 8455 | unsigned int *anQueue; /* Number of pending entries in the queue */ |
| 8456 | int nCoord; /* Number of coordinates */ |
| 8457 | int iLevel; /* Level of current node or entry */ |
| 8458 | int mxLevel; /* The largest iLevel value in the tree */ |
| @@ -8643,11 +8644,11 @@ | |
| 8644 | ** If xFilter returns 0, changes is not tracked. Note that once a table is |
| 8645 | ** attached, xFilter will not be called again. |
| 8646 | */ |
| 8647 | void sqlite3session_table_filter( |
| 8648 | sqlite3_session *pSession, /* Session object */ |
| 8649 | int(*xFilter)( |
| 8650 | void *pCtx, /* Copy of third arg to _filter_table() */ |
| 8651 | const char *zTab /* Table name */ |
| 8652 | ), |
| 8653 | void *pCtx /* First argument passed to xFilter */ |
| 8654 | ); |
| @@ -9218,11 +9219,11 @@ | |
| 9219 | ** An sqlite3_changegroup object is used to combine two or more changesets |
| 9220 | ** (or patchsets) into a single changeset (or patchset). A single changegroup |
| 9221 | ** object may combine changesets or patchsets, but not both. The output is |
| 9222 | ** always in the same format as the input. |
| 9223 | ** |
| 9224 | ** If successful, this function returns SQLITE_OK and populates (*pp) with |
| 9225 | ** a pointer to a new sqlite3_changegroup object before returning. The caller |
| 9226 | ** should eventually free the returned object using a call to |
| 9227 | ** sqlite3changegroup_delete(). If an error occurs, an SQLite error code |
| 9228 | ** (i.e. SQLITE_NOMEM) is returned and *pp is set to NULL. |
| 9229 | ** |
| @@ -9338,11 +9339,11 @@ | |
| 9339 | ** changes for tables that do not appear in the first changeset, they are |
| 9340 | ** appended onto the end of the output changeset, again in the order in |
| 9341 | ** which they are first encountered. |
| 9342 | ** |
| 9343 | ** If an error occurs, an SQLite error code is returned and the output |
| 9344 | ** variables (*pnData) and (*ppData) are set to 0. Otherwise, SQLITE_OK |
| 9345 | ** is returned and the output variables are set to the size of and a |
| 9346 | ** pointer to the output buffer, respectively. In this case it is the |
| 9347 | ** responsibility of the caller to eventually free the buffer using a |
| 9348 | ** call to sqlite3_free(). |
| 9349 | */ |
| @@ -9495,15 +9496,15 @@ | |
| 9496 | */ |
| 9497 | int sqlite3changeset_apply( |
| 9498 | sqlite3 *db, /* Apply change to "main" db of this handle */ |
| 9499 | int nChangeset, /* Size of changeset in bytes */ |
| 9500 | void *pChangeset, /* Changeset blob */ |
| 9501 | int(*xFilter)( |
| 9502 | void *pCtx, /* Copy of sixth arg to _apply() */ |
| 9503 | const char *zTab /* Table name */ |
| 9504 | ), |
| 9505 | int(*xConflict)( |
| 9506 | void *pCtx, /* Copy of sixth arg to _apply() */ |
| 9507 | int eConflict, /* DATA, MISSING, CONFLICT, CONSTRAINT */ |
| 9508 | sqlite3_changeset_iter *p /* Handle describing change and conflict */ |
| 9509 | ), |
| 9510 | void *pCtx /* First argument passed to xConflict */ |
| @@ -9640,20 +9641,20 @@ | |
| 9641 | ** </pre> |
| 9642 | ** |
| 9643 | ** Is replaced by: |
| 9644 | ** |
| 9645 | ** <pre> |
| 9646 | ** int (*xInput)(void *pIn, void *pData, int *pnData), |
| 9647 | ** void *pIn, |
| 9648 | ** </pre> |
| 9649 | ** |
| 9650 | ** Each time the xInput callback is invoked by the sessions module, the first |
| 9651 | ** argument passed is a copy of the supplied pIn context pointer. The second |
| 9652 | ** argument, pData, points to a buffer (*pnData) bytes in size. Assuming no |
| 9653 | ** error occurs the xInput method should copy up to (*pnData) bytes of data |
| 9654 | ** into the buffer and set (*pnData) to the actual number of bytes copied |
| 9655 | ** before returning SQLITE_OK. If the input is completely exhausted, (*pnData) |
| 9656 | ** should be set to zero to indicate this. Or, if an error occurs, an SQLite |
| 9657 | ** error code should be returned. In all cases, if an xInput callback returns |
| 9658 | ** an error, all processing is abandoned and the streaming API function |
| 9659 | ** returns a copy of the error code to the caller. |
| 9660 | ** |
| @@ -9674,11 +9675,11 @@ | |
| 9675 | ** </pre> |
| 9676 | ** |
| 9677 | ** Is replaced by: |
| 9678 | ** |
| 9679 | ** <pre> |
| 9680 | ** int (*xOutput)(void *pOut, const void *pData, int nData), |
| 9681 | ** void *pOut |
| 9682 | ** </pre> |
| 9683 | ** |
| 9684 | ** The xOutput callback is invoked zero or more times to return data to |
| 9685 | ** the application. The first parameter passed to each call is a copy of the |
| @@ -9694,58 +9695,58 @@ | |
| 9695 | ** parameter set to a value less than or equal to zero. Other than this, |
| 9696 | ** no guarantees are made as to the size of the chunks of data returned. |
| 9697 | */ |
| 9698 | int sqlite3changeset_apply_strm( |
| 9699 | sqlite3 *db, /* Apply change to "main" db of this handle */ |
| 9700 | int (*xInput)(void *pIn, void *pData, int *pnData), /* Input function */ |
| 9701 | void *pIn, /* First arg for xInput */ |
| 9702 | int(*xFilter)( |
| 9703 | void *pCtx, /* Copy of sixth arg to _apply() */ |
| 9704 | const char *zTab /* Table name */ |
| 9705 | ), |
| 9706 | int(*xConflict)( |
| 9707 | void *pCtx, /* Copy of sixth arg to _apply() */ |
| 9708 | int eConflict, /* DATA, MISSING, CONFLICT, CONSTRAINT */ |
| 9709 | sqlite3_changeset_iter *p /* Handle describing change and conflict */ |
| 9710 | ), |
| 9711 | void *pCtx /* First argument passed to xConflict */ |
| 9712 | ); |
| 9713 | int sqlite3changeset_concat_strm( |
| 9714 | int (*xInputA)(void *pIn, void *pData, int *pnData), |
| 9715 | void *pInA, |
| 9716 | int (*xInputB)(void *pIn, void *pData, int *pnData), |
| 9717 | void *pInB, |
| 9718 | int (*xOutput)(void *pOut, const void *pData, int nData), |
| 9719 | void *pOut |
| 9720 | ); |
| 9721 | int sqlite3changeset_invert_strm( |
| 9722 | int (*xInput)(void *pIn, void *pData, int *pnData), |
| 9723 | void *pIn, |
| 9724 | int (*xOutput)(void *pOut, const void *pData, int nData), |
| 9725 | void *pOut |
| 9726 | ); |
| 9727 | int sqlite3changeset_start_strm( |
| 9728 | sqlite3_changeset_iter **pp, |
| 9729 | int (*xInput)(void *pIn, void *pData, int *pnData), |
| 9730 | void *pIn |
| 9731 | ); |
| 9732 | int sqlite3session_changeset_strm( |
| 9733 | sqlite3_session *pSession, |
| 9734 | int (*xOutput)(void *pOut, const void *pData, int nData), |
| 9735 | void *pOut |
| 9736 | ); |
| 9737 | int sqlite3session_patchset_strm( |
| 9738 | sqlite3_session *pSession, |
| 9739 | int (*xOutput)(void *pOut, const void *pData, int nData), |
| 9740 | void *pOut |
| 9741 | ); |
| 9742 | int sqlite3changegroup_add_strm(sqlite3_changegroup*, |
| 9743 | int (*xInput)(void *pIn, void *pData, int *pnData), |
| 9744 | void *pIn |
| 9745 | ); |
| 9746 | int sqlite3changegroup_output_strm(sqlite3_changegroup*, |
| 9747 | int (*xOutput)(void *pOut, const void *pData, int nData), |
| 9748 | void *pOut |
| 9749 | ); |
| 9750 | |
| 9751 | |
| 9752 | /* |
| @@ -9796,11 +9797,11 @@ | |
| 9797 | |
| 9798 | typedef struct Fts5ExtensionApi Fts5ExtensionApi; |
| 9799 | typedef struct Fts5Context Fts5Context; |
| 9800 | typedef struct Fts5PhraseIter Fts5PhraseIter; |
| 9801 | |
| 9802 | typedef void (*fts5_extension_function)( |
| 9803 | const Fts5ExtensionApi *pApi, /* API offered by current FTS version */ |
| 9804 | Fts5Context *pFts, /* First arg to pass to pApi functions */ |
| 9805 | sqlite3_context *pCtx, /* Context for returning result/error */ |
| 9806 | int nVal, /* Number of values in apVal[] array */ |
| 9807 | sqlite3_value **apVal /* Array of trailing arguments */ |
| @@ -9847,15 +9848,15 @@ | |
| 9848 | ** This function may be quite inefficient if used with an FTS5 table |
| 9849 | ** created with the "columnsize=0" option. |
| 9850 | ** |
| 9851 | ** xColumnText: |
| 9852 | ** This function attempts to retrieve the text of column iCol of the |
| 9853 | ** current document. If successful, (*pz) is set to point to a buffer |
| 9854 | ** containing the text in utf-8 encoding, (*pn) is set to the size in bytes |
| 9855 | ** (not characters) of the buffer and SQLITE_OK is returned. Otherwise, |
| 9856 | ** if an error occurs, an SQLite error code is returned and the final values |
| 9857 | ** of (*pz) and (*pn) are undefined. |
| 9858 | ** |
| 9859 | ** xPhraseCount: |
| 9860 | ** Returns the number of phrases in the current query expression. |
| 9861 | ** |
| 9862 | ** xPhraseSize: |
| @@ -9960,11 +9961,11 @@ | |
| 9961 | ** xRowCount(pFts5, pnRow) |
| 9962 | ** |
| 9963 | ** This function is used to retrieve the total number of rows in the table. |
| 9964 | ** In other words, the same value that would be returned by: |
| 9965 | ** |
| 9966 | ** SELECT count(*) FROM ftstable; |
| 9967 | ** |
| 9968 | ** xPhraseFirst() |
| 9969 | ** This function is used, along with type Fts5PhraseIter and the xPhraseNext |
| 9970 | ** method, to iterate through all instances of a single query phrase within |
| 9971 | ** the current row. This is the same information as is accessible via the |
| @@ -10027,43 +10028,43 @@ | |
| 10028 | ** See xPhraseFirstColumn above. |
| 10029 | */ |
| 10030 | struct Fts5ExtensionApi { |
| 10031 | int iVersion; /* Currently always set to 3 */ |
| 10032 | |
| 10033 | void *(*xUserData)(Fts5Context*); |
| 10034 | |
| 10035 | int (*xColumnCount)(Fts5Context*); |
| 10036 | int (*xRowCount)(Fts5Context*, sqlite3_int64 *pnRow); |
| 10037 | int (*xColumnTotalSize)(Fts5Context*, int iCol, sqlite3_int64 *pnToken); |
| 10038 | |
| 10039 | int (*xTokenize)(Fts5Context*, |
| 10040 | const char *pText, int nText, /* Text to tokenize */ |
| 10041 | void *pCtx, /* Context passed to xToken() */ |
| 10042 | int (*xToken)(void*, int, const char*, int, int, int) /* Callback */ |
| 10043 | ); |
| 10044 | |
| 10045 | int (*xPhraseCount)(Fts5Context*); |
| 10046 | int (*xPhraseSize)(Fts5Context*, int iPhrase); |
| 10047 | |
| 10048 | int (*xInstCount)(Fts5Context*, int *pnInst); |
| 10049 | int (*xInst)(Fts5Context*, int iIdx, int *piPhrase, int *piCol, int *piOff); |
| 10050 | |
| 10051 | sqlite3_int64 (*xRowid)(Fts5Context*); |
| 10052 | int (*xColumnText)(Fts5Context*, int iCol, const char **pz, int *pn); |
| 10053 | int (*xColumnSize)(Fts5Context*, int iCol, int *pnToken); |
| 10054 | |
| 10055 | int (*xQueryPhrase)(Fts5Context*, int iPhrase, void *pUserData, |
| 10056 | int(*)(const Fts5ExtensionApi*,Fts5Context*,void*) |
| 10057 | ); |
| 10058 | int (*xSetAuxdata)(Fts5Context*, void *pAux, void(*xDelete)(void*)); |
| 10059 | void *(*xGetAuxdata)(Fts5Context*, int bClear); |
| 10060 | |
| 10061 | int (*xPhraseFirst)(Fts5Context*, int iPhrase, Fts5PhraseIter*, int*, int*); |
| 10062 | void (*xPhraseNext)(Fts5Context*, Fts5PhraseIter*, int *piCol, int *piOff); |
| 10063 | |
| 10064 | int (*xPhraseFirstColumn)(Fts5Context*, int iPhrase, Fts5PhraseIter*, int*); |
| 10065 | void (*xPhraseNextColumn)(Fts5Context*, Fts5PhraseIter*, int *piCol); |
| 10066 | }; |
| 10067 | |
| 10068 | /* |
| 10069 | ** CUSTOM AUXILIARY FUNCTIONS |
| 10070 | *************************************************************************/ |
| @@ -10087,11 +10088,11 @@ | |
| 10088 | ** The second and third arguments are an array of nul-terminated strings |
| 10089 | ** containing the tokenizer arguments, if any, specified following the |
| 10090 | ** tokenizer name as part of the CREATE VIRTUAL TABLE statement used |
| 10091 | ** to create the FTS5 table. |
| 10092 | ** |
| 10093 | ** The final argument is an output variable. If successful, (*ppOut) |
| 10094 | ** should be set to point to the new tokenizer handle and SQLITE_OK |
| 10095 | ** returned. If an error occurs, some value other than SQLITE_OK should |
| 10096 | ** be returned. In this case, fts5 assumes that the final value of *ppOut |
| 10097 | ** is undefined. |
| 10098 | ** |
| @@ -10261,17 +10262,17 @@ | |
| 10262 | ** inefficient. |
| 10263 | */ |
| 10264 | typedef struct Fts5Tokenizer Fts5Tokenizer; |
| 10265 | typedef struct fts5_tokenizer fts5_tokenizer; |
| 10266 | struct fts5_tokenizer { |
| 10267 | int (*xCreate)(void*, const char **azArg, int nArg, Fts5Tokenizer **ppOut); |
| 10268 | void (*xDelete)(Fts5Tokenizer*); |
| 10269 | int (*xTokenize)(Fts5Tokenizer*, |
| 10270 | void *pCtx, |
| 10271 | int flags, /* Mask of FTS5_TOKENIZE_* flags */ |
| 10272 | const char *pText, int nText, |
| 10273 | int (*xToken)( |
| 10274 | void *pCtx, /* Copy of 2nd argument to xTokenize() */ |
| 10275 | int tflags, /* Mask of FTS5_TOKEN_* flags */ |
| 10276 | const char *pToken, /* Pointer to buffer containing token */ |
| 10277 | int nToken, /* Size of token in bytes */ |
| 10278 | int iStart, /* Byte offset of token within input text */ |
| @@ -10300,33 +10301,33 @@ | |
| 10301 | typedef struct fts5_api fts5_api; |
| 10302 | struct fts5_api { |
| 10303 | int iVersion; /* Currently always set to 2 */ |
| 10304 | |
| 10305 | /* Create a new tokenizer */ |
| 10306 | int (*xCreateTokenizer)( |
| 10307 | fts5_api *pApi, |
| 10308 | const char *zName, |
| 10309 | void *pContext, |
| 10310 | fts5_tokenizer *pTokenizer, |
| 10311 | void (*xDestroy)(void*) |
| 10312 | ); |
| 10313 | |
| 10314 | /* Find an existing tokenizer */ |
| 10315 | int (*xFindTokenizer)( |
| 10316 | fts5_api *pApi, |
| 10317 | const char *zName, |
| 10318 | void **ppContext, |
| 10319 | fts5_tokenizer *pTokenizer |
| 10320 | ); |
| 10321 | |
| 10322 | /* Create a new auxiliary function */ |
| 10323 | int (*xCreateFunction)( |
| 10324 | fts5_api *pApi, |
| 10325 | const char *zName, |
| 10326 | void *pContext, |
| 10327 | fts5_extension_function xFunction, |
| 10328 | void (*xDestroy)(void*) |
| 10329 | ); |
| 10330 | }; |
| 10331 | |
| 10332 | /* |
| 10333 | ** END OF REGISTRATION API |
| 10334 |