@op-engineering/op-sqlite 5.0.0 → 5.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/CMakeLists.txt +23 -14
- package/android/build.gradle +22 -5
- package/cpp/PreparedStatementHostObject.cpp +1 -0
- package/cpp/bindings.cpp +9 -0
- package/cpp/bridge.cpp +1 -1
- package/cpp/sqlcipher/sqlite3.c +8992 -3860
- package/cpp/sqlcipher/sqlite3.h +1674 -1343
- package/cpp/utils.cpp +3 -3
- package/lib/commonjs/index.js +25 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/index.js +23 -0
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/src/index.d.ts +2 -0
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/op-sqlite.podspec +21 -3
- package/package.json +1 -1
- package/src/index.ts +29 -0
package/cpp/sqlcipher/sqlite3.h
CHANGED
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
*/
|
|
33
33
|
#ifndef SQLITE3_H
|
|
34
34
|
#define SQLITE3_H
|
|
35
|
-
#include <stdarg.h>
|
|
35
|
+
#include <stdarg.h> /* Needed for the definition of va_list */
|
|
36
36
|
|
|
37
37
|
/*
|
|
38
38
|
** Make sure we can call this stuff from C++.
|
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
extern "C" {
|
|
42
42
|
#endif
|
|
43
43
|
|
|
44
|
+
|
|
44
45
|
/*
|
|
45
46
|
** Facilitate override of interface linkage and calling conventions.
|
|
46
47
|
** Be aware that these macros may not be used within this particular
|
|
@@ -68,25 +69,25 @@ extern "C" {
|
|
|
68
69
|
** that require non-default calling conventions.
|
|
69
70
|
*/
|
|
70
71
|
#ifndef SQLITE_EXTERN
|
|
71
|
-
#define SQLITE_EXTERN extern
|
|
72
|
+
# define SQLITE_EXTERN extern
|
|
72
73
|
#endif
|
|
73
74
|
#ifndef SQLITE_API
|
|
74
|
-
#define SQLITE_API
|
|
75
|
+
# define SQLITE_API
|
|
75
76
|
#endif
|
|
76
77
|
#ifndef SQLITE_CDECL
|
|
77
|
-
#define SQLITE_CDECL
|
|
78
|
+
# define SQLITE_CDECL
|
|
78
79
|
#endif
|
|
79
80
|
#ifndef SQLITE_APICALL
|
|
80
|
-
#define SQLITE_APICALL
|
|
81
|
+
# define SQLITE_APICALL
|
|
81
82
|
#endif
|
|
82
83
|
#ifndef SQLITE_STDCALL
|
|
83
|
-
#define SQLITE_STDCALL SQLITE_APICALL
|
|
84
|
+
# define SQLITE_STDCALL SQLITE_APICALL
|
|
84
85
|
#endif
|
|
85
86
|
#ifndef SQLITE_CALLBACK
|
|
86
|
-
#define SQLITE_CALLBACK
|
|
87
|
+
# define SQLITE_CALLBACK
|
|
87
88
|
#endif
|
|
88
89
|
#ifndef SQLITE_SYSAPI
|
|
89
|
-
#define SQLITE_SYSAPI
|
|
90
|
+
# define SQLITE_SYSAPI
|
|
90
91
|
#endif
|
|
91
92
|
|
|
92
93
|
/*
|
|
@@ -109,10 +110,10 @@ extern "C" {
|
|
|
109
110
|
** Ensure these symbols were not defined by some previous header file.
|
|
110
111
|
*/
|
|
111
112
|
#ifdef SQLITE_VERSION
|
|
112
|
-
#undef SQLITE_VERSION
|
|
113
|
+
# undef SQLITE_VERSION
|
|
113
114
|
#endif
|
|
114
115
|
#ifdef SQLITE_VERSION_NUMBER
|
|
115
|
-
#undef SQLITE_VERSION_NUMBER
|
|
116
|
+
# undef SQLITE_VERSION_NUMBER
|
|
116
117
|
#endif
|
|
117
118
|
|
|
118
119
|
/*
|
|
@@ -145,11 +146,9 @@ extern "C" {
|
|
|
145
146
|
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
|
|
146
147
|
** [sqlite_version()] and [sqlite_source_id()].
|
|
147
148
|
*/
|
|
148
|
-
#define SQLITE_VERSION
|
|
149
|
-
#define SQLITE_VERSION_NUMBER
|
|
150
|
-
#define SQLITE_SOURCE_ID
|
|
151
|
-
"2023-05-16 12:36:15 " \
|
|
152
|
-
"831d0fb2836b71c9bc51067c49fee4b8f18047814f2ff22d817d25195cf3alt1"
|
|
149
|
+
#define SQLITE_VERSION "3.44.2"
|
|
150
|
+
#define SQLITE_VERSION_NUMBER 3044002
|
|
151
|
+
#define SQLITE_SOURCE_ID "2023-11-24 11:41:44 ebead0e7230cd33bcec9f95d2183069565b9e709bf745c9b5db65cc0cbf9alt1"
|
|
153
152
|
|
|
154
153
|
/*
|
|
155
154
|
** CAPI3REF: Run-Time Library Version Numbers
|
|
@@ -214,8 +213,8 @@ SQLITE_API int sqlite3_libversion_number(void);
|
|
|
214
213
|
SQLITE_API int sqlite3_compileoption_used(const char *zOptName);
|
|
215
214
|
SQLITE_API const char *sqlite3_compileoption_get(int N);
|
|
216
215
|
#else
|
|
217
|
-
#define sqlite3_compileoption_used(X) 0
|
|
218
|
-
#define sqlite3_compileoption_get(X)
|
|
216
|
+
# define sqlite3_compileoption_used(X) 0
|
|
217
|
+
# define sqlite3_compileoption_get(X) ((void*)0)
|
|
219
218
|
#endif
|
|
220
219
|
|
|
221
220
|
/*
|
|
@@ -289,18 +288,18 @@ typedef struct sqlite3 sqlite3;
|
|
|
289
288
|
** between 0 and +18446744073709551615 inclusive.
|
|
290
289
|
*/
|
|
291
290
|
#ifdef SQLITE_INT64_TYPE
|
|
292
|
-
typedef SQLITE_INT64_TYPE sqlite_int64;
|
|
293
|
-
#ifdef SQLITE_UINT64_TYPE
|
|
294
|
-
typedef SQLITE_UINT64_TYPE sqlite_uint64;
|
|
295
|
-
#else
|
|
296
|
-
typedef unsigned SQLITE_INT64_TYPE sqlite_uint64;
|
|
297
|
-
#endif
|
|
291
|
+
typedef SQLITE_INT64_TYPE sqlite_int64;
|
|
292
|
+
# ifdef SQLITE_UINT64_TYPE
|
|
293
|
+
typedef SQLITE_UINT64_TYPE sqlite_uint64;
|
|
294
|
+
# else
|
|
295
|
+
typedef unsigned SQLITE_INT64_TYPE sqlite_uint64;
|
|
296
|
+
# endif
|
|
298
297
|
#elif defined(_MSC_VER) || defined(__BORLANDC__)
|
|
299
|
-
typedef __int64 sqlite_int64;
|
|
300
|
-
typedef unsigned __int64 sqlite_uint64;
|
|
298
|
+
typedef __int64 sqlite_int64;
|
|
299
|
+
typedef unsigned __int64 sqlite_uint64;
|
|
301
300
|
#else
|
|
302
|
-
typedef long long int sqlite_int64;
|
|
303
|
-
typedef unsigned long long int sqlite_uint64;
|
|
301
|
+
typedef long long int sqlite_int64;
|
|
302
|
+
typedef unsigned long long int sqlite_uint64;
|
|
304
303
|
#endif
|
|
305
304
|
typedef sqlite_int64 sqlite3_int64;
|
|
306
305
|
typedef sqlite_uint64 sqlite3_uint64;
|
|
@@ -310,7 +309,7 @@ typedef sqlite_uint64 sqlite3_uint64;
|
|
|
310
309
|
** substitute integer for floating-point.
|
|
311
310
|
*/
|
|
312
311
|
#ifdef SQLITE_OMIT_FLOATING_POINT
|
|
313
|
-
#define double sqlite3_int64
|
|
312
|
+
# define double sqlite3_int64
|
|
314
313
|
#endif
|
|
315
314
|
|
|
316
315
|
/*
|
|
@@ -351,15 +350,15 @@ typedef sqlite_uint64 sqlite3_uint64;
|
|
|
351
350
|
** ^Calling sqlite3_close() or sqlite3_close_v2() with a NULL pointer
|
|
352
351
|
** argument is a harmless no-op.
|
|
353
352
|
*/
|
|
354
|
-
SQLITE_API int sqlite3_close(sqlite3
|
|
355
|
-
SQLITE_API int sqlite3_close_v2(sqlite3
|
|
353
|
+
SQLITE_API int sqlite3_close(sqlite3*);
|
|
354
|
+
SQLITE_API int sqlite3_close_v2(sqlite3*);
|
|
356
355
|
|
|
357
356
|
/*
|
|
358
357
|
** The type for a callback function.
|
|
359
358
|
** This is legacy and deprecated. It is included for historical
|
|
360
359
|
** compatibility and is not documented.
|
|
361
360
|
*/
|
|
362
|
-
typedef int (*sqlite3_callback)(void
|
|
361
|
+
typedef int (*sqlite3_callback)(void*,int,char**, char**);
|
|
363
362
|
|
|
364
363
|
/*
|
|
365
364
|
** CAPI3REF: One-Step Query Execution Interface
|
|
@@ -423,12 +422,12 @@ typedef int (*sqlite3_callback)(void *, int, char **, char **);
|
|
|
423
422
|
** the 2nd parameter of sqlite3_exec() while sqlite3_exec() is running.
|
|
424
423
|
** </ul>
|
|
425
424
|
*/
|
|
426
|
-
SQLITE_API int sqlite3_exec(
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
425
|
+
SQLITE_API int sqlite3_exec(
|
|
426
|
+
sqlite3*, /* An open database */
|
|
427
|
+
const char *sql, /* SQL to be evaluated */
|
|
428
|
+
int (*callback)(void*,int,char**,char**), /* Callback function */
|
|
429
|
+
void *, /* 1st argument to callback */
|
|
430
|
+
char **errmsg /* Error msg written here */
|
|
432
431
|
);
|
|
433
432
|
|
|
434
433
|
/*
|
|
@@ -442,38 +441,38 @@ SQLITE_API int sqlite3_exec(sqlite3 *, /* An open database */
|
|
|
442
441
|
**
|
|
443
442
|
** See also: [extended result code definitions]
|
|
444
443
|
*/
|
|
445
|
-
#define SQLITE_OK
|
|
444
|
+
#define SQLITE_OK 0 /* Successful result */
|
|
446
445
|
/* beginning-of-error-codes */
|
|
447
|
-
#define SQLITE_ERROR
|
|
448
|
-
#define SQLITE_INTERNAL
|
|
449
|
-
#define SQLITE_PERM
|
|
450
|
-
#define SQLITE_ABORT
|
|
451
|
-
#define SQLITE_BUSY
|
|
452
|
-
#define SQLITE_LOCKED
|
|
453
|
-
#define SQLITE_NOMEM
|
|
454
|
-
#define SQLITE_READONLY
|
|
455
|
-
#define SQLITE_INTERRUPT
|
|
456
|
-
#define SQLITE_IOERR
|
|
457
|
-
#define SQLITE_CORRUPT
|
|
458
|
-
#define SQLITE_NOTFOUND
|
|
459
|
-
#define SQLITE_FULL
|
|
460
|
-
#define SQLITE_CANTOPEN
|
|
461
|
-
#define SQLITE_PROTOCOL
|
|
462
|
-
#define SQLITE_EMPTY
|
|
463
|
-
#define SQLITE_SCHEMA
|
|
464
|
-
#define SQLITE_TOOBIG
|
|
465
|
-
#define SQLITE_CONSTRAINT
|
|
466
|
-
#define SQLITE_MISMATCH
|
|
467
|
-
#define SQLITE_MISUSE
|
|
468
|
-
#define SQLITE_NOLFS
|
|
469
|
-
#define SQLITE_AUTH
|
|
470
|
-
#define SQLITE_FORMAT
|
|
471
|
-
#define SQLITE_RANGE
|
|
472
|
-
#define SQLITE_NOTADB
|
|
473
|
-
#define SQLITE_NOTICE
|
|
474
|
-
#define SQLITE_WARNING
|
|
475
|
-
#define SQLITE_ROW
|
|
476
|
-
#define SQLITE_DONE
|
|
446
|
+
#define SQLITE_ERROR 1 /* Generic error */
|
|
447
|
+
#define SQLITE_INTERNAL 2 /* Internal logic error in SQLite */
|
|
448
|
+
#define SQLITE_PERM 3 /* Access permission denied */
|
|
449
|
+
#define SQLITE_ABORT 4 /* Callback routine requested an abort */
|
|
450
|
+
#define SQLITE_BUSY 5 /* The database file is locked */
|
|
451
|
+
#define SQLITE_LOCKED 6 /* A table in the database is locked */
|
|
452
|
+
#define SQLITE_NOMEM 7 /* A malloc() failed */
|
|
453
|
+
#define SQLITE_READONLY 8 /* Attempt to write a readonly database */
|
|
454
|
+
#define SQLITE_INTERRUPT 9 /* Operation terminated by sqlite3_interrupt()*/
|
|
455
|
+
#define SQLITE_IOERR 10 /* Some kind of disk I/O error occurred */
|
|
456
|
+
#define SQLITE_CORRUPT 11 /* The database disk image is malformed */
|
|
457
|
+
#define SQLITE_NOTFOUND 12 /* Unknown opcode in sqlite3_file_control() */
|
|
458
|
+
#define SQLITE_FULL 13 /* Insertion failed because database is full */
|
|
459
|
+
#define SQLITE_CANTOPEN 14 /* Unable to open the database file */
|
|
460
|
+
#define SQLITE_PROTOCOL 15 /* Database lock protocol error */
|
|
461
|
+
#define SQLITE_EMPTY 16 /* Internal use only */
|
|
462
|
+
#define SQLITE_SCHEMA 17 /* The database schema changed */
|
|
463
|
+
#define SQLITE_TOOBIG 18 /* String or BLOB exceeds size limit */
|
|
464
|
+
#define SQLITE_CONSTRAINT 19 /* Abort due to constraint violation */
|
|
465
|
+
#define SQLITE_MISMATCH 20 /* Data type mismatch */
|
|
466
|
+
#define SQLITE_MISUSE 21 /* Library used incorrectly */
|
|
467
|
+
#define SQLITE_NOLFS 22 /* Uses OS features not supported on host */
|
|
468
|
+
#define SQLITE_AUTH 23 /* Authorization denied */
|
|
469
|
+
#define SQLITE_FORMAT 24 /* Not used */
|
|
470
|
+
#define SQLITE_RANGE 25 /* 2nd parameter to sqlite3_bind out of range */
|
|
471
|
+
#define SQLITE_NOTADB 26 /* File opened that is not a database file */
|
|
472
|
+
#define SQLITE_NOTICE 27 /* Notifications from sqlite3_log() */
|
|
473
|
+
#define SQLITE_WARNING 28 /* Warnings from sqlite3_log() */
|
|
474
|
+
#define SQLITE_ROW 100 /* sqlite3_step() has another row ready */
|
|
475
|
+
#define SQLITE_DONE 101 /* sqlite3_step() has finished executing */
|
|
477
476
|
/* end-of-error-codes */
|
|
478
477
|
|
|
479
478
|
/*
|
|
@@ -493,82 +492,83 @@ SQLITE_API int sqlite3_exec(sqlite3 *, /* An open database */
|
|
|
493
492
|
** the most recent error can be obtained using
|
|
494
493
|
** [sqlite3_extended_errcode()].
|
|
495
494
|
*/
|
|
496
|
-
#define SQLITE_ERROR_MISSING_COLLSEQ
|
|
497
|
-
#define SQLITE_ERROR_RETRY
|
|
498
|
-
#define SQLITE_ERROR_SNAPSHOT
|
|
499
|
-
#define SQLITE_IOERR_READ
|
|
500
|
-
#define SQLITE_IOERR_SHORT_READ
|
|
501
|
-
#define SQLITE_IOERR_WRITE
|
|
502
|
-
#define SQLITE_IOERR_FSYNC
|
|
503
|
-
#define SQLITE_IOERR_DIR_FSYNC
|
|
504
|
-
#define SQLITE_IOERR_TRUNCATE
|
|
505
|
-
#define SQLITE_IOERR_FSTAT
|
|
506
|
-
#define SQLITE_IOERR_UNLOCK
|
|
507
|
-
#define SQLITE_IOERR_RDLOCK
|
|
508
|
-
#define SQLITE_IOERR_DELETE
|
|
509
|
-
#define SQLITE_IOERR_BLOCKED
|
|
510
|
-
#define SQLITE_IOERR_NOMEM
|
|
511
|
-
#define SQLITE_IOERR_ACCESS
|
|
512
|
-
#define SQLITE_IOERR_CHECKRESERVEDLOCK (SQLITE_IOERR | (14
|
|
513
|
-
#define SQLITE_IOERR_LOCK
|
|
514
|
-
#define SQLITE_IOERR_CLOSE
|
|
515
|
-
#define SQLITE_IOERR_DIR_CLOSE
|
|
516
|
-
#define SQLITE_IOERR_SHMOPEN
|
|
517
|
-
#define SQLITE_IOERR_SHMSIZE
|
|
518
|
-
#define SQLITE_IOERR_SHMLOCK
|
|
519
|
-
#define SQLITE_IOERR_SHMMAP
|
|
520
|
-
#define SQLITE_IOERR_SEEK
|
|
521
|
-
#define SQLITE_IOERR_DELETE_NOENT
|
|
522
|
-
#define SQLITE_IOERR_MMAP
|
|
523
|
-
#define SQLITE_IOERR_GETTEMPPATH
|
|
524
|
-
#define SQLITE_IOERR_CONVPATH
|
|
525
|
-
#define SQLITE_IOERR_VNODE
|
|
526
|
-
#define SQLITE_IOERR_AUTH
|
|
527
|
-
#define SQLITE_IOERR_BEGIN_ATOMIC
|
|
528
|
-
#define SQLITE_IOERR_COMMIT_ATOMIC
|
|
529
|
-
#define SQLITE_IOERR_ROLLBACK_ATOMIC
|
|
530
|
-
#define SQLITE_IOERR_DATA
|
|
531
|
-
#define SQLITE_IOERR_CORRUPTFS
|
|
532
|
-
#define
|
|
533
|
-
#define
|
|
534
|
-
#define
|
|
535
|
-
#define
|
|
536
|
-
#define
|
|
537
|
-
#define
|
|
538
|
-
#define
|
|
539
|
-
#define
|
|
540
|
-
#define
|
|
541
|
-
#define
|
|
542
|
-
#define
|
|
543
|
-
#define
|
|
544
|
-
#define
|
|
545
|
-
#define
|
|
546
|
-
#define
|
|
547
|
-
#define
|
|
548
|
-
#define
|
|
549
|
-
#define
|
|
550
|
-
#define
|
|
551
|
-
#define
|
|
552
|
-
#define
|
|
553
|
-
#define
|
|
554
|
-
#define
|
|
555
|
-
#define
|
|
556
|
-
#define
|
|
557
|
-
#define
|
|
558
|
-
#define
|
|
559
|
-
#define
|
|
560
|
-
#define
|
|
561
|
-
#define
|
|
562
|
-
#define
|
|
563
|
-
#define
|
|
564
|
-
#define
|
|
565
|
-
#define
|
|
566
|
-
#define
|
|
567
|
-
#define
|
|
568
|
-
#define
|
|
569
|
-
#define
|
|
570
|
-
#define
|
|
571
|
-
#define
|
|
495
|
+
#define SQLITE_ERROR_MISSING_COLLSEQ (SQLITE_ERROR | (1<<8))
|
|
496
|
+
#define SQLITE_ERROR_RETRY (SQLITE_ERROR | (2<<8))
|
|
497
|
+
#define SQLITE_ERROR_SNAPSHOT (SQLITE_ERROR | (3<<8))
|
|
498
|
+
#define SQLITE_IOERR_READ (SQLITE_IOERR | (1<<8))
|
|
499
|
+
#define SQLITE_IOERR_SHORT_READ (SQLITE_IOERR | (2<<8))
|
|
500
|
+
#define SQLITE_IOERR_WRITE (SQLITE_IOERR | (3<<8))
|
|
501
|
+
#define SQLITE_IOERR_FSYNC (SQLITE_IOERR | (4<<8))
|
|
502
|
+
#define SQLITE_IOERR_DIR_FSYNC (SQLITE_IOERR | (5<<8))
|
|
503
|
+
#define SQLITE_IOERR_TRUNCATE (SQLITE_IOERR | (6<<8))
|
|
504
|
+
#define SQLITE_IOERR_FSTAT (SQLITE_IOERR | (7<<8))
|
|
505
|
+
#define SQLITE_IOERR_UNLOCK (SQLITE_IOERR | (8<<8))
|
|
506
|
+
#define SQLITE_IOERR_RDLOCK (SQLITE_IOERR | (9<<8))
|
|
507
|
+
#define SQLITE_IOERR_DELETE (SQLITE_IOERR | (10<<8))
|
|
508
|
+
#define SQLITE_IOERR_BLOCKED (SQLITE_IOERR | (11<<8))
|
|
509
|
+
#define SQLITE_IOERR_NOMEM (SQLITE_IOERR | (12<<8))
|
|
510
|
+
#define SQLITE_IOERR_ACCESS (SQLITE_IOERR | (13<<8))
|
|
511
|
+
#define SQLITE_IOERR_CHECKRESERVEDLOCK (SQLITE_IOERR | (14<<8))
|
|
512
|
+
#define SQLITE_IOERR_LOCK (SQLITE_IOERR | (15<<8))
|
|
513
|
+
#define SQLITE_IOERR_CLOSE (SQLITE_IOERR | (16<<8))
|
|
514
|
+
#define SQLITE_IOERR_DIR_CLOSE (SQLITE_IOERR | (17<<8))
|
|
515
|
+
#define SQLITE_IOERR_SHMOPEN (SQLITE_IOERR | (18<<8))
|
|
516
|
+
#define SQLITE_IOERR_SHMSIZE (SQLITE_IOERR | (19<<8))
|
|
517
|
+
#define SQLITE_IOERR_SHMLOCK (SQLITE_IOERR | (20<<8))
|
|
518
|
+
#define SQLITE_IOERR_SHMMAP (SQLITE_IOERR | (21<<8))
|
|
519
|
+
#define SQLITE_IOERR_SEEK (SQLITE_IOERR | (22<<8))
|
|
520
|
+
#define SQLITE_IOERR_DELETE_NOENT (SQLITE_IOERR | (23<<8))
|
|
521
|
+
#define SQLITE_IOERR_MMAP (SQLITE_IOERR | (24<<8))
|
|
522
|
+
#define SQLITE_IOERR_GETTEMPPATH (SQLITE_IOERR | (25<<8))
|
|
523
|
+
#define SQLITE_IOERR_CONVPATH (SQLITE_IOERR | (26<<8))
|
|
524
|
+
#define SQLITE_IOERR_VNODE (SQLITE_IOERR | (27<<8))
|
|
525
|
+
#define SQLITE_IOERR_AUTH (SQLITE_IOERR | (28<<8))
|
|
526
|
+
#define SQLITE_IOERR_BEGIN_ATOMIC (SQLITE_IOERR | (29<<8))
|
|
527
|
+
#define SQLITE_IOERR_COMMIT_ATOMIC (SQLITE_IOERR | (30<<8))
|
|
528
|
+
#define SQLITE_IOERR_ROLLBACK_ATOMIC (SQLITE_IOERR | (31<<8))
|
|
529
|
+
#define SQLITE_IOERR_DATA (SQLITE_IOERR | (32<<8))
|
|
530
|
+
#define SQLITE_IOERR_CORRUPTFS (SQLITE_IOERR | (33<<8))
|
|
531
|
+
#define SQLITE_IOERR_IN_PAGE (SQLITE_IOERR | (34<<8))
|
|
532
|
+
#define SQLITE_LOCKED_SHAREDCACHE (SQLITE_LOCKED | (1<<8))
|
|
533
|
+
#define SQLITE_LOCKED_VTAB (SQLITE_LOCKED | (2<<8))
|
|
534
|
+
#define SQLITE_BUSY_RECOVERY (SQLITE_BUSY | (1<<8))
|
|
535
|
+
#define SQLITE_BUSY_SNAPSHOT (SQLITE_BUSY | (2<<8))
|
|
536
|
+
#define SQLITE_BUSY_TIMEOUT (SQLITE_BUSY | (3<<8))
|
|
537
|
+
#define SQLITE_CANTOPEN_NOTEMPDIR (SQLITE_CANTOPEN | (1<<8))
|
|
538
|
+
#define SQLITE_CANTOPEN_ISDIR (SQLITE_CANTOPEN | (2<<8))
|
|
539
|
+
#define SQLITE_CANTOPEN_FULLPATH (SQLITE_CANTOPEN | (3<<8))
|
|
540
|
+
#define SQLITE_CANTOPEN_CONVPATH (SQLITE_CANTOPEN | (4<<8))
|
|
541
|
+
#define SQLITE_CANTOPEN_DIRTYWAL (SQLITE_CANTOPEN | (5<<8)) /* Not Used */
|
|
542
|
+
#define SQLITE_CANTOPEN_SYMLINK (SQLITE_CANTOPEN | (6<<8))
|
|
543
|
+
#define SQLITE_CORRUPT_VTAB (SQLITE_CORRUPT | (1<<8))
|
|
544
|
+
#define SQLITE_CORRUPT_SEQUENCE (SQLITE_CORRUPT | (2<<8))
|
|
545
|
+
#define SQLITE_CORRUPT_INDEX (SQLITE_CORRUPT | (3<<8))
|
|
546
|
+
#define SQLITE_READONLY_RECOVERY (SQLITE_READONLY | (1<<8))
|
|
547
|
+
#define SQLITE_READONLY_CANTLOCK (SQLITE_READONLY | (2<<8))
|
|
548
|
+
#define SQLITE_READONLY_ROLLBACK (SQLITE_READONLY | (3<<8))
|
|
549
|
+
#define SQLITE_READONLY_DBMOVED (SQLITE_READONLY | (4<<8))
|
|
550
|
+
#define SQLITE_READONLY_CANTINIT (SQLITE_READONLY | (5<<8))
|
|
551
|
+
#define SQLITE_READONLY_DIRECTORY (SQLITE_READONLY | (6<<8))
|
|
552
|
+
#define SQLITE_ABORT_ROLLBACK (SQLITE_ABORT | (2<<8))
|
|
553
|
+
#define SQLITE_CONSTRAINT_CHECK (SQLITE_CONSTRAINT | (1<<8))
|
|
554
|
+
#define SQLITE_CONSTRAINT_COMMITHOOK (SQLITE_CONSTRAINT | (2<<8))
|
|
555
|
+
#define SQLITE_CONSTRAINT_FOREIGNKEY (SQLITE_CONSTRAINT | (3<<8))
|
|
556
|
+
#define SQLITE_CONSTRAINT_FUNCTION (SQLITE_CONSTRAINT | (4<<8))
|
|
557
|
+
#define SQLITE_CONSTRAINT_NOTNULL (SQLITE_CONSTRAINT | (5<<8))
|
|
558
|
+
#define SQLITE_CONSTRAINT_PRIMARYKEY (SQLITE_CONSTRAINT | (6<<8))
|
|
559
|
+
#define SQLITE_CONSTRAINT_TRIGGER (SQLITE_CONSTRAINT | (7<<8))
|
|
560
|
+
#define SQLITE_CONSTRAINT_UNIQUE (SQLITE_CONSTRAINT | (8<<8))
|
|
561
|
+
#define SQLITE_CONSTRAINT_VTAB (SQLITE_CONSTRAINT | (9<<8))
|
|
562
|
+
#define SQLITE_CONSTRAINT_ROWID (SQLITE_CONSTRAINT |(10<<8))
|
|
563
|
+
#define SQLITE_CONSTRAINT_PINNED (SQLITE_CONSTRAINT |(11<<8))
|
|
564
|
+
#define SQLITE_CONSTRAINT_DATATYPE (SQLITE_CONSTRAINT |(12<<8))
|
|
565
|
+
#define SQLITE_NOTICE_RECOVER_WAL (SQLITE_NOTICE | (1<<8))
|
|
566
|
+
#define SQLITE_NOTICE_RECOVER_ROLLBACK (SQLITE_NOTICE | (2<<8))
|
|
567
|
+
#define SQLITE_NOTICE_RBU (SQLITE_NOTICE | (3<<8))
|
|
568
|
+
#define SQLITE_WARNING_AUTOINDEX (SQLITE_WARNING | (1<<8))
|
|
569
|
+
#define SQLITE_AUTH_USER (SQLITE_AUTH | (1<<8))
|
|
570
|
+
#define SQLITE_OK_LOAD_PERMANENTLY (SQLITE_OK | (1<<8))
|
|
571
|
+
#define SQLITE_OK_SYMLINK (SQLITE_OK | (2<<8)) /* internal use only */
|
|
572
572
|
|
|
573
573
|
/*
|
|
574
574
|
** CAPI3REF: Flags For File Open Operations
|
|
@@ -590,32 +590,33 @@ SQLITE_API int sqlite3_exec(sqlite3 *, /* An open database */
|
|
|
590
590
|
** [sqlite3_open_v2()] has historically be a no-op and might become an
|
|
591
591
|
** error in future versions of SQLite.
|
|
592
592
|
*/
|
|
593
|
-
#define SQLITE_OPEN_READONLY
|
|
594
|
-
#define SQLITE_OPEN_READWRITE
|
|
595
|
-
#define SQLITE_OPEN_CREATE
|
|
596
|
-
#define SQLITE_OPEN_DELETEONCLOSE
|
|
597
|
-
#define SQLITE_OPEN_EXCLUSIVE
|
|
598
|
-
#define SQLITE_OPEN_AUTOPROXY
|
|
599
|
-
#define SQLITE_OPEN_URI
|
|
600
|
-
#define SQLITE_OPEN_MEMORY
|
|
601
|
-
#define SQLITE_OPEN_MAIN_DB
|
|
602
|
-
#define SQLITE_OPEN_TEMP_DB
|
|
603
|
-
#define SQLITE_OPEN_TRANSIENT_DB
|
|
604
|
-
#define SQLITE_OPEN_MAIN_JOURNAL
|
|
605
|
-
#define SQLITE_OPEN_TEMP_JOURNAL
|
|
606
|
-
#define SQLITE_OPEN_SUBJOURNAL
|
|
607
|
-
#define SQLITE_OPEN_SUPER_JOURNAL
|
|
608
|
-
#define SQLITE_OPEN_NOMUTEX
|
|
609
|
-
#define SQLITE_OPEN_FULLMUTEX
|
|
610
|
-
#define SQLITE_OPEN_SHAREDCACHE
|
|
611
|
-
#define SQLITE_OPEN_PRIVATECACHE
|
|
612
|
-
#define SQLITE_OPEN_WAL
|
|
613
|
-
#define SQLITE_OPEN_NOFOLLOW
|
|
614
|
-
#define SQLITE_OPEN_EXRESCODE
|
|
593
|
+
#define SQLITE_OPEN_READONLY 0x00000001 /* Ok for sqlite3_open_v2() */
|
|
594
|
+
#define SQLITE_OPEN_READWRITE 0x00000002 /* Ok for sqlite3_open_v2() */
|
|
595
|
+
#define SQLITE_OPEN_CREATE 0x00000004 /* Ok for sqlite3_open_v2() */
|
|
596
|
+
#define SQLITE_OPEN_DELETEONCLOSE 0x00000008 /* VFS only */
|
|
597
|
+
#define SQLITE_OPEN_EXCLUSIVE 0x00000010 /* VFS only */
|
|
598
|
+
#define SQLITE_OPEN_AUTOPROXY 0x00000020 /* VFS only */
|
|
599
|
+
#define SQLITE_OPEN_URI 0x00000040 /* Ok for sqlite3_open_v2() */
|
|
600
|
+
#define SQLITE_OPEN_MEMORY 0x00000080 /* Ok for sqlite3_open_v2() */
|
|
601
|
+
#define SQLITE_OPEN_MAIN_DB 0x00000100 /* VFS only */
|
|
602
|
+
#define SQLITE_OPEN_TEMP_DB 0x00000200 /* VFS only */
|
|
603
|
+
#define SQLITE_OPEN_TRANSIENT_DB 0x00000400 /* VFS only */
|
|
604
|
+
#define SQLITE_OPEN_MAIN_JOURNAL 0x00000800 /* VFS only */
|
|
605
|
+
#define SQLITE_OPEN_TEMP_JOURNAL 0x00001000 /* VFS only */
|
|
606
|
+
#define SQLITE_OPEN_SUBJOURNAL 0x00002000 /* VFS only */
|
|
607
|
+
#define SQLITE_OPEN_SUPER_JOURNAL 0x00004000 /* VFS only */
|
|
608
|
+
#define SQLITE_OPEN_NOMUTEX 0x00008000 /* Ok for sqlite3_open_v2() */
|
|
609
|
+
#define SQLITE_OPEN_FULLMUTEX 0x00010000 /* Ok for sqlite3_open_v2() */
|
|
610
|
+
#define SQLITE_OPEN_SHAREDCACHE 0x00020000 /* Ok for sqlite3_open_v2() */
|
|
611
|
+
#define SQLITE_OPEN_PRIVATECACHE 0x00040000 /* Ok for sqlite3_open_v2() */
|
|
612
|
+
#define SQLITE_OPEN_WAL 0x00080000 /* VFS only */
|
|
613
|
+
#define SQLITE_OPEN_NOFOLLOW 0x01000000 /* Ok for sqlite3_open_v2() */
|
|
614
|
+
#define SQLITE_OPEN_EXRESCODE 0x02000000 /* Extended result codes */
|
|
615
615
|
|
|
616
616
|
/* Reserved: 0x00F00000 */
|
|
617
617
|
/* Legacy compatibility: */
|
|
618
|
-
#define SQLITE_OPEN_MASTER_JOURNAL
|
|
618
|
+
#define SQLITE_OPEN_MASTER_JOURNAL 0x00004000 /* VFS only */
|
|
619
|
+
|
|
619
620
|
|
|
620
621
|
/*
|
|
621
622
|
** CAPI3REF: Device Characteristics
|
|
@@ -650,21 +651,21 @@ SQLITE_API int sqlite3_exec(sqlite3 *, /* An open database */
|
|
|
650
651
|
** write operations are bracketed by [SQLITE_FCNTL_BEGIN_ATOMIC_WRITE] and
|
|
651
652
|
** [SQLITE_FCNTL_COMMIT_ATOMIC_WRITE].
|
|
652
653
|
*/
|
|
653
|
-
#define SQLITE_IOCAP_ATOMIC
|
|
654
|
-
#define SQLITE_IOCAP_ATOMIC512
|
|
655
|
-
#define SQLITE_IOCAP_ATOMIC1K
|
|
656
|
-
#define SQLITE_IOCAP_ATOMIC2K
|
|
657
|
-
#define SQLITE_IOCAP_ATOMIC4K
|
|
658
|
-
#define SQLITE_IOCAP_ATOMIC8K
|
|
659
|
-
#define SQLITE_IOCAP_ATOMIC16K
|
|
660
|
-
#define SQLITE_IOCAP_ATOMIC32K
|
|
661
|
-
#define SQLITE_IOCAP_ATOMIC64K
|
|
662
|
-
#define SQLITE_IOCAP_SAFE_APPEND
|
|
663
|
-
#define SQLITE_IOCAP_SEQUENTIAL
|
|
664
|
-
#define SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN
|
|
665
|
-
#define SQLITE_IOCAP_POWERSAFE_OVERWRITE
|
|
666
|
-
#define SQLITE_IOCAP_IMMUTABLE
|
|
667
|
-
#define SQLITE_IOCAP_BATCH_ATOMIC
|
|
654
|
+
#define SQLITE_IOCAP_ATOMIC 0x00000001
|
|
655
|
+
#define SQLITE_IOCAP_ATOMIC512 0x00000002
|
|
656
|
+
#define SQLITE_IOCAP_ATOMIC1K 0x00000004
|
|
657
|
+
#define SQLITE_IOCAP_ATOMIC2K 0x00000008
|
|
658
|
+
#define SQLITE_IOCAP_ATOMIC4K 0x00000010
|
|
659
|
+
#define SQLITE_IOCAP_ATOMIC8K 0x00000020
|
|
660
|
+
#define SQLITE_IOCAP_ATOMIC16K 0x00000040
|
|
661
|
+
#define SQLITE_IOCAP_ATOMIC32K 0x00000080
|
|
662
|
+
#define SQLITE_IOCAP_ATOMIC64K 0x00000100
|
|
663
|
+
#define SQLITE_IOCAP_SAFE_APPEND 0x00000200
|
|
664
|
+
#define SQLITE_IOCAP_SEQUENTIAL 0x00000400
|
|
665
|
+
#define SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN 0x00000800
|
|
666
|
+
#define SQLITE_IOCAP_POWERSAFE_OVERWRITE 0x00001000
|
|
667
|
+
#define SQLITE_IOCAP_IMMUTABLE 0x00002000
|
|
668
|
+
#define SQLITE_IOCAP_BATCH_ATOMIC 0x00004000
|
|
668
669
|
|
|
669
670
|
/*
|
|
670
671
|
** CAPI3REF: File Locking Levels
|
|
@@ -677,11 +678,11 @@ SQLITE_API int sqlite3_exec(sqlite3 *, /* An open database */
|
|
|
677
678
|
** The argument to xLock() is always SHARED or higher. The argument to
|
|
678
679
|
** xUnlock is either SHARED or NONE.
|
|
679
680
|
*/
|
|
680
|
-
#define SQLITE_LOCK_NONE
|
|
681
|
-
#define SQLITE_LOCK_SHARED
|
|
682
|
-
#define SQLITE_LOCK_RESERVED
|
|
683
|
-
#define SQLITE_LOCK_PENDING
|
|
684
|
-
#define SQLITE_LOCK_EXCLUSIVE
|
|
681
|
+
#define SQLITE_LOCK_NONE 0 /* xUnlock() only */
|
|
682
|
+
#define SQLITE_LOCK_SHARED 1 /* xLock() or xUnlock() */
|
|
683
|
+
#define SQLITE_LOCK_RESERVED 2 /* xLock() only */
|
|
684
|
+
#define SQLITE_LOCK_PENDING 3 /* xLock() only */
|
|
685
|
+
#define SQLITE_LOCK_EXCLUSIVE 4 /* xLock() only */
|
|
685
686
|
|
|
686
687
|
/*
|
|
687
688
|
** CAPI3REF: Synchronization Type Flags
|
|
@@ -709,9 +710,9 @@ SQLITE_API int sqlite3_exec(sqlite3 *, /* An open database */
|
|
|
709
710
|
** operating systems natively supported by SQLite, only Mac OSX
|
|
710
711
|
** cares about the difference.)
|
|
711
712
|
*/
|
|
712
|
-
#define SQLITE_SYNC_NORMAL
|
|
713
|
-
#define SQLITE_SYNC_FULL
|
|
714
|
-
#define SQLITE_SYNC_DATAONLY
|
|
713
|
+
#define SQLITE_SYNC_NORMAL 0x00002
|
|
714
|
+
#define SQLITE_SYNC_FULL 0x00003
|
|
715
|
+
#define SQLITE_SYNC_DATAONLY 0x00010
|
|
715
716
|
|
|
716
717
|
/*
|
|
717
718
|
** CAPI3REF: OS Interface Open File Handle
|
|
@@ -726,7 +727,7 @@ SQLITE_API int sqlite3_exec(sqlite3 *, /* An open database */
|
|
|
726
727
|
*/
|
|
727
728
|
typedef struct sqlite3_file sqlite3_file;
|
|
728
729
|
struct sqlite3_file {
|
|
729
|
-
const struct sqlite3_io_methods *pMethods;
|
|
730
|
+
const struct sqlite3_io_methods *pMethods; /* Methods for an open file */
|
|
730
731
|
};
|
|
731
732
|
|
|
732
733
|
/*
|
|
@@ -833,26 +834,26 @@ struct sqlite3_file {
|
|
|
833
834
|
typedef struct sqlite3_io_methods sqlite3_io_methods;
|
|
834
835
|
struct sqlite3_io_methods {
|
|
835
836
|
int iVersion;
|
|
836
|
-
int (*xClose)(sqlite3_file
|
|
837
|
-
int (*xRead)(sqlite3_file
|
|
838
|
-
int (*xWrite)(sqlite3_file
|
|
839
|
-
int (*xTruncate)(sqlite3_file
|
|
840
|
-
int (*xSync)(sqlite3_file
|
|
841
|
-
int (*xFileSize)(sqlite3_file
|
|
842
|
-
int (*xLock)(sqlite3_file
|
|
843
|
-
int (*xUnlock)(sqlite3_file
|
|
844
|
-
int (*xCheckReservedLock)(sqlite3_file
|
|
845
|
-
int (*xFileControl)(sqlite3_file
|
|
846
|
-
int (*xSectorSize)(sqlite3_file
|
|
847
|
-
int (*xDeviceCharacteristics)(sqlite3_file
|
|
837
|
+
int (*xClose)(sqlite3_file*);
|
|
838
|
+
int (*xRead)(sqlite3_file*, void*, int iAmt, sqlite3_int64 iOfst);
|
|
839
|
+
int (*xWrite)(sqlite3_file*, const void*, int iAmt, sqlite3_int64 iOfst);
|
|
840
|
+
int (*xTruncate)(sqlite3_file*, sqlite3_int64 size);
|
|
841
|
+
int (*xSync)(sqlite3_file*, int flags);
|
|
842
|
+
int (*xFileSize)(sqlite3_file*, sqlite3_int64 *pSize);
|
|
843
|
+
int (*xLock)(sqlite3_file*, int);
|
|
844
|
+
int (*xUnlock)(sqlite3_file*, int);
|
|
845
|
+
int (*xCheckReservedLock)(sqlite3_file*, int *pResOut);
|
|
846
|
+
int (*xFileControl)(sqlite3_file*, int op, void *pArg);
|
|
847
|
+
int (*xSectorSize)(sqlite3_file*);
|
|
848
|
+
int (*xDeviceCharacteristics)(sqlite3_file*);
|
|
848
849
|
/* Methods above are valid for version 1 */
|
|
849
|
-
int (*xShmMap)(sqlite3_file
|
|
850
|
-
int (*xShmLock)(sqlite3_file
|
|
851
|
-
void (*xShmBarrier)(sqlite3_file
|
|
852
|
-
int (*xShmUnmap)(sqlite3_file
|
|
850
|
+
int (*xShmMap)(sqlite3_file*, int iPg, int pgsz, int, void volatile**);
|
|
851
|
+
int (*xShmLock)(sqlite3_file*, int offset, int n, int flags);
|
|
852
|
+
void (*xShmBarrier)(sqlite3_file*);
|
|
853
|
+
int (*xShmUnmap)(sqlite3_file*, int deleteFlag);
|
|
853
854
|
/* Methods above are valid for version 2 */
|
|
854
|
-
int (*xFetch)(sqlite3_file
|
|
855
|
-
int (*xUnfetch)(sqlite3_file
|
|
855
|
+
int (*xFetch)(sqlite3_file*, sqlite3_int64 iOfst, int iAmt, void **pp);
|
|
856
|
+
int (*xUnfetch)(sqlite3_file*, sqlite3_int64 iOfst, void *p);
|
|
856
857
|
/* Methods above are valid for version 3 */
|
|
857
858
|
/* Additional methods may be added in future releases */
|
|
858
859
|
};
|
|
@@ -1190,7 +1191,7 @@ struct sqlite3_io_methods {
|
|
|
1190
1191
|
** by clients within the current process, only within other processes.
|
|
1191
1192
|
**
|
|
1192
1193
|
** <li>[[SQLITE_FCNTL_CKSM_FILE]]
|
|
1193
|
-
** The [SQLITE_FCNTL_CKSM_FILE] opcode is for use
|
|
1194
|
+
** The [SQLITE_FCNTL_CKSM_FILE] opcode is for use internally by the
|
|
1194
1195
|
** [checksum VFS shim] only.
|
|
1195
1196
|
**
|
|
1196
1197
|
** <li>[[SQLITE_FCNTL_RESET_CACHE]]
|
|
@@ -1200,52 +1201,53 @@ struct sqlite3_io_methods {
|
|
|
1200
1201
|
** transaction, or if the db is a temp-db, this opcode is a no-op, not an error.
|
|
1201
1202
|
** </ul>
|
|
1202
1203
|
*/
|
|
1203
|
-
#define SQLITE_FCNTL_LOCKSTATE
|
|
1204
|
-
#define SQLITE_FCNTL_GET_LOCKPROXYFILE
|
|
1205
|
-
#define SQLITE_FCNTL_SET_LOCKPROXYFILE
|
|
1206
|
-
#define SQLITE_FCNTL_LAST_ERRNO
|
|
1207
|
-
#define SQLITE_FCNTL_SIZE_HINT
|
|
1208
|
-
#define SQLITE_FCNTL_CHUNK_SIZE
|
|
1209
|
-
#define SQLITE_FCNTL_FILE_POINTER
|
|
1210
|
-
#define SQLITE_FCNTL_SYNC_OMITTED
|
|
1211
|
-
#define SQLITE_FCNTL_WIN32_AV_RETRY
|
|
1212
|
-
#define SQLITE_FCNTL_PERSIST_WAL
|
|
1213
|
-
#define SQLITE_FCNTL_OVERWRITE
|
|
1214
|
-
#define SQLITE_FCNTL_VFSNAME
|
|
1215
|
-
#define SQLITE_FCNTL_POWERSAFE_OVERWRITE
|
|
1216
|
-
#define SQLITE_FCNTL_PRAGMA
|
|
1217
|
-
#define SQLITE_FCNTL_BUSYHANDLER
|
|
1218
|
-
#define SQLITE_FCNTL_TEMPFILENAME
|
|
1219
|
-
#define SQLITE_FCNTL_MMAP_SIZE
|
|
1220
|
-
#define SQLITE_FCNTL_TRACE
|
|
1221
|
-
#define SQLITE_FCNTL_HAS_MOVED
|
|
1222
|
-
#define SQLITE_FCNTL_SYNC
|
|
1223
|
-
#define SQLITE_FCNTL_COMMIT_PHASETWO
|
|
1224
|
-
#define SQLITE_FCNTL_WIN32_SET_HANDLE
|
|
1225
|
-
#define SQLITE_FCNTL_WAL_BLOCK
|
|
1226
|
-
#define SQLITE_FCNTL_ZIPVFS
|
|
1227
|
-
#define SQLITE_FCNTL_RBU
|
|
1228
|
-
#define SQLITE_FCNTL_VFS_POINTER
|
|
1229
|
-
#define SQLITE_FCNTL_JOURNAL_POINTER
|
|
1230
|
-
#define SQLITE_FCNTL_WIN32_GET_HANDLE
|
|
1231
|
-
#define SQLITE_FCNTL_PDB
|
|
1232
|
-
#define SQLITE_FCNTL_BEGIN_ATOMIC_WRITE
|
|
1233
|
-
#define SQLITE_FCNTL_COMMIT_ATOMIC_WRITE
|
|
1234
|
-
#define SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE
|
|
1235
|
-
#define SQLITE_FCNTL_LOCK_TIMEOUT
|
|
1236
|
-
#define SQLITE_FCNTL_DATA_VERSION
|
|
1237
|
-
#define SQLITE_FCNTL_SIZE_LIMIT
|
|
1238
|
-
#define SQLITE_FCNTL_CKPT_DONE
|
|
1239
|
-
#define SQLITE_FCNTL_RESERVE_BYTES
|
|
1240
|
-
#define SQLITE_FCNTL_CKPT_START
|
|
1241
|
-
#define SQLITE_FCNTL_EXTERNAL_READER
|
|
1242
|
-
#define SQLITE_FCNTL_CKSM_FILE
|
|
1243
|
-
#define SQLITE_FCNTL_RESET_CACHE
|
|
1204
|
+
#define SQLITE_FCNTL_LOCKSTATE 1
|
|
1205
|
+
#define SQLITE_FCNTL_GET_LOCKPROXYFILE 2
|
|
1206
|
+
#define SQLITE_FCNTL_SET_LOCKPROXYFILE 3
|
|
1207
|
+
#define SQLITE_FCNTL_LAST_ERRNO 4
|
|
1208
|
+
#define SQLITE_FCNTL_SIZE_HINT 5
|
|
1209
|
+
#define SQLITE_FCNTL_CHUNK_SIZE 6
|
|
1210
|
+
#define SQLITE_FCNTL_FILE_POINTER 7
|
|
1211
|
+
#define SQLITE_FCNTL_SYNC_OMITTED 8
|
|
1212
|
+
#define SQLITE_FCNTL_WIN32_AV_RETRY 9
|
|
1213
|
+
#define SQLITE_FCNTL_PERSIST_WAL 10
|
|
1214
|
+
#define SQLITE_FCNTL_OVERWRITE 11
|
|
1215
|
+
#define SQLITE_FCNTL_VFSNAME 12
|
|
1216
|
+
#define SQLITE_FCNTL_POWERSAFE_OVERWRITE 13
|
|
1217
|
+
#define SQLITE_FCNTL_PRAGMA 14
|
|
1218
|
+
#define SQLITE_FCNTL_BUSYHANDLER 15
|
|
1219
|
+
#define SQLITE_FCNTL_TEMPFILENAME 16
|
|
1220
|
+
#define SQLITE_FCNTL_MMAP_SIZE 18
|
|
1221
|
+
#define SQLITE_FCNTL_TRACE 19
|
|
1222
|
+
#define SQLITE_FCNTL_HAS_MOVED 20
|
|
1223
|
+
#define SQLITE_FCNTL_SYNC 21
|
|
1224
|
+
#define SQLITE_FCNTL_COMMIT_PHASETWO 22
|
|
1225
|
+
#define SQLITE_FCNTL_WIN32_SET_HANDLE 23
|
|
1226
|
+
#define SQLITE_FCNTL_WAL_BLOCK 24
|
|
1227
|
+
#define SQLITE_FCNTL_ZIPVFS 25
|
|
1228
|
+
#define SQLITE_FCNTL_RBU 26
|
|
1229
|
+
#define SQLITE_FCNTL_VFS_POINTER 27
|
|
1230
|
+
#define SQLITE_FCNTL_JOURNAL_POINTER 28
|
|
1231
|
+
#define SQLITE_FCNTL_WIN32_GET_HANDLE 29
|
|
1232
|
+
#define SQLITE_FCNTL_PDB 30
|
|
1233
|
+
#define SQLITE_FCNTL_BEGIN_ATOMIC_WRITE 31
|
|
1234
|
+
#define SQLITE_FCNTL_COMMIT_ATOMIC_WRITE 32
|
|
1235
|
+
#define SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE 33
|
|
1236
|
+
#define SQLITE_FCNTL_LOCK_TIMEOUT 34
|
|
1237
|
+
#define SQLITE_FCNTL_DATA_VERSION 35
|
|
1238
|
+
#define SQLITE_FCNTL_SIZE_LIMIT 36
|
|
1239
|
+
#define SQLITE_FCNTL_CKPT_DONE 37
|
|
1240
|
+
#define SQLITE_FCNTL_RESERVE_BYTES 38
|
|
1241
|
+
#define SQLITE_FCNTL_CKPT_START 39
|
|
1242
|
+
#define SQLITE_FCNTL_EXTERNAL_READER 40
|
|
1243
|
+
#define SQLITE_FCNTL_CKSM_FILE 41
|
|
1244
|
+
#define SQLITE_FCNTL_RESET_CACHE 42
|
|
1244
1245
|
|
|
1245
1246
|
/* deprecated names */
|
|
1246
|
-
#define SQLITE_GET_LOCKPROXYFILE
|
|
1247
|
-
#define SQLITE_SET_LOCKPROXYFILE
|
|
1248
|
-
#define SQLITE_LAST_ERRNO
|
|
1247
|
+
#define SQLITE_GET_LOCKPROXYFILE SQLITE_FCNTL_GET_LOCKPROXYFILE
|
|
1248
|
+
#define SQLITE_SET_LOCKPROXYFILE SQLITE_FCNTL_SET_LOCKPROXYFILE
|
|
1249
|
+
#define SQLITE_LAST_ERRNO SQLITE_FCNTL_LAST_ERRNO
|
|
1250
|
+
|
|
1249
1251
|
|
|
1250
1252
|
/*
|
|
1251
1253
|
** CAPI3REF: Mutex Handle
|
|
@@ -1461,37 +1463,37 @@ typedef const char *sqlite3_filename;
|
|
|
1461
1463
|
typedef struct sqlite3_vfs sqlite3_vfs;
|
|
1462
1464
|
typedef void (*sqlite3_syscall_ptr)(void);
|
|
1463
1465
|
struct sqlite3_vfs {
|
|
1464
|
-
int iVersion;
|
|
1465
|
-
int szOsFile;
|
|
1466
|
-
int mxPathname;
|
|
1467
|
-
sqlite3_vfs *pNext;
|
|
1468
|
-
const char *zName;
|
|
1469
|
-
void *pAppData;
|
|
1470
|
-
int (*xOpen)(sqlite3_vfs
|
|
1471
|
-
int *pOutFlags);
|
|
1472
|
-
int (*xDelete)(sqlite3_vfs
|
|
1473
|
-
int (*xAccess)(sqlite3_vfs
|
|
1474
|
-
int (*xFullPathname)(sqlite3_vfs
|
|
1475
|
-
void *(*xDlOpen)(sqlite3_vfs
|
|
1476
|
-
void (*xDlError)(sqlite3_vfs
|
|
1477
|
-
void (*(*xDlSym)(sqlite3_vfs
|
|
1478
|
-
void (*xDlClose)(sqlite3_vfs
|
|
1479
|
-
int (*xRandomness)(sqlite3_vfs
|
|
1480
|
-
int (*xSleep)(sqlite3_vfs
|
|
1481
|
-
int (*xCurrentTime)(sqlite3_vfs
|
|
1482
|
-
int (*xGetLastError)(sqlite3_vfs
|
|
1466
|
+
int iVersion; /* Structure version number (currently 3) */
|
|
1467
|
+
int szOsFile; /* Size of subclassed sqlite3_file */
|
|
1468
|
+
int mxPathname; /* Maximum file pathname length */
|
|
1469
|
+
sqlite3_vfs *pNext; /* Next registered VFS */
|
|
1470
|
+
const char *zName; /* Name of this virtual file system */
|
|
1471
|
+
void *pAppData; /* Pointer to application-specific data */
|
|
1472
|
+
int (*xOpen)(sqlite3_vfs*, sqlite3_filename zName, sqlite3_file*,
|
|
1473
|
+
int flags, int *pOutFlags);
|
|
1474
|
+
int (*xDelete)(sqlite3_vfs*, const char *zName, int syncDir);
|
|
1475
|
+
int (*xAccess)(sqlite3_vfs*, const char *zName, int flags, int *pResOut);
|
|
1476
|
+
int (*xFullPathname)(sqlite3_vfs*, const char *zName, int nOut, char *zOut);
|
|
1477
|
+
void *(*xDlOpen)(sqlite3_vfs*, const char *zFilename);
|
|
1478
|
+
void (*xDlError)(sqlite3_vfs*, int nByte, char *zErrMsg);
|
|
1479
|
+
void (*(*xDlSym)(sqlite3_vfs*,void*, const char *zSymbol))(void);
|
|
1480
|
+
void (*xDlClose)(sqlite3_vfs*, void*);
|
|
1481
|
+
int (*xRandomness)(sqlite3_vfs*, int nByte, char *zOut);
|
|
1482
|
+
int (*xSleep)(sqlite3_vfs*, int microseconds);
|
|
1483
|
+
int (*xCurrentTime)(sqlite3_vfs*, double*);
|
|
1484
|
+
int (*xGetLastError)(sqlite3_vfs*, int, char *);
|
|
1483
1485
|
/*
|
|
1484
1486
|
** The methods above are in version 1 of the sqlite_vfs object
|
|
1485
1487
|
** definition. Those that follow are added in version 2 or later
|
|
1486
1488
|
*/
|
|
1487
|
-
int (*xCurrentTimeInt64)(sqlite3_vfs
|
|
1489
|
+
int (*xCurrentTimeInt64)(sqlite3_vfs*, sqlite3_int64*);
|
|
1488
1490
|
/*
|
|
1489
1491
|
** The methods above are in versions 1 and 2 of the sqlite_vfs object.
|
|
1490
1492
|
** Those below are for version 3 and greater.
|
|
1491
1493
|
*/
|
|
1492
|
-
int (*xSetSystemCall)(sqlite3_vfs
|
|
1493
|
-
sqlite3_syscall_ptr (*xGetSystemCall)(sqlite3_vfs
|
|
1494
|
-
const char *(*xNextSystemCall)(sqlite3_vfs
|
|
1494
|
+
int (*xSetSystemCall)(sqlite3_vfs*, const char *zName, sqlite3_syscall_ptr);
|
|
1495
|
+
sqlite3_syscall_ptr (*xGetSystemCall)(sqlite3_vfs*, const char *zName);
|
|
1496
|
+
const char *(*xNextSystemCall)(sqlite3_vfs*, const char *zName);
|
|
1495
1497
|
/*
|
|
1496
1498
|
** The methods above are in versions 1 through 3 of the sqlite_vfs object.
|
|
1497
1499
|
** New fields may be appended in future versions. The iVersion
|
|
@@ -1519,9 +1521,9 @@ struct sqlite3_vfs {
|
|
|
1519
1521
|
** currently unused, though it might be used in a future release of
|
|
1520
1522
|
** SQLite.
|
|
1521
1523
|
*/
|
|
1522
|
-
#define SQLITE_ACCESS_EXISTS
|
|
1523
|
-
#define SQLITE_ACCESS_READWRITE 1
|
|
1524
|
-
#define SQLITE_ACCESS_READ
|
|
1524
|
+
#define SQLITE_ACCESS_EXISTS 0
|
|
1525
|
+
#define SQLITE_ACCESS_READWRITE 1 /* Used by PRAGMA temp_store_directory */
|
|
1526
|
+
#define SQLITE_ACCESS_READ 2 /* Unused */
|
|
1525
1527
|
|
|
1526
1528
|
/*
|
|
1527
1529
|
** CAPI3REF: Flags for the xShmLock VFS method
|
|
@@ -1545,10 +1547,10 @@ struct sqlite3_vfs {
|
|
|
1545
1547
|
** between unlocked and EXCLUSIVE. It cannot transition between SHARED
|
|
1546
1548
|
** and EXCLUSIVE.
|
|
1547
1549
|
*/
|
|
1548
|
-
#define SQLITE_SHM_UNLOCK
|
|
1549
|
-
#define SQLITE_SHM_LOCK
|
|
1550
|
-
#define SQLITE_SHM_SHARED
|
|
1551
|
-
#define SQLITE_SHM_EXCLUSIVE
|
|
1550
|
+
#define SQLITE_SHM_UNLOCK 1
|
|
1551
|
+
#define SQLITE_SHM_LOCK 2
|
|
1552
|
+
#define SQLITE_SHM_SHARED 4
|
|
1553
|
+
#define SQLITE_SHM_EXCLUSIVE 8
|
|
1552
1554
|
|
|
1553
1555
|
/*
|
|
1554
1556
|
** CAPI3REF: Maximum xShmLock index
|
|
@@ -1558,7 +1560,8 @@ struct sqlite3_vfs {
|
|
|
1558
1560
|
** The SQLite core will never attempt to acquire or release a
|
|
1559
1561
|
** lock outside of this range
|
|
1560
1562
|
*/
|
|
1561
|
-
#define SQLITE_SHM_NLOCK
|
|
1563
|
+
#define SQLITE_SHM_NLOCK 8
|
|
1564
|
+
|
|
1562
1565
|
|
|
1563
1566
|
/*
|
|
1564
1567
|
** CAPI3REF: Initialize The SQLite Library
|
|
@@ -1666,8 +1669,7 @@ SQLITE_API int sqlite3_os_end(void);
|
|
|
1666
1669
|
** are called "anytime configuration options".
|
|
1667
1670
|
** ^If sqlite3_config() is called after [sqlite3_initialize()] and before
|
|
1668
1671
|
** [sqlite3_shutdown()] with a first argument that is not an anytime
|
|
1669
|
-
** configuration option, then the sqlite3_config() call will return
|
|
1670
|
-
*SQLITE_MISUSE.
|
|
1672
|
+
** configuration option, then the sqlite3_config() call will return SQLITE_MISUSE.
|
|
1671
1673
|
** Note, however, that ^sqlite3_config() can be called as part of the
|
|
1672
1674
|
** implementation of an application-defined [sqlite3_os_init()].
|
|
1673
1675
|
**
|
|
@@ -1694,7 +1696,7 @@ SQLITE_API int sqlite3_config(int, ...);
|
|
|
1694
1696
|
** ^Calls to sqlite3_db_config() return SQLITE_OK if and only if
|
|
1695
1697
|
** the call is considered successful.
|
|
1696
1698
|
*/
|
|
1697
|
-
SQLITE_API int sqlite3_db_config(sqlite3
|
|
1699
|
+
SQLITE_API int sqlite3_db_config(sqlite3*, int op, ...);
|
|
1698
1700
|
|
|
1699
1701
|
/*
|
|
1700
1702
|
** CAPI3REF: Memory Allocation Routines
|
|
@@ -1761,14 +1763,14 @@ SQLITE_API int sqlite3_db_config(sqlite3 *, int op, ...);
|
|
|
1761
1763
|
*/
|
|
1762
1764
|
typedef struct sqlite3_mem_methods sqlite3_mem_methods;
|
|
1763
1765
|
struct sqlite3_mem_methods {
|
|
1764
|
-
void *(*xMalloc)(int);
|
|
1765
|
-
void (*xFree)(void
|
|
1766
|
-
void *(*xRealloc)(void
|
|
1767
|
-
int (*xSize)(void
|
|
1768
|
-
int (*xRoundup)(int);
|
|
1769
|
-
int (*xInit)(void
|
|
1770
|
-
void (*xShutdown)(void
|
|
1771
|
-
void *pAppData;
|
|
1766
|
+
void *(*xMalloc)(int); /* Memory allocation function */
|
|
1767
|
+
void (*xFree)(void*); /* Free a prior allocation */
|
|
1768
|
+
void *(*xRealloc)(void*,int); /* Resize an allocation */
|
|
1769
|
+
int (*xSize)(void*); /* Return the size of an allocation */
|
|
1770
|
+
int (*xRoundup)(int); /* Round up request size to allocation size */
|
|
1771
|
+
int (*xInit)(void*); /* Initialize the memory allocator */
|
|
1772
|
+
void (*xShutdown)(void*); /* Deinitialize the memory allocator */
|
|
1773
|
+
void *pAppData; /* Argument to xInit() and xShutdown() */
|
|
1772
1774
|
};
|
|
1773
1775
|
|
|
1774
1776
|
/*
|
|
@@ -2125,7 +2127,7 @@ struct sqlite3_mem_methods {
|
|
|
2125
2127
|
** is stored in each sorted record and the required column values loaded
|
|
2126
2128
|
** from the database as records are returned in sorted order. The default
|
|
2127
2129
|
** value for this option is to never use this optimization. Specifying a
|
|
2128
|
-
** negative value for this option restores the default
|
|
2130
|
+
** negative value for this option restores the default behavior.
|
|
2129
2131
|
** This option is only available if SQLite is compiled with the
|
|
2130
2132
|
** [SQLITE_ENABLE_SORTER_REFERENCES] compile-time option.
|
|
2131
2133
|
**
|
|
@@ -2141,35 +2143,35 @@ struct sqlite3_mem_methods {
|
|
|
2141
2143
|
** compile-time option is not set, then the default maximum is 1073741824.
|
|
2142
2144
|
** </dl>
|
|
2143
2145
|
*/
|
|
2144
|
-
#define SQLITE_CONFIG_SINGLETHREAD
|
|
2145
|
-
#define SQLITE_CONFIG_MULTITHREAD
|
|
2146
|
-
#define SQLITE_CONFIG_SERIALIZED
|
|
2147
|
-
#define SQLITE_CONFIG_MALLOC
|
|
2148
|
-
#define SQLITE_CONFIG_GETMALLOC
|
|
2149
|
-
#define SQLITE_CONFIG_SCRATCH
|
|
2150
|
-
#define SQLITE_CONFIG_PAGECACHE
|
|
2151
|
-
#define SQLITE_CONFIG_HEAP
|
|
2152
|
-
#define SQLITE_CONFIG_MEMSTATUS
|
|
2153
|
-
#define SQLITE_CONFIG_MUTEX
|
|
2154
|
-
#define SQLITE_CONFIG_GETMUTEX
|
|
2146
|
+
#define SQLITE_CONFIG_SINGLETHREAD 1 /* nil */
|
|
2147
|
+
#define SQLITE_CONFIG_MULTITHREAD 2 /* nil */
|
|
2148
|
+
#define SQLITE_CONFIG_SERIALIZED 3 /* nil */
|
|
2149
|
+
#define SQLITE_CONFIG_MALLOC 4 /* sqlite3_mem_methods* */
|
|
2150
|
+
#define SQLITE_CONFIG_GETMALLOC 5 /* sqlite3_mem_methods* */
|
|
2151
|
+
#define SQLITE_CONFIG_SCRATCH 6 /* No longer used */
|
|
2152
|
+
#define SQLITE_CONFIG_PAGECACHE 7 /* void*, int sz, int N */
|
|
2153
|
+
#define SQLITE_CONFIG_HEAP 8 /* void*, int nByte, int min */
|
|
2154
|
+
#define SQLITE_CONFIG_MEMSTATUS 9 /* boolean */
|
|
2155
|
+
#define SQLITE_CONFIG_MUTEX 10 /* sqlite3_mutex_methods* */
|
|
2156
|
+
#define SQLITE_CONFIG_GETMUTEX 11 /* sqlite3_mutex_methods* */
|
|
2155
2157
|
/* previously SQLITE_CONFIG_CHUNKALLOC 12 which is now unused. */
|
|
2156
|
-
#define SQLITE_CONFIG_LOOKASIDE
|
|
2157
|
-
#define SQLITE_CONFIG_PCACHE
|
|
2158
|
-
#define SQLITE_CONFIG_GETPCACHE
|
|
2159
|
-
#define SQLITE_CONFIG_LOG
|
|
2160
|
-
#define SQLITE_CONFIG_URI
|
|
2161
|
-
#define SQLITE_CONFIG_PCACHE2
|
|
2162
|
-
#define SQLITE_CONFIG_GETPCACHE2
|
|
2163
|
-
#define SQLITE_CONFIG_COVERING_INDEX_SCAN 20
|
|
2164
|
-
#define SQLITE_CONFIG_SQLLOG
|
|
2165
|
-
#define SQLITE_CONFIG_MMAP_SIZE
|
|
2166
|
-
#define SQLITE_CONFIG_WIN32_HEAPSIZE
|
|
2167
|
-
#define SQLITE_CONFIG_PCACHE_HDRSZ
|
|
2168
|
-
#define SQLITE_CONFIG_PMASZ
|
|
2169
|
-
#define SQLITE_CONFIG_STMTJRNL_SPILL
|
|
2170
|
-
#define SQLITE_CONFIG_SMALL_MALLOC
|
|
2171
|
-
#define SQLITE_CONFIG_SORTERREF_SIZE
|
|
2172
|
-
#define SQLITE_CONFIG_MEMDB_MAXSIZE
|
|
2158
|
+
#define SQLITE_CONFIG_LOOKASIDE 13 /* int int */
|
|
2159
|
+
#define SQLITE_CONFIG_PCACHE 14 /* no-op */
|
|
2160
|
+
#define SQLITE_CONFIG_GETPCACHE 15 /* no-op */
|
|
2161
|
+
#define SQLITE_CONFIG_LOG 16 /* xFunc, void* */
|
|
2162
|
+
#define SQLITE_CONFIG_URI 17 /* int */
|
|
2163
|
+
#define SQLITE_CONFIG_PCACHE2 18 /* sqlite3_pcache_methods2* */
|
|
2164
|
+
#define SQLITE_CONFIG_GETPCACHE2 19 /* sqlite3_pcache_methods2* */
|
|
2165
|
+
#define SQLITE_CONFIG_COVERING_INDEX_SCAN 20 /* int */
|
|
2166
|
+
#define SQLITE_CONFIG_SQLLOG 21 /* xSqllog, void* */
|
|
2167
|
+
#define SQLITE_CONFIG_MMAP_SIZE 22 /* sqlite3_int64, sqlite3_int64 */
|
|
2168
|
+
#define SQLITE_CONFIG_WIN32_HEAPSIZE 23 /* int nByte */
|
|
2169
|
+
#define SQLITE_CONFIG_PCACHE_HDRSZ 24 /* int *psz */
|
|
2170
|
+
#define SQLITE_CONFIG_PMASZ 25 /* unsigned int szPma */
|
|
2171
|
+
#define SQLITE_CONFIG_STMTJRNL_SPILL 26 /* int nByte */
|
|
2172
|
+
#define SQLITE_CONFIG_SMALL_MALLOC 27 /* boolean */
|
|
2173
|
+
#define SQLITE_CONFIG_SORTERREF_SIZE 28 /* int nByte */
|
|
2174
|
+
#define SQLITE_CONFIG_MEMDB_MAXSIZE 29 /* sqlite3_int64 */
|
|
2173
2175
|
|
|
2174
2176
|
/*
|
|
2175
2177
|
** CAPI3REF: Database Connection Configuration Options
|
|
@@ -2300,7 +2302,7 @@ struct sqlite3_mem_methods {
|
|
|
2300
2302
|
** database handle, SQLite checks if this will mean that there are now no
|
|
2301
2303
|
** connections at all to the database. If so, it performs a checkpoint
|
|
2302
2304
|
** operation before closing the connection. This option may be used to
|
|
2303
|
-
** override this
|
|
2305
|
+
** override this behavior. The first parameter passed to this operation
|
|
2304
2306
|
** is an integer - positive to disable checkpoints-on-close, or zero (the
|
|
2305
2307
|
** default) to enable them, and negative to leave the setting unchanged.
|
|
2306
2308
|
** The second parameter is a pointer to an integer
|
|
@@ -2453,7 +2455,7 @@ struct sqlite3_mem_methods {
|
|
|
2453
2455
|
** the [VACUUM] command will fail with an obscure error when attempting to
|
|
2454
2456
|
** process a table with generated columns and a descending index. This is
|
|
2455
2457
|
** not considered a bug since SQLite versions 3.3.0 and earlier do not support
|
|
2456
|
-
** either generated columns or
|
|
2458
|
+
** either generated columns or descending indexes.
|
|
2457
2459
|
** </dd>
|
|
2458
2460
|
**
|
|
2459
2461
|
** [[SQLITE_DBCONFIG_STMT_SCANSTATUS]]
|
|
@@ -2489,27 +2491,27 @@ struct sqlite3_mem_methods {
|
|
|
2489
2491
|
**
|
|
2490
2492
|
** </dl>
|
|
2491
2493
|
*/
|
|
2492
|
-
#define SQLITE_DBCONFIG_MAINDBNAME
|
|
2493
|
-
#define SQLITE_DBCONFIG_LOOKASIDE
|
|
2494
|
-
#define SQLITE_DBCONFIG_ENABLE_FKEY
|
|
2495
|
-
#define SQLITE_DBCONFIG_ENABLE_TRIGGER
|
|
2494
|
+
#define SQLITE_DBCONFIG_MAINDBNAME 1000 /* const char* */
|
|
2495
|
+
#define SQLITE_DBCONFIG_LOOKASIDE 1001 /* void* int int */
|
|
2496
|
+
#define SQLITE_DBCONFIG_ENABLE_FKEY 1002 /* int int* */
|
|
2497
|
+
#define SQLITE_DBCONFIG_ENABLE_TRIGGER 1003 /* int int* */
|
|
2496
2498
|
#define SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER 1004 /* int int* */
|
|
2497
2499
|
#define SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION 1005 /* int int* */
|
|
2498
|
-
#define SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE
|
|
2499
|
-
#define SQLITE_DBCONFIG_ENABLE_QPSG
|
|
2500
|
-
#define SQLITE_DBCONFIG_TRIGGER_EQP
|
|
2501
|
-
#define SQLITE_DBCONFIG_RESET_DATABASE
|
|
2502
|
-
#define SQLITE_DBCONFIG_DEFENSIVE
|
|
2503
|
-
#define SQLITE_DBCONFIG_WRITABLE_SCHEMA
|
|
2504
|
-
#define SQLITE_DBCONFIG_LEGACY_ALTER_TABLE
|
|
2505
|
-
#define SQLITE_DBCONFIG_DQS_DML
|
|
2506
|
-
#define SQLITE_DBCONFIG_DQS_DDL
|
|
2507
|
-
#define SQLITE_DBCONFIG_ENABLE_VIEW
|
|
2508
|
-
#define SQLITE_DBCONFIG_LEGACY_FILE_FORMAT
|
|
2509
|
-
#define SQLITE_DBCONFIG_TRUSTED_SCHEMA
|
|
2510
|
-
#define SQLITE_DBCONFIG_STMT_SCANSTATUS
|
|
2511
|
-
#define SQLITE_DBCONFIG_REVERSE_SCANORDER
|
|
2512
|
-
#define SQLITE_DBCONFIG_MAX
|
|
2500
|
+
#define SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE 1006 /* int int* */
|
|
2501
|
+
#define SQLITE_DBCONFIG_ENABLE_QPSG 1007 /* int int* */
|
|
2502
|
+
#define SQLITE_DBCONFIG_TRIGGER_EQP 1008 /* int int* */
|
|
2503
|
+
#define SQLITE_DBCONFIG_RESET_DATABASE 1009 /* int int* */
|
|
2504
|
+
#define SQLITE_DBCONFIG_DEFENSIVE 1010 /* int int* */
|
|
2505
|
+
#define SQLITE_DBCONFIG_WRITABLE_SCHEMA 1011 /* int int* */
|
|
2506
|
+
#define SQLITE_DBCONFIG_LEGACY_ALTER_TABLE 1012 /* int int* */
|
|
2507
|
+
#define SQLITE_DBCONFIG_DQS_DML 1013 /* int int* */
|
|
2508
|
+
#define SQLITE_DBCONFIG_DQS_DDL 1014 /* int int* */
|
|
2509
|
+
#define SQLITE_DBCONFIG_ENABLE_VIEW 1015 /* int int* */
|
|
2510
|
+
#define SQLITE_DBCONFIG_LEGACY_FILE_FORMAT 1016 /* int int* */
|
|
2511
|
+
#define SQLITE_DBCONFIG_TRUSTED_SCHEMA 1017 /* int int* */
|
|
2512
|
+
#define SQLITE_DBCONFIG_STMT_SCANSTATUS 1018 /* int int* */
|
|
2513
|
+
#define SQLITE_DBCONFIG_REVERSE_SCANORDER 1019 /* int int* */
|
|
2514
|
+
#define SQLITE_DBCONFIG_MAX 1019 /* Largest DBCONFIG */
|
|
2513
2515
|
|
|
2514
2516
|
/*
|
|
2515
2517
|
** CAPI3REF: Enable Or Disable Extended Result Codes
|
|
@@ -2519,7 +2521,7 @@ struct sqlite3_mem_methods {
|
|
|
2519
2521
|
** [extended result codes] feature of SQLite. ^The extended result
|
|
2520
2522
|
** codes are disabled by default for historical compatibility.
|
|
2521
2523
|
*/
|
|
2522
|
-
SQLITE_API int sqlite3_extended_result_codes(sqlite3
|
|
2524
|
+
SQLITE_API int sqlite3_extended_result_codes(sqlite3*, int onoff);
|
|
2523
2525
|
|
|
2524
2526
|
/*
|
|
2525
2527
|
** CAPI3REF: Last Insert Rowid
|
|
@@ -2581,7 +2583,7 @@ SQLITE_API int sqlite3_extended_result_codes(sqlite3 *, int onoff);
|
|
|
2581
2583
|
** unpredictable and might not equal either the old or the new
|
|
2582
2584
|
** last insert [rowid].
|
|
2583
2585
|
*/
|
|
2584
|
-
SQLITE_API sqlite3_int64 sqlite3_last_insert_rowid(sqlite3
|
|
2586
|
+
SQLITE_API sqlite3_int64 sqlite3_last_insert_rowid(sqlite3*);
|
|
2585
2587
|
|
|
2586
2588
|
/*
|
|
2587
2589
|
** CAPI3REF: Set the Last Insert Rowid value.
|
|
@@ -2591,7 +2593,7 @@ SQLITE_API sqlite3_int64 sqlite3_last_insert_rowid(sqlite3 *);
|
|
|
2591
2593
|
** set the value returned by calling sqlite3_last_insert_rowid(D) to R
|
|
2592
2594
|
** without inserting a row into the database.
|
|
2593
2595
|
*/
|
|
2594
|
-
SQLITE_API void sqlite3_set_last_insert_rowid(sqlite3
|
|
2596
|
+
SQLITE_API void sqlite3_set_last_insert_rowid(sqlite3*,sqlite3_int64);
|
|
2595
2597
|
|
|
2596
2598
|
/*
|
|
2597
2599
|
** CAPI3REF: Count The Number Of Rows Modified
|
|
@@ -2652,8 +2654,8 @@ SQLITE_API void sqlite3_set_last_insert_rowid(sqlite3 *, sqlite3_int64);
|
|
|
2652
2654
|
** <li> the [data_version pragma]
|
|
2653
2655
|
** </ul>
|
|
2654
2656
|
*/
|
|
2655
|
-
SQLITE_API int sqlite3_changes(sqlite3
|
|
2656
|
-
SQLITE_API sqlite3_int64 sqlite3_changes64(sqlite3
|
|
2657
|
+
SQLITE_API int sqlite3_changes(sqlite3*);
|
|
2658
|
+
SQLITE_API sqlite3_int64 sqlite3_changes64(sqlite3*);
|
|
2657
2659
|
|
|
2658
2660
|
/*
|
|
2659
2661
|
** CAPI3REF: Total Number Of Rows Modified
|
|
@@ -2694,8 +2696,8 @@ SQLITE_API sqlite3_int64 sqlite3_changes64(sqlite3 *);
|
|
|
2694
2696
|
** <li> the [SQLITE_FCNTL_DATA_VERSION] [file control]
|
|
2695
2697
|
** </ul>
|
|
2696
2698
|
*/
|
|
2697
|
-
SQLITE_API int sqlite3_total_changes(sqlite3
|
|
2698
|
-
SQLITE_API sqlite3_int64 sqlite3_total_changes64(sqlite3
|
|
2699
|
+
SQLITE_API int sqlite3_total_changes(sqlite3*);
|
|
2700
|
+
SQLITE_API sqlite3_int64 sqlite3_total_changes64(sqlite3*);
|
|
2699
2701
|
|
|
2700
2702
|
/*
|
|
2701
2703
|
** CAPI3REF: Interrupt A Long-Running Query
|
|
@@ -2734,9 +2736,10 @@ SQLITE_API sqlite3_int64 sqlite3_total_changes64(sqlite3 *);
|
|
|
2734
2736
|
**
|
|
2735
2737
|
** ^The [sqlite3_is_interrupted(D)] interface can be used to determine whether
|
|
2736
2738
|
** or not an interrupt is currently in effect for [database connection] D.
|
|
2739
|
+
** It returns 1 if an interrupt is currently in effect, or 0 otherwise.
|
|
2737
2740
|
*/
|
|
2738
|
-
SQLITE_API void sqlite3_interrupt(sqlite3
|
|
2739
|
-
SQLITE_API int sqlite3_is_interrupted(sqlite3
|
|
2741
|
+
SQLITE_API void sqlite3_interrupt(sqlite3*);
|
|
2742
|
+
SQLITE_API int sqlite3_is_interrupted(sqlite3*);
|
|
2740
2743
|
|
|
2741
2744
|
/*
|
|
2742
2745
|
** CAPI3REF: Determine If An SQL Statement Is Complete
|
|
@@ -2833,7 +2836,7 @@ SQLITE_API int sqlite3_complete16(const void *sql);
|
|
|
2833
2836
|
** A busy handler must not close the database connection
|
|
2834
2837
|
** or [prepared statement] that invoked the busy handler.
|
|
2835
2838
|
*/
|
|
2836
|
-
SQLITE_API int sqlite3_busy_handler(sqlite3
|
|
2839
|
+
SQLITE_API int sqlite3_busy_handler(sqlite3*,int(*)(void*,int),void*);
|
|
2837
2840
|
|
|
2838
2841
|
/*
|
|
2839
2842
|
** CAPI3REF: Set A Busy Timeout
|
|
@@ -2856,7 +2859,7 @@ SQLITE_API int sqlite3_busy_handler(sqlite3 *, int (*)(void *, int), void *);
|
|
|
2856
2859
|
**
|
|
2857
2860
|
** See also: [PRAGMA busy_timeout]
|
|
2858
2861
|
*/
|
|
2859
|
-
SQLITE_API int sqlite3_busy_timeout(sqlite3
|
|
2862
|
+
SQLITE_API int sqlite3_busy_timeout(sqlite3*, int ms);
|
|
2860
2863
|
|
|
2861
2864
|
/*
|
|
2862
2865
|
** CAPI3REF: Convenience Routines For Running Queries
|
|
@@ -2931,13 +2934,13 @@ SQLITE_API int sqlite3_busy_timeout(sqlite3 *, int ms);
|
|
|
2931
2934
|
** reflected in subsequent calls to [sqlite3_errcode()] or
|
|
2932
2935
|
** [sqlite3_errmsg()].
|
|
2933
2936
|
*/
|
|
2934
|
-
SQLITE_API int
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2937
|
+
SQLITE_API int sqlite3_get_table(
|
|
2938
|
+
sqlite3 *db, /* An open database */
|
|
2939
|
+
const char *zSql, /* SQL to be evaluated */
|
|
2940
|
+
char ***pazResult, /* Results of the query */
|
|
2941
|
+
int *pnRow, /* Number of result rows written here */
|
|
2942
|
+
int *pnColumn, /* Number of result columns written here */
|
|
2943
|
+
char **pzErrmsg /* Error msg written here */
|
|
2941
2944
|
);
|
|
2942
2945
|
SQLITE_API void sqlite3_free_table(char **result);
|
|
2943
2946
|
|
|
@@ -2981,10 +2984,10 @@ SQLITE_API void sqlite3_free_table(char **result);
|
|
|
2981
2984
|
**
|
|
2982
2985
|
** See also: [built-in printf()], [printf() SQL function]
|
|
2983
2986
|
*/
|
|
2984
|
-
SQLITE_API char *sqlite3_mprintf(const char
|
|
2985
|
-
SQLITE_API char *sqlite3_vmprintf(const char
|
|
2986
|
-
SQLITE_API char *sqlite3_snprintf(int,
|
|
2987
|
-
SQLITE_API char *sqlite3_vsnprintf(int,
|
|
2987
|
+
SQLITE_API char *sqlite3_mprintf(const char*,...);
|
|
2988
|
+
SQLITE_API char *sqlite3_vmprintf(const char*, va_list);
|
|
2989
|
+
SQLITE_API char *sqlite3_snprintf(int,char*,const char*, ...);
|
|
2990
|
+
SQLITE_API char *sqlite3_vsnprintf(int,char*,const char*, va_list);
|
|
2988
2991
|
|
|
2989
2992
|
/*
|
|
2990
2993
|
** CAPI3REF: Memory Allocation Subsystem
|
|
@@ -3063,10 +3066,10 @@ SQLITE_API char *sqlite3_vsnprintf(int, char *, const char *, va_list);
|
|
|
3063
3066
|
*/
|
|
3064
3067
|
SQLITE_API void *sqlite3_malloc(int);
|
|
3065
3068
|
SQLITE_API void *sqlite3_malloc64(sqlite3_uint64);
|
|
3066
|
-
SQLITE_API void *sqlite3_realloc(void
|
|
3067
|
-
SQLITE_API void *sqlite3_realloc64(void
|
|
3068
|
-
SQLITE_API void sqlite3_free(void
|
|
3069
|
-
SQLITE_API sqlite3_uint64 sqlite3_msize(void
|
|
3069
|
+
SQLITE_API void *sqlite3_realloc(void*, int);
|
|
3070
|
+
SQLITE_API void *sqlite3_realloc64(void*, sqlite3_uint64);
|
|
3071
|
+
SQLITE_API void sqlite3_free(void*);
|
|
3072
|
+
SQLITE_API sqlite3_uint64 sqlite3_msize(void*);
|
|
3070
3073
|
|
|
3071
3074
|
/*
|
|
3072
3075
|
** CAPI3REF: Memory Allocator Statistics
|
|
@@ -3206,11 +3209,11 @@ SQLITE_API void sqlite3_randomness(int N, void *P);
|
|
|
3206
3209
|
** as stated in the previous paragraph, sqlite3_step() invokes
|
|
3207
3210
|
** sqlite3_prepare_v2() to reprepare a statement after a schema change.
|
|
3208
3211
|
*/
|
|
3209
|
-
SQLITE_API int sqlite3_set_authorizer(
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3212
|
+
SQLITE_API int sqlite3_set_authorizer(
|
|
3213
|
+
sqlite3*,
|
|
3214
|
+
int (*xAuth)(void*,int,const char*,const char*,const char*,const char*),
|
|
3215
|
+
void *pUserData
|
|
3216
|
+
);
|
|
3214
3217
|
|
|
3215
3218
|
/*
|
|
3216
3219
|
** CAPI3REF: Authorizer Return Codes
|
|
@@ -3224,8 +3227,8 @@ SQLITE_API int sqlite3_set_authorizer(sqlite3 *,
|
|
|
3224
3227
|
** Note that SQLITE_IGNORE is also used as a [conflict resolution mode]
|
|
3225
3228
|
** returned from the [sqlite3_vtab_on_conflict()] interface.
|
|
3226
3229
|
*/
|
|
3227
|
-
#define SQLITE_DENY
|
|
3228
|
-
#define SQLITE_IGNORE 2
|
|
3230
|
+
#define SQLITE_DENY 1 /* Abort the SQL statement with an error */
|
|
3231
|
+
#define SQLITE_IGNORE 2 /* Don't allow access, but don't generate an error */
|
|
3229
3232
|
|
|
3230
3233
|
/*
|
|
3231
3234
|
** CAPI3REF: Authorizer Action Codes
|
|
@@ -3247,40 +3250,40 @@ SQLITE_API int sqlite3_set_authorizer(sqlite3 *,
|
|
|
3247
3250
|
** top-level SQL code.
|
|
3248
3251
|
*/
|
|
3249
3252
|
/******************************************* 3rd ************ 4th ***********/
|
|
3250
|
-
#define SQLITE_CREATE_INDEX
|
|
3251
|
-
#define SQLITE_CREATE_TABLE
|
|
3252
|
-
#define SQLITE_CREATE_TEMP_INDEX
|
|
3253
|
-
#define SQLITE_CREATE_TEMP_TABLE
|
|
3254
|
-
#define SQLITE_CREATE_TEMP_TRIGGER
|
|
3255
|
-
#define SQLITE_CREATE_TEMP_VIEW
|
|
3256
|
-
#define SQLITE_CREATE_TRIGGER
|
|
3257
|
-
#define SQLITE_CREATE_VIEW
|
|
3258
|
-
#define SQLITE_DELETE
|
|
3259
|
-
#define SQLITE_DROP_INDEX
|
|
3260
|
-
#define SQLITE_DROP_TABLE
|
|
3261
|
-
#define SQLITE_DROP_TEMP_INDEX
|
|
3262
|
-
#define SQLITE_DROP_TEMP_TABLE
|
|
3263
|
-
#define SQLITE_DROP_TEMP_TRIGGER
|
|
3264
|
-
#define SQLITE_DROP_TEMP_VIEW
|
|
3265
|
-
#define SQLITE_DROP_TRIGGER
|
|
3266
|
-
#define SQLITE_DROP_VIEW
|
|
3267
|
-
#define SQLITE_INSERT
|
|
3268
|
-
#define SQLITE_PRAGMA
|
|
3269
|
-
#define SQLITE_READ
|
|
3270
|
-
#define SQLITE_SELECT
|
|
3271
|
-
#define SQLITE_TRANSACTION
|
|
3272
|
-
#define SQLITE_UPDATE
|
|
3273
|
-
#define SQLITE_ATTACH
|
|
3274
|
-
#define SQLITE_DETACH
|
|
3275
|
-
#define SQLITE_ALTER_TABLE
|
|
3276
|
-
#define SQLITE_REINDEX
|
|
3277
|
-
#define SQLITE_ANALYZE
|
|
3278
|
-
#define SQLITE_CREATE_VTABLE
|
|
3279
|
-
#define SQLITE_DROP_VTABLE
|
|
3280
|
-
#define SQLITE_FUNCTION
|
|
3281
|
-
#define SQLITE_SAVEPOINT
|
|
3282
|
-
#define SQLITE_COPY
|
|
3283
|
-
#define SQLITE_RECURSIVE
|
|
3253
|
+
#define SQLITE_CREATE_INDEX 1 /* Index Name Table Name */
|
|
3254
|
+
#define SQLITE_CREATE_TABLE 2 /* Table Name NULL */
|
|
3255
|
+
#define SQLITE_CREATE_TEMP_INDEX 3 /* Index Name Table Name */
|
|
3256
|
+
#define SQLITE_CREATE_TEMP_TABLE 4 /* Table Name NULL */
|
|
3257
|
+
#define SQLITE_CREATE_TEMP_TRIGGER 5 /* Trigger Name Table Name */
|
|
3258
|
+
#define SQLITE_CREATE_TEMP_VIEW 6 /* View Name NULL */
|
|
3259
|
+
#define SQLITE_CREATE_TRIGGER 7 /* Trigger Name Table Name */
|
|
3260
|
+
#define SQLITE_CREATE_VIEW 8 /* View Name NULL */
|
|
3261
|
+
#define SQLITE_DELETE 9 /* Table Name NULL */
|
|
3262
|
+
#define SQLITE_DROP_INDEX 10 /* Index Name Table Name */
|
|
3263
|
+
#define SQLITE_DROP_TABLE 11 /* Table Name NULL */
|
|
3264
|
+
#define SQLITE_DROP_TEMP_INDEX 12 /* Index Name Table Name */
|
|
3265
|
+
#define SQLITE_DROP_TEMP_TABLE 13 /* Table Name NULL */
|
|
3266
|
+
#define SQLITE_DROP_TEMP_TRIGGER 14 /* Trigger Name Table Name */
|
|
3267
|
+
#define SQLITE_DROP_TEMP_VIEW 15 /* View Name NULL */
|
|
3268
|
+
#define SQLITE_DROP_TRIGGER 16 /* Trigger Name Table Name */
|
|
3269
|
+
#define SQLITE_DROP_VIEW 17 /* View Name NULL */
|
|
3270
|
+
#define SQLITE_INSERT 18 /* Table Name NULL */
|
|
3271
|
+
#define SQLITE_PRAGMA 19 /* Pragma Name 1st arg or NULL */
|
|
3272
|
+
#define SQLITE_READ 20 /* Table Name Column Name */
|
|
3273
|
+
#define SQLITE_SELECT 21 /* NULL NULL */
|
|
3274
|
+
#define SQLITE_TRANSACTION 22 /* Operation NULL */
|
|
3275
|
+
#define SQLITE_UPDATE 23 /* Table Name Column Name */
|
|
3276
|
+
#define SQLITE_ATTACH 24 /* Filename NULL */
|
|
3277
|
+
#define SQLITE_DETACH 25 /* Database Name NULL */
|
|
3278
|
+
#define SQLITE_ALTER_TABLE 26 /* Database Name Table Name */
|
|
3279
|
+
#define SQLITE_REINDEX 27 /* Index Name NULL */
|
|
3280
|
+
#define SQLITE_ANALYZE 28 /* Table Name NULL */
|
|
3281
|
+
#define SQLITE_CREATE_VTABLE 29 /* Table Name Module Name */
|
|
3282
|
+
#define SQLITE_DROP_VTABLE 30 /* Table Name Module Name */
|
|
3283
|
+
#define SQLITE_FUNCTION 31 /* NULL Function Name */
|
|
3284
|
+
#define SQLITE_SAVEPOINT 32 /* Operation Savepoint Name */
|
|
3285
|
+
#define SQLITE_COPY 0 /* No longer used */
|
|
3286
|
+
#define SQLITE_RECURSIVE 33 /* NULL NULL */
|
|
3284
3287
|
|
|
3285
3288
|
/*
|
|
3286
3289
|
** CAPI3REF: Tracing And Profiling Functions
|
|
@@ -3314,11 +3317,10 @@ SQLITE_API int sqlite3_set_authorizer(sqlite3 *,
|
|
|
3314
3317
|
** either [sqlite3_trace()] or [sqlite3_trace_v2()] will cancel the
|
|
3315
3318
|
** profile callback.
|
|
3316
3319
|
*/
|
|
3317
|
-
SQLITE_API SQLITE_DEPRECATED void *
|
|
3318
|
-
|
|
3319
|
-
SQLITE_API SQLITE_DEPRECATED void *
|
|
3320
|
-
|
|
3321
|
-
void (*xProfile)(void *, const char *, sqlite3_uint64), void *);
|
|
3320
|
+
SQLITE_API SQLITE_DEPRECATED void *sqlite3_trace(sqlite3*,
|
|
3321
|
+
void(*xTrace)(void*,const char*), void*);
|
|
3322
|
+
SQLITE_API SQLITE_DEPRECATED void *sqlite3_profile(sqlite3*,
|
|
3323
|
+
void(*xProfile)(void*,const char*,sqlite3_uint64), void*);
|
|
3322
3324
|
|
|
3323
3325
|
/*
|
|
3324
3326
|
** CAPI3REF: SQL Trace Event Codes
|
|
@@ -3372,10 +3374,10 @@ sqlite3_profile(sqlite3 *,
|
|
|
3372
3374
|
** and the X argument is unused.
|
|
3373
3375
|
** </dl>
|
|
3374
3376
|
*/
|
|
3375
|
-
#define SQLITE_TRACE_STMT
|
|
3376
|
-
#define SQLITE_TRACE_PROFILE
|
|
3377
|
-
#define SQLITE_TRACE_ROW
|
|
3378
|
-
#define SQLITE_TRACE_CLOSE
|
|
3377
|
+
#define SQLITE_TRACE_STMT 0x01
|
|
3378
|
+
#define SQLITE_TRACE_PROFILE 0x02
|
|
3379
|
+
#define SQLITE_TRACE_ROW 0x04
|
|
3380
|
+
#define SQLITE_TRACE_CLOSE 0x08
|
|
3379
3381
|
|
|
3380
3382
|
/*
|
|
3381
3383
|
** CAPI3REF: SQL Trace Hook
|
|
@@ -3388,8 +3390,10 @@ sqlite3_profile(sqlite3 *,
|
|
|
3388
3390
|
** M argument should be the bitwise OR-ed combination of
|
|
3389
3391
|
** zero or more [SQLITE_TRACE] constants.
|
|
3390
3392
|
**
|
|
3391
|
-
** ^Each call to either sqlite3_trace() or sqlite3_trace_v2()
|
|
3392
|
-
** (cancels)
|
|
3393
|
+
** ^Each call to either sqlite3_trace(D,X,P) or sqlite3_trace_v2(D,M,X,P)
|
|
3394
|
+
** overrides (cancels) all prior calls to sqlite3_trace(D,X,P) or
|
|
3395
|
+
** sqlite3_trace_v2(D,M,X,P) for the [database connection] D. Each
|
|
3396
|
+
** database connection may have at most one trace callback.
|
|
3393
3397
|
**
|
|
3394
3398
|
** ^The X callback is invoked whenever any of the events identified by
|
|
3395
3399
|
** mask M occur. ^The integer return value from the callback is currently
|
|
@@ -3406,10 +3410,12 @@ sqlite3_profile(sqlite3 *,
|
|
|
3406
3410
|
** interfaces [sqlite3_trace()] and [sqlite3_profile()], both of which
|
|
3407
3411
|
** are deprecated.
|
|
3408
3412
|
*/
|
|
3409
|
-
SQLITE_API int sqlite3_trace_v2(
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
+
SQLITE_API int sqlite3_trace_v2(
|
|
3414
|
+
sqlite3*,
|
|
3415
|
+
unsigned uMask,
|
|
3416
|
+
int(*xCallback)(unsigned,void*,void*,void*),
|
|
3417
|
+
void *pCtx
|
|
3418
|
+
);
|
|
3413
3419
|
|
|
3414
3420
|
/*
|
|
3415
3421
|
** CAPI3REF: Query Progress Callbacks
|
|
@@ -3450,8 +3456,7 @@ SQLITE_API int sqlite3_trace_v2(sqlite3 *, unsigned uMask,
|
|
|
3450
3456
|
** invoked directly from [sqlite3_prepare()] while analyzing and generating
|
|
3451
3457
|
** code for complex queries.
|
|
3452
3458
|
*/
|
|
3453
|
-
SQLITE_API void sqlite3_progress_handler(sqlite3
|
|
3454
|
-
void *);
|
|
3459
|
+
SQLITE_API void sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*);
|
|
3455
3460
|
|
|
3456
3461
|
/*
|
|
3457
3462
|
** CAPI3REF: Opening A New Database Connection
|
|
@@ -3731,19 +3736,19 @@ SQLITE_API void sqlite3_progress_handler(sqlite3 *, int, int (*)(void *),
|
|
|
3731
3736
|
**
|
|
3732
3737
|
** See also: [sqlite3_temp_directory]
|
|
3733
3738
|
*/
|
|
3734
|
-
SQLITE_API int
|
|
3735
|
-
|
|
3736
|
-
|
|
3739
|
+
SQLITE_API int sqlite3_open(
|
|
3740
|
+
const char *filename, /* Database filename (UTF-8) */
|
|
3741
|
+
sqlite3 **ppDb /* OUT: SQLite db handle */
|
|
3737
3742
|
);
|
|
3738
|
-
SQLITE_API int
|
|
3739
|
-
|
|
3740
|
-
|
|
3743
|
+
SQLITE_API int sqlite3_open16(
|
|
3744
|
+
const void *filename, /* Database filename (UTF-16) */
|
|
3745
|
+
sqlite3 **ppDb /* OUT: SQLite db handle */
|
|
3741
3746
|
);
|
|
3742
|
-
SQLITE_API int
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
+
SQLITE_API int sqlite3_open_v2(
|
|
3748
|
+
const char *filename, /* Database filename (UTF-8) */
|
|
3749
|
+
sqlite3 **ppDb, /* OUT: SQLite db handle */
|
|
3750
|
+
int flags, /* Flags */
|
|
3751
|
+
const char *zVfs /* Name of VFS module to use */
|
|
3747
3752
|
);
|
|
3748
3753
|
|
|
3749
3754
|
/*
|
|
@@ -3757,7 +3762,7 @@ sqlite3_open_v2(const char *filename, /* Database filename (UTF-8) */
|
|
|
3757
3762
|
** as F) must be one of:
|
|
3758
3763
|
** <ul>
|
|
3759
3764
|
** <li> A database filename pointer created by the SQLite core and
|
|
3760
|
-
** passed into the xOpen() method of a VFS
|
|
3765
|
+
** passed into the xOpen() method of a VFS implementation, or
|
|
3761
3766
|
** <li> A filename obtained from [sqlite3_db_filename()], or
|
|
3762
3767
|
** <li> A new filename constructed using [sqlite3_create_filename()].
|
|
3763
3768
|
** </ul>
|
|
@@ -3812,12 +3817,9 @@ sqlite3_open_v2(const char *filename, /* Database filename (UTF-8) */
|
|
|
3812
3817
|
**
|
|
3813
3818
|
** See the [URI filename] documentation for additional information.
|
|
3814
3819
|
*/
|
|
3815
|
-
SQLITE_API const char *sqlite3_uri_parameter(sqlite3_filename z,
|
|
3816
|
-
|
|
3817
|
-
SQLITE_API
|
|
3818
|
-
int bDefault);
|
|
3819
|
-
SQLITE_API sqlite3_int64 sqlite3_uri_int64(sqlite3_filename, const char *,
|
|
3820
|
-
sqlite3_int64);
|
|
3820
|
+
SQLITE_API const char *sqlite3_uri_parameter(sqlite3_filename z, const char *zParam);
|
|
3821
|
+
SQLITE_API int sqlite3_uri_boolean(sqlite3_filename z, const char *zParam, int bDefault);
|
|
3822
|
+
SQLITE_API sqlite3_int64 sqlite3_uri_int64(sqlite3_filename, const char*, sqlite3_int64);
|
|
3821
3823
|
SQLITE_API const char *sqlite3_uri_key(sqlite3_filename z, int N);
|
|
3822
3824
|
|
|
3823
3825
|
/*
|
|
@@ -3868,12 +3870,12 @@ SQLITE_API const char *sqlite3_filename_wal(sqlite3_filename);
|
|
|
3868
3870
|
** of this routine results in undefined and probably undesirable
|
|
3869
3871
|
** behavior.
|
|
3870
3872
|
*/
|
|
3871
|
-
SQLITE_API sqlite3_file *sqlite3_database_file_object(const char
|
|
3873
|
+
SQLITE_API sqlite3_file *sqlite3_database_file_object(const char*);
|
|
3872
3874
|
|
|
3873
3875
|
/*
|
|
3874
3876
|
** CAPI3REF: Create and Destroy VFS Filenames
|
|
3875
3877
|
**
|
|
3876
|
-
** These
|
|
3878
|
+
** These interfaces are provided for use by [VFS shim] implementations and
|
|
3877
3879
|
** are not useful outside of that context.
|
|
3878
3880
|
**
|
|
3879
3881
|
** The sqlite3_create_filename(D,J,W,N,P) allocates memory to hold a version of
|
|
@@ -3915,11 +3917,13 @@ SQLITE_API sqlite3_file *sqlite3_database_file_object(const char *);
|
|
|
3915
3917
|
** then the corresponding [sqlite3_module.xClose() method should also be
|
|
3916
3918
|
** invoked prior to calling sqlite3_free_filename(Y).
|
|
3917
3919
|
*/
|
|
3918
|
-
SQLITE_API sqlite3_filename sqlite3_create_filename(
|
|
3919
|
-
|
|
3920
|
-
|
|
3921
|
-
|
|
3922
|
-
|
|
3920
|
+
SQLITE_API sqlite3_filename sqlite3_create_filename(
|
|
3921
|
+
const char *zDatabase,
|
|
3922
|
+
const char *zJournal,
|
|
3923
|
+
const char *zWal,
|
|
3924
|
+
int nParam,
|
|
3925
|
+
const char **azParam
|
|
3926
|
+
);
|
|
3923
3927
|
SQLITE_API void sqlite3_free_filename(sqlite3_filename);
|
|
3924
3928
|
|
|
3925
3929
|
/*
|
|
@@ -3951,6 +3955,7 @@ SQLITE_API void sqlite3_free_filename(sqlite3_filename);
|
|
|
3951
3955
|
**
|
|
3952
3956
|
** ^The sqlite3_errmsg() and sqlite3_errmsg16() return English-language
|
|
3953
3957
|
** text that describes the error, as either UTF-8 or UTF-16 respectively.
|
|
3958
|
+
** (See how SQLite handles [invalid UTF] for exceptions to this rule.)
|
|
3954
3959
|
** ^(Memory to hold the error message string is managed internally.
|
|
3955
3960
|
** The application does not need to worry about freeing the result.
|
|
3956
3961
|
** However, the error string might be overwritten or deallocated by
|
|
@@ -3984,8 +3989,8 @@ SQLITE_API void sqlite3_free_filename(sqlite3_filename);
|
|
|
3984
3989
|
*/
|
|
3985
3990
|
SQLITE_API int sqlite3_errcode(sqlite3 *db);
|
|
3986
3991
|
SQLITE_API int sqlite3_extended_errcode(sqlite3 *db);
|
|
3987
|
-
SQLITE_API const char *sqlite3_errmsg(sqlite3
|
|
3988
|
-
SQLITE_API const void *sqlite3_errmsg16(sqlite3
|
|
3992
|
+
SQLITE_API const char *sqlite3_errmsg(sqlite3*);
|
|
3993
|
+
SQLITE_API const void *sqlite3_errmsg16(sqlite3*);
|
|
3989
3994
|
SQLITE_API const char *sqlite3_errstr(int);
|
|
3990
3995
|
SQLITE_API int sqlite3_error_offset(sqlite3 *db);
|
|
3991
3996
|
|
|
@@ -4055,7 +4060,7 @@ typedef struct sqlite3_stmt sqlite3_stmt;
|
|
|
4055
4060
|
**
|
|
4056
4061
|
** New run-time limit categories may be added in future releases.
|
|
4057
4062
|
*/
|
|
4058
|
-
SQLITE_API int sqlite3_limit(sqlite3
|
|
4063
|
+
SQLITE_API int sqlite3_limit(sqlite3*, int id, int newVal);
|
|
4059
4064
|
|
|
4060
4065
|
/*
|
|
4061
4066
|
** CAPI3REF: Run-Time Limit Categories
|
|
@@ -4113,18 +4118,18 @@ SQLITE_API int sqlite3_limit(sqlite3 *, int id, int newVal);
|
|
|
4113
4118
|
** [prepared statement] may start.</dd>)^
|
|
4114
4119
|
** </dl>
|
|
4115
4120
|
*/
|
|
4116
|
-
#define SQLITE_LIMIT_LENGTH
|
|
4117
|
-
#define SQLITE_LIMIT_SQL_LENGTH
|
|
4118
|
-
#define SQLITE_LIMIT_COLUMN
|
|
4119
|
-
#define SQLITE_LIMIT_EXPR_DEPTH
|
|
4120
|
-
#define SQLITE_LIMIT_COMPOUND_SELECT
|
|
4121
|
-
#define SQLITE_LIMIT_VDBE_OP
|
|
4122
|
-
#define SQLITE_LIMIT_FUNCTION_ARG
|
|
4123
|
-
#define SQLITE_LIMIT_ATTACHED
|
|
4124
|
-
#define SQLITE_LIMIT_LIKE_PATTERN_LENGTH
|
|
4125
|
-
#define SQLITE_LIMIT_VARIABLE_NUMBER
|
|
4126
|
-
#define SQLITE_LIMIT_TRIGGER_DEPTH
|
|
4127
|
-
#define SQLITE_LIMIT_WORKER_THREADS
|
|
4121
|
+
#define SQLITE_LIMIT_LENGTH 0
|
|
4122
|
+
#define SQLITE_LIMIT_SQL_LENGTH 1
|
|
4123
|
+
#define SQLITE_LIMIT_COLUMN 2
|
|
4124
|
+
#define SQLITE_LIMIT_EXPR_DEPTH 3
|
|
4125
|
+
#define SQLITE_LIMIT_COMPOUND_SELECT 4
|
|
4126
|
+
#define SQLITE_LIMIT_VDBE_OP 5
|
|
4127
|
+
#define SQLITE_LIMIT_FUNCTION_ARG 6
|
|
4128
|
+
#define SQLITE_LIMIT_ATTACHED 7
|
|
4129
|
+
#define SQLITE_LIMIT_LIKE_PATTERN_LENGTH 8
|
|
4130
|
+
#define SQLITE_LIMIT_VARIABLE_NUMBER 9
|
|
4131
|
+
#define SQLITE_LIMIT_TRIGGER_DEPTH 10
|
|
4132
|
+
#define SQLITE_LIMIT_WORKER_THREADS 11
|
|
4128
4133
|
|
|
4129
4134
|
/*
|
|
4130
4135
|
** CAPI3REF: Prepare Flags
|
|
@@ -4161,9 +4166,9 @@ SQLITE_API int sqlite3_limit(sqlite3 *, int id, int newVal);
|
|
|
4161
4166
|
** any virtual tables.
|
|
4162
4167
|
** </dl>
|
|
4163
4168
|
*/
|
|
4164
|
-
#define SQLITE_PREPARE_PERSISTENT
|
|
4165
|
-
#define SQLITE_PREPARE_NORMALIZE
|
|
4166
|
-
#define SQLITE_PREPARE_NO_VTAB
|
|
4169
|
+
#define SQLITE_PREPARE_PERSISTENT 0x01
|
|
4170
|
+
#define SQLITE_PREPARE_NORMALIZE 0x02
|
|
4171
|
+
#define SQLITE_PREPARE_NO_VTAB 0x04
|
|
4167
4172
|
|
|
4168
4173
|
/*
|
|
4169
4174
|
** CAPI3REF: Compiling An SQL Statement
|
|
@@ -4265,49 +4270,49 @@ SQLITE_API int sqlite3_limit(sqlite3 *, int id, int newVal);
|
|
|
4265
4270
|
** sqlite3_prepare_v2() interface works exactly the same as
|
|
4266
4271
|
** sqlite3_prepare_v3() with a zero prepFlags parameter.
|
|
4267
4272
|
*/
|
|
4268
|
-
SQLITE_API int
|
|
4269
|
-
|
|
4270
|
-
|
|
4271
|
-
|
|
4272
|
-
|
|
4273
|
-
|
|
4273
|
+
SQLITE_API int sqlite3_prepare(
|
|
4274
|
+
sqlite3 *db, /* Database handle */
|
|
4275
|
+
const char *zSql, /* SQL statement, UTF-8 encoded */
|
|
4276
|
+
int nByte, /* Maximum length of zSql in bytes. */
|
|
4277
|
+
sqlite3_stmt **ppStmt, /* OUT: Statement handle */
|
|
4278
|
+
const char **pzTail /* OUT: Pointer to unused portion of zSql */
|
|
4274
4279
|
);
|
|
4275
4280
|
SQLITE_API int sqlite3_prepare_v2(
|
|
4276
|
-
|
|
4277
|
-
|
|
4278
|
-
|
|
4279
|
-
|
|
4280
|
-
|
|
4281
|
+
sqlite3 *db, /* Database handle */
|
|
4282
|
+
const char *zSql, /* SQL statement, UTF-8 encoded */
|
|
4283
|
+
int nByte, /* Maximum length of zSql in bytes. */
|
|
4284
|
+
sqlite3_stmt **ppStmt, /* OUT: Statement handle */
|
|
4285
|
+
const char **pzTail /* OUT: Pointer to unused portion of zSql */
|
|
4281
4286
|
);
|
|
4282
4287
|
SQLITE_API int sqlite3_prepare_v3(
|
|
4283
|
-
|
|
4284
|
-
|
|
4285
|
-
|
|
4286
|
-
|
|
4287
|
-
|
|
4288
|
-
|
|
4288
|
+
sqlite3 *db, /* Database handle */
|
|
4289
|
+
const char *zSql, /* SQL statement, UTF-8 encoded */
|
|
4290
|
+
int nByte, /* Maximum length of zSql in bytes. */
|
|
4291
|
+
unsigned int prepFlags, /* Zero or more SQLITE_PREPARE_ flags */
|
|
4292
|
+
sqlite3_stmt **ppStmt, /* OUT: Statement handle */
|
|
4293
|
+
const char **pzTail /* OUT: Pointer to unused portion of zSql */
|
|
4289
4294
|
);
|
|
4290
4295
|
SQLITE_API int sqlite3_prepare16(
|
|
4291
|
-
|
|
4292
|
-
|
|
4293
|
-
|
|
4294
|
-
|
|
4295
|
-
|
|
4296
|
+
sqlite3 *db, /* Database handle */
|
|
4297
|
+
const void *zSql, /* SQL statement, UTF-16 encoded */
|
|
4298
|
+
int nByte, /* Maximum length of zSql in bytes. */
|
|
4299
|
+
sqlite3_stmt **ppStmt, /* OUT: Statement handle */
|
|
4300
|
+
const void **pzTail /* OUT: Pointer to unused portion of zSql */
|
|
4296
4301
|
);
|
|
4297
4302
|
SQLITE_API int sqlite3_prepare16_v2(
|
|
4298
|
-
|
|
4299
|
-
|
|
4300
|
-
|
|
4301
|
-
|
|
4302
|
-
|
|
4303
|
+
sqlite3 *db, /* Database handle */
|
|
4304
|
+
const void *zSql, /* SQL statement, UTF-16 encoded */
|
|
4305
|
+
int nByte, /* Maximum length of zSql in bytes. */
|
|
4306
|
+
sqlite3_stmt **ppStmt, /* OUT: Statement handle */
|
|
4307
|
+
const void **pzTail /* OUT: Pointer to unused portion of zSql */
|
|
4303
4308
|
);
|
|
4304
4309
|
SQLITE_API int sqlite3_prepare16_v3(
|
|
4305
|
-
|
|
4306
|
-
|
|
4307
|
-
|
|
4308
|
-
|
|
4309
|
-
|
|
4310
|
-
|
|
4310
|
+
sqlite3 *db, /* Database handle */
|
|
4311
|
+
const void *zSql, /* SQL statement, UTF-16 encoded */
|
|
4312
|
+
int nByte, /* Maximum length of zSql in bytes. */
|
|
4313
|
+
unsigned int prepFlags, /* Zero or more SQLITE_PREPARE_ flags */
|
|
4314
|
+
sqlite3_stmt **ppStmt, /* OUT: Statement handle */
|
|
4315
|
+
const void **pzTail /* OUT: Pointer to unused portion of zSql */
|
|
4311
4316
|
);
|
|
4312
4317
|
|
|
4313
4318
|
/*
|
|
@@ -4418,6 +4423,41 @@ SQLITE_API int sqlite3_stmt_readonly(sqlite3_stmt *pStmt);
|
|
|
4418
4423
|
*/
|
|
4419
4424
|
SQLITE_API int sqlite3_stmt_isexplain(sqlite3_stmt *pStmt);
|
|
4420
4425
|
|
|
4426
|
+
/*
|
|
4427
|
+
** CAPI3REF: Change The EXPLAIN Setting For A Prepared Statement
|
|
4428
|
+
** METHOD: sqlite3_stmt
|
|
4429
|
+
**
|
|
4430
|
+
** The sqlite3_stmt_explain(S,E) interface changes the EXPLAIN
|
|
4431
|
+
** setting for [prepared statement] S. If E is zero, then S becomes
|
|
4432
|
+
** a normal prepared statement. If E is 1, then S behaves as if
|
|
4433
|
+
** its SQL text began with "[EXPLAIN]". If E is 2, then S behaves as if
|
|
4434
|
+
** its SQL text began with "[EXPLAIN QUERY PLAN]".
|
|
4435
|
+
**
|
|
4436
|
+
** Calling sqlite3_stmt_explain(S,E) might cause S to be reprepared.
|
|
4437
|
+
** SQLite tries to avoid a reprepare, but a reprepare might be necessary
|
|
4438
|
+
** on the first transition into EXPLAIN or EXPLAIN QUERY PLAN mode.
|
|
4439
|
+
**
|
|
4440
|
+
** Because of the potential need to reprepare, a call to
|
|
4441
|
+
** sqlite3_stmt_explain(S,E) will fail with SQLITE_ERROR if S cannot be
|
|
4442
|
+
** reprepared because it was created using [sqlite3_prepare()] instead of
|
|
4443
|
+
** the newer [sqlite3_prepare_v2()] or [sqlite3_prepare_v3()] interfaces and
|
|
4444
|
+
** hence has no saved SQL text with which to reprepare.
|
|
4445
|
+
**
|
|
4446
|
+
** Changing the explain setting for a prepared statement does not change
|
|
4447
|
+
** the original SQL text for the statement. Hence, if the SQL text originally
|
|
4448
|
+
** began with EXPLAIN or EXPLAIN QUERY PLAN, but sqlite3_stmt_explain(S,0)
|
|
4449
|
+
** is called to convert the statement into an ordinary statement, the EXPLAIN
|
|
4450
|
+
** or EXPLAIN QUERY PLAN keywords will still appear in the sqlite3_sql(S)
|
|
4451
|
+
** output, even though the statement now acts like a normal SQL statement.
|
|
4452
|
+
**
|
|
4453
|
+
** This routine returns SQLITE_OK if the explain mode is successfully
|
|
4454
|
+
** changed, or an error code if the explain mode could not be changed.
|
|
4455
|
+
** The explain mode cannot be changed while a statement is active.
|
|
4456
|
+
** Hence, it is good practice to call [sqlite3_reset(S)]
|
|
4457
|
+
** immediately prior to calling sqlite3_stmt_explain(S,E).
|
|
4458
|
+
*/
|
|
4459
|
+
SQLITE_API int sqlite3_stmt_explain(sqlite3_stmt *pStmt, int eMode);
|
|
4460
|
+
|
|
4421
4461
|
/*
|
|
4422
4462
|
** CAPI3REF: Determine If A Prepared Statement Has Been Reset
|
|
4423
4463
|
** METHOD: sqlite3_stmt
|
|
@@ -4437,7 +4477,7 @@ SQLITE_API int sqlite3_stmt_isexplain(sqlite3_stmt *pStmt);
|
|
|
4437
4477
|
** for example, in diagnostic routines to search for prepared
|
|
4438
4478
|
** statements that are holding a transaction open.
|
|
4439
4479
|
*/
|
|
4440
|
-
SQLITE_API int sqlite3_stmt_busy(sqlite3_stmt
|
|
4480
|
+
SQLITE_API int sqlite3_stmt_busy(sqlite3_stmt*);
|
|
4441
4481
|
|
|
4442
4482
|
/*
|
|
4443
4483
|
** CAPI3REF: Dynamically Typed Value Object
|
|
@@ -4581,7 +4621,7 @@ typedef struct sqlite3_context sqlite3_context;
|
|
|
4581
4621
|
** with it may be passed. ^It is called to dispose of the BLOB or string even
|
|
4582
4622
|
** if the call to the bind API fails, except the destructor is not called if
|
|
4583
4623
|
** the third parameter is a NULL pointer or the fourth parameter is negative.
|
|
4584
|
-
** ^ (2) The special constant, [SQLITE_STATIC], may be
|
|
4624
|
+
** ^ (2) The special constant, [SQLITE_STATIC], may be passed to indicate that
|
|
4585
4625
|
** the application remains responsible for disposing of the object. ^In this
|
|
4586
4626
|
** case, the object and the provided pointer to it must remain valid until
|
|
4587
4627
|
** either the prepared statement is finalized or the same SQL parameter is
|
|
@@ -4637,26 +4677,21 @@ typedef struct sqlite3_context sqlite3_context;
|
|
|
4637
4677
|
** See also: [sqlite3_bind_parameter_count()],
|
|
4638
4678
|
** [sqlite3_bind_parameter_name()], and [sqlite3_bind_parameter_index()].
|
|
4639
4679
|
*/
|
|
4640
|
-
SQLITE_API int sqlite3_bind_blob(sqlite3_stmt
|
|
4641
|
-
|
|
4642
|
-
|
|
4643
|
-
|
|
4644
|
-
SQLITE_API int
|
|
4645
|
-
SQLITE_API int
|
|
4646
|
-
SQLITE_API int
|
|
4647
|
-
SQLITE_API int
|
|
4648
|
-
SQLITE_API int
|
|
4649
|
-
|
|
4650
|
-
|
|
4651
|
-
|
|
4652
|
-
SQLITE_API int
|
|
4653
|
-
|
|
4654
|
-
|
|
4655
|
-
SQLITE_API int sqlite3_bind_value(sqlite3_stmt *, int, const sqlite3_value *);
|
|
4656
|
-
SQLITE_API int sqlite3_bind_pointer(sqlite3_stmt *, int, void *, const char *,
|
|
4657
|
-
void (*)(void *));
|
|
4658
|
-
SQLITE_API int sqlite3_bind_zeroblob(sqlite3_stmt *, int, int n);
|
|
4659
|
-
SQLITE_API int sqlite3_bind_zeroblob64(sqlite3_stmt *, int, sqlite3_uint64);
|
|
4680
|
+
SQLITE_API int sqlite3_bind_blob(sqlite3_stmt*, int, const void*, int n, void(*)(void*));
|
|
4681
|
+
SQLITE_API int sqlite3_bind_blob64(sqlite3_stmt*, int, const void*, sqlite3_uint64,
|
|
4682
|
+
void(*)(void*));
|
|
4683
|
+
SQLITE_API int sqlite3_bind_double(sqlite3_stmt*, int, double);
|
|
4684
|
+
SQLITE_API int sqlite3_bind_int(sqlite3_stmt*, int, int);
|
|
4685
|
+
SQLITE_API int sqlite3_bind_int64(sqlite3_stmt*, int, sqlite3_int64);
|
|
4686
|
+
SQLITE_API int sqlite3_bind_null(sqlite3_stmt*, int);
|
|
4687
|
+
SQLITE_API int sqlite3_bind_text(sqlite3_stmt*,int,const char*,int,void(*)(void*));
|
|
4688
|
+
SQLITE_API int sqlite3_bind_text16(sqlite3_stmt*, int, const void*, int, void(*)(void*));
|
|
4689
|
+
SQLITE_API int sqlite3_bind_text64(sqlite3_stmt*, int, const char*, sqlite3_uint64,
|
|
4690
|
+
void(*)(void*), unsigned char encoding);
|
|
4691
|
+
SQLITE_API int sqlite3_bind_value(sqlite3_stmt*, int, const sqlite3_value*);
|
|
4692
|
+
SQLITE_API int sqlite3_bind_pointer(sqlite3_stmt*, int, void*, const char*,void(*)(void*));
|
|
4693
|
+
SQLITE_API int sqlite3_bind_zeroblob(sqlite3_stmt*, int, int n);
|
|
4694
|
+
SQLITE_API int sqlite3_bind_zeroblob64(sqlite3_stmt*, int, sqlite3_uint64);
|
|
4660
4695
|
|
|
4661
4696
|
/*
|
|
4662
4697
|
** CAPI3REF: Number Of SQL Parameters
|
|
@@ -4677,7 +4712,7 @@ SQLITE_API int sqlite3_bind_zeroblob64(sqlite3_stmt *, int, sqlite3_uint64);
|
|
|
4677
4712
|
** [sqlite3_bind_parameter_name()], and
|
|
4678
4713
|
** [sqlite3_bind_parameter_index()].
|
|
4679
4714
|
*/
|
|
4680
|
-
SQLITE_API int sqlite3_bind_parameter_count(sqlite3_stmt
|
|
4715
|
+
SQLITE_API int sqlite3_bind_parameter_count(sqlite3_stmt*);
|
|
4681
4716
|
|
|
4682
4717
|
/*
|
|
4683
4718
|
** CAPI3REF: Name Of A Host Parameter
|
|
@@ -4705,7 +4740,7 @@ SQLITE_API int sqlite3_bind_parameter_count(sqlite3_stmt *);
|
|
|
4705
4740
|
** [sqlite3_bind_parameter_count()], and
|
|
4706
4741
|
** [sqlite3_bind_parameter_index()].
|
|
4707
4742
|
*/
|
|
4708
|
-
SQLITE_API const char *sqlite3_bind_parameter_name(sqlite3_stmt
|
|
4743
|
+
SQLITE_API const char *sqlite3_bind_parameter_name(sqlite3_stmt*, int);
|
|
4709
4744
|
|
|
4710
4745
|
/*
|
|
4711
4746
|
** CAPI3REF: Index Of A Parameter With A Given Name
|
|
@@ -4723,7 +4758,7 @@ SQLITE_API const char *sqlite3_bind_parameter_name(sqlite3_stmt *, int);
|
|
|
4723
4758
|
** [sqlite3_bind_parameter_count()], and
|
|
4724
4759
|
** [sqlite3_bind_parameter_name()].
|
|
4725
4760
|
*/
|
|
4726
|
-
SQLITE_API int sqlite3_bind_parameter_index(sqlite3_stmt
|
|
4761
|
+
SQLITE_API int sqlite3_bind_parameter_index(sqlite3_stmt*, const char *zName);
|
|
4727
4762
|
|
|
4728
4763
|
/*
|
|
4729
4764
|
** CAPI3REF: Reset All Bindings On A Prepared Statement
|
|
@@ -4733,7 +4768,7 @@ SQLITE_API int sqlite3_bind_parameter_index(sqlite3_stmt *, const char *zName);
|
|
|
4733
4768
|
** the [sqlite3_bind_blob | bindings] on a [prepared statement].
|
|
4734
4769
|
** ^Use this routine to reset all host parameters to NULL.
|
|
4735
4770
|
*/
|
|
4736
|
-
SQLITE_API int sqlite3_clear_bindings(sqlite3_stmt
|
|
4771
|
+
SQLITE_API int sqlite3_clear_bindings(sqlite3_stmt*);
|
|
4737
4772
|
|
|
4738
4773
|
/*
|
|
4739
4774
|
** CAPI3REF: Number Of Columns In A Result Set
|
|
@@ -4778,8 +4813,8 @@ SQLITE_API int sqlite3_column_count(sqlite3_stmt *pStmt);
|
|
|
4778
4813
|
** then the name of the column is unspecified and may change from
|
|
4779
4814
|
** one release of SQLite to the next.
|
|
4780
4815
|
*/
|
|
4781
|
-
SQLITE_API const char *sqlite3_column_name(sqlite3_stmt
|
|
4782
|
-
SQLITE_API const void *sqlite3_column_name16(sqlite3_stmt
|
|
4816
|
+
SQLITE_API const char *sqlite3_column_name(sqlite3_stmt*, int N);
|
|
4817
|
+
SQLITE_API const void *sqlite3_column_name16(sqlite3_stmt*, int N);
|
|
4783
4818
|
|
|
4784
4819
|
/*
|
|
4785
4820
|
** CAPI3REF: Source Of Data In A Query Result
|
|
@@ -4823,12 +4858,12 @@ SQLITE_API const void *sqlite3_column_name16(sqlite3_stmt *, int N);
|
|
|
4823
4858
|
** for the same [prepared statement] and result column
|
|
4824
4859
|
** at the same time then the results are undefined.
|
|
4825
4860
|
*/
|
|
4826
|
-
SQLITE_API const char *sqlite3_column_database_name(sqlite3_stmt
|
|
4827
|
-
SQLITE_API const void *sqlite3_column_database_name16(sqlite3_stmt
|
|
4828
|
-
SQLITE_API const char *sqlite3_column_table_name(sqlite3_stmt
|
|
4829
|
-
SQLITE_API const void *sqlite3_column_table_name16(sqlite3_stmt
|
|
4830
|
-
SQLITE_API const char *sqlite3_column_origin_name(sqlite3_stmt
|
|
4831
|
-
SQLITE_API const void *sqlite3_column_origin_name16(sqlite3_stmt
|
|
4861
|
+
SQLITE_API const char *sqlite3_column_database_name(sqlite3_stmt*,int);
|
|
4862
|
+
SQLITE_API const void *sqlite3_column_database_name16(sqlite3_stmt*,int);
|
|
4863
|
+
SQLITE_API const char *sqlite3_column_table_name(sqlite3_stmt*,int);
|
|
4864
|
+
SQLITE_API const void *sqlite3_column_table_name16(sqlite3_stmt*,int);
|
|
4865
|
+
SQLITE_API const char *sqlite3_column_origin_name(sqlite3_stmt*,int);
|
|
4866
|
+
SQLITE_API const void *sqlite3_column_origin_name16(sqlite3_stmt*,int);
|
|
4832
4867
|
|
|
4833
4868
|
/*
|
|
4834
4869
|
** CAPI3REF: Declared Datatype Of A Query Result
|
|
@@ -4860,8 +4895,8 @@ SQLITE_API const void *sqlite3_column_origin_name16(sqlite3_stmt *, int);
|
|
|
4860
4895
|
** is associated with individual values, not with the containers
|
|
4861
4896
|
** used to hold those values.
|
|
4862
4897
|
*/
|
|
4863
|
-
SQLITE_API const char *sqlite3_column_decltype(sqlite3_stmt
|
|
4864
|
-
SQLITE_API const void *sqlite3_column_decltype16(sqlite3_stmt
|
|
4898
|
+
SQLITE_API const char *sqlite3_column_decltype(sqlite3_stmt*,int);
|
|
4899
|
+
SQLITE_API const void *sqlite3_column_decltype16(sqlite3_stmt*,int);
|
|
4865
4900
|
|
|
4866
4901
|
/*
|
|
4867
4902
|
** CAPI3REF: Evaluate An SQL Statement
|
|
@@ -4945,7 +4980,7 @@ SQLITE_API const void *sqlite3_column_decltype16(sqlite3_stmt *, int);
|
|
|
4945
4980
|
** then the more specific [error codes] are returned directly
|
|
4946
4981
|
** by sqlite3_step(). The use of the "vX" interfaces is recommended.
|
|
4947
4982
|
*/
|
|
4948
|
-
SQLITE_API int sqlite3_step(sqlite3_stmt
|
|
4983
|
+
SQLITE_API int sqlite3_step(sqlite3_stmt*);
|
|
4949
4984
|
|
|
4950
4985
|
/*
|
|
4951
4986
|
** CAPI3REF: Number of columns in a result set
|
|
@@ -4989,16 +5024,16 @@ SQLITE_API int sqlite3_data_count(sqlite3_stmt *pStmt);
|
|
|
4989
5024
|
** SQLite version 2 and SQLite version 3 should use SQLITE3_TEXT, not
|
|
4990
5025
|
** SQLITE_TEXT.
|
|
4991
5026
|
*/
|
|
4992
|
-
#define SQLITE_INTEGER
|
|
4993
|
-
#define SQLITE_FLOAT
|
|
4994
|
-
#define SQLITE_BLOB
|
|
4995
|
-
#define SQLITE_NULL
|
|
5027
|
+
#define SQLITE_INTEGER 1
|
|
5028
|
+
#define SQLITE_FLOAT 2
|
|
5029
|
+
#define SQLITE_BLOB 4
|
|
5030
|
+
#define SQLITE_NULL 5
|
|
4996
5031
|
#ifdef SQLITE_TEXT
|
|
4997
|
-
#undef SQLITE_TEXT
|
|
5032
|
+
# undef SQLITE_TEXT
|
|
4998
5033
|
#else
|
|
4999
|
-
#define SQLITE_TEXT
|
|
5034
|
+
# define SQLITE_TEXT 3
|
|
5000
5035
|
#endif
|
|
5001
|
-
#define SQLITE3_TEXT
|
|
5036
|
+
#define SQLITE3_TEXT 3
|
|
5002
5037
|
|
|
5003
5038
|
/*
|
|
5004
5039
|
** CAPI3REF: Result Values From A Query
|
|
@@ -5213,16 +5248,16 @@ SQLITE_API int sqlite3_data_count(sqlite3_stmt *pStmt);
|
|
|
5213
5248
|
** return value is obtained and before any
|
|
5214
5249
|
** other SQLite interface is called on the same [database connection].
|
|
5215
5250
|
*/
|
|
5216
|
-
SQLITE_API const void *sqlite3_column_blob(sqlite3_stmt
|
|
5217
|
-
SQLITE_API double sqlite3_column_double(sqlite3_stmt
|
|
5218
|
-
SQLITE_API int sqlite3_column_int(sqlite3_stmt
|
|
5219
|
-
SQLITE_API sqlite3_int64 sqlite3_column_int64(sqlite3_stmt
|
|
5220
|
-
SQLITE_API const unsigned char *sqlite3_column_text(sqlite3_stmt
|
|
5221
|
-
SQLITE_API const void *sqlite3_column_text16(sqlite3_stmt
|
|
5222
|
-
SQLITE_API sqlite3_value *sqlite3_column_value(sqlite3_stmt
|
|
5223
|
-
SQLITE_API int sqlite3_column_bytes(sqlite3_stmt
|
|
5224
|
-
SQLITE_API int sqlite3_column_bytes16(sqlite3_stmt
|
|
5225
|
-
SQLITE_API int sqlite3_column_type(sqlite3_stmt
|
|
5251
|
+
SQLITE_API const void *sqlite3_column_blob(sqlite3_stmt*, int iCol);
|
|
5252
|
+
SQLITE_API double sqlite3_column_double(sqlite3_stmt*, int iCol);
|
|
5253
|
+
SQLITE_API int sqlite3_column_int(sqlite3_stmt*, int iCol);
|
|
5254
|
+
SQLITE_API sqlite3_int64 sqlite3_column_int64(sqlite3_stmt*, int iCol);
|
|
5255
|
+
SQLITE_API const unsigned char *sqlite3_column_text(sqlite3_stmt*, int iCol);
|
|
5256
|
+
SQLITE_API const void *sqlite3_column_text16(sqlite3_stmt*, int iCol);
|
|
5257
|
+
SQLITE_API sqlite3_value *sqlite3_column_value(sqlite3_stmt*, int iCol);
|
|
5258
|
+
SQLITE_API int sqlite3_column_bytes(sqlite3_stmt*, int iCol);
|
|
5259
|
+
SQLITE_API int sqlite3_column_bytes16(sqlite3_stmt*, int iCol);
|
|
5260
|
+
SQLITE_API int sqlite3_column_type(sqlite3_stmt*, int iCol);
|
|
5226
5261
|
|
|
5227
5262
|
/*
|
|
5228
5263
|
** CAPI3REF: Destroy A Prepared Statement Object
|
|
@@ -5265,20 +5300,33 @@ SQLITE_API int sqlite3_finalize(sqlite3_stmt *pStmt);
|
|
|
5265
5300
|
** ^The [sqlite3_reset(S)] interface resets the [prepared statement] S
|
|
5266
5301
|
** back to the beginning of its program.
|
|
5267
5302
|
**
|
|
5268
|
-
** ^
|
|
5269
|
-
**
|
|
5270
|
-
**
|
|
5271
|
-
**
|
|
5303
|
+
** ^The return code from [sqlite3_reset(S)] indicates whether or not
|
|
5304
|
+
** the previous evaluation of prepared statement S completed successfully.
|
|
5305
|
+
** ^If [sqlite3_step(S)] has never before been called on S or if
|
|
5306
|
+
** [sqlite3_step(S)] has not been called since the previous call
|
|
5307
|
+
** to [sqlite3_reset(S)], then [sqlite3_reset(S)] will return
|
|
5308
|
+
** [SQLITE_OK].
|
|
5272
5309
|
**
|
|
5273
5310
|
** ^If the most recent call to [sqlite3_step(S)] for the
|
|
5274
5311
|
** [prepared statement] S indicated an error, then
|
|
5275
5312
|
** [sqlite3_reset(S)] returns an appropriate [error code].
|
|
5313
|
+
** ^The [sqlite3_reset(S)] interface might also return an [error code]
|
|
5314
|
+
** if there were no prior errors but the process of resetting
|
|
5315
|
+
** the prepared statement caused a new error. ^For example, if an
|
|
5316
|
+
** [INSERT] statement with a [RETURNING] clause is only stepped one time,
|
|
5317
|
+
** that one call to [sqlite3_step(S)] might return SQLITE_ROW but
|
|
5318
|
+
** the overall statement might still fail and the [sqlite3_reset(S)] call
|
|
5319
|
+
** might return SQLITE_BUSY if locking constraints prevent the
|
|
5320
|
+
** database change from committing. Therefore, it is important that
|
|
5321
|
+
** applications check the return code from [sqlite3_reset(S)] even if
|
|
5322
|
+
** no prior call to [sqlite3_step(S)] indicated a problem.
|
|
5276
5323
|
**
|
|
5277
5324
|
** ^The [sqlite3_reset(S)] interface does not change the values
|
|
5278
5325
|
** of any [sqlite3_bind_blob|bindings] on the [prepared statement] S.
|
|
5279
5326
|
*/
|
|
5280
5327
|
SQLITE_API int sqlite3_reset(sqlite3_stmt *pStmt);
|
|
5281
5328
|
|
|
5329
|
+
|
|
5282
5330
|
/*
|
|
5283
5331
|
** CAPI3REF: Create Or Redefine SQL Functions
|
|
5284
5332
|
** KEYWORDS: {function creation routines}
|
|
@@ -5402,28 +5450,49 @@ SQLITE_API int sqlite3_reset(sqlite3_stmt *pStmt);
|
|
|
5402
5450
|
** close the database connection nor finalize or reset the prepared
|
|
5403
5451
|
** statement in which the function is running.
|
|
5404
5452
|
*/
|
|
5405
|
-
SQLITE_API int
|
|
5406
|
-
|
|
5407
|
-
|
|
5408
|
-
|
|
5409
|
-
|
|
5410
|
-
|
|
5453
|
+
SQLITE_API int sqlite3_create_function(
|
|
5454
|
+
sqlite3 *db,
|
|
5455
|
+
const char *zFunctionName,
|
|
5456
|
+
int nArg,
|
|
5457
|
+
int eTextRep,
|
|
5458
|
+
void *pApp,
|
|
5459
|
+
void (*xFunc)(sqlite3_context*,int,sqlite3_value**),
|
|
5460
|
+
void (*xStep)(sqlite3_context*,int,sqlite3_value**),
|
|
5461
|
+
void (*xFinal)(sqlite3_context*)
|
|
5462
|
+
);
|
|
5411
5463
|
SQLITE_API int sqlite3_create_function16(
|
|
5412
|
-
|
|
5413
|
-
|
|
5414
|
-
|
|
5415
|
-
|
|
5464
|
+
sqlite3 *db,
|
|
5465
|
+
const void *zFunctionName,
|
|
5466
|
+
int nArg,
|
|
5467
|
+
int eTextRep,
|
|
5468
|
+
void *pApp,
|
|
5469
|
+
void (*xFunc)(sqlite3_context*,int,sqlite3_value**),
|
|
5470
|
+
void (*xStep)(sqlite3_context*,int,sqlite3_value**),
|
|
5471
|
+
void (*xFinal)(sqlite3_context*)
|
|
5472
|
+
);
|
|
5416
5473
|
SQLITE_API int sqlite3_create_function_v2(
|
|
5417
|
-
|
|
5418
|
-
|
|
5419
|
-
|
|
5420
|
-
|
|
5474
|
+
sqlite3 *db,
|
|
5475
|
+
const char *zFunctionName,
|
|
5476
|
+
int nArg,
|
|
5477
|
+
int eTextRep,
|
|
5478
|
+
void *pApp,
|
|
5479
|
+
void (*xFunc)(sqlite3_context*,int,sqlite3_value**),
|
|
5480
|
+
void (*xStep)(sqlite3_context*,int,sqlite3_value**),
|
|
5481
|
+
void (*xFinal)(sqlite3_context*),
|
|
5482
|
+
void(*xDestroy)(void*)
|
|
5483
|
+
);
|
|
5421
5484
|
SQLITE_API int sqlite3_create_window_function(
|
|
5422
|
-
|
|
5423
|
-
|
|
5424
|
-
|
|
5425
|
-
|
|
5426
|
-
|
|
5485
|
+
sqlite3 *db,
|
|
5486
|
+
const char *zFunctionName,
|
|
5487
|
+
int nArg,
|
|
5488
|
+
int eTextRep,
|
|
5489
|
+
void *pApp,
|
|
5490
|
+
void (*xStep)(sqlite3_context*,int,sqlite3_value**),
|
|
5491
|
+
void (*xFinal)(sqlite3_context*),
|
|
5492
|
+
void (*xValue)(sqlite3_context*),
|
|
5493
|
+
void (*xInverse)(sqlite3_context*,int,sqlite3_value**),
|
|
5494
|
+
void(*xDestroy)(void*)
|
|
5495
|
+
);
|
|
5427
5496
|
|
|
5428
5497
|
/*
|
|
5429
5498
|
** CAPI3REF: Text Encodings
|
|
@@ -5431,12 +5500,12 @@ SQLITE_API int sqlite3_create_window_function(
|
|
|
5431
5500
|
** These constant define integer codes that represent the various
|
|
5432
5501
|
** text encodings supported by SQLite.
|
|
5433
5502
|
*/
|
|
5434
|
-
#define SQLITE_UTF8
|
|
5435
|
-
#define SQLITE_UTF16LE
|
|
5436
|
-
#define SQLITE_UTF16BE
|
|
5437
|
-
#define SQLITE_UTF16
|
|
5438
|
-
#define SQLITE_ANY
|
|
5439
|
-
#define SQLITE_UTF16_ALIGNED
|
|
5503
|
+
#define SQLITE_UTF8 1 /* IMP: R-37514-35566 */
|
|
5504
|
+
#define SQLITE_UTF16LE 2 /* IMP: R-03371-37637 */
|
|
5505
|
+
#define SQLITE_UTF16BE 3 /* IMP: R-51971-34154 */
|
|
5506
|
+
#define SQLITE_UTF16 4 /* Use native byte order */
|
|
5507
|
+
#define SQLITE_ANY 5 /* Deprecated */
|
|
5508
|
+
#define SQLITE_UTF16_ALIGNED 8 /* sqlite3_create_collation only */
|
|
5440
5509
|
|
|
5441
5510
|
/*
|
|
5442
5511
|
** CAPI3REF: Function Flags
|
|
@@ -5468,7 +5537,7 @@ SQLITE_API int sqlite3_create_window_function(
|
|
|
5468
5537
|
** [application-defined SQL function]
|
|
5469
5538
|
** that has side-effects or that could potentially leak sensitive information.
|
|
5470
5539
|
** This will prevent attacks in which an application is tricked
|
|
5471
|
-
** into using a database file that has had its schema
|
|
5540
|
+
** into using a database file that has had its schema surreptitiously
|
|
5472
5541
|
** modified to invoke the application-defined function in ways that are
|
|
5473
5542
|
** harmful.
|
|
5474
5543
|
** <p>
|
|
@@ -5504,20 +5573,35 @@ SQLITE_API int sqlite3_create_window_function(
|
|
|
5504
5573
|
** </dd>
|
|
5505
5574
|
**
|
|
5506
5575
|
** [[SQLITE_SUBTYPE]] <dt>SQLITE_SUBTYPE</dt><dd>
|
|
5507
|
-
** The SQLITE_SUBTYPE flag indicates to SQLite that a function
|
|
5576
|
+
** The SQLITE_SUBTYPE flag indicates to SQLite that a function might call
|
|
5508
5577
|
** [sqlite3_value_subtype()] to inspect the sub-types of its arguments.
|
|
5509
|
-
**
|
|
5510
|
-
**
|
|
5511
|
-
**
|
|
5512
|
-
**
|
|
5513
|
-
**
|
|
5578
|
+
** This flag instructs SQLite to omit some corner-case optimizations that
|
|
5579
|
+
** might disrupt the operation of the [sqlite3_value_subtype()] function,
|
|
5580
|
+
** causing it to return zero rather than the correct subtype().
|
|
5581
|
+
** SQL functions that invokes [sqlite3_value_subtype()] should have this
|
|
5582
|
+
** property. If the SQLITE_SUBTYPE property is omitted, then the return
|
|
5583
|
+
** value from [sqlite3_value_subtype()] might sometimes be zero even though
|
|
5584
|
+
** a non-zero subtype was specified by the function argument expression.
|
|
5585
|
+
**
|
|
5586
|
+
** [[SQLITE_RESULT_SUBTYPE]] <dt>SQLITE_RESULT_SUBTYPE</dt><dd>
|
|
5587
|
+
** The SQLITE_RESULT_SUBTYPE flag indicates to SQLite that a function might call
|
|
5588
|
+
** [sqlite3_result_subtype()] to cause a sub-type to be associated with its
|
|
5589
|
+
** result.
|
|
5590
|
+
** Every function that invokes [sqlite3_result_subtype()] should have this
|
|
5591
|
+
** property. If it does not, then the call to [sqlite3_result_subtype()]
|
|
5592
|
+
** might become a no-op if the function is used as term in an
|
|
5593
|
+
** [expression index]. On the other hand, SQL functions that never invoke
|
|
5594
|
+
** [sqlite3_result_subtype()] should avoid setting this property, as the
|
|
5595
|
+
** purpose of this property is to disable certain optimizations that are
|
|
5596
|
+
** incompatible with subtypes.
|
|
5514
5597
|
** </dd>
|
|
5515
5598
|
** </dl>
|
|
5516
5599
|
*/
|
|
5517
|
-
#define SQLITE_DETERMINISTIC
|
|
5518
|
-
#define SQLITE_DIRECTONLY
|
|
5519
|
-
#define SQLITE_SUBTYPE
|
|
5520
|
-
#define SQLITE_INNOCUOUS
|
|
5600
|
+
#define SQLITE_DETERMINISTIC 0x000000800
|
|
5601
|
+
#define SQLITE_DIRECTONLY 0x000080000
|
|
5602
|
+
#define SQLITE_SUBTYPE 0x000100000
|
|
5603
|
+
#define SQLITE_INNOCUOUS 0x000200000
|
|
5604
|
+
#define SQLITE_RESULT_SUBTYPE 0x001000000
|
|
5521
5605
|
|
|
5522
5606
|
/*
|
|
5523
5607
|
** CAPI3REF: Deprecated Functions
|
|
@@ -5530,15 +5614,13 @@ SQLITE_API int sqlite3_create_window_function(
|
|
|
5530
5614
|
** these functions, we will not explain what they do.
|
|
5531
5615
|
*/
|
|
5532
5616
|
#ifndef SQLITE_OMIT_DEPRECATED
|
|
5533
|
-
SQLITE_API SQLITE_DEPRECATED int sqlite3_aggregate_count(sqlite3_context
|
|
5534
|
-
SQLITE_API SQLITE_DEPRECATED int sqlite3_expired(sqlite3_stmt
|
|
5535
|
-
SQLITE_API SQLITE_DEPRECATED int sqlite3_transfer_bindings(sqlite3_stmt
|
|
5536
|
-
sqlite3_stmt *);
|
|
5617
|
+
SQLITE_API SQLITE_DEPRECATED int sqlite3_aggregate_count(sqlite3_context*);
|
|
5618
|
+
SQLITE_API SQLITE_DEPRECATED int sqlite3_expired(sqlite3_stmt*);
|
|
5619
|
+
SQLITE_API SQLITE_DEPRECATED int sqlite3_transfer_bindings(sqlite3_stmt*, sqlite3_stmt*);
|
|
5537
5620
|
SQLITE_API SQLITE_DEPRECATED int sqlite3_global_recover(void);
|
|
5538
5621
|
SQLITE_API SQLITE_DEPRECATED void sqlite3_thread_cleanup(void);
|
|
5539
|
-
SQLITE_API SQLITE_DEPRECATED int
|
|
5540
|
-
|
|
5541
|
-
sqlite3_int64);
|
|
5622
|
+
SQLITE_API SQLITE_DEPRECATED int sqlite3_memory_alarm(void(*)(void*,sqlite3_int64,int),
|
|
5623
|
+
void*,sqlite3_int64);
|
|
5542
5624
|
#endif
|
|
5543
5625
|
|
|
5544
5626
|
/*
|
|
@@ -5669,21 +5751,21 @@ sqlite3_memory_alarm(void (*)(void *, sqlite3_int64, int), void *,
|
|
|
5669
5751
|
** return value is obtained and before any
|
|
5670
5752
|
** other SQLite interface is called on the same [database connection].
|
|
5671
5753
|
*/
|
|
5672
|
-
SQLITE_API const void *sqlite3_value_blob(sqlite3_value
|
|
5673
|
-
SQLITE_API double sqlite3_value_double(sqlite3_value
|
|
5674
|
-
SQLITE_API int sqlite3_value_int(sqlite3_value
|
|
5675
|
-
SQLITE_API sqlite3_int64 sqlite3_value_int64(sqlite3_value
|
|
5676
|
-
SQLITE_API void *sqlite3_value_pointer(sqlite3_value
|
|
5677
|
-
SQLITE_API const unsigned char *sqlite3_value_text(sqlite3_value
|
|
5678
|
-
SQLITE_API const void *sqlite3_value_text16(sqlite3_value
|
|
5679
|
-
SQLITE_API const void *sqlite3_value_text16le(sqlite3_value
|
|
5680
|
-
SQLITE_API const void *sqlite3_value_text16be(sqlite3_value
|
|
5681
|
-
SQLITE_API int sqlite3_value_bytes(sqlite3_value
|
|
5682
|
-
SQLITE_API int sqlite3_value_bytes16(sqlite3_value
|
|
5683
|
-
SQLITE_API int sqlite3_value_type(sqlite3_value
|
|
5684
|
-
SQLITE_API int sqlite3_value_numeric_type(sqlite3_value
|
|
5685
|
-
SQLITE_API int sqlite3_value_nochange(sqlite3_value
|
|
5686
|
-
SQLITE_API int sqlite3_value_frombind(sqlite3_value
|
|
5754
|
+
SQLITE_API const void *sqlite3_value_blob(sqlite3_value*);
|
|
5755
|
+
SQLITE_API double sqlite3_value_double(sqlite3_value*);
|
|
5756
|
+
SQLITE_API int sqlite3_value_int(sqlite3_value*);
|
|
5757
|
+
SQLITE_API sqlite3_int64 sqlite3_value_int64(sqlite3_value*);
|
|
5758
|
+
SQLITE_API void *sqlite3_value_pointer(sqlite3_value*, const char*);
|
|
5759
|
+
SQLITE_API const unsigned char *sqlite3_value_text(sqlite3_value*);
|
|
5760
|
+
SQLITE_API const void *sqlite3_value_text16(sqlite3_value*);
|
|
5761
|
+
SQLITE_API const void *sqlite3_value_text16le(sqlite3_value*);
|
|
5762
|
+
SQLITE_API const void *sqlite3_value_text16be(sqlite3_value*);
|
|
5763
|
+
SQLITE_API int sqlite3_value_bytes(sqlite3_value*);
|
|
5764
|
+
SQLITE_API int sqlite3_value_bytes16(sqlite3_value*);
|
|
5765
|
+
SQLITE_API int sqlite3_value_type(sqlite3_value*);
|
|
5766
|
+
SQLITE_API int sqlite3_value_numeric_type(sqlite3_value*);
|
|
5767
|
+
SQLITE_API int sqlite3_value_nochange(sqlite3_value*);
|
|
5768
|
+
SQLITE_API int sqlite3_value_frombind(sqlite3_value*);
|
|
5687
5769
|
|
|
5688
5770
|
/*
|
|
5689
5771
|
** CAPI3REF: Report the internal text encoding state of an sqlite3_value object
|
|
@@ -5694,8 +5776,7 @@ SQLITE_API int sqlite3_value_frombind(sqlite3_value *);
|
|
|
5694
5776
|
** of the value X, assuming that X has type TEXT.)^ If sqlite3_value_type(X)
|
|
5695
5777
|
** returns something other than SQLITE_TEXT, then the return value from
|
|
5696
5778
|
** sqlite3_value_encoding(X) is meaningless. ^Calls to
|
|
5697
|
-
** [sqlite3_value_text(X)], [sqlite3_value_text16(X)],
|
|
5698
|
-
*[sqlite3_value_text16be(X)],
|
|
5779
|
+
** [sqlite3_value_text(X)], [sqlite3_value_text16(X)], [sqlite3_value_text16be(X)],
|
|
5699
5780
|
** [sqlite3_value_text16le(X)], [sqlite3_value_bytes(X)], or
|
|
5700
5781
|
** [sqlite3_value_bytes16(X)] might change the encoding of the value X and
|
|
5701
5782
|
** thus change the return from subsequent calls to sqlite3_value_encoding(X).
|
|
@@ -5706,7 +5787,7 @@ SQLITE_API int sqlite3_value_frombind(sqlite3_value *);
|
|
|
5706
5787
|
** not need to know what the internal state of an sqlite3_value object is and
|
|
5707
5788
|
** hence should not need to use this interface.
|
|
5708
5789
|
*/
|
|
5709
|
-
SQLITE_API int sqlite3_value_encoding(sqlite3_value
|
|
5790
|
+
SQLITE_API int sqlite3_value_encoding(sqlite3_value*);
|
|
5710
5791
|
|
|
5711
5792
|
/*
|
|
5712
5793
|
** CAPI3REF: Finding The Subtype Of SQL Values
|
|
@@ -5717,8 +5798,14 @@ SQLITE_API int sqlite3_value_encoding(sqlite3_value *);
|
|
|
5717
5798
|
** information can be used to pass a limited amount of context from
|
|
5718
5799
|
** one SQL function to another. Use the [sqlite3_result_subtype()]
|
|
5719
5800
|
** routine to set the subtype for the return value of an SQL function.
|
|
5801
|
+
**
|
|
5802
|
+
** Every [application-defined SQL function] that invoke this interface
|
|
5803
|
+
** should include the [SQLITE_SUBTYPE] property in the text
|
|
5804
|
+
** encoding argument when the function is [sqlite3_create_function|registered].
|
|
5805
|
+
** If the [SQLITE_SUBTYPE] property is omitted, then sqlite3_value_subtype()
|
|
5806
|
+
** might return zero instead of the upstream subtype in some corner cases.
|
|
5720
5807
|
*/
|
|
5721
|
-
SQLITE_API unsigned int sqlite3_value_subtype(sqlite3_value
|
|
5808
|
+
SQLITE_API unsigned int sqlite3_value_subtype(sqlite3_value*);
|
|
5722
5809
|
|
|
5723
5810
|
/*
|
|
5724
5811
|
** CAPI3REF: Copy And Free SQL Values
|
|
@@ -5735,8 +5822,8 @@ SQLITE_API unsigned int sqlite3_value_subtype(sqlite3_value *);
|
|
|
5735
5822
|
** previously obtained from [sqlite3_value_dup()]. ^If V is a NULL pointer
|
|
5736
5823
|
** then sqlite3_value_free(V) is a harmless no-op.
|
|
5737
5824
|
*/
|
|
5738
|
-
SQLITE_API sqlite3_value *sqlite3_value_dup(const sqlite3_value
|
|
5739
|
-
SQLITE_API void sqlite3_value_free(sqlite3_value
|
|
5825
|
+
SQLITE_API sqlite3_value *sqlite3_value_dup(const sqlite3_value*);
|
|
5826
|
+
SQLITE_API void sqlite3_value_free(sqlite3_value*);
|
|
5740
5827
|
|
|
5741
5828
|
/*
|
|
5742
5829
|
** CAPI3REF: Obtain Aggregate Function Context
|
|
@@ -5781,7 +5868,7 @@ SQLITE_API void sqlite3_value_free(sqlite3_value *);
|
|
|
5781
5868
|
** This routine must be called from the same thread in which
|
|
5782
5869
|
** the aggregate SQL function is running.
|
|
5783
5870
|
*/
|
|
5784
|
-
SQLITE_API void *sqlite3_aggregate_context(sqlite3_context
|
|
5871
|
+
SQLITE_API void *sqlite3_aggregate_context(sqlite3_context*, int nBytes);
|
|
5785
5872
|
|
|
5786
5873
|
/*
|
|
5787
5874
|
** CAPI3REF: User Data For Functions
|
|
@@ -5796,7 +5883,7 @@ SQLITE_API void *sqlite3_aggregate_context(sqlite3_context *, int nBytes);
|
|
|
5796
5883
|
** This routine must be called from the same thread in which
|
|
5797
5884
|
** the application-defined function is running.
|
|
5798
5885
|
*/
|
|
5799
|
-
SQLITE_API void *sqlite3_user_data(sqlite3_context
|
|
5886
|
+
SQLITE_API void *sqlite3_user_data(sqlite3_context*);
|
|
5800
5887
|
|
|
5801
5888
|
/*
|
|
5802
5889
|
** CAPI3REF: Database Connection For Functions
|
|
@@ -5808,55 +5895,63 @@ SQLITE_API void *sqlite3_user_data(sqlite3_context *);
|
|
|
5808
5895
|
** and [sqlite3_create_function16()] routines that originally
|
|
5809
5896
|
** registered the application defined function.
|
|
5810
5897
|
*/
|
|
5811
|
-
SQLITE_API sqlite3 *sqlite3_context_db_handle(sqlite3_context
|
|
5898
|
+
SQLITE_API sqlite3 *sqlite3_context_db_handle(sqlite3_context*);
|
|
5812
5899
|
|
|
5813
5900
|
/*
|
|
5814
5901
|
** CAPI3REF: Function Auxiliary Data
|
|
5815
5902
|
** METHOD: sqlite3_context
|
|
5816
5903
|
**
|
|
5817
5904
|
** These functions may be used by (non-aggregate) SQL functions to
|
|
5818
|
-
** associate
|
|
5819
|
-
** multiple invocations of the same SQL function during
|
|
5820
|
-
** some circumstances the associated
|
|
5821
|
-
** of where this might be useful is in a
|
|
5822
|
-
** function. The compiled version of the regular
|
|
5823
|
-
**
|
|
5905
|
+
** associate auxiliary data with argument values. If the same argument
|
|
5906
|
+
** value is passed to multiple invocations of the same SQL function during
|
|
5907
|
+
** query execution, under some circumstances the associated auxiliary data
|
|
5908
|
+
** might be preserved. An example of where this might be useful is in a
|
|
5909
|
+
** regular-expression matching function. The compiled version of the regular
|
|
5910
|
+
** expression can be stored as auxiliary data associated with the pattern string.
|
|
5824
5911
|
** Then as long as the pattern string remains the same,
|
|
5825
5912
|
** the compiled regular expression can be reused on multiple
|
|
5826
5913
|
** invocations of the same function.
|
|
5827
5914
|
**
|
|
5828
|
-
** ^The sqlite3_get_auxdata(C,N) interface returns a pointer to the
|
|
5915
|
+
** ^The sqlite3_get_auxdata(C,N) interface returns a pointer to the auxiliary data
|
|
5829
5916
|
** associated by the sqlite3_set_auxdata(C,N,P,X) function with the Nth argument
|
|
5830
5917
|
** value to the application-defined function. ^N is zero for the left-most
|
|
5831
|
-
** function argument. ^If there is no
|
|
5918
|
+
** function argument. ^If there is no auxiliary data
|
|
5832
5919
|
** associated with the function argument, the sqlite3_get_auxdata(C,N) interface
|
|
5833
5920
|
** returns a NULL pointer.
|
|
5834
5921
|
**
|
|
5835
|
-
** ^The sqlite3_set_auxdata(C,N,P,X) interface saves P as
|
|
5836
|
-
** argument of the application-defined function. ^Subsequent
|
|
5922
|
+
** ^The sqlite3_set_auxdata(C,N,P,X) interface saves P as auxiliary data for the
|
|
5923
|
+
** N-th argument of the application-defined function. ^Subsequent
|
|
5837
5924
|
** calls to sqlite3_get_auxdata(C,N) return P from the most recent
|
|
5838
|
-
** sqlite3_set_auxdata(C,N,P,X) call if the
|
|
5839
|
-
** NULL if the
|
|
5925
|
+
** sqlite3_set_auxdata(C,N,P,X) call if the auxiliary data is still valid or
|
|
5926
|
+
** NULL if the auxiliary data has been discarded.
|
|
5840
5927
|
** ^After each call to sqlite3_set_auxdata(C,N,P,X) where X is not NULL,
|
|
5841
5928
|
** SQLite will invoke the destructor function X with parameter P exactly
|
|
5842
|
-
** once, when the
|
|
5843
|
-
** SQLite is free to discard the
|
|
5929
|
+
** once, when the auxiliary data is discarded.
|
|
5930
|
+
** SQLite is free to discard the auxiliary data at any time, including: <ul>
|
|
5844
5931
|
** <li> ^(when the corresponding function parameter changes)^, or
|
|
5845
5932
|
** <li> ^(when [sqlite3_reset()] or [sqlite3_finalize()] is called for the
|
|
5846
5933
|
** SQL statement)^, or
|
|
5847
5934
|
** <li> ^(when sqlite3_set_auxdata() is invoked again on the same
|
|
5848
5935
|
** parameter)^, or
|
|
5849
5936
|
** <li> ^(during the original sqlite3_set_auxdata() call when a memory
|
|
5850
|
-
** allocation error occurs.)^
|
|
5937
|
+
** allocation error occurs.)^
|
|
5938
|
+
** <li> ^(during the original sqlite3_set_auxdata() call if the function
|
|
5939
|
+
** is evaluated during query planning instead of during query execution,
|
|
5940
|
+
** as sometimes happens with [SQLITE_ENABLE_STAT4].)^ </ul>
|
|
5851
5941
|
**
|
|
5852
|
-
** Note the last
|
|
5942
|
+
** Note the last two bullets in particular. The destructor X in
|
|
5853
5943
|
** sqlite3_set_auxdata(C,N,P,X) might be called immediately, before the
|
|
5854
5944
|
** sqlite3_set_auxdata() interface even returns. Hence sqlite3_set_auxdata()
|
|
5855
5945
|
** should be called near the end of the function implementation and the
|
|
5856
5946
|
** function implementation should not make any use of P after
|
|
5857
|
-
** sqlite3_set_auxdata() has been called.
|
|
5858
|
-
**
|
|
5859
|
-
**
|
|
5947
|
+
** sqlite3_set_auxdata() has been called. Furthermore, a call to
|
|
5948
|
+
** sqlite3_get_auxdata() that occurs immediately after a corresponding call
|
|
5949
|
+
** to sqlite3_set_auxdata() might still return NULL if an out-of-memory
|
|
5950
|
+
** condition occurred during the sqlite3_set_auxdata() call or if the
|
|
5951
|
+
** function is being evaluated during query planning rather than during
|
|
5952
|
+
** query execution.
|
|
5953
|
+
**
|
|
5954
|
+
** ^(In practice, auxiliary data is preserved between function calls for
|
|
5860
5955
|
** function parameters that are compile-time constants, including literal
|
|
5861
5956
|
** values and [parameters] and expressions composed from the same.)^
|
|
5862
5957
|
**
|
|
@@ -5866,10 +5961,67 @@ SQLITE_API sqlite3 *sqlite3_context_db_handle(sqlite3_context *);
|
|
|
5866
5961
|
**
|
|
5867
5962
|
** These routines must be called from the same thread in which
|
|
5868
5963
|
** the SQL function is running.
|
|
5964
|
+
**
|
|
5965
|
+
** See also: [sqlite3_get_clientdata()] and [sqlite3_set_clientdata()].
|
|
5869
5966
|
*/
|
|
5870
|
-
SQLITE_API void *sqlite3_get_auxdata(sqlite3_context
|
|
5871
|
-
SQLITE_API void sqlite3_set_auxdata(sqlite3_context
|
|
5872
|
-
|
|
5967
|
+
SQLITE_API void *sqlite3_get_auxdata(sqlite3_context*, int N);
|
|
5968
|
+
SQLITE_API void sqlite3_set_auxdata(sqlite3_context*, int N, void*, void (*)(void*));
|
|
5969
|
+
|
|
5970
|
+
/*
|
|
5971
|
+
** CAPI3REF: Database Connection Client Data
|
|
5972
|
+
** METHOD: sqlite3
|
|
5973
|
+
**
|
|
5974
|
+
** These functions are used to associate one or more named pointers
|
|
5975
|
+
** with a [database connection].
|
|
5976
|
+
** A call to sqlite3_set_clientdata(D,N,P,X) causes the pointer P
|
|
5977
|
+
** to be attached to [database connection] D using name N. Subsequent
|
|
5978
|
+
** calls to sqlite3_get_clientdata(D,N) will return a copy of pointer P
|
|
5979
|
+
** or a NULL pointer if there were no prior calls to
|
|
5980
|
+
** sqlite3_set_clientdata() with the same values of D and N.
|
|
5981
|
+
** Names are compared using strcmp() and are thus case sensitive.
|
|
5982
|
+
**
|
|
5983
|
+
** If P and X are both non-NULL, then the destructor X is invoked with
|
|
5984
|
+
** argument P on the first of the following occurrences:
|
|
5985
|
+
** <ul>
|
|
5986
|
+
** <li> An out-of-memory error occurs during the call to
|
|
5987
|
+
** sqlite3_set_clientdata() which attempts to register pointer P.
|
|
5988
|
+
** <li> A subsequent call to sqlite3_set_clientdata(D,N,P,X) is made
|
|
5989
|
+
** with the same D and N parameters.
|
|
5990
|
+
** <li> The database connection closes. SQLite does not make any guarantees
|
|
5991
|
+
** about the order in which destructors are called, only that all
|
|
5992
|
+
** destructors will be called exactly once at some point during the
|
|
5993
|
+
** database connection closing process.
|
|
5994
|
+
** </ul>
|
|
5995
|
+
**
|
|
5996
|
+
** SQLite does not do anything with client data other than invoke
|
|
5997
|
+
** destructors on the client data at the appropriate time. The intended
|
|
5998
|
+
** use for client data is to provide a mechanism for wrapper libraries
|
|
5999
|
+
** to store additional information about an SQLite database connection.
|
|
6000
|
+
**
|
|
6001
|
+
** There is no limit (other than available memory) on the number of different
|
|
6002
|
+
** client data pointers (with different names) that can be attached to a
|
|
6003
|
+
** single database connection. However, the implementation is optimized
|
|
6004
|
+
** for the case of having only one or two different client data names.
|
|
6005
|
+
** Applications and wrapper libraries are discouraged from using more than
|
|
6006
|
+
** one client data name each.
|
|
6007
|
+
**
|
|
6008
|
+
** There is no way to enumerate the client data pointers
|
|
6009
|
+
** associated with a database connection. The N parameter can be thought
|
|
6010
|
+
** of as a secret key such that only code that knows the secret key is able
|
|
6011
|
+
** to access the associated data.
|
|
6012
|
+
**
|
|
6013
|
+
** Security Warning: These interfaces should not be exposed in scripting
|
|
6014
|
+
** languages or in other circumstances where it might be possible for an
|
|
6015
|
+
** an attacker to invoke them. Any agent that can invoke these interfaces
|
|
6016
|
+
** can probably also take control of the process.
|
|
6017
|
+
**
|
|
6018
|
+
** Database connection client data is only available for SQLite
|
|
6019
|
+
** version 3.44.0 ([dateof:3.44.0]) and later.
|
|
6020
|
+
**
|
|
6021
|
+
** See also: [sqlite3_set_auxdata()] and [sqlite3_get_auxdata()].
|
|
6022
|
+
*/
|
|
6023
|
+
SQLITE_API void *sqlite3_get_clientdata(sqlite3*,const char*);
|
|
6024
|
+
SQLITE_API int sqlite3_set_clientdata(sqlite3*, const char*, void*, void(*)(void*));
|
|
5873
6025
|
|
|
5874
6026
|
/*
|
|
5875
6027
|
** CAPI3REF: Constants Defining Special Destructor Behavior
|
|
@@ -5885,9 +6037,9 @@ SQLITE_API void sqlite3_set_auxdata(sqlite3_context *, int N, void *,
|
|
|
5885
6037
|
** The typedef is necessary to work around problems in certain
|
|
5886
6038
|
** C++ compilers.
|
|
5887
6039
|
*/
|
|
5888
|
-
typedef void (*sqlite3_destructor_type)(void
|
|
5889
|
-
#define SQLITE_STATIC
|
|
5890
|
-
#define SQLITE_TRANSIENT
|
|
6040
|
+
typedef void (*sqlite3_destructor_type)(void*);
|
|
6041
|
+
#define SQLITE_STATIC ((sqlite3_destructor_type)0)
|
|
6042
|
+
#define SQLITE_TRANSIENT ((sqlite3_destructor_type)-1)
|
|
5891
6043
|
|
|
5892
6044
|
/*
|
|
5893
6045
|
** CAPI3REF: Setting The Result Of An SQL Function
|
|
@@ -6036,35 +6188,29 @@ typedef void (*sqlite3_destructor_type)(void *);
|
|
|
6036
6188
|
** than the one containing the application-defined function that received
|
|
6037
6189
|
** the [sqlite3_context] pointer, the results are undefined.
|
|
6038
6190
|
*/
|
|
6039
|
-
SQLITE_API void sqlite3_result_blob(sqlite3_context
|
|
6040
|
-
|
|
6041
|
-
|
|
6042
|
-
|
|
6043
|
-
SQLITE_API void
|
|
6044
|
-
SQLITE_API void
|
|
6045
|
-
SQLITE_API void
|
|
6046
|
-
SQLITE_API void
|
|
6047
|
-
SQLITE_API void
|
|
6048
|
-
SQLITE_API void
|
|
6049
|
-
SQLITE_API void
|
|
6050
|
-
SQLITE_API void
|
|
6051
|
-
SQLITE_API void
|
|
6052
|
-
SQLITE_API void
|
|
6053
|
-
|
|
6054
|
-
SQLITE_API void
|
|
6055
|
-
|
|
6056
|
-
|
|
6057
|
-
SQLITE_API void
|
|
6058
|
-
|
|
6059
|
-
SQLITE_API void
|
|
6060
|
-
|
|
6061
|
-
|
|
6062
|
-
void (*)(void *));
|
|
6063
|
-
SQLITE_API void sqlite3_result_value(sqlite3_context *, sqlite3_value *);
|
|
6064
|
-
SQLITE_API void sqlite3_result_pointer(sqlite3_context *, void *, const char *,
|
|
6065
|
-
void (*)(void *));
|
|
6066
|
-
SQLITE_API void sqlite3_result_zeroblob(sqlite3_context *, int n);
|
|
6067
|
-
SQLITE_API int sqlite3_result_zeroblob64(sqlite3_context *, sqlite3_uint64 n);
|
|
6191
|
+
SQLITE_API void sqlite3_result_blob(sqlite3_context*, const void*, int, void(*)(void*));
|
|
6192
|
+
SQLITE_API void sqlite3_result_blob64(sqlite3_context*,const void*,
|
|
6193
|
+
sqlite3_uint64,void(*)(void*));
|
|
6194
|
+
SQLITE_API void sqlite3_result_double(sqlite3_context*, double);
|
|
6195
|
+
SQLITE_API void sqlite3_result_error(sqlite3_context*, const char*, int);
|
|
6196
|
+
SQLITE_API void sqlite3_result_error16(sqlite3_context*, const void*, int);
|
|
6197
|
+
SQLITE_API void sqlite3_result_error_toobig(sqlite3_context*);
|
|
6198
|
+
SQLITE_API void sqlite3_result_error_nomem(sqlite3_context*);
|
|
6199
|
+
SQLITE_API void sqlite3_result_error_code(sqlite3_context*, int);
|
|
6200
|
+
SQLITE_API void sqlite3_result_int(sqlite3_context*, int);
|
|
6201
|
+
SQLITE_API void sqlite3_result_int64(sqlite3_context*, sqlite3_int64);
|
|
6202
|
+
SQLITE_API void sqlite3_result_null(sqlite3_context*);
|
|
6203
|
+
SQLITE_API void sqlite3_result_text(sqlite3_context*, const char*, int, void(*)(void*));
|
|
6204
|
+
SQLITE_API void sqlite3_result_text64(sqlite3_context*, const char*,sqlite3_uint64,
|
|
6205
|
+
void(*)(void*), unsigned char encoding);
|
|
6206
|
+
SQLITE_API void sqlite3_result_text16(sqlite3_context*, const void*, int, void(*)(void*));
|
|
6207
|
+
SQLITE_API void sqlite3_result_text16le(sqlite3_context*, const void*, int,void(*)(void*));
|
|
6208
|
+
SQLITE_API void sqlite3_result_text16be(sqlite3_context*, const void*, int,void(*)(void*));
|
|
6209
|
+
SQLITE_API void sqlite3_result_value(sqlite3_context*, sqlite3_value*);
|
|
6210
|
+
SQLITE_API void sqlite3_result_pointer(sqlite3_context*, void*,const char*,void(*)(void*));
|
|
6211
|
+
SQLITE_API void sqlite3_result_zeroblob(sqlite3_context*, int n);
|
|
6212
|
+
SQLITE_API int sqlite3_result_zeroblob64(sqlite3_context*, sqlite3_uint64 n);
|
|
6213
|
+
|
|
6068
6214
|
|
|
6069
6215
|
/*
|
|
6070
6216
|
** CAPI3REF: Setting The Subtype Of An SQL Function
|
|
@@ -6077,8 +6223,22 @@ SQLITE_API int sqlite3_result_zeroblob64(sqlite3_context *, sqlite3_uint64 n);
|
|
|
6077
6223
|
** higher order bits are discarded.
|
|
6078
6224
|
** The number of subtype bytes preserved by SQLite might increase
|
|
6079
6225
|
** in future releases of SQLite.
|
|
6226
|
+
**
|
|
6227
|
+
** Every [application-defined SQL function] that invokes this interface
|
|
6228
|
+
** should include the [SQLITE_RESULT_SUBTYPE] property in its
|
|
6229
|
+
** text encoding argument when the SQL function is
|
|
6230
|
+
** [sqlite3_create_function|registered]. If the [SQLITE_RESULT_SUBTYPE]
|
|
6231
|
+
** property is omitted from the function that invokes sqlite3_result_subtype(),
|
|
6232
|
+
** then in some cases the sqlite3_result_subtype() might fail to set
|
|
6233
|
+
** the result subtype.
|
|
6234
|
+
**
|
|
6235
|
+
** If SQLite is compiled with -DSQLITE_STRICT_SUBTYPE=1, then any
|
|
6236
|
+
** SQL function that invokes the sqlite3_result_subtype() interface
|
|
6237
|
+
** and that does not have the SQLITE_RESULT_SUBTYPE property will raise
|
|
6238
|
+
** an error. Future versions of SQLite might enable -DSQLITE_STRICT_SUBTYPE=1
|
|
6239
|
+
** by default.
|
|
6080
6240
|
*/
|
|
6081
|
-
SQLITE_API void sqlite3_result_subtype(sqlite3_context
|
|
6241
|
+
SQLITE_API void sqlite3_result_subtype(sqlite3_context*,unsigned int);
|
|
6082
6242
|
|
|
6083
6243
|
/*
|
|
6084
6244
|
** CAPI3REF: Define New Collating Sequences
|
|
@@ -6162,15 +6322,27 @@ SQLITE_API void sqlite3_result_subtype(sqlite3_context *, unsigned int);
|
|
|
6162
6322
|
** See also: [sqlite3_collation_needed()] and [sqlite3_collation_needed16()].
|
|
6163
6323
|
*/
|
|
6164
6324
|
SQLITE_API int sqlite3_create_collation(
|
|
6165
|
-
|
|
6166
|
-
|
|
6325
|
+
sqlite3*,
|
|
6326
|
+
const char *zName,
|
|
6327
|
+
int eTextRep,
|
|
6328
|
+
void *pArg,
|
|
6329
|
+
int(*xCompare)(void*,int,const void*,int,const void*)
|
|
6330
|
+
);
|
|
6167
6331
|
SQLITE_API int sqlite3_create_collation_v2(
|
|
6168
|
-
|
|
6169
|
-
|
|
6170
|
-
|
|
6332
|
+
sqlite3*,
|
|
6333
|
+
const char *zName,
|
|
6334
|
+
int eTextRep,
|
|
6335
|
+
void *pArg,
|
|
6336
|
+
int(*xCompare)(void*,int,const void*,int,const void*),
|
|
6337
|
+
void(*xDestroy)(void*)
|
|
6338
|
+
);
|
|
6171
6339
|
SQLITE_API int sqlite3_create_collation16(
|
|
6172
|
-
|
|
6173
|
-
|
|
6340
|
+
sqlite3*,
|
|
6341
|
+
const void *zName,
|
|
6342
|
+
int eTextRep,
|
|
6343
|
+
void *pArg,
|
|
6344
|
+
int(*xCompare)(void*,int,const void*,int,const void*)
|
|
6345
|
+
);
|
|
6174
6346
|
|
|
6175
6347
|
/*
|
|
6176
6348
|
** CAPI3REF: Collation Needed Callbacks
|
|
@@ -6199,12 +6371,16 @@ SQLITE_API int sqlite3_create_collation16(
|
|
|
6199
6371
|
** [sqlite3_create_collation()], [sqlite3_create_collation16()], or
|
|
6200
6372
|
** [sqlite3_create_collation_v2()].
|
|
6201
6373
|
*/
|
|
6202
|
-
SQLITE_API int sqlite3_collation_needed(
|
|
6203
|
-
|
|
6204
|
-
|
|
6205
|
-
|
|
6206
|
-
|
|
6207
|
-
|
|
6374
|
+
SQLITE_API int sqlite3_collation_needed(
|
|
6375
|
+
sqlite3*,
|
|
6376
|
+
void*,
|
|
6377
|
+
void(*)(void*,sqlite3*,int eTextRep,const char*)
|
|
6378
|
+
);
|
|
6379
|
+
SQLITE_API int sqlite3_collation_needed16(
|
|
6380
|
+
sqlite3*,
|
|
6381
|
+
void*,
|
|
6382
|
+
void(*)(void*,sqlite3*,int eTextRep,const void*)
|
|
6383
|
+
);
|
|
6208
6384
|
|
|
6209
6385
|
/* BEGIN SQLCIPHER */
|
|
6210
6386
|
#ifdef SQLITE_HAS_CODEC
|
|
@@ -6215,12 +6391,14 @@ SQLITE_API int sqlite3_collation_needed16(sqlite3 *, void *,
|
|
|
6215
6391
|
** The code to implement this API is not available in the public release
|
|
6216
6392
|
** of SQLite.
|
|
6217
6393
|
*/
|
|
6218
|
-
SQLITE_API int sqlite3_key(
|
|
6219
|
-
|
|
6394
|
+
SQLITE_API int sqlite3_key(
|
|
6395
|
+
sqlite3 *db, /* Database to be rekeyed */
|
|
6396
|
+
const void *pKey, int nKey /* The key */
|
|
6220
6397
|
);
|
|
6221
|
-
SQLITE_API int sqlite3_key_v2(
|
|
6222
|
-
|
|
6223
|
-
|
|
6398
|
+
SQLITE_API int sqlite3_key_v2(
|
|
6399
|
+
sqlite3 *db, /* Database to be rekeyed */
|
|
6400
|
+
const char *zDbName, /* Name of the database */
|
|
6401
|
+
const void *pKey, int nKey /* The key */
|
|
6224
6402
|
);
|
|
6225
6403
|
|
|
6226
6404
|
/*
|
|
@@ -6244,20 +6422,22 @@ SQLITE_API int sqlite3_key_v2(sqlite3 *db, /* Database to be rekeyed */
|
|
|
6244
6422
|
use an ATTACHed database and the sqlcipher_export() convenience function
|
|
6245
6423
|
as per the SQLCipher Documentation.
|
|
6246
6424
|
*/
|
|
6247
|
-
SQLITE_API int sqlite3_rekey(
|
|
6248
|
-
|
|
6425
|
+
SQLITE_API int sqlite3_rekey(
|
|
6426
|
+
sqlite3 *db, /* Database to be rekeyed */
|
|
6427
|
+
const void *pKey, int nKey /* The new key */
|
|
6249
6428
|
);
|
|
6250
|
-
SQLITE_API int sqlite3_rekey_v2(
|
|
6251
|
-
|
|
6252
|
-
|
|
6429
|
+
SQLITE_API int sqlite3_rekey_v2(
|
|
6430
|
+
sqlite3 *db, /* Database to be rekeyed */
|
|
6431
|
+
const char *zDbName, /* Name of the database */
|
|
6432
|
+
const void *pKey, int nKey /* The new key */
|
|
6253
6433
|
);
|
|
6254
6434
|
|
|
6255
6435
|
/*
|
|
6256
6436
|
** Specify the activation key for a SEE database. Unless
|
|
6257
6437
|
** activated, none of the SEE routines will work.
|
|
6258
6438
|
*/
|
|
6259
|
-
SQLITE_API void
|
|
6260
|
-
|
|
6439
|
+
SQLITE_API void sqlite3_activate_see(
|
|
6440
|
+
const char *zPassPhrase /* Activation phrase */
|
|
6261
6441
|
);
|
|
6262
6442
|
#endif
|
|
6263
6443
|
/* END SQLCIPHER */
|
|
@@ -6267,8 +6447,8 @@ sqlite3_activate_see(const char *zPassPhrase /* Activation phrase */
|
|
|
6267
6447
|
** Specify the activation key for a CEROD database. Unless
|
|
6268
6448
|
** activated, none of the CEROD routines will work.
|
|
6269
6449
|
*/
|
|
6270
|
-
SQLITE_API void
|
|
6271
|
-
|
|
6450
|
+
SQLITE_API void sqlite3_activate_cerod(
|
|
6451
|
+
const char *zPassPhrase /* Activation phrase */
|
|
6272
6452
|
);
|
|
6273
6453
|
#endif
|
|
6274
6454
|
|
|
@@ -6413,13 +6593,11 @@ SQLITE_API SQLITE_EXTERN char *sqlite3_data_directory;
|
|
|
6413
6593
|
** UTF-8 or UTF-16, respectively.
|
|
6414
6594
|
*/
|
|
6415
6595
|
SQLITE_API int sqlite3_win32_set_directory(
|
|
6416
|
-
|
|
6417
|
-
|
|
6596
|
+
unsigned long type, /* Identifier for directory being set or reset */
|
|
6597
|
+
void *zValue /* New value for directory being set or reset */
|
|
6418
6598
|
);
|
|
6419
|
-
SQLITE_API int sqlite3_win32_set_directory8(unsigned long type,
|
|
6420
|
-
|
|
6421
|
-
SQLITE_API int sqlite3_win32_set_directory16(unsigned long type,
|
|
6422
|
-
const void *zValue);
|
|
6599
|
+
SQLITE_API int sqlite3_win32_set_directory8(unsigned long type, const char *zValue);
|
|
6600
|
+
SQLITE_API int sqlite3_win32_set_directory16(unsigned long type, const void *zValue);
|
|
6423
6601
|
|
|
6424
6602
|
/*
|
|
6425
6603
|
** CAPI3REF: Win32 Directory Types
|
|
@@ -6427,8 +6605,8 @@ SQLITE_API int sqlite3_win32_set_directory16(unsigned long type,
|
|
|
6427
6605
|
** These macros are only available on Windows. They define the allowed values
|
|
6428
6606
|
** for the type argument to the [sqlite3_win32_set_directory] interface.
|
|
6429
6607
|
*/
|
|
6430
|
-
#define SQLITE_WIN32_DATA_DIRECTORY_TYPE
|
|
6431
|
-
#define SQLITE_WIN32_TEMP_DIRECTORY_TYPE
|
|
6608
|
+
#define SQLITE_WIN32_DATA_DIRECTORY_TYPE 1
|
|
6609
|
+
#define SQLITE_WIN32_TEMP_DIRECTORY_TYPE 2
|
|
6432
6610
|
|
|
6433
6611
|
/*
|
|
6434
6612
|
** CAPI3REF: Test For Auto-Commit Mode
|
|
@@ -6452,7 +6630,7 @@ SQLITE_API int sqlite3_win32_set_directory16(unsigned long type,
|
|
|
6452
6630
|
** connection while this routine is running, then the return value
|
|
6453
6631
|
** is undefined.
|
|
6454
6632
|
*/
|
|
6455
|
-
SQLITE_API int sqlite3_get_autocommit(sqlite3
|
|
6633
|
+
SQLITE_API int sqlite3_get_autocommit(sqlite3*);
|
|
6456
6634
|
|
|
6457
6635
|
/*
|
|
6458
6636
|
** CAPI3REF: Find The Database Handle Of A Prepared Statement
|
|
@@ -6465,7 +6643,7 @@ SQLITE_API int sqlite3_get_autocommit(sqlite3 *);
|
|
|
6465
6643
|
** to the [sqlite3_prepare_v2()] call (or its variants) that was used to
|
|
6466
6644
|
** create the statement in the first place.
|
|
6467
6645
|
*/
|
|
6468
|
-
SQLITE_API sqlite3 *sqlite3_db_handle(sqlite3_stmt
|
|
6646
|
+
SQLITE_API sqlite3 *sqlite3_db_handle(sqlite3_stmt*);
|
|
6469
6647
|
|
|
6470
6648
|
/*
|
|
6471
6649
|
** CAPI3REF: Return The Schema Name For A Database Connection
|
|
@@ -6519,8 +6697,7 @@ SQLITE_API const char *sqlite3_db_name(sqlite3 *db, int N);
|
|
|
6519
6697
|
** <li> [sqlite3_filename_wal()]
|
|
6520
6698
|
** </ul>
|
|
6521
6699
|
*/
|
|
6522
|
-
SQLITE_API sqlite3_filename sqlite3_db_filename(sqlite3 *db,
|
|
6523
|
-
const char *zDbName);
|
|
6700
|
+
SQLITE_API sqlite3_filename sqlite3_db_filename(sqlite3 *db, const char *zDbName);
|
|
6524
6701
|
|
|
6525
6702
|
/*
|
|
6526
6703
|
** CAPI3REF: Determine if a database is read-only
|
|
@@ -6548,10 +6725,10 @@ SQLITE_API int sqlite3_db_readonly(sqlite3 *db, const char *zDbName);
|
|
|
6548
6725
|
** ^If the S argument to sqlite3_txn_state(D,S) is not the name of
|
|
6549
6726
|
** a valid schema, then -1 is returned.
|
|
6550
6727
|
*/
|
|
6551
|
-
SQLITE_API int sqlite3_txn_state(sqlite3
|
|
6728
|
+
SQLITE_API int sqlite3_txn_state(sqlite3*,const char *zSchema);
|
|
6552
6729
|
|
|
6553
6730
|
/*
|
|
6554
|
-
** CAPI3REF: Allowed return values from
|
|
6731
|
+
** CAPI3REF: Allowed return values from sqlite3_txn_state()
|
|
6555
6732
|
** KEYWORDS: {transaction state}
|
|
6556
6733
|
**
|
|
6557
6734
|
** These constants define the current transaction state of a database file.
|
|
@@ -6579,8 +6756,8 @@ SQLITE_API int sqlite3_txn_state(sqlite3 *, const char *zSchema);
|
|
|
6579
6756
|
** but has not yet committed. The transaction state will change to
|
|
6580
6757
|
** to SQLITE_TXN_NONE at the next [ROLLBACK] or [COMMIT].</dd>
|
|
6581
6758
|
*/
|
|
6582
|
-
#define SQLITE_TXN_NONE
|
|
6583
|
-
#define SQLITE_TXN_READ
|
|
6759
|
+
#define SQLITE_TXN_NONE 0
|
|
6760
|
+
#define SQLITE_TXN_READ 1
|
|
6584
6761
|
#define SQLITE_TXN_WRITE 2
|
|
6585
6762
|
|
|
6586
6763
|
/*
|
|
@@ -6646,8 +6823,8 @@ SQLITE_API sqlite3_stmt *sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt);
|
|
|
6646
6823
|
**
|
|
6647
6824
|
** See also the [sqlite3_update_hook()] interface.
|
|
6648
6825
|
*/
|
|
6649
|
-
SQLITE_API void *sqlite3_commit_hook(sqlite3
|
|
6650
|
-
SQLITE_API void *sqlite3_rollback_hook(sqlite3
|
|
6826
|
+
SQLITE_API void *sqlite3_commit_hook(sqlite3*, int(*)(void*), void*);
|
|
6827
|
+
SQLITE_API void *sqlite3_rollback_hook(sqlite3*, void(*)(void *), void*);
|
|
6651
6828
|
|
|
6652
6829
|
/*
|
|
6653
6830
|
** CAPI3REF: Autovacuum Compaction Amount Callback
|
|
@@ -6683,7 +6860,7 @@ SQLITE_API void *sqlite3_rollback_hook(sqlite3 *, void (*)(void *), void *);
|
|
|
6683
6860
|
** ^Each call to the sqlite3_autovacuum_pages() interface overrides all
|
|
6684
6861
|
** previous invocations for that database connection. ^If the callback
|
|
6685
6862
|
** argument (C) to sqlite3_autovacuum_pages(D,C,P,X) is a NULL pointer,
|
|
6686
|
-
** then the autovacuum steps callback is
|
|
6863
|
+
** then the autovacuum steps callback is canceled. The return value
|
|
6687
6864
|
** from sqlite3_autovacuum_pages() is normally SQLITE_OK, but might
|
|
6688
6865
|
** be some other error code if something goes wrong. The current
|
|
6689
6866
|
** implementation will only return SQLITE_OK or SQLITE_MISUSE, but other
|
|
@@ -6707,11 +6884,13 @@ SQLITE_API void *sqlite3_rollback_hook(sqlite3 *, void (*)(void *), void *);
|
|
|
6707
6884
|
** }
|
|
6708
6885
|
** </pre></blockquote>
|
|
6709
6886
|
*/
|
|
6710
|
-
SQLITE_API int
|
|
6711
|
-
|
|
6712
|
-
|
|
6713
|
-
|
|
6714
|
-
|
|
6887
|
+
SQLITE_API int sqlite3_autovacuum_pages(
|
|
6888
|
+
sqlite3 *db,
|
|
6889
|
+
unsigned int(*)(void*,const char*,unsigned int,unsigned int,unsigned int),
|
|
6890
|
+
void*,
|
|
6891
|
+
void(*)(void*)
|
|
6892
|
+
);
|
|
6893
|
+
|
|
6715
6894
|
|
|
6716
6895
|
/*
|
|
6717
6896
|
** CAPI3REF: Data Change Notification Callbacks
|
|
@@ -6762,10 +6941,11 @@ sqlite3_autovacuum_pages(sqlite3 *db,
|
|
|
6762
6941
|
** See also the [sqlite3_commit_hook()], [sqlite3_rollback_hook()],
|
|
6763
6942
|
** and [sqlite3_preupdate_hook()] interfaces.
|
|
6764
6943
|
*/
|
|
6765
|
-
SQLITE_API void *sqlite3_update_hook(
|
|
6766
|
-
|
|
6767
|
-
|
|
6768
|
-
|
|
6944
|
+
SQLITE_API void *sqlite3_update_hook(
|
|
6945
|
+
sqlite3*,
|
|
6946
|
+
void(*)(void *,int ,char const *,char const *,sqlite3_int64),
|
|
6947
|
+
void*
|
|
6948
|
+
);
|
|
6769
6949
|
|
|
6770
6950
|
/*
|
|
6771
6951
|
** CAPI3REF: Enable Or Disable Shared Pager Cache
|
|
@@ -6841,7 +7021,7 @@ SQLITE_API int sqlite3_release_memory(int);
|
|
|
6841
7021
|
**
|
|
6842
7022
|
** See also: [sqlite3_release_memory()]
|
|
6843
7023
|
*/
|
|
6844
|
-
SQLITE_API int sqlite3_db_release_memory(sqlite3
|
|
7024
|
+
SQLITE_API int sqlite3_db_release_memory(sqlite3*);
|
|
6845
7025
|
|
|
6846
7026
|
/*
|
|
6847
7027
|
** CAPI3REF: Impose A Limit On Heap Size
|
|
@@ -6921,6 +7101,7 @@ SQLITE_API sqlite3_int64 sqlite3_hard_heap_limit64(sqlite3_int64 N);
|
|
|
6921
7101
|
*/
|
|
6922
7102
|
SQLITE_API SQLITE_DEPRECATED void sqlite3_soft_heap_limit(int N);
|
|
6923
7103
|
|
|
7104
|
+
|
|
6924
7105
|
/*
|
|
6925
7106
|
** CAPI3REF: Extract Metadata About A Column Of A Table
|
|
6926
7107
|
** METHOD: sqlite3
|
|
@@ -6991,15 +7172,15 @@ SQLITE_API SQLITE_DEPRECATED void sqlite3_soft_heap_limit(int N);
|
|
|
6991
7172
|
** any errors are encountered while loading the schema.
|
|
6992
7173
|
*/
|
|
6993
7174
|
SQLITE_API int sqlite3_table_column_metadata(
|
|
6994
|
-
|
|
6995
|
-
|
|
6996
|
-
|
|
6997
|
-
|
|
6998
|
-
|
|
6999
|
-
|
|
7000
|
-
|
|
7001
|
-
|
|
7002
|
-
|
|
7175
|
+
sqlite3 *db, /* Connection handle */
|
|
7176
|
+
const char *zDbName, /* Database name or NULL */
|
|
7177
|
+
const char *zTableName, /* Table name */
|
|
7178
|
+
const char *zColumnName, /* Column name */
|
|
7179
|
+
char const **pzDataType, /* OUTPUT: Declared data type */
|
|
7180
|
+
char const **pzCollSeq, /* OUTPUT: Collation sequence name */
|
|
7181
|
+
int *pNotNull, /* OUTPUT: True if NOT NULL constraint exists */
|
|
7182
|
+
int *pPrimaryKey, /* OUTPUT: True if column part of PK */
|
|
7183
|
+
int *pAutoinc /* OUTPUT: True if column is auto-increment */
|
|
7003
7184
|
);
|
|
7004
7185
|
|
|
7005
7186
|
/*
|
|
@@ -7047,10 +7228,10 @@ SQLITE_API int sqlite3_table_column_metadata(
|
|
|
7047
7228
|
** See also the [load_extension() SQL function].
|
|
7048
7229
|
*/
|
|
7049
7230
|
SQLITE_API int sqlite3_load_extension(
|
|
7050
|
-
|
|
7051
|
-
|
|
7052
|
-
|
|
7053
|
-
|
|
7231
|
+
sqlite3 *db, /* Load the extension into this database connection */
|
|
7232
|
+
const char *zFile, /* Name of the shared library containing extension */
|
|
7233
|
+
const char *zProc, /* Entry point. Derived from zFile if 0 */
|
|
7234
|
+
char **pzErrMsg /* Put error message here if not 0 */
|
|
7054
7235
|
);
|
|
7055
7236
|
|
|
7056
7237
|
/*
|
|
@@ -7116,7 +7297,7 @@ SQLITE_API int sqlite3_enable_load_extension(sqlite3 *db, int onoff);
|
|
|
7116
7297
|
** See also: [sqlite3_reset_auto_extension()]
|
|
7117
7298
|
** and [sqlite3_cancel_auto_extension()]
|
|
7118
7299
|
*/
|
|
7119
|
-
SQLITE_API int sqlite3_auto_extension(void
|
|
7300
|
+
SQLITE_API int sqlite3_auto_extension(void(*xEntryPoint)(void));
|
|
7120
7301
|
|
|
7121
7302
|
/*
|
|
7122
7303
|
** CAPI3REF: Cancel Automatic Extension Loading
|
|
@@ -7128,7 +7309,7 @@ SQLITE_API int sqlite3_auto_extension(void (*xEntryPoint)(void));
|
|
|
7128
7309
|
** unregistered and it returns 0 if X was not on the list of initialization
|
|
7129
7310
|
** routines.
|
|
7130
7311
|
*/
|
|
7131
|
-
SQLITE_API int sqlite3_cancel_auto_extension(void
|
|
7312
|
+
SQLITE_API int sqlite3_cancel_auto_extension(void(*xEntryPoint)(void));
|
|
7132
7313
|
|
|
7133
7314
|
/*
|
|
7134
7315
|
** CAPI3REF: Reset Automatic Extension Loading
|
|
@@ -7164,29 +7345,30 @@ typedef struct sqlite3_module sqlite3_module;
|
|
|
7164
7345
|
*/
|
|
7165
7346
|
struct sqlite3_module {
|
|
7166
7347
|
int iVersion;
|
|
7167
|
-
int (*xCreate)(sqlite3
|
|
7168
|
-
|
|
7169
|
-
|
|
7170
|
-
|
|
7171
|
-
|
|
7348
|
+
int (*xCreate)(sqlite3*, void *pAux,
|
|
7349
|
+
int argc, const char *const*argv,
|
|
7350
|
+
sqlite3_vtab **ppVTab, char**);
|
|
7351
|
+
int (*xConnect)(sqlite3*, void *pAux,
|
|
7352
|
+
int argc, const char *const*argv,
|
|
7353
|
+
sqlite3_vtab **ppVTab, char**);
|
|
7354
|
+
int (*xBestIndex)(sqlite3_vtab *pVTab, sqlite3_index_info*);
|
|
7172
7355
|
int (*xDisconnect)(sqlite3_vtab *pVTab);
|
|
7173
7356
|
int (*xDestroy)(sqlite3_vtab *pVTab);
|
|
7174
7357
|
int (*xOpen)(sqlite3_vtab *pVTab, sqlite3_vtab_cursor **ppCursor);
|
|
7175
|
-
int (*xClose)(sqlite3_vtab_cursor
|
|
7176
|
-
int (*xFilter)(sqlite3_vtab_cursor
|
|
7177
|
-
|
|
7178
|
-
int (*xNext)(sqlite3_vtab_cursor
|
|
7179
|
-
int (*xEof)(sqlite3_vtab_cursor
|
|
7180
|
-
int (*xColumn)(sqlite3_vtab_cursor
|
|
7181
|
-
int (*xRowid)(sqlite3_vtab_cursor
|
|
7358
|
+
int (*xClose)(sqlite3_vtab_cursor*);
|
|
7359
|
+
int (*xFilter)(sqlite3_vtab_cursor*, int idxNum, const char *idxStr,
|
|
7360
|
+
int argc, sqlite3_value **argv);
|
|
7361
|
+
int (*xNext)(sqlite3_vtab_cursor*);
|
|
7362
|
+
int (*xEof)(sqlite3_vtab_cursor*);
|
|
7363
|
+
int (*xColumn)(sqlite3_vtab_cursor*, sqlite3_context*, int);
|
|
7364
|
+
int (*xRowid)(sqlite3_vtab_cursor*, sqlite3_int64 *pRowid);
|
|
7182
7365
|
int (*xUpdate)(sqlite3_vtab *, int, sqlite3_value **, sqlite3_int64 *);
|
|
7183
7366
|
int (*xBegin)(sqlite3_vtab *pVTab);
|
|
7184
7367
|
int (*xSync)(sqlite3_vtab *pVTab);
|
|
7185
7368
|
int (*xCommit)(sqlite3_vtab *pVTab);
|
|
7186
7369
|
int (*xRollback)(sqlite3_vtab *pVTab);
|
|
7187
7370
|
int (*xFindFunction)(sqlite3_vtab *pVtab, int nArg, const char *zName,
|
|
7188
|
-
void (**pxFunc)(sqlite3_context
|
|
7189
|
-
sqlite3_value **),
|
|
7371
|
+
void (**pxFunc)(sqlite3_context*,int,sqlite3_value**),
|
|
7190
7372
|
void **ppArg);
|
|
7191
7373
|
int (*xRename)(sqlite3_vtab *pVtab, const char *zNew);
|
|
7192
7374
|
/* The methods above are in version 1 of the sqlite_module object. Those
|
|
@@ -7196,7 +7378,11 @@ struct sqlite3_module {
|
|
|
7196
7378
|
int (*xRollbackTo)(sqlite3_vtab *pVTab, int);
|
|
7197
7379
|
/* The methods above are in versions 1 and 2 of the sqlite_module object.
|
|
7198
7380
|
** Those below are for version 3 and greater. */
|
|
7199
|
-
int (*xShadowName)(const char
|
|
7381
|
+
int (*xShadowName)(const char*);
|
|
7382
|
+
/* The methods above are in versions 1 through 3 of the sqlite_module object.
|
|
7383
|
+
** Those below are for version 4 and greater. */
|
|
7384
|
+
int (*xIntegrity)(sqlite3_vtab *pVTab, const char *zSchema,
|
|
7385
|
+
const char *zTabName, int mFlags, char **pzErr);
|
|
7200
7386
|
};
|
|
7201
7387
|
|
|
7202
7388
|
/*
|
|
@@ -7303,34 +7489,34 @@ struct sqlite3_module {
|
|
|
7303
7489
|
*/
|
|
7304
7490
|
struct sqlite3_index_info {
|
|
7305
7491
|
/* Inputs */
|
|
7306
|
-
int nConstraint;
|
|
7492
|
+
int nConstraint; /* Number of entries in aConstraint */
|
|
7307
7493
|
struct sqlite3_index_constraint {
|
|
7308
|
-
|
|
7309
|
-
|
|
7310
|
-
|
|
7311
|
-
|
|
7312
|
-
} *aConstraint;
|
|
7313
|
-
int nOrderBy;
|
|
7494
|
+
int iColumn; /* Column constrained. -1 for ROWID */
|
|
7495
|
+
unsigned char op; /* Constraint operator */
|
|
7496
|
+
unsigned char usable; /* True if this constraint is usable */
|
|
7497
|
+
int iTermOffset; /* Used internally - xBestIndex should ignore */
|
|
7498
|
+
} *aConstraint; /* Table of WHERE clause constraints */
|
|
7499
|
+
int nOrderBy; /* Number of terms in the ORDER BY clause */
|
|
7314
7500
|
struct sqlite3_index_orderby {
|
|
7315
|
-
|
|
7316
|
-
|
|
7317
|
-
} *aOrderBy;
|
|
7501
|
+
int iColumn; /* Column number */
|
|
7502
|
+
unsigned char desc; /* True for DESC. False for ASC. */
|
|
7503
|
+
} *aOrderBy; /* The ORDER BY clause */
|
|
7318
7504
|
/* Outputs */
|
|
7319
7505
|
struct sqlite3_index_constraint_usage {
|
|
7320
|
-
int argvIndex;
|
|
7321
|
-
unsigned char omit;
|
|
7506
|
+
int argvIndex; /* if >0, constraint is part of argv to xFilter */
|
|
7507
|
+
unsigned char omit; /* Do not code a test for this constraint */
|
|
7322
7508
|
} *aConstraintUsage;
|
|
7323
|
-
int idxNum;
|
|
7324
|
-
char *idxStr;
|
|
7325
|
-
int needToFreeIdxStr;
|
|
7326
|
-
int orderByConsumed;
|
|
7327
|
-
double estimatedCost;
|
|
7509
|
+
int idxNum; /* Number used to identify the index */
|
|
7510
|
+
char *idxStr; /* String, possibly obtained from sqlite3_malloc */
|
|
7511
|
+
int needToFreeIdxStr; /* Free idxStr using sqlite3_free() if true */
|
|
7512
|
+
int orderByConsumed; /* True if output is already ordered */
|
|
7513
|
+
double estimatedCost; /* Estimated cost of using this index */
|
|
7328
7514
|
/* Fields below are only available in SQLite 3.8.2 and later */
|
|
7329
|
-
sqlite3_int64 estimatedRows;
|
|
7515
|
+
sqlite3_int64 estimatedRows; /* Estimated number of rows returned */
|
|
7330
7516
|
/* Fields below are only available in SQLite 3.9.0 and later */
|
|
7331
|
-
int idxFlags;
|
|
7517
|
+
int idxFlags; /* Mask of SQLITE_INDEX_SCAN_* flags */
|
|
7332
7518
|
/* Fields below are only available in SQLite 3.10.0 and later */
|
|
7333
|
-
sqlite3_uint64 colUsed;
|
|
7519
|
+
sqlite3_uint64 colUsed; /* Input: Mask of columns used by statement */
|
|
7334
7520
|
};
|
|
7335
7521
|
|
|
7336
7522
|
/*
|
|
@@ -7340,7 +7526,7 @@ struct sqlite3_index_info {
|
|
|
7340
7526
|
** [sqlite3_index_info].idxFlags field to some combination of
|
|
7341
7527
|
** these bits.
|
|
7342
7528
|
*/
|
|
7343
|
-
#define SQLITE_INDEX_SCAN_UNIQUE
|
|
7529
|
+
#define SQLITE_INDEX_SCAN_UNIQUE 1 /* Scan visits at most 1 row */
|
|
7344
7530
|
|
|
7345
7531
|
/*
|
|
7346
7532
|
** CAPI3REF: Virtual Table Constraint Operator Codes
|
|
@@ -7380,23 +7566,23 @@ struct sqlite3_index_info {
|
|
|
7380
7566
|
** because the constraints are numeric) and so the sqlite3_vtab_collation()
|
|
7381
7567
|
** interface is not commonly needed.
|
|
7382
7568
|
*/
|
|
7383
|
-
#define SQLITE_INDEX_CONSTRAINT_EQ
|
|
7384
|
-
#define SQLITE_INDEX_CONSTRAINT_GT
|
|
7385
|
-
#define SQLITE_INDEX_CONSTRAINT_LE
|
|
7386
|
-
#define SQLITE_INDEX_CONSTRAINT_LT
|
|
7387
|
-
#define SQLITE_INDEX_CONSTRAINT_GE
|
|
7388
|
-
#define SQLITE_INDEX_CONSTRAINT_MATCH
|
|
7389
|
-
#define SQLITE_INDEX_CONSTRAINT_LIKE
|
|
7390
|
-
#define SQLITE_INDEX_CONSTRAINT_GLOB
|
|
7391
|
-
#define SQLITE_INDEX_CONSTRAINT_REGEXP
|
|
7392
|
-
#define SQLITE_INDEX_CONSTRAINT_NE
|
|
7393
|
-
#define SQLITE_INDEX_CONSTRAINT_ISNOT
|
|
7394
|
-
#define SQLITE_INDEX_CONSTRAINT_ISNOTNULL
|
|
7395
|
-
#define SQLITE_INDEX_CONSTRAINT_ISNULL
|
|
7396
|
-
#define SQLITE_INDEX_CONSTRAINT_IS
|
|
7397
|
-
#define SQLITE_INDEX_CONSTRAINT_LIMIT
|
|
7398
|
-
#define SQLITE_INDEX_CONSTRAINT_OFFSET
|
|
7399
|
-
#define SQLITE_INDEX_CONSTRAINT_FUNCTION
|
|
7569
|
+
#define SQLITE_INDEX_CONSTRAINT_EQ 2
|
|
7570
|
+
#define SQLITE_INDEX_CONSTRAINT_GT 4
|
|
7571
|
+
#define SQLITE_INDEX_CONSTRAINT_LE 8
|
|
7572
|
+
#define SQLITE_INDEX_CONSTRAINT_LT 16
|
|
7573
|
+
#define SQLITE_INDEX_CONSTRAINT_GE 32
|
|
7574
|
+
#define SQLITE_INDEX_CONSTRAINT_MATCH 64
|
|
7575
|
+
#define SQLITE_INDEX_CONSTRAINT_LIKE 65
|
|
7576
|
+
#define SQLITE_INDEX_CONSTRAINT_GLOB 66
|
|
7577
|
+
#define SQLITE_INDEX_CONSTRAINT_REGEXP 67
|
|
7578
|
+
#define SQLITE_INDEX_CONSTRAINT_NE 68
|
|
7579
|
+
#define SQLITE_INDEX_CONSTRAINT_ISNOT 69
|
|
7580
|
+
#define SQLITE_INDEX_CONSTRAINT_ISNOTNULL 70
|
|
7581
|
+
#define SQLITE_INDEX_CONSTRAINT_ISNULL 71
|
|
7582
|
+
#define SQLITE_INDEX_CONSTRAINT_IS 72
|
|
7583
|
+
#define SQLITE_INDEX_CONSTRAINT_LIMIT 73
|
|
7584
|
+
#define SQLITE_INDEX_CONSTRAINT_OFFSET 74
|
|
7585
|
+
#define SQLITE_INDEX_CONSTRAINT_FUNCTION 150
|
|
7400
7586
|
|
|
7401
7587
|
/*
|
|
7402
7588
|
** CAPI3REF: Register A Virtual Table Implementation
|
|
@@ -7431,17 +7617,17 @@ struct sqlite3_index_info {
|
|
|
7431
7617
|
** See also: [sqlite3_drop_modules()]
|
|
7432
7618
|
*/
|
|
7433
7619
|
SQLITE_API int sqlite3_create_module(
|
|
7434
|
-
|
|
7435
|
-
|
|
7436
|
-
|
|
7437
|
-
|
|
7620
|
+
sqlite3 *db, /* SQLite connection to register module with */
|
|
7621
|
+
const char *zName, /* Name of the module */
|
|
7622
|
+
const sqlite3_module *p, /* Methods for the module */
|
|
7623
|
+
void *pClientData /* Client data for xCreate/xConnect */
|
|
7438
7624
|
);
|
|
7439
7625
|
SQLITE_API int sqlite3_create_module_v2(
|
|
7440
|
-
|
|
7441
|
-
|
|
7442
|
-
|
|
7443
|
-
|
|
7444
|
-
|
|
7626
|
+
sqlite3 *db, /* SQLite connection to register module with */
|
|
7627
|
+
const char *zName, /* Name of the module */
|
|
7628
|
+
const sqlite3_module *p, /* Methods for the module */
|
|
7629
|
+
void *pClientData, /* Client data for xCreate/xConnect */
|
|
7630
|
+
void(*xDestroy)(void*) /* Module destructor function */
|
|
7445
7631
|
);
|
|
7446
7632
|
|
|
7447
7633
|
/*
|
|
@@ -7457,8 +7643,8 @@ SQLITE_API int sqlite3_create_module_v2(
|
|
|
7457
7643
|
** See also: [sqlite3_create_module()]
|
|
7458
7644
|
*/
|
|
7459
7645
|
SQLITE_API int sqlite3_drop_modules(
|
|
7460
|
-
|
|
7461
|
-
|
|
7646
|
+
sqlite3 *db, /* Remove modules from this connection */
|
|
7647
|
+
const char **azKeep /* Except, do not remove the ones named here */
|
|
7462
7648
|
);
|
|
7463
7649
|
|
|
7464
7650
|
/*
|
|
@@ -7480,9 +7666,9 @@ SQLITE_API int sqlite3_drop_modules(
|
|
|
7480
7666
|
** freed by sqlite3_free() and the zErrMsg field will be zeroed.
|
|
7481
7667
|
*/
|
|
7482
7668
|
struct sqlite3_vtab {
|
|
7483
|
-
const sqlite3_module *pModule;
|
|
7484
|
-
int nRef;
|
|
7485
|
-
char *zErrMsg;
|
|
7669
|
+
const sqlite3_module *pModule; /* The module for this virtual table */
|
|
7670
|
+
int nRef; /* Number of open cursors */
|
|
7671
|
+
char *zErrMsg; /* Error message from sqlite3_mprintf() */
|
|
7486
7672
|
/* Virtual table implementations will typically add additional fields */
|
|
7487
7673
|
};
|
|
7488
7674
|
|
|
@@ -7504,7 +7690,7 @@ struct sqlite3_vtab {
|
|
|
7504
7690
|
** are common to all implementations.
|
|
7505
7691
|
*/
|
|
7506
7692
|
struct sqlite3_vtab_cursor {
|
|
7507
|
-
sqlite3_vtab *pVtab;
|
|
7693
|
+
sqlite3_vtab *pVtab; /* Virtual table of this cursor */
|
|
7508
7694
|
/* Virtual table implementations will typically add additional fields */
|
|
7509
7695
|
};
|
|
7510
7696
|
|
|
@@ -7516,7 +7702,7 @@ struct sqlite3_vtab_cursor {
|
|
|
7516
7702
|
** to declare the format (the names and datatypes of the columns) of
|
|
7517
7703
|
** the virtual tables they implement.
|
|
7518
7704
|
*/
|
|
7519
|
-
SQLITE_API int sqlite3_declare_vtab(sqlite3
|
|
7705
|
+
SQLITE_API int sqlite3_declare_vtab(sqlite3*, const char *zSQL);
|
|
7520
7706
|
|
|
7521
7707
|
/*
|
|
7522
7708
|
** CAPI3REF: Overload A Function For A Virtual Table
|
|
@@ -7535,8 +7721,7 @@ SQLITE_API int sqlite3_declare_vtab(sqlite3 *, const char *zSQL);
|
|
|
7535
7721
|
** purpose is to be a placeholder function that can be overloaded
|
|
7536
7722
|
** by a [virtual table].
|
|
7537
7723
|
*/
|
|
7538
|
-
SQLITE_API int sqlite3_overload_function(sqlite3
|
|
7539
|
-
int nArg);
|
|
7724
|
+
SQLITE_API int sqlite3_overload_function(sqlite3*, const char *zFuncName, int nArg);
|
|
7540
7725
|
|
|
7541
7726
|
/*
|
|
7542
7727
|
** CAPI3REF: A Handle To An Open BLOB
|
|
@@ -7635,9 +7820,15 @@ typedef struct sqlite3_blob sqlite3_blob;
|
|
|
7635
7820
|
** [sqlite3_blob_reopen()], [sqlite3_blob_read()],
|
|
7636
7821
|
** [sqlite3_blob_bytes()], [sqlite3_blob_write()].
|
|
7637
7822
|
*/
|
|
7638
|
-
SQLITE_API int sqlite3_blob_open(
|
|
7639
|
-
|
|
7640
|
-
|
|
7823
|
+
SQLITE_API int sqlite3_blob_open(
|
|
7824
|
+
sqlite3*,
|
|
7825
|
+
const char *zDb,
|
|
7826
|
+
const char *zTable,
|
|
7827
|
+
const char *zColumn,
|
|
7828
|
+
sqlite3_int64 iRow,
|
|
7829
|
+
int flags,
|
|
7830
|
+
sqlite3_blob **ppBlob
|
|
7831
|
+
);
|
|
7641
7832
|
|
|
7642
7833
|
/*
|
|
7643
7834
|
** CAPI3REF: Move a BLOB Handle to a New Row
|
|
@@ -7679,7 +7870,7 @@ SQLITE_API int sqlite3_blob_reopen(sqlite3_blob *, sqlite3_int64);
|
|
|
7679
7870
|
** code is returned and the transaction rolled back.
|
|
7680
7871
|
**
|
|
7681
7872
|
** Calling this function with an argument that is not a NULL pointer or an
|
|
7682
|
-
** open blob handle results in undefined
|
|
7873
|
+
** open blob handle results in undefined behavior. ^Calling this routine
|
|
7683
7874
|
** with a null pointer (such as would be returned by a failed call to
|
|
7684
7875
|
** [sqlite3_blob_open()]) is a harmless no-op. ^Otherwise, if this function
|
|
7685
7876
|
** is passed a valid open blob handle, the values returned by the
|
|
@@ -7772,8 +7963,7 @@ SQLITE_API int sqlite3_blob_read(sqlite3_blob *, void *Z, int N, int iOffset);
|
|
|
7772
7963
|
**
|
|
7773
7964
|
** See also: [sqlite3_blob_read()].
|
|
7774
7965
|
*/
|
|
7775
|
-
SQLITE_API int sqlite3_blob_write(sqlite3_blob *, const void *z, int n,
|
|
7776
|
-
int iOffset);
|
|
7966
|
+
SQLITE_API int sqlite3_blob_write(sqlite3_blob *, const void *z, int n, int iOffset);
|
|
7777
7967
|
|
|
7778
7968
|
/*
|
|
7779
7969
|
** CAPI3REF: Virtual File System Objects
|
|
@@ -7805,8 +7995,8 @@ SQLITE_API int sqlite3_blob_write(sqlite3_blob *, const void *z, int n,
|
|
|
7805
7995
|
** the default. The choice for the new VFS is arbitrary.)^
|
|
7806
7996
|
*/
|
|
7807
7997
|
SQLITE_API sqlite3_vfs *sqlite3_vfs_find(const char *zVfsName);
|
|
7808
|
-
SQLITE_API int sqlite3_vfs_register(sqlite3_vfs
|
|
7809
|
-
SQLITE_API int sqlite3_vfs_unregister(sqlite3_vfs
|
|
7998
|
+
SQLITE_API int sqlite3_vfs_register(sqlite3_vfs*, int makeDflt);
|
|
7999
|
+
SQLITE_API int sqlite3_vfs_unregister(sqlite3_vfs*);
|
|
7810
8000
|
|
|
7811
8001
|
/*
|
|
7812
8002
|
** CAPI3REF: Mutexes
|
|
@@ -7923,10 +8113,10 @@ SQLITE_API int sqlite3_vfs_unregister(sqlite3_vfs *);
|
|
|
7923
8113
|
** See also: [sqlite3_mutex_held()] and [sqlite3_mutex_notheld()].
|
|
7924
8114
|
*/
|
|
7925
8115
|
SQLITE_API sqlite3_mutex *sqlite3_mutex_alloc(int);
|
|
7926
|
-
SQLITE_API void sqlite3_mutex_free(sqlite3_mutex
|
|
7927
|
-
SQLITE_API void sqlite3_mutex_enter(sqlite3_mutex
|
|
7928
|
-
SQLITE_API int sqlite3_mutex_try(sqlite3_mutex
|
|
7929
|
-
SQLITE_API void sqlite3_mutex_leave(sqlite3_mutex
|
|
8116
|
+
SQLITE_API void sqlite3_mutex_free(sqlite3_mutex*);
|
|
8117
|
+
SQLITE_API void sqlite3_mutex_enter(sqlite3_mutex*);
|
|
8118
|
+
SQLITE_API int sqlite3_mutex_try(sqlite3_mutex*);
|
|
8119
|
+
SQLITE_API void sqlite3_mutex_leave(sqlite3_mutex*);
|
|
7930
8120
|
|
|
7931
8121
|
/*
|
|
7932
8122
|
** CAPI3REF: Mutex Methods Object
|
|
@@ -8036,8 +8226,8 @@ struct sqlite3_mutex_methods {
|
|
|
8036
8226
|
** interface should also return 1 when given a NULL pointer.
|
|
8037
8227
|
*/
|
|
8038
8228
|
#ifndef NDEBUG
|
|
8039
|
-
SQLITE_API int sqlite3_mutex_held(sqlite3_mutex
|
|
8040
|
-
SQLITE_API int sqlite3_mutex_notheld(sqlite3_mutex
|
|
8229
|
+
SQLITE_API int sqlite3_mutex_held(sqlite3_mutex*);
|
|
8230
|
+
SQLITE_API int sqlite3_mutex_notheld(sqlite3_mutex*);
|
|
8041
8231
|
#endif
|
|
8042
8232
|
|
|
8043
8233
|
/*
|
|
@@ -8050,25 +8240,26 @@ SQLITE_API int sqlite3_mutex_notheld(sqlite3_mutex *);
|
|
|
8050
8240
|
** next. Applications that override the built-in mutex logic must be
|
|
8051
8241
|
** prepared to accommodate additional static mutexes.
|
|
8052
8242
|
*/
|
|
8053
|
-
#define SQLITE_MUTEX_FAST
|
|
8054
|
-
#define SQLITE_MUTEX_RECURSIVE
|
|
8055
|
-
#define SQLITE_MUTEX_STATIC_MAIN
|
|
8056
|
-
#define SQLITE_MUTEX_STATIC_MEM
|
|
8057
|
-
#define SQLITE_MUTEX_STATIC_MEM2
|
|
8058
|
-
#define SQLITE_MUTEX_STATIC_OPEN
|
|
8059
|
-
#define SQLITE_MUTEX_STATIC_PRNG
|
|
8060
|
-
#define SQLITE_MUTEX_STATIC_LRU
|
|
8061
|
-
#define SQLITE_MUTEX_STATIC_LRU2
|
|
8062
|
-
#define SQLITE_MUTEX_STATIC_PMEM
|
|
8063
|
-
#define SQLITE_MUTEX_STATIC_APP1
|
|
8064
|
-
#define SQLITE_MUTEX_STATIC_APP2
|
|
8065
|
-
#define SQLITE_MUTEX_STATIC_APP3
|
|
8066
|
-
#define SQLITE_MUTEX_STATIC_VFS1
|
|
8067
|
-
#define SQLITE_MUTEX_STATIC_VFS2
|
|
8068
|
-
#define SQLITE_MUTEX_STATIC_VFS3
|
|
8243
|
+
#define SQLITE_MUTEX_FAST 0
|
|
8244
|
+
#define SQLITE_MUTEX_RECURSIVE 1
|
|
8245
|
+
#define SQLITE_MUTEX_STATIC_MAIN 2
|
|
8246
|
+
#define SQLITE_MUTEX_STATIC_MEM 3 /* sqlite3_malloc() */
|
|
8247
|
+
#define SQLITE_MUTEX_STATIC_MEM2 4 /* NOT USED */
|
|
8248
|
+
#define SQLITE_MUTEX_STATIC_OPEN 4 /* sqlite3BtreeOpen() */
|
|
8249
|
+
#define SQLITE_MUTEX_STATIC_PRNG 5 /* sqlite3_randomness() */
|
|
8250
|
+
#define SQLITE_MUTEX_STATIC_LRU 6 /* lru page list */
|
|
8251
|
+
#define SQLITE_MUTEX_STATIC_LRU2 7 /* NOT USED */
|
|
8252
|
+
#define SQLITE_MUTEX_STATIC_PMEM 7 /* sqlite3PageMalloc() */
|
|
8253
|
+
#define SQLITE_MUTEX_STATIC_APP1 8 /* For use by application */
|
|
8254
|
+
#define SQLITE_MUTEX_STATIC_APP2 9 /* For use by application */
|
|
8255
|
+
#define SQLITE_MUTEX_STATIC_APP3 10 /* For use by application */
|
|
8256
|
+
#define SQLITE_MUTEX_STATIC_VFS1 11 /* For use by built-in VFS */
|
|
8257
|
+
#define SQLITE_MUTEX_STATIC_VFS2 12 /* For use by extension VFS */
|
|
8258
|
+
#define SQLITE_MUTEX_STATIC_VFS3 13 /* For use by application VFS */
|
|
8069
8259
|
|
|
8070
8260
|
/* Legacy compatibility: */
|
|
8071
|
-
#define SQLITE_MUTEX_STATIC_MASTER
|
|
8261
|
+
#define SQLITE_MUTEX_STATIC_MASTER 2
|
|
8262
|
+
|
|
8072
8263
|
|
|
8073
8264
|
/*
|
|
8074
8265
|
** CAPI3REF: Retrieve the mutex for a database connection
|
|
@@ -8080,7 +8271,7 @@ SQLITE_API int sqlite3_mutex_notheld(sqlite3_mutex *);
|
|
|
8080
8271
|
** ^If the [threading mode] is Single-thread or Multi-thread then this
|
|
8081
8272
|
** routine returns a NULL pointer.
|
|
8082
8273
|
*/
|
|
8083
|
-
SQLITE_API sqlite3_mutex *sqlite3_db_mutex(sqlite3
|
|
8274
|
+
SQLITE_API sqlite3_mutex *sqlite3_db_mutex(sqlite3*);
|
|
8084
8275
|
|
|
8085
8276
|
/*
|
|
8086
8277
|
** CAPI3REF: Low-Level Control Of Database Files
|
|
@@ -8123,8 +8314,7 @@ SQLITE_API sqlite3_mutex *sqlite3_db_mutex(sqlite3 *);
|
|
|
8123
8314
|
**
|
|
8124
8315
|
** See also: [file control opcodes]
|
|
8125
8316
|
*/
|
|
8126
|
-
SQLITE_API int sqlite3_file_control(sqlite3
|
|
8127
|
-
void *);
|
|
8317
|
+
SQLITE_API int sqlite3_file_control(sqlite3*, const char *zDbName, int op, void*);
|
|
8128
8318
|
|
|
8129
8319
|
/*
|
|
8130
8320
|
** CAPI3REF: Testing Interface
|
|
@@ -8156,39 +8346,41 @@ SQLITE_API int sqlite3_test_control(int op, ...);
|
|
|
8156
8346
|
** Applications should not use any of these parameters or the
|
|
8157
8347
|
** [sqlite3_test_control()] interface.
|
|
8158
8348
|
*/
|
|
8159
|
-
#define SQLITE_TESTCTRL_FIRST
|
|
8160
|
-
#define SQLITE_TESTCTRL_PRNG_SAVE
|
|
8161
|
-
#define SQLITE_TESTCTRL_PRNG_RESTORE
|
|
8162
|
-
#define SQLITE_TESTCTRL_PRNG_RESET
|
|
8163
|
-
#define
|
|
8164
|
-
#define
|
|
8165
|
-
#define
|
|
8166
|
-
#define
|
|
8167
|
-
#define
|
|
8168
|
-
#define
|
|
8169
|
-
#define
|
|
8170
|
-
#define
|
|
8171
|
-
#define
|
|
8172
|
-
#define
|
|
8173
|
-
#define
|
|
8174
|
-
#define
|
|
8175
|
-
#define
|
|
8176
|
-
#define
|
|
8177
|
-
#define
|
|
8178
|
-
#define
|
|
8179
|
-
#define
|
|
8180
|
-
#define
|
|
8181
|
-
#define
|
|
8182
|
-
#define
|
|
8183
|
-
#define
|
|
8184
|
-
#define
|
|
8185
|
-
#define
|
|
8186
|
-
#define
|
|
8187
|
-
#define
|
|
8188
|
-
#define
|
|
8189
|
-
#define
|
|
8190
|
-
#define
|
|
8191
|
-
#define
|
|
8349
|
+
#define SQLITE_TESTCTRL_FIRST 5
|
|
8350
|
+
#define SQLITE_TESTCTRL_PRNG_SAVE 5
|
|
8351
|
+
#define SQLITE_TESTCTRL_PRNG_RESTORE 6
|
|
8352
|
+
#define SQLITE_TESTCTRL_PRNG_RESET 7 /* NOT USED */
|
|
8353
|
+
#define SQLITE_TESTCTRL_FK_NO_ACTION 7
|
|
8354
|
+
#define SQLITE_TESTCTRL_BITVEC_TEST 8
|
|
8355
|
+
#define SQLITE_TESTCTRL_FAULT_INSTALL 9
|
|
8356
|
+
#define SQLITE_TESTCTRL_BENIGN_MALLOC_HOOKS 10
|
|
8357
|
+
#define SQLITE_TESTCTRL_PENDING_BYTE 11
|
|
8358
|
+
#define SQLITE_TESTCTRL_ASSERT 12
|
|
8359
|
+
#define SQLITE_TESTCTRL_ALWAYS 13
|
|
8360
|
+
#define SQLITE_TESTCTRL_RESERVE 14 /* NOT USED */
|
|
8361
|
+
#define SQLITE_TESTCTRL_OPTIMIZATIONS 15
|
|
8362
|
+
#define SQLITE_TESTCTRL_ISKEYWORD 16 /* NOT USED */
|
|
8363
|
+
#define SQLITE_TESTCTRL_SCRATCHMALLOC 17 /* NOT USED */
|
|
8364
|
+
#define SQLITE_TESTCTRL_INTERNAL_FUNCTIONS 17
|
|
8365
|
+
#define SQLITE_TESTCTRL_LOCALTIME_FAULT 18
|
|
8366
|
+
#define SQLITE_TESTCTRL_EXPLAIN_STMT 19 /* NOT USED */
|
|
8367
|
+
#define SQLITE_TESTCTRL_ONCE_RESET_THRESHOLD 19
|
|
8368
|
+
#define SQLITE_TESTCTRL_NEVER_CORRUPT 20
|
|
8369
|
+
#define SQLITE_TESTCTRL_VDBE_COVERAGE 21
|
|
8370
|
+
#define SQLITE_TESTCTRL_BYTEORDER 22
|
|
8371
|
+
#define SQLITE_TESTCTRL_ISINIT 23
|
|
8372
|
+
#define SQLITE_TESTCTRL_SORTER_MMAP 24
|
|
8373
|
+
#define SQLITE_TESTCTRL_IMPOSTER 25
|
|
8374
|
+
#define SQLITE_TESTCTRL_PARSER_COVERAGE 26
|
|
8375
|
+
#define SQLITE_TESTCTRL_RESULT_INTREAL 27
|
|
8376
|
+
#define SQLITE_TESTCTRL_PRNG_SEED 28
|
|
8377
|
+
#define SQLITE_TESTCTRL_EXTRA_SCHEMA_CHECKS 29
|
|
8378
|
+
#define SQLITE_TESTCTRL_SEEK_COUNT 30
|
|
8379
|
+
#define SQLITE_TESTCTRL_TRACEFLAGS 31
|
|
8380
|
+
#define SQLITE_TESTCTRL_TUNE 32
|
|
8381
|
+
#define SQLITE_TESTCTRL_LOGEST 33
|
|
8382
|
+
#define SQLITE_TESTCTRL_USELONGDOUBLE 34
|
|
8383
|
+
#define SQLITE_TESTCTRL_LAST 34 /* Largest TESTCTRL */
|
|
8192
8384
|
|
|
8193
8385
|
/*
|
|
8194
8386
|
** CAPI3REF: SQL Keyword Checking
|
|
@@ -8238,8 +8430,8 @@ SQLITE_API int sqlite3_test_control(int op, ...);
|
|
|
8238
8430
|
** new keywords may be added to future releases of SQLite.
|
|
8239
8431
|
*/
|
|
8240
8432
|
SQLITE_API int sqlite3_keyword_count(void);
|
|
8241
|
-
SQLITE_API int sqlite3_keyword_name(int,
|
|
8242
|
-
SQLITE_API int sqlite3_keyword_check(const char
|
|
8433
|
+
SQLITE_API int sqlite3_keyword_name(int,const char**,int*);
|
|
8434
|
+
SQLITE_API int sqlite3_keyword_check(const char*,int);
|
|
8243
8435
|
|
|
8244
8436
|
/*
|
|
8245
8437
|
** CAPI3REF: Dynamic String Object
|
|
@@ -8284,7 +8476,7 @@ typedef struct sqlite3_str sqlite3_str;
|
|
|
8284
8476
|
** the value set for [sqlite3_limit](D,[SQLITE_LIMIT_LENGTH]) instead
|
|
8285
8477
|
** of [SQLITE_MAX_LENGTH].
|
|
8286
8478
|
*/
|
|
8287
|
-
SQLITE_API sqlite3_str *sqlite3_str_new(sqlite3
|
|
8479
|
+
SQLITE_API sqlite3_str *sqlite3_str_new(sqlite3*);
|
|
8288
8480
|
|
|
8289
8481
|
/*
|
|
8290
8482
|
** CAPI3REF: Finalize A Dynamic String
|
|
@@ -8299,7 +8491,7 @@ SQLITE_API sqlite3_str *sqlite3_str_new(sqlite3 *);
|
|
|
8299
8491
|
** [sqlite3_str_finish(X)] interface will also return a NULL pointer if the
|
|
8300
8492
|
** string in [sqlite3_str] object X is zero bytes long.
|
|
8301
8493
|
*/
|
|
8302
|
-
SQLITE_API char *sqlite3_str_finish(sqlite3_str
|
|
8494
|
+
SQLITE_API char *sqlite3_str_finish(sqlite3_str*);
|
|
8303
8495
|
|
|
8304
8496
|
/*
|
|
8305
8497
|
** CAPI3REF: Add Content To A Dynamic String
|
|
@@ -8333,13 +8525,12 @@ SQLITE_API char *sqlite3_str_finish(sqlite3_str *);
|
|
|
8333
8525
|
** is recorded in the [sqlite3_str] object and can be recovered by a
|
|
8334
8526
|
** subsequent call to [sqlite3_str_errcode(X)].
|
|
8335
8527
|
*/
|
|
8336
|
-
SQLITE_API void sqlite3_str_appendf(sqlite3_str
|
|
8337
|
-
SQLITE_API void sqlite3_str_vappendf(sqlite3_str
|
|
8338
|
-
|
|
8339
|
-
SQLITE_API void
|
|
8340
|
-
SQLITE_API void
|
|
8341
|
-
SQLITE_API void
|
|
8342
|
-
SQLITE_API void sqlite3_str_reset(sqlite3_str *);
|
|
8528
|
+
SQLITE_API void sqlite3_str_appendf(sqlite3_str*, const char *zFormat, ...);
|
|
8529
|
+
SQLITE_API void sqlite3_str_vappendf(sqlite3_str*, const char *zFormat, va_list);
|
|
8530
|
+
SQLITE_API void sqlite3_str_append(sqlite3_str*, const char *zIn, int N);
|
|
8531
|
+
SQLITE_API void sqlite3_str_appendall(sqlite3_str*, const char *zIn);
|
|
8532
|
+
SQLITE_API void sqlite3_str_appendchar(sqlite3_str*, int N, char C);
|
|
8533
|
+
SQLITE_API void sqlite3_str_reset(sqlite3_str*);
|
|
8343
8534
|
|
|
8344
8535
|
/*
|
|
8345
8536
|
** CAPI3REF: Status Of A Dynamic String
|
|
@@ -8370,9 +8561,9 @@ SQLITE_API void sqlite3_str_reset(sqlite3_str *);
|
|
|
8370
8561
|
** outside the range of 0 to [sqlite3_str_length(X)] and do not read or
|
|
8371
8562
|
** write any byte after any subsequent sqlite3_str method call.
|
|
8372
8563
|
*/
|
|
8373
|
-
SQLITE_API int sqlite3_str_errcode(sqlite3_str
|
|
8374
|
-
SQLITE_API int sqlite3_str_length(sqlite3_str
|
|
8375
|
-
SQLITE_API char *sqlite3_str_value(sqlite3_str
|
|
8564
|
+
SQLITE_API int sqlite3_str_errcode(sqlite3_str*);
|
|
8565
|
+
SQLITE_API int sqlite3_str_length(sqlite3_str*);
|
|
8566
|
+
SQLITE_API char *sqlite3_str_value(sqlite3_str*);
|
|
8376
8567
|
|
|
8377
8568
|
/*
|
|
8378
8569
|
** CAPI3REF: SQLite Runtime Status
|
|
@@ -8400,10 +8591,14 @@ SQLITE_API char *sqlite3_str_value(sqlite3_str *);
|
|
|
8400
8591
|
**
|
|
8401
8592
|
** See also: [sqlite3_db_status()]
|
|
8402
8593
|
*/
|
|
8403
|
-
SQLITE_API int sqlite3_status(int op, int *pCurrent, int *pHighwater,
|
|
8404
|
-
|
|
8405
|
-
|
|
8406
|
-
|
|
8594
|
+
SQLITE_API int sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag);
|
|
8595
|
+
SQLITE_API int sqlite3_status64(
|
|
8596
|
+
int op,
|
|
8597
|
+
sqlite3_int64 *pCurrent,
|
|
8598
|
+
sqlite3_int64 *pHighwater,
|
|
8599
|
+
int resetFlag
|
|
8600
|
+
);
|
|
8601
|
+
|
|
8407
8602
|
|
|
8408
8603
|
/*
|
|
8409
8604
|
** CAPI3REF: Status Parameters
|
|
@@ -8472,16 +8667,16 @@ SQLITE_API int sqlite3_status64(int op, sqlite3_int64 *pCurrent,
|
|
|
8472
8667
|
**
|
|
8473
8668
|
** New status parameters may be added from time to time.
|
|
8474
8669
|
*/
|
|
8475
|
-
#define SQLITE_STATUS_MEMORY_USED
|
|
8476
|
-
#define SQLITE_STATUS_PAGECACHE_USED
|
|
8477
|
-
#define SQLITE_STATUS_PAGECACHE_OVERFLOW
|
|
8478
|
-
#define SQLITE_STATUS_SCRATCH_USED
|
|
8479
|
-
#define SQLITE_STATUS_SCRATCH_OVERFLOW
|
|
8480
|
-
#define SQLITE_STATUS_MALLOC_SIZE
|
|
8481
|
-
#define SQLITE_STATUS_PARSER_STACK
|
|
8482
|
-
#define SQLITE_STATUS_PAGECACHE_SIZE
|
|
8483
|
-
#define SQLITE_STATUS_SCRATCH_SIZE
|
|
8484
|
-
#define SQLITE_STATUS_MALLOC_COUNT
|
|
8670
|
+
#define SQLITE_STATUS_MEMORY_USED 0
|
|
8671
|
+
#define SQLITE_STATUS_PAGECACHE_USED 1
|
|
8672
|
+
#define SQLITE_STATUS_PAGECACHE_OVERFLOW 2
|
|
8673
|
+
#define SQLITE_STATUS_SCRATCH_USED 3 /* NOT USED */
|
|
8674
|
+
#define SQLITE_STATUS_SCRATCH_OVERFLOW 4 /* NOT USED */
|
|
8675
|
+
#define SQLITE_STATUS_MALLOC_SIZE 5
|
|
8676
|
+
#define SQLITE_STATUS_PARSER_STACK 6
|
|
8677
|
+
#define SQLITE_STATUS_PAGECACHE_SIZE 7
|
|
8678
|
+
#define SQLITE_STATUS_SCRATCH_SIZE 8 /* NOT USED */
|
|
8679
|
+
#define SQLITE_STATUS_MALLOC_COUNT 9
|
|
8485
8680
|
|
|
8486
8681
|
/*
|
|
8487
8682
|
** CAPI3REF: Database Connection Status
|
|
@@ -8506,8 +8701,7 @@ SQLITE_API int sqlite3_status64(int op, sqlite3_int64 *pCurrent,
|
|
|
8506
8701
|
**
|
|
8507
8702
|
** See also: [sqlite3_status()] and [sqlite3_stmt_status()].
|
|
8508
8703
|
*/
|
|
8509
|
-
SQLITE_API int sqlite3_db_status(sqlite3
|
|
8510
|
-
int resetFlg);
|
|
8704
|
+
SQLITE_API int sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int resetFlg);
|
|
8511
8705
|
|
|
8512
8706
|
/*
|
|
8513
8707
|
** CAPI3REF: Status Parameters for database connections
|
|
@@ -8620,20 +8814,21 @@ SQLITE_API int sqlite3_db_status(sqlite3 *, int op, int *pCur, int *pHiwtr,
|
|
|
8620
8814
|
** </dd>
|
|
8621
8815
|
** </dl>
|
|
8622
8816
|
*/
|
|
8623
|
-
#define SQLITE_DBSTATUS_LOOKASIDE_USED
|
|
8624
|
-
#define SQLITE_DBSTATUS_CACHE_USED
|
|
8625
|
-
#define SQLITE_DBSTATUS_SCHEMA_USED
|
|
8626
|
-
#define SQLITE_DBSTATUS_STMT_USED
|
|
8627
|
-
#define SQLITE_DBSTATUS_LOOKASIDE_HIT
|
|
8628
|
-
#define SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE
|
|
8629
|
-
#define SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL
|
|
8630
|
-
#define SQLITE_DBSTATUS_CACHE_HIT
|
|
8631
|
-
#define SQLITE_DBSTATUS_CACHE_MISS
|
|
8632
|
-
#define SQLITE_DBSTATUS_CACHE_WRITE
|
|
8633
|
-
#define SQLITE_DBSTATUS_DEFERRED_FKS
|
|
8634
|
-
#define SQLITE_DBSTATUS_CACHE_USED_SHARED
|
|
8635
|
-
#define SQLITE_DBSTATUS_CACHE_SPILL
|
|
8636
|
-
#define SQLITE_DBSTATUS_MAX
|
|
8817
|
+
#define SQLITE_DBSTATUS_LOOKASIDE_USED 0
|
|
8818
|
+
#define SQLITE_DBSTATUS_CACHE_USED 1
|
|
8819
|
+
#define SQLITE_DBSTATUS_SCHEMA_USED 2
|
|
8820
|
+
#define SQLITE_DBSTATUS_STMT_USED 3
|
|
8821
|
+
#define SQLITE_DBSTATUS_LOOKASIDE_HIT 4
|
|
8822
|
+
#define SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE 5
|
|
8823
|
+
#define SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL 6
|
|
8824
|
+
#define SQLITE_DBSTATUS_CACHE_HIT 7
|
|
8825
|
+
#define SQLITE_DBSTATUS_CACHE_MISS 8
|
|
8826
|
+
#define SQLITE_DBSTATUS_CACHE_WRITE 9
|
|
8827
|
+
#define SQLITE_DBSTATUS_DEFERRED_FKS 10
|
|
8828
|
+
#define SQLITE_DBSTATUS_CACHE_USED_SHARED 11
|
|
8829
|
+
#define SQLITE_DBSTATUS_CACHE_SPILL 12
|
|
8830
|
+
#define SQLITE_DBSTATUS_MAX 12 /* Largest defined DBSTATUS */
|
|
8831
|
+
|
|
8637
8832
|
|
|
8638
8833
|
/*
|
|
8639
8834
|
** CAPI3REF: Prepared Statement Status
|
|
@@ -8659,7 +8854,7 @@ SQLITE_API int sqlite3_db_status(sqlite3 *, int op, int *pCur, int *pHiwtr,
|
|
|
8659
8854
|
**
|
|
8660
8855
|
** See also: [sqlite3_status()] and [sqlite3_db_status()].
|
|
8661
8856
|
*/
|
|
8662
|
-
SQLITE_API int sqlite3_stmt_status(sqlite3_stmt
|
|
8857
|
+
SQLITE_API int sqlite3_stmt_status(sqlite3_stmt*, int op,int resetFlg);
|
|
8663
8858
|
|
|
8664
8859
|
/*
|
|
8665
8860
|
** CAPI3REF: Status Parameters for prepared statements
|
|
@@ -8726,15 +8921,15 @@ SQLITE_API int sqlite3_stmt_status(sqlite3_stmt *, int op, int resetFlg);
|
|
|
8726
8921
|
** </dd>
|
|
8727
8922
|
** </dl>
|
|
8728
8923
|
*/
|
|
8729
|
-
#define SQLITE_STMTSTATUS_FULLSCAN_STEP
|
|
8730
|
-
#define SQLITE_STMTSTATUS_SORT
|
|
8731
|
-
#define SQLITE_STMTSTATUS_AUTOINDEX
|
|
8732
|
-
#define SQLITE_STMTSTATUS_VM_STEP
|
|
8733
|
-
#define SQLITE_STMTSTATUS_REPREPARE
|
|
8734
|
-
#define SQLITE_STMTSTATUS_RUN
|
|
8735
|
-
#define SQLITE_STMTSTATUS_FILTER_MISS
|
|
8736
|
-
#define SQLITE_STMTSTATUS_FILTER_HIT
|
|
8737
|
-
#define SQLITE_STMTSTATUS_MEMUSED
|
|
8924
|
+
#define SQLITE_STMTSTATUS_FULLSCAN_STEP 1
|
|
8925
|
+
#define SQLITE_STMTSTATUS_SORT 2
|
|
8926
|
+
#define SQLITE_STMTSTATUS_AUTOINDEX 3
|
|
8927
|
+
#define SQLITE_STMTSTATUS_VM_STEP 4
|
|
8928
|
+
#define SQLITE_STMTSTATUS_REPREPARE 5
|
|
8929
|
+
#define SQLITE_STMTSTATUS_RUN 6
|
|
8930
|
+
#define SQLITE_STMTSTATUS_FILTER_MISS 7
|
|
8931
|
+
#define SQLITE_STMTSTATUS_FILTER_HIT 8
|
|
8932
|
+
#define SQLITE_STMTSTATUS_MEMUSED 99
|
|
8738
8933
|
|
|
8739
8934
|
/*
|
|
8740
8935
|
** CAPI3REF: Custom Page Cache Object
|
|
@@ -8761,8 +8956,8 @@ typedef struct sqlite3_pcache sqlite3_pcache;
|
|
|
8761
8956
|
*/
|
|
8762
8957
|
typedef struct sqlite3_pcache_page sqlite3_pcache_page;
|
|
8763
8958
|
struct sqlite3_pcache_page {
|
|
8764
|
-
void *pBuf;
|
|
8765
|
-
void *pExtra;
|
|
8959
|
+
void *pBuf; /* The content of the page */
|
|
8960
|
+
void *pExtra; /* Extra information associated with the page */
|
|
8766
8961
|
};
|
|
8767
8962
|
|
|
8768
8963
|
/*
|
|
@@ -8928,19 +9123,18 @@ typedef struct sqlite3_pcache_methods2 sqlite3_pcache_methods2;
|
|
|
8928
9123
|
struct sqlite3_pcache_methods2 {
|
|
8929
9124
|
int iVersion;
|
|
8930
9125
|
void *pArg;
|
|
8931
|
-
int (*xInit)(void
|
|
8932
|
-
void (*xShutdown)(void
|
|
9126
|
+
int (*xInit)(void*);
|
|
9127
|
+
void (*xShutdown)(void*);
|
|
8933
9128
|
sqlite3_pcache *(*xCreate)(int szPage, int szExtra, int bPurgeable);
|
|
8934
|
-
void (*xCachesize)(sqlite3_pcache
|
|
8935
|
-
int (*xPagecount)(sqlite3_pcache
|
|
8936
|
-
sqlite3_pcache_page *(*xFetch)(sqlite3_pcache
|
|
8937
|
-
|
|
8938
|
-
void (*
|
|
8939
|
-
|
|
8940
|
-
|
|
8941
|
-
void (*
|
|
8942
|
-
void (*
|
|
8943
|
-
void (*xShrink)(sqlite3_pcache *);
|
|
9129
|
+
void (*xCachesize)(sqlite3_pcache*, int nCachesize);
|
|
9130
|
+
int (*xPagecount)(sqlite3_pcache*);
|
|
9131
|
+
sqlite3_pcache_page *(*xFetch)(sqlite3_pcache*, unsigned key, int createFlag);
|
|
9132
|
+
void (*xUnpin)(sqlite3_pcache*, sqlite3_pcache_page*, int discard);
|
|
9133
|
+
void (*xRekey)(sqlite3_pcache*, sqlite3_pcache_page*,
|
|
9134
|
+
unsigned oldKey, unsigned newKey);
|
|
9135
|
+
void (*xTruncate)(sqlite3_pcache*, unsigned iLimit);
|
|
9136
|
+
void (*xDestroy)(sqlite3_pcache*);
|
|
9137
|
+
void (*xShrink)(sqlite3_pcache*);
|
|
8944
9138
|
};
|
|
8945
9139
|
|
|
8946
9140
|
/*
|
|
@@ -8951,18 +9145,19 @@ struct sqlite3_pcache_methods2 {
|
|
|
8951
9145
|
typedef struct sqlite3_pcache_methods sqlite3_pcache_methods;
|
|
8952
9146
|
struct sqlite3_pcache_methods {
|
|
8953
9147
|
void *pArg;
|
|
8954
|
-
int (*xInit)(void
|
|
8955
|
-
void (*xShutdown)(void
|
|
9148
|
+
int (*xInit)(void*);
|
|
9149
|
+
void (*xShutdown)(void*);
|
|
8956
9150
|
sqlite3_pcache *(*xCreate)(int szPage, int bPurgeable);
|
|
8957
|
-
void (*xCachesize)(sqlite3_pcache
|
|
8958
|
-
int (*xPagecount)(sqlite3_pcache
|
|
8959
|
-
void *(*xFetch)(sqlite3_pcache
|
|
8960
|
-
void (*xUnpin)(sqlite3_pcache
|
|
8961
|
-
void (*xRekey)(sqlite3_pcache
|
|
8962
|
-
void (*xTruncate)(sqlite3_pcache
|
|
8963
|
-
void (*xDestroy)(sqlite3_pcache
|
|
9151
|
+
void (*xCachesize)(sqlite3_pcache*, int nCachesize);
|
|
9152
|
+
int (*xPagecount)(sqlite3_pcache*);
|
|
9153
|
+
void *(*xFetch)(sqlite3_pcache*, unsigned key, int createFlag);
|
|
9154
|
+
void (*xUnpin)(sqlite3_pcache*, void*, int discard);
|
|
9155
|
+
void (*xRekey)(sqlite3_pcache*, void*, unsigned oldKey, unsigned newKey);
|
|
9156
|
+
void (*xTruncate)(sqlite3_pcache*, unsigned iLimit);
|
|
9157
|
+
void (*xDestroy)(sqlite3_pcache*);
|
|
8964
9158
|
};
|
|
8965
9159
|
|
|
9160
|
+
|
|
8966
9161
|
/*
|
|
8967
9162
|
** CAPI3REF: Online Backup Object
|
|
8968
9163
|
**
|
|
@@ -9161,11 +9356,11 @@ typedef struct sqlite3_backup sqlite3_backup;
|
|
|
9161
9356
|
** same time as another thread is invoking sqlite3_backup_step() it is
|
|
9162
9357
|
** possible that they return invalid values.
|
|
9163
9358
|
*/
|
|
9164
|
-
SQLITE_API sqlite3_backup *
|
|
9165
|
-
|
|
9166
|
-
|
|
9167
|
-
|
|
9168
|
-
|
|
9359
|
+
SQLITE_API sqlite3_backup *sqlite3_backup_init(
|
|
9360
|
+
sqlite3 *pDest, /* Destination database handle */
|
|
9361
|
+
const char *zDestName, /* Destination database name */
|
|
9362
|
+
sqlite3 *pSource, /* Source database handle */
|
|
9363
|
+
const char *zSourceName /* Source database name */
|
|
9169
9364
|
);
|
|
9170
9365
|
SQLITE_API int sqlite3_backup_step(sqlite3_backup *p, int nPage);
|
|
9171
9366
|
SQLITE_API int sqlite3_backup_finish(sqlite3_backup *p);
|
|
@@ -9288,11 +9483,12 @@ SQLITE_API int sqlite3_backup_pagecount(sqlite3_backup *p);
|
|
|
9288
9483
|
** SQLITE_LOCKED.)^
|
|
9289
9484
|
*/
|
|
9290
9485
|
SQLITE_API int sqlite3_unlock_notify(
|
|
9291
|
-
|
|
9292
|
-
|
|
9293
|
-
|
|
9486
|
+
sqlite3 *pBlocked, /* Waiting connection */
|
|
9487
|
+
void (*xNotify)(void **apArg, int nArg), /* Callback function to invoke */
|
|
9488
|
+
void *pNotifyArg /* Argument to pass to xNotify */
|
|
9294
9489
|
);
|
|
9295
9490
|
|
|
9491
|
+
|
|
9296
9492
|
/*
|
|
9297
9493
|
** CAPI3REF: String Comparison
|
|
9298
9494
|
**
|
|
@@ -9342,8 +9538,7 @@ SQLITE_API int sqlite3_strglob(const char *zGlob, const char *zStr);
|
|
|
9342
9538
|
**
|
|
9343
9539
|
** See also: [sqlite3_strglob()].
|
|
9344
9540
|
*/
|
|
9345
|
-
SQLITE_API int sqlite3_strlike(const char *zGlob, const char *zStr,
|
|
9346
|
-
unsigned int cEsc);
|
|
9541
|
+
SQLITE_API int sqlite3_strlike(const char *zGlob, const char *zStr, unsigned int cEsc);
|
|
9347
9542
|
|
|
9348
9543
|
/*
|
|
9349
9544
|
** CAPI3REF: Error Logging Interface
|
|
@@ -9403,9 +9598,11 @@ SQLITE_API void sqlite3_log(int iErrCode, const char *zFormat, ...);
|
|
|
9403
9598
|
** [wal_autocheckpoint pragma] both invoke [sqlite3_wal_hook()] and will
|
|
9404
9599
|
** overwrite any prior [sqlite3_wal_hook()] settings.
|
|
9405
9600
|
*/
|
|
9406
|
-
SQLITE_API void *sqlite3_wal_hook(
|
|
9407
|
-
|
|
9408
|
-
|
|
9601
|
+
SQLITE_API void *sqlite3_wal_hook(
|
|
9602
|
+
sqlite3*,
|
|
9603
|
+
int(*)(void *,sqlite3*,const char*,int),
|
|
9604
|
+
void*
|
|
9605
|
+
);
|
|
9409
9606
|
|
|
9410
9607
|
/*
|
|
9411
9608
|
** CAPI3REF: Configure an auto-checkpoint
|
|
@@ -9553,11 +9750,11 @@ SQLITE_API int sqlite3_wal_checkpoint(sqlite3 *db, const char *zDb);
|
|
|
9553
9750
|
** from SQL.
|
|
9554
9751
|
*/
|
|
9555
9752
|
SQLITE_API int sqlite3_wal_checkpoint_v2(
|
|
9556
|
-
|
|
9557
|
-
|
|
9558
|
-
|
|
9559
|
-
|
|
9560
|
-
|
|
9753
|
+
sqlite3 *db, /* Database handle */
|
|
9754
|
+
const char *zDb, /* Name of attached database (or NULL) */
|
|
9755
|
+
int eMode, /* SQLITE_CHECKPOINT_* value */
|
|
9756
|
+
int *pnLog, /* OUT: Size of WAL log in frames */
|
|
9757
|
+
int *pnCkpt /* OUT: Total number of frames checkpointed */
|
|
9561
9758
|
);
|
|
9562
9759
|
|
|
9563
9760
|
/*
|
|
@@ -9569,10 +9766,10 @@ SQLITE_API int sqlite3_wal_checkpoint_v2(
|
|
|
9569
9766
|
** See the [sqlite3_wal_checkpoint_v2()] documentation for details on the
|
|
9570
9767
|
** meaning of each of these checkpoint modes.
|
|
9571
9768
|
*/
|
|
9572
|
-
#define SQLITE_CHECKPOINT_PASSIVE
|
|
9573
|
-
#define SQLITE_CHECKPOINT_FULL
|
|
9574
|
-
#define SQLITE_CHECKPOINT_RESTART
|
|
9575
|
-
#define SQLITE_CHECKPOINT_TRUNCATE 3
|
|
9769
|
+
#define SQLITE_CHECKPOINT_PASSIVE 0 /* Do as much as possible w/o blocking */
|
|
9770
|
+
#define SQLITE_CHECKPOINT_FULL 1 /* Wait for writers, then checkpoint */
|
|
9771
|
+
#define SQLITE_CHECKPOINT_RESTART 2 /* Like FULL but wait for readers */
|
|
9772
|
+
#define SQLITE_CHECKPOINT_TRUNCATE 3 /* Like RESTART but also truncate WAL */
|
|
9576
9773
|
|
|
9577
9774
|
/*
|
|
9578
9775
|
** CAPI3REF: Virtual Table Interface Configuration
|
|
@@ -9592,7 +9789,7 @@ SQLITE_API int sqlite3_wal_checkpoint_v2(
|
|
|
9592
9789
|
** of parameters after C depend on which [virtual table configuration option]
|
|
9593
9790
|
** is used.
|
|
9594
9791
|
*/
|
|
9595
|
-
SQLITE_API int sqlite3_vtab_config(sqlite3
|
|
9792
|
+
SQLITE_API int sqlite3_vtab_config(sqlite3*, int op, ...);
|
|
9596
9793
|
|
|
9597
9794
|
/*
|
|
9598
9795
|
** CAPI3REF: Virtual Table Configuration Options
|
|
@@ -9639,7 +9836,7 @@ SQLITE_API int sqlite3_vtab_config(sqlite3 *, int op, ...);
|
|
|
9639
9836
|
** [[SQLITE_VTAB_DIRECTONLY]]<dt>SQLITE_VTAB_DIRECTONLY</dt>
|
|
9640
9837
|
** <dd>Calls of the form
|
|
9641
9838
|
** [sqlite3_vtab_config](db,SQLITE_VTAB_DIRECTONLY) from within the
|
|
9642
|
-
** the [xConnect] or [xCreate] methods of a [virtual table]
|
|
9839
|
+
** the [xConnect] or [xCreate] methods of a [virtual table] implementation
|
|
9643
9840
|
** prohibits that virtual table from being used from within triggers and
|
|
9644
9841
|
** views.
|
|
9645
9842
|
** </dd>
|
|
@@ -9666,9 +9863,9 @@ SQLITE_API int sqlite3_vtab_config(sqlite3 *, int op, ...);
|
|
|
9666
9863
|
** </dl>
|
|
9667
9864
|
*/
|
|
9668
9865
|
#define SQLITE_VTAB_CONSTRAINT_SUPPORT 1
|
|
9669
|
-
#define SQLITE_VTAB_INNOCUOUS
|
|
9670
|
-
#define SQLITE_VTAB_DIRECTONLY
|
|
9671
|
-
#define SQLITE_VTAB_USES_ALL_SCHEMAS
|
|
9866
|
+
#define SQLITE_VTAB_INNOCUOUS 2
|
|
9867
|
+
#define SQLITE_VTAB_DIRECTONLY 3
|
|
9868
|
+
#define SQLITE_VTAB_USES_ALL_SCHEMAS 4
|
|
9672
9869
|
|
|
9673
9870
|
/*
|
|
9674
9871
|
** CAPI3REF: Determine The Virtual Table Conflict Policy
|
|
@@ -9706,7 +9903,7 @@ SQLITE_API int sqlite3_vtab_on_conflict(sqlite3 *);
|
|
|
9706
9903
|
** current implementation, the sqlite3_vtab_nochange() interface does always
|
|
9707
9904
|
** returns false for the enhanced [UPDATE FROM] statement.
|
|
9708
9905
|
*/
|
|
9709
|
-
SQLITE_API int sqlite3_vtab_nochange(sqlite3_context
|
|
9906
|
+
SQLITE_API int sqlite3_vtab_nochange(sqlite3_context*);
|
|
9710
9907
|
|
|
9711
9908
|
/*
|
|
9712
9909
|
** CAPI3REF: Determine The Collation For a Virtual Table Constraint
|
|
@@ -9741,7 +9938,7 @@ SQLITE_API int sqlite3_vtab_nochange(sqlite3_context *);
|
|
|
9741
9938
|
** <li><p> Otherwise, "BINARY" is returned.
|
|
9742
9939
|
** </ol>
|
|
9743
9940
|
*/
|
|
9744
|
-
SQLITE_API const char *sqlite3_vtab_collation(sqlite3_index_info
|
|
9941
|
+
SQLITE_API const char *sqlite3_vtab_collation(sqlite3_index_info*,int);
|
|
9745
9942
|
|
|
9746
9943
|
/*
|
|
9747
9944
|
** CAPI3REF: Determine if a virtual table query is DISTINCT
|
|
@@ -9814,7 +10011,7 @@ SQLITE_API const char *sqlite3_vtab_collation(sqlite3_index_info *, int);
|
|
|
9814
10011
|
** valid to do so, on the other hand, might cause SQLite to return incorrect
|
|
9815
10012
|
** results.
|
|
9816
10013
|
*/
|
|
9817
|
-
SQLITE_API int sqlite3_vtab_distinct(sqlite3_index_info
|
|
10014
|
+
SQLITE_API int sqlite3_vtab_distinct(sqlite3_index_info*);
|
|
9818
10015
|
|
|
9819
10016
|
/*
|
|
9820
10017
|
** CAPI3REF: Identify and handle IN constraints in xBestIndex
|
|
@@ -9829,7 +10026,7 @@ SQLITE_API int sqlite3_vtab_distinct(sqlite3_index_info *);
|
|
|
9829
10026
|
** communicated to the xBestIndex method as a
|
|
9830
10027
|
** [SQLITE_INDEX_CONSTRAINT_EQ] constraint.)^ If xBestIndex wants to use
|
|
9831
10028
|
** this constraint, it must set the corresponding
|
|
9832
|
-
** aConstraintUsage[].argvIndex to a
|
|
10029
|
+
** aConstraintUsage[].argvIndex to a positive integer. ^(Then, under
|
|
9833
10030
|
** the usual mode of handling IN operators, SQLite generates [bytecode]
|
|
9834
10031
|
** that invokes the [xFilter|xFilter() method] once for each value
|
|
9835
10032
|
** on the right-hand side of the IN operator.)^ Thus the virtual table
|
|
@@ -9887,7 +10084,7 @@ SQLITE_API int sqlite3_vtab_distinct(sqlite3_index_info *);
|
|
|
9887
10084
|
** [sqlite3_vtab_in_next()] to find all values on the right-hand side
|
|
9888
10085
|
** of the IN constraint.
|
|
9889
10086
|
*/
|
|
9890
|
-
SQLITE_API int sqlite3_vtab_in(sqlite3_index_info
|
|
10087
|
+
SQLITE_API int sqlite3_vtab_in(sqlite3_index_info*, int iCons, int bHandle);
|
|
9891
10088
|
|
|
9892
10089
|
/*
|
|
9893
10090
|
** CAPI3REF: Find all elements on the right-hand side of an IN constraint.
|
|
@@ -9934,8 +10131,7 @@ SQLITE_API int sqlite3_vtab_in(sqlite3_index_info *, int iCons, int bHandle);
|
|
|
9934
10131
|
** implementation needs to retain the *ppOut values for longer, it must make
|
|
9935
10132
|
** copies. The *ppOut values are [protected sqlite3_value|protected].
|
|
9936
10133
|
*/
|
|
9937
|
-
SQLITE_API int sqlite3_vtab_in_first(sqlite3_value *pVal,
|
|
9938
|
-
sqlite3_value **ppOut);
|
|
10134
|
+
SQLITE_API int sqlite3_vtab_in_first(sqlite3_value *pVal, sqlite3_value **ppOut);
|
|
9939
10135
|
SQLITE_API int sqlite3_vtab_in_next(sqlite3_value *pVal, sqlite3_value **ppOut);
|
|
9940
10136
|
|
|
9941
10137
|
/*
|
|
@@ -9978,8 +10174,7 @@ SQLITE_API int sqlite3_vtab_in_next(sqlite3_value *pVal, sqlite3_value **ppOut);
|
|
|
9978
10174
|
** The "_rhs_" in the name of this routine is an abbreviation for
|
|
9979
10175
|
** "Right-Hand Side".
|
|
9980
10176
|
*/
|
|
9981
|
-
SQLITE_API int sqlite3_vtab_rhs_value(sqlite3_index_info
|
|
9982
|
-
sqlite3_value **ppVal);
|
|
10177
|
+
SQLITE_API int sqlite3_vtab_rhs_value(sqlite3_index_info*, int, sqlite3_value **ppVal);
|
|
9983
10178
|
|
|
9984
10179
|
/*
|
|
9985
10180
|
** CAPI3REF: Conflict resolution modes
|
|
@@ -9995,9 +10190,9 @@ SQLITE_API int sqlite3_vtab_rhs_value(sqlite3_index_info *, int,
|
|
|
9995
10190
|
*/
|
|
9996
10191
|
#define SQLITE_ROLLBACK 1
|
|
9997
10192
|
/* #define SQLITE_IGNORE 2 // Also used by sqlite3_authorizer() callback */
|
|
9998
|
-
#define SQLITE_FAIL
|
|
10193
|
+
#define SQLITE_FAIL 3
|
|
9999
10194
|
/* #define SQLITE_ABORT 4 // Also an error code */
|
|
10000
|
-
#define SQLITE_REPLACE
|
|
10195
|
+
#define SQLITE_REPLACE 5
|
|
10001
10196
|
|
|
10002
10197
|
/*
|
|
10003
10198
|
** CAPI3REF: Prepared Statement Scan Status Opcodes
|
|
@@ -10062,14 +10257,14 @@ SQLITE_API int sqlite3_vtab_rhs_value(sqlite3_index_info *, int,
|
|
|
10062
10257
|
** set to -1.
|
|
10063
10258
|
** </dl>
|
|
10064
10259
|
*/
|
|
10065
|
-
#define SQLITE_SCANSTAT_NLOOP
|
|
10066
|
-
#define SQLITE_SCANSTAT_NVISIT
|
|
10067
|
-
#define SQLITE_SCANSTAT_EST
|
|
10068
|
-
#define SQLITE_SCANSTAT_NAME
|
|
10069
|
-
#define SQLITE_SCANSTAT_EXPLAIN
|
|
10260
|
+
#define SQLITE_SCANSTAT_NLOOP 0
|
|
10261
|
+
#define SQLITE_SCANSTAT_NVISIT 1
|
|
10262
|
+
#define SQLITE_SCANSTAT_EST 2
|
|
10263
|
+
#define SQLITE_SCANSTAT_NAME 3
|
|
10264
|
+
#define SQLITE_SCANSTAT_EXPLAIN 4
|
|
10070
10265
|
#define SQLITE_SCANSTAT_SELECTID 5
|
|
10071
10266
|
#define SQLITE_SCANSTAT_PARENTID 6
|
|
10072
|
-
#define SQLITE_SCANSTAT_NCYCLE
|
|
10267
|
+
#define SQLITE_SCANSTAT_NCYCLE 7
|
|
10073
10268
|
|
|
10074
10269
|
/*
|
|
10075
10270
|
** CAPI3REF: Prepared Statement Scan Status
|
|
@@ -10109,17 +10304,17 @@ SQLITE_API int sqlite3_vtab_rhs_value(sqlite3_index_info *, int,
|
|
|
10109
10304
|
** See also: [sqlite3_stmt_scanstatus_reset()]
|
|
10110
10305
|
*/
|
|
10111
10306
|
SQLITE_API int sqlite3_stmt_scanstatus(
|
|
10112
|
-
|
|
10113
|
-
|
|
10114
|
-
|
|
10115
|
-
|
|
10307
|
+
sqlite3_stmt *pStmt, /* Prepared statement for which info desired */
|
|
10308
|
+
int idx, /* Index of loop to report on */
|
|
10309
|
+
int iScanStatusOp, /* Information desired. SQLITE_SCANSTAT_* */
|
|
10310
|
+
void *pOut /* Result written here */
|
|
10116
10311
|
);
|
|
10117
10312
|
SQLITE_API int sqlite3_stmt_scanstatus_v2(
|
|
10118
|
-
|
|
10119
|
-
|
|
10120
|
-
|
|
10121
|
-
|
|
10122
|
-
|
|
10313
|
+
sqlite3_stmt *pStmt, /* Prepared statement for which info desired */
|
|
10314
|
+
int idx, /* Index of loop to report on */
|
|
10315
|
+
int iScanStatusOp, /* Information desired. SQLITE_SCANSTAT_* */
|
|
10316
|
+
int flags, /* Mask of flags defined below */
|
|
10317
|
+
void *pOut /* Result written here */
|
|
10123
10318
|
);
|
|
10124
10319
|
|
|
10125
10320
|
/*
|
|
@@ -10137,7 +10332,7 @@ SQLITE_API int sqlite3_stmt_scanstatus_v2(
|
|
|
10137
10332
|
** This API is only available if the library is built with pre-processor
|
|
10138
10333
|
** symbol [SQLITE_ENABLE_STMT_SCANSTATUS] defined.
|
|
10139
10334
|
*/
|
|
10140
|
-
SQLITE_API void sqlite3_stmt_scanstatus_reset(sqlite3_stmt
|
|
10335
|
+
SQLITE_API void sqlite3_stmt_scanstatus_reset(sqlite3_stmt*);
|
|
10141
10336
|
|
|
10142
10337
|
/*
|
|
10143
10338
|
** CAPI3REF: Flush caches to disk mid-transaction
|
|
@@ -10170,7 +10365,7 @@ SQLITE_API void sqlite3_stmt_scanstatus_reset(sqlite3_stmt *);
|
|
|
10170
10365
|
** ^This function does not set the database handle error code or message
|
|
10171
10366
|
** returned by the [sqlite3_errcode()] and [sqlite3_errmsg()] functions.
|
|
10172
10367
|
*/
|
|
10173
|
-
SQLITE_API int sqlite3_db_cacheflush(sqlite3
|
|
10368
|
+
SQLITE_API int sqlite3_db_cacheflush(sqlite3*);
|
|
10174
10369
|
|
|
10175
10370
|
/*
|
|
10176
10371
|
** CAPI3REF: The pre-update hook.
|
|
@@ -10260,7 +10455,7 @@ SQLITE_API int sqlite3_db_cacheflush(sqlite3 *);
|
|
|
10260
10455
|
** When the [sqlite3_blob_write()] API is used to update a blob column,
|
|
10261
10456
|
** the pre-update hook is invoked with SQLITE_DELETE. This is because the
|
|
10262
10457
|
** in this case the new values are not available. In this case, when a
|
|
10263
|
-
** callback made with op==SQLITE_DELETE is
|
|
10458
|
+
** callback made with op==SQLITE_DELETE is actually a write using the
|
|
10264
10459
|
** sqlite3_blob_write() API, the [sqlite3_preupdate_blobwrite()] returns
|
|
10265
10460
|
** the index of the column being written. In other cases, where the
|
|
10266
10461
|
** pre-update hook is being invoked for some other reason, including a
|
|
@@ -10270,17 +10465,18 @@ SQLITE_API int sqlite3_db_cacheflush(sqlite3 *);
|
|
|
10270
10465
|
*/
|
|
10271
10466
|
#if defined(SQLITE_ENABLE_PREUPDATE_HOOK)
|
|
10272
10467
|
SQLITE_API void *sqlite3_preupdate_hook(
|
|
10273
|
-
|
|
10274
|
-
|
|
10275
|
-
|
|
10276
|
-
|
|
10277
|
-
|
|
10278
|
-
|
|
10279
|
-
|
|
10280
|
-
|
|
10281
|
-
|
|
10282
|
-
|
|
10283
|
-
|
|
10468
|
+
sqlite3 *db,
|
|
10469
|
+
void(*xPreUpdate)(
|
|
10470
|
+
void *pCtx, /* Copy of third arg to preupdate_hook() */
|
|
10471
|
+
sqlite3 *db, /* Database handle */
|
|
10472
|
+
int op, /* SQLITE_UPDATE, DELETE or INSERT */
|
|
10473
|
+
char const *zDb, /* Database name */
|
|
10474
|
+
char const *zName, /* Table name */
|
|
10475
|
+
sqlite3_int64 iKey1, /* Rowid of row about to be deleted/updated */
|
|
10476
|
+
sqlite3_int64 iKey2 /* New rowid value (for a rowid UPDATE) */
|
|
10477
|
+
),
|
|
10478
|
+
void*
|
|
10479
|
+
);
|
|
10284
10480
|
SQLITE_API int sqlite3_preupdate_old(sqlite3 *, int, sqlite3_value **);
|
|
10285
10481
|
SQLITE_API int sqlite3_preupdate_count(sqlite3 *);
|
|
10286
10482
|
SQLITE_API int sqlite3_preupdate_depth(sqlite3 *);
|
|
@@ -10299,7 +10495,7 @@ SQLITE_API int sqlite3_preupdate_blobwrite(sqlite3 *);
|
|
|
10299
10495
|
** called to get back the underlying "errno" that caused the problem, such
|
|
10300
10496
|
** as ENOSPC, EAUTH, EISDIR, and so forth.
|
|
10301
10497
|
*/
|
|
10302
|
-
SQLITE_API int sqlite3_system_errno(sqlite3
|
|
10498
|
+
SQLITE_API int sqlite3_system_errno(sqlite3*);
|
|
10303
10499
|
|
|
10304
10500
|
/*
|
|
10305
10501
|
** CAPI3REF: Database Snapshot
|
|
@@ -10368,9 +10564,11 @@ typedef struct sqlite3_snapshot {
|
|
|
10368
10564
|
** The [sqlite3_snapshot_get()] interface is only available when the
|
|
10369
10565
|
** [SQLITE_ENABLE_SNAPSHOT] compile-time option is used.
|
|
10370
10566
|
*/
|
|
10371
|
-
SQLITE_API SQLITE_EXPERIMENTAL int
|
|
10372
|
-
|
|
10373
|
-
|
|
10567
|
+
SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_get(
|
|
10568
|
+
sqlite3 *db,
|
|
10569
|
+
const char *zSchema,
|
|
10570
|
+
sqlite3_snapshot **ppSnapshot
|
|
10571
|
+
);
|
|
10374
10572
|
|
|
10375
10573
|
/*
|
|
10376
10574
|
** CAPI3REF: Start a read transaction on an historical snapshot
|
|
@@ -10415,9 +10613,11 @@ sqlite3_snapshot_get(sqlite3 *db, const char *zSchema,
|
|
|
10415
10613
|
** The [sqlite3_snapshot_open()] interface is only available when the
|
|
10416
10614
|
** [SQLITE_ENABLE_SNAPSHOT] compile-time option is used.
|
|
10417
10615
|
*/
|
|
10418
|
-
SQLITE_API SQLITE_EXPERIMENTAL int
|
|
10419
|
-
|
|
10420
|
-
|
|
10616
|
+
SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_open(
|
|
10617
|
+
sqlite3 *db,
|
|
10618
|
+
const char *zSchema,
|
|
10619
|
+
sqlite3_snapshot *pSnapshot
|
|
10620
|
+
);
|
|
10421
10621
|
|
|
10422
10622
|
/*
|
|
10423
10623
|
** CAPI3REF: Destroy a snapshot
|
|
@@ -10430,7 +10630,7 @@ sqlite3_snapshot_open(sqlite3 *db, const char *zSchema,
|
|
|
10430
10630
|
** The [sqlite3_snapshot_free()] interface is only available when the
|
|
10431
10631
|
** [SQLITE_ENABLE_SNAPSHOT] compile-time option is used.
|
|
10432
10632
|
*/
|
|
10433
|
-
SQLITE_API SQLITE_EXPERIMENTAL void sqlite3_snapshot_free(sqlite3_snapshot
|
|
10633
|
+
SQLITE_API SQLITE_EXPERIMENTAL void sqlite3_snapshot_free(sqlite3_snapshot*);
|
|
10434
10634
|
|
|
10435
10635
|
/*
|
|
10436
10636
|
** CAPI3REF: Compare the ages of two snapshot handles.
|
|
@@ -10457,8 +10657,10 @@ SQLITE_API SQLITE_EXPERIMENTAL void sqlite3_snapshot_free(sqlite3_snapshot *);
|
|
|
10457
10657
|
** This interface is only available if SQLite is compiled with the
|
|
10458
10658
|
** [SQLITE_ENABLE_SNAPSHOT] option.
|
|
10459
10659
|
*/
|
|
10460
|
-
SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_cmp(
|
|
10461
|
-
|
|
10660
|
+
SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_cmp(
|
|
10661
|
+
sqlite3_snapshot *p1,
|
|
10662
|
+
sqlite3_snapshot *p2
|
|
10663
|
+
);
|
|
10462
10664
|
|
|
10463
10665
|
/*
|
|
10464
10666
|
** CAPI3REF: Recover snapshots from a wal file
|
|
@@ -10483,8 +10685,7 @@ SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_cmp(sqlite3_snapshot *p1,
|
|
|
10483
10685
|
** This interface is only available if SQLite is compiled with the
|
|
10484
10686
|
** [SQLITE_ENABLE_SNAPSHOT] option.
|
|
10485
10687
|
*/
|
|
10486
|
-
SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_recover(sqlite3 *db,
|
|
10487
|
-
const char *zDb);
|
|
10688
|
+
SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_recover(sqlite3 *db, const char *zDb);
|
|
10488
10689
|
|
|
10489
10690
|
/*
|
|
10490
10691
|
** CAPI3REF: Serialize a database
|
|
@@ -10515,6 +10716,13 @@ SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_recover(sqlite3 *db,
|
|
|
10515
10716
|
** SQLITE_SERIALIZE_NOCOPY bit is set but no contiguous copy
|
|
10516
10717
|
** of the database exists.
|
|
10517
10718
|
**
|
|
10719
|
+
** After the call, if the SQLITE_SERIALIZE_NOCOPY bit had been set,
|
|
10720
|
+
** the returned buffer content will remain accessible and unchanged
|
|
10721
|
+
** until either the next write operation on the connection or when
|
|
10722
|
+
** the connection is closed, and applications must not modify the
|
|
10723
|
+
** buffer. If the bit had been clear, the returned buffer will not
|
|
10724
|
+
** be accessed by SQLite after the call.
|
|
10725
|
+
**
|
|
10518
10726
|
** A call to sqlite3_serialize(D,S,P,F) might return NULL even if the
|
|
10519
10727
|
** SQLITE_SERIALIZE_NOCOPY bit is omitted from argument F if a memory
|
|
10520
10728
|
** allocation error occurs.
|
|
@@ -10523,10 +10731,10 @@ SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_recover(sqlite3 *db,
|
|
|
10523
10731
|
** [SQLITE_OMIT_DESERIALIZE] option.
|
|
10524
10732
|
*/
|
|
10525
10733
|
SQLITE_API unsigned char *sqlite3_serialize(
|
|
10526
|
-
|
|
10527
|
-
|
|
10528
|
-
|
|
10529
|
-
|
|
10734
|
+
sqlite3 *db, /* The database connection */
|
|
10735
|
+
const char *zSchema, /* Which DB to serialize. ex: "main", "temp", ... */
|
|
10736
|
+
sqlite3_int64 *piSize, /* Write size of the DB here, if not NULL */
|
|
10737
|
+
unsigned int mFlags /* Zero or more SQLITE_SERIALIZE_* flags */
|
|
10530
10738
|
);
|
|
10531
10739
|
|
|
10532
10740
|
/*
|
|
@@ -10543,7 +10751,7 @@ SQLITE_API unsigned char *sqlite3_serialize(
|
|
|
10543
10751
|
** using a contiguous in-memory database if it has been initialized by a
|
|
10544
10752
|
** prior call to [sqlite3_deserialize()].
|
|
10545
10753
|
*/
|
|
10546
|
-
#define SQLITE_SERIALIZE_NOCOPY 0x001
|
|
10754
|
+
#define SQLITE_SERIALIZE_NOCOPY 0x001 /* Do no memory allocations */
|
|
10547
10755
|
|
|
10548
10756
|
/*
|
|
10549
10757
|
** CAPI3REF: Deserialize a database
|
|
@@ -10563,6 +10771,9 @@ SQLITE_API unsigned char *sqlite3_serialize(
|
|
|
10563
10771
|
** SQLite will try to increase the buffer size using sqlite3_realloc64()
|
|
10564
10772
|
** if writes on the database cause it to grow larger than M bytes.
|
|
10565
10773
|
**
|
|
10774
|
+
** Applications must not modify the buffer P or invalidate it before
|
|
10775
|
+
** the database connection D is closed.
|
|
10776
|
+
**
|
|
10566
10777
|
** The sqlite3_deserialize() interface will fail with SQLITE_BUSY if the
|
|
10567
10778
|
** database is currently in a read transaction or is involved in a backup
|
|
10568
10779
|
** operation.
|
|
@@ -10571,6 +10782,13 @@ SQLITE_API unsigned char *sqlite3_serialize(
|
|
|
10571
10782
|
** S argument to sqlite3_deserialize(D,S,P,N,M,F) is "temp" then the
|
|
10572
10783
|
** function returns SQLITE_ERROR.
|
|
10573
10784
|
**
|
|
10785
|
+
** The deserialized database should not be in [WAL mode]. If the database
|
|
10786
|
+
** is in WAL mode, then any attempt to use the database file will result
|
|
10787
|
+
** in an [SQLITE_CANTOPEN] error. The application can set the
|
|
10788
|
+
** [file format version numbers] (bytes 18 and 19) of the input database P
|
|
10789
|
+
** to 0x01 prior to invoking sqlite3_deserialize(D,S,P,N,M,F) to force the
|
|
10790
|
+
** database file into rollback mode and work around this limitation.
|
|
10791
|
+
**
|
|
10574
10792
|
** If sqlite3_deserialize(D,S,P,N,M,F) fails for any reason and if the
|
|
10575
10793
|
** SQLITE_DESERIALIZE_FREEONCLOSE bit is set in argument F, then
|
|
10576
10794
|
** [sqlite3_free()] is invoked on argument P prior to returning.
|
|
@@ -10579,12 +10797,12 @@ SQLITE_API unsigned char *sqlite3_serialize(
|
|
|
10579
10797
|
** [SQLITE_OMIT_DESERIALIZE] option.
|
|
10580
10798
|
*/
|
|
10581
10799
|
SQLITE_API int sqlite3_deserialize(
|
|
10582
|
-
|
|
10583
|
-
|
|
10584
|
-
|
|
10585
|
-
|
|
10586
|
-
|
|
10587
|
-
|
|
10800
|
+
sqlite3 *db, /* The database connection */
|
|
10801
|
+
const char *zSchema, /* Which DB to reopen with the deserialization */
|
|
10802
|
+
unsigned char *pData, /* The serialized database content */
|
|
10803
|
+
sqlite3_int64 szDb, /* Number bytes in the deserialization */
|
|
10804
|
+
sqlite3_int64 szBuf, /* Total size of buffer pData[] */
|
|
10805
|
+
unsigned mFlags /* Zero or more SQLITE_DESERIALIZE_* flags */
|
|
10588
10806
|
);
|
|
10589
10807
|
|
|
10590
10808
|
/*
|
|
@@ -10609,32 +10827,32 @@ SQLITE_API int sqlite3_deserialize(
|
|
|
10609
10827
|
** should be treated as read-only.
|
|
10610
10828
|
*/
|
|
10611
10829
|
#define SQLITE_DESERIALIZE_FREEONCLOSE 1 /* Call sqlite3_free() on close */
|
|
10612
|
-
#define SQLITE_DESERIALIZE_RESIZEABLE
|
|
10613
|
-
#define SQLITE_DESERIALIZE_READONLY
|
|
10830
|
+
#define SQLITE_DESERIALIZE_RESIZEABLE 2 /* Resize using sqlite3_realloc64() */
|
|
10831
|
+
#define SQLITE_DESERIALIZE_READONLY 4 /* Database is read-only */
|
|
10614
10832
|
|
|
10615
10833
|
/*
|
|
10616
10834
|
** Undo the hack that converts floating point types to integer for
|
|
10617
10835
|
** builds on processors without floating point support.
|
|
10618
10836
|
*/
|
|
10619
10837
|
#ifdef SQLITE_OMIT_FLOATING_POINT
|
|
10620
|
-
#undef double
|
|
10838
|
+
# undef double
|
|
10621
10839
|
#endif
|
|
10622
10840
|
|
|
10623
10841
|
#if defined(__wasi__)
|
|
10624
|
-
#undef SQLITE_WASI
|
|
10625
|
-
#define SQLITE_WASI 1
|
|
10626
|
-
#undef SQLITE_OMIT_WAL
|
|
10627
|
-
#define SQLITE_OMIT_WAL 1
|
|
10628
|
-
#ifndef SQLITE_OMIT_LOAD_EXTENSION
|
|
10629
|
-
#define SQLITE_OMIT_LOAD_EXTENSION
|
|
10630
|
-
#endif
|
|
10631
|
-
#ifndef SQLITE_THREADSAFE
|
|
10632
|
-
#define SQLITE_THREADSAFE 0
|
|
10633
|
-
#endif
|
|
10842
|
+
# undef SQLITE_WASI
|
|
10843
|
+
# define SQLITE_WASI 1
|
|
10844
|
+
# undef SQLITE_OMIT_WAL
|
|
10845
|
+
# define SQLITE_OMIT_WAL 1/* because it requires shared memory APIs */
|
|
10846
|
+
# ifndef SQLITE_OMIT_LOAD_EXTENSION
|
|
10847
|
+
# define SQLITE_OMIT_LOAD_EXTENSION
|
|
10848
|
+
# endif
|
|
10849
|
+
# ifndef SQLITE_THREADSAFE
|
|
10850
|
+
# define SQLITE_THREADSAFE 0
|
|
10851
|
+
# endif
|
|
10634
10852
|
#endif
|
|
10635
10853
|
|
|
10636
10854
|
#ifdef __cplusplus
|
|
10637
|
-
}
|
|
10855
|
+
} /* End of the 'extern "C"' block */
|
|
10638
10856
|
#endif
|
|
10639
10857
|
#endif /* SQLITE3_H */
|
|
10640
10858
|
|
|
@@ -10655,6 +10873,7 @@ SQLITE_API int sqlite3_deserialize(
|
|
|
10655
10873
|
#ifndef _SQLITE3RTREE_H_
|
|
10656
10874
|
#define _SQLITE3RTREE_H_
|
|
10657
10875
|
|
|
10876
|
+
|
|
10658
10877
|
#ifdef __cplusplus
|
|
10659
10878
|
extern "C" {
|
|
10660
10879
|
#endif
|
|
@@ -10666,9 +10885,9 @@ typedef struct sqlite3_rtree_query_info sqlite3_rtree_query_info;
|
|
|
10666
10885
|
** SQLITE_RTREE_INT_ONLY compile-time option.
|
|
10667
10886
|
*/
|
|
10668
10887
|
#ifdef SQLITE_RTREE_INT_ONLY
|
|
10669
|
-
typedef sqlite3_int64 sqlite3_rtree_dbl;
|
|
10888
|
+
typedef sqlite3_int64 sqlite3_rtree_dbl;
|
|
10670
10889
|
#else
|
|
10671
|
-
typedef double sqlite3_rtree_dbl;
|
|
10890
|
+
typedef double sqlite3_rtree_dbl;
|
|
10672
10891
|
#endif
|
|
10673
10892
|
|
|
10674
10893
|
/*
|
|
@@ -10678,20 +10897,23 @@ typedef double sqlite3_rtree_dbl;
|
|
|
10678
10897
|
** SELECT ... FROM <rtree> WHERE <rtree col> MATCH $zGeom(... params ...)
|
|
10679
10898
|
*/
|
|
10680
10899
|
SQLITE_API int sqlite3_rtree_geometry_callback(
|
|
10681
|
-
|
|
10682
|
-
|
|
10683
|
-
|
|
10900
|
+
sqlite3 *db,
|
|
10901
|
+
const char *zGeom,
|
|
10902
|
+
int (*xGeom)(sqlite3_rtree_geometry*, int, sqlite3_rtree_dbl*,int*),
|
|
10903
|
+
void *pContext
|
|
10904
|
+
);
|
|
10905
|
+
|
|
10684
10906
|
|
|
10685
10907
|
/*
|
|
10686
10908
|
** A pointer to a structure of the following type is passed as the first
|
|
10687
10909
|
** argument to callbacks registered using rtree_geometry_callback().
|
|
10688
10910
|
*/
|
|
10689
10911
|
struct sqlite3_rtree_geometry {
|
|
10690
|
-
void *pContext;
|
|
10691
|
-
int nParam;
|
|
10692
|
-
sqlite3_rtree_dbl *aParam;
|
|
10693
|
-
void *pUser;
|
|
10694
|
-
void (*xDelUser)(void *);
|
|
10912
|
+
void *pContext; /* Copy of pContext passed to s_r_g_c() */
|
|
10913
|
+
int nParam; /* Size of array aParam[] */
|
|
10914
|
+
sqlite3_rtree_dbl *aParam; /* Parameters passed to SQL geom function */
|
|
10915
|
+
void *pUser; /* Callback implementation user data */
|
|
10916
|
+
void (*xDelUser)(void *); /* Called by SQLite to clean up pUser */
|
|
10695
10917
|
};
|
|
10696
10918
|
|
|
10697
10919
|
/*
|
|
@@ -10700,10 +10922,14 @@ struct sqlite3_rtree_geometry {
|
|
|
10700
10922
|
**
|
|
10701
10923
|
** SELECT ... FROM <rtree> WHERE <rtree col> MATCH $zQueryFunc(... params ...)
|
|
10702
10924
|
*/
|
|
10703
|
-
SQLITE_API int
|
|
10704
|
-
|
|
10705
|
-
|
|
10706
|
-
|
|
10925
|
+
SQLITE_API int sqlite3_rtree_query_callback(
|
|
10926
|
+
sqlite3 *db,
|
|
10927
|
+
const char *zQueryFunc,
|
|
10928
|
+
int (*xQueryFunc)(sqlite3_rtree_query_info*),
|
|
10929
|
+
void *pContext,
|
|
10930
|
+
void (*xDestructor)(void*)
|
|
10931
|
+
);
|
|
10932
|
+
|
|
10707
10933
|
|
|
10708
10934
|
/*
|
|
10709
10935
|
** A pointer to a structure of the following type is passed as the
|
|
@@ -10715,37 +10941,38 @@ sqlite3_rtree_query_callback(sqlite3 *db, const char *zQueryFunc,
|
|
|
10715
10941
|
** sqlite3_rtree_geometry.
|
|
10716
10942
|
*/
|
|
10717
10943
|
struct sqlite3_rtree_query_info {
|
|
10718
|
-
void *pContext;
|
|
10719
|
-
int nParam;
|
|
10720
|
-
sqlite3_rtree_dbl *aParam;
|
|
10721
|
-
void *pUser;
|
|
10722
|
-
void (*xDelUser)(void
|
|
10723
|
-
sqlite3_rtree_dbl *aCoord;
|
|
10724
|
-
unsigned int *anQueue;
|
|
10725
|
-
int nCoord;
|
|
10726
|
-
int iLevel;
|
|
10727
|
-
int mxLevel;
|
|
10728
|
-
sqlite3_int64 iRowid;
|
|
10729
|
-
sqlite3_rtree_dbl rParentScore;
|
|
10730
|
-
int eParentWithin;
|
|
10731
|
-
int eWithin;
|
|
10732
|
-
sqlite3_rtree_dbl rScore;
|
|
10944
|
+
void *pContext; /* pContext from when function registered */
|
|
10945
|
+
int nParam; /* Number of function parameters */
|
|
10946
|
+
sqlite3_rtree_dbl *aParam; /* value of function parameters */
|
|
10947
|
+
void *pUser; /* callback can use this, if desired */
|
|
10948
|
+
void (*xDelUser)(void*); /* function to free pUser */
|
|
10949
|
+
sqlite3_rtree_dbl *aCoord; /* Coordinates of node or entry to check */
|
|
10950
|
+
unsigned int *anQueue; /* Number of pending entries in the queue */
|
|
10951
|
+
int nCoord; /* Number of coordinates */
|
|
10952
|
+
int iLevel; /* Level of current node or entry */
|
|
10953
|
+
int mxLevel; /* The largest iLevel value in the tree */
|
|
10954
|
+
sqlite3_int64 iRowid; /* Rowid for current entry */
|
|
10955
|
+
sqlite3_rtree_dbl rParentScore; /* Score of parent node */
|
|
10956
|
+
int eParentWithin; /* Visibility of parent node */
|
|
10957
|
+
int eWithin; /* OUT: Visibility */
|
|
10958
|
+
sqlite3_rtree_dbl rScore; /* OUT: Write the score here */
|
|
10733
10959
|
/* The following fields are only available in 3.8.11 and later */
|
|
10734
|
-
sqlite3_value **apSqlParam;
|
|
10960
|
+
sqlite3_value **apSqlParam; /* Original SQL values of parameters */
|
|
10735
10961
|
};
|
|
10736
10962
|
|
|
10737
10963
|
/*
|
|
10738
10964
|
** Allowed values for sqlite3_rtree_query.eWithin and .eParentWithin.
|
|
10739
10965
|
*/
|
|
10740
|
-
#define NOT_WITHIN
|
|
10741
|
-
#define PARTLY_WITHIN
|
|
10742
|
-
#define FULLY_WITHIN
|
|
10966
|
+
#define NOT_WITHIN 0 /* Object completely outside of query region */
|
|
10967
|
+
#define PARTLY_WITHIN 1 /* Object partially overlaps query region */
|
|
10968
|
+
#define FULLY_WITHIN 2 /* Object fully contained within query region */
|
|
10969
|
+
|
|
10743
10970
|
|
|
10744
10971
|
#ifdef __cplusplus
|
|
10745
|
-
}
|
|
10972
|
+
} /* end of the 'extern "C"' block */
|
|
10746
10973
|
#endif
|
|
10747
10974
|
|
|
10748
|
-
#endif
|
|
10975
|
+
#endif /* ifndef _SQLITE3RTREE_H_ */
|
|
10749
10976
|
|
|
10750
10977
|
/******** End of sqlite3rtree.h *********/
|
|
10751
10978
|
/******** Begin file sqlite3session.h *********/
|
|
@@ -10760,6 +10987,7 @@ struct sqlite3_rtree_query_info {
|
|
|
10760
10987
|
extern "C" {
|
|
10761
10988
|
#endif
|
|
10762
10989
|
|
|
10990
|
+
|
|
10763
10991
|
/*
|
|
10764
10992
|
** CAPI3REF: Session Object Handle
|
|
10765
10993
|
**
|
|
@@ -10807,10 +11035,10 @@ typedef struct sqlite3_changeset_iter sqlite3_changeset_iter;
|
|
|
10807
11035
|
** attached database. It is not an error if database zDb is not attached
|
|
10808
11036
|
** to the database when the session object is created.
|
|
10809
11037
|
*/
|
|
10810
|
-
SQLITE_API int
|
|
10811
|
-
|
|
10812
|
-
|
|
10813
|
-
|
|
11038
|
+
SQLITE_API int sqlite3session_create(
|
|
11039
|
+
sqlite3 *db, /* Database handle */
|
|
11040
|
+
const char *zDb, /* Name of db (e.g. "main") */
|
|
11041
|
+
sqlite3_session **ppSession /* OUT: New session object */
|
|
10814
11042
|
);
|
|
10815
11043
|
|
|
10816
11044
|
/*
|
|
@@ -10837,8 +11065,7 @@ SQLITE_API void sqlite3session_delete(sqlite3_session *pSession);
|
|
|
10837
11065
|
** [SQLITE_SESSION_OBJCONFIG_SIZE] and [SQLITE_SESSION_OBJCONFIG_ROWID].
|
|
10838
11066
|
**
|
|
10839
11067
|
*/
|
|
10840
|
-
SQLITE_API int sqlite3session_object_config(sqlite3_session
|
|
10841
|
-
void *pArg);
|
|
11068
|
+
SQLITE_API int sqlite3session_object_config(sqlite3_session*, int op, void *pArg);
|
|
10842
11069
|
|
|
10843
11070
|
/*
|
|
10844
11071
|
** CAPI3REF: Options for sqlite3session_object_config
|
|
@@ -10872,7 +11099,7 @@ SQLITE_API int sqlite3session_object_config(sqlite3_session *, int op,
|
|
|
10872
11099
|
** It is an error (SQLITE_MISUSE) to attempt to modify this setting after
|
|
10873
11100
|
** the first table has been attached to the session object.
|
|
10874
11101
|
*/
|
|
10875
|
-
#define SQLITE_SESSION_OBJCONFIG_SIZE
|
|
11102
|
+
#define SQLITE_SESSION_OBJCONFIG_SIZE 1
|
|
10876
11103
|
#define SQLITE_SESSION_OBJCONFIG_ROWID 2
|
|
10877
11104
|
|
|
10878
11105
|
/*
|
|
@@ -10923,8 +11150,7 @@ SQLITE_API int sqlite3session_enable(sqlite3_session *pSession, int bEnable);
|
|
|
10923
11150
|
** The return value indicates the final state of the indirect flag: 0 if
|
|
10924
11151
|
** it is clear, or 1 if it is set.
|
|
10925
11152
|
*/
|
|
10926
|
-
SQLITE_API int sqlite3session_indirect(sqlite3_session *pSession,
|
|
10927
|
-
int bIndirect);
|
|
11153
|
+
SQLITE_API int sqlite3session_indirect(sqlite3_session *pSession, int bIndirect);
|
|
10928
11154
|
|
|
10929
11155
|
/*
|
|
10930
11156
|
** CAPI3REF: Attach A Table To A Session Object
|
|
@@ -10984,9 +11210,9 @@ SQLITE_API int sqlite3session_indirect(sqlite3_session *pSession,
|
|
|
10984
11210
|
** sqlite3changeset_apply() function silently ignore any modifications to the
|
|
10985
11211
|
** sqlite_stat1 table that are part of a changeset or patchset.
|
|
10986
11212
|
*/
|
|
10987
|
-
SQLITE_API int
|
|
10988
|
-
|
|
10989
|
-
|
|
11213
|
+
SQLITE_API int sqlite3session_attach(
|
|
11214
|
+
sqlite3_session *pSession, /* Session object */
|
|
11215
|
+
const char *zTab /* Table name */
|
|
10990
11216
|
);
|
|
10991
11217
|
|
|
10992
11218
|
/*
|
|
@@ -11000,11 +11226,12 @@ sqlite3session_attach(sqlite3_session *pSession, /* Session object */
|
|
|
11000
11226
|
** attached, xFilter will not be called again.
|
|
11001
11227
|
*/
|
|
11002
11228
|
SQLITE_API void sqlite3session_table_filter(
|
|
11003
|
-
|
|
11004
|
-
|
|
11005
|
-
|
|
11006
|
-
|
|
11007
|
-
|
|
11229
|
+
sqlite3_session *pSession, /* Session object */
|
|
11230
|
+
int(*xFilter)(
|
|
11231
|
+
void *pCtx, /* Copy of third arg to _filter_table() */
|
|
11232
|
+
const char *zTab /* Table name */
|
|
11233
|
+
),
|
|
11234
|
+
void *pCtx /* First argument passed to xFilter */
|
|
11008
11235
|
);
|
|
11009
11236
|
|
|
11010
11237
|
/*
|
|
@@ -11113,9 +11340,9 @@ SQLITE_API void sqlite3session_table_filter(
|
|
|
11113
11340
|
** resulting changeset will contain an UPDATE change that updates both fields.
|
|
11114
11341
|
*/
|
|
11115
11342
|
SQLITE_API int sqlite3session_changeset(
|
|
11116
|
-
|
|
11117
|
-
|
|
11118
|
-
|
|
11343
|
+
sqlite3_session *pSession, /* Session object */
|
|
11344
|
+
int *pnChangeset, /* OUT: Size of buffer at *ppChangeset */
|
|
11345
|
+
void **ppChangeset /* OUT: Buffer containing changeset */
|
|
11119
11346
|
);
|
|
11120
11347
|
|
|
11121
11348
|
/*
|
|
@@ -11132,8 +11359,7 @@ SQLITE_API int sqlite3session_changeset(
|
|
|
11132
11359
|
** called. The final changeset size might be equal to or smaller than the
|
|
11133
11360
|
** size in bytes returned by this function.
|
|
11134
11361
|
*/
|
|
11135
|
-
SQLITE_API sqlite3_int64
|
|
11136
|
-
sqlite3session_changeset_size(sqlite3_session *pSession);
|
|
11362
|
+
SQLITE_API sqlite3_int64 sqlite3session_changeset_size(sqlite3_session *pSession);
|
|
11137
11363
|
|
|
11138
11364
|
/*
|
|
11139
11365
|
** CAPI3REF: Load The Difference Between Tables Into A Session
|
|
@@ -11192,9 +11418,13 @@ sqlite3session_changeset_size(sqlite3_session *pSession);
|
|
|
11192
11418
|
** message. It is the responsibility of the caller to free this buffer using
|
|
11193
11419
|
** sqlite3_free().
|
|
11194
11420
|
*/
|
|
11195
|
-
SQLITE_API int sqlite3session_diff(
|
|
11196
|
-
|
|
11197
|
-
|
|
11421
|
+
SQLITE_API int sqlite3session_diff(
|
|
11422
|
+
sqlite3_session *pSession,
|
|
11423
|
+
const char *zFromDb,
|
|
11424
|
+
const char *zTbl,
|
|
11425
|
+
char **pzErrMsg
|
|
11426
|
+
);
|
|
11427
|
+
|
|
11198
11428
|
|
|
11199
11429
|
/*
|
|
11200
11430
|
** CAPI3REF: Generate A Patchset From A Session Object
|
|
@@ -11226,9 +11456,9 @@ SQLITE_API int sqlite3session_diff(sqlite3_session *pSession,
|
|
|
11226
11456
|
** they were attached to the session object).
|
|
11227
11457
|
*/
|
|
11228
11458
|
SQLITE_API int sqlite3session_patchset(
|
|
11229
|
-
|
|
11230
|
-
|
|
11231
|
-
|
|
11459
|
+
sqlite3_session *pSession, /* Session object */
|
|
11460
|
+
int *pnPatchset, /* OUT: Size of buffer at *ppPatchset */
|
|
11461
|
+
void **ppPatchset /* OUT: Buffer containing patchset */
|
|
11232
11462
|
);
|
|
11233
11463
|
|
|
11234
11464
|
/*
|
|
@@ -11298,15 +11528,15 @@ SQLITE_API sqlite3_int64 sqlite3session_memory_used(sqlite3_session *pSession);
|
|
|
11298
11528
|
** and therefore subject to change.
|
|
11299
11529
|
*/
|
|
11300
11530
|
SQLITE_API int sqlite3changeset_start(
|
|
11301
|
-
|
|
11302
|
-
|
|
11303
|
-
|
|
11531
|
+
sqlite3_changeset_iter **pp, /* OUT: New changeset iterator handle */
|
|
11532
|
+
int nChangeset, /* Size of changeset blob in bytes */
|
|
11533
|
+
void *pChangeset /* Pointer to blob containing changeset */
|
|
11304
11534
|
);
|
|
11305
11535
|
SQLITE_API int sqlite3changeset_start_v2(
|
|
11306
|
-
|
|
11307
|
-
|
|
11308
|
-
|
|
11309
|
-
|
|
11536
|
+
sqlite3_changeset_iter **pp, /* OUT: New changeset iterator handle */
|
|
11537
|
+
int nChangeset, /* Size of changeset blob in bytes */
|
|
11538
|
+
void *pChangeset, /* Pointer to blob containing changeset */
|
|
11539
|
+
int flags /* SESSION_CHANGESETSTART_* flags */
|
|
11310
11540
|
);
|
|
11311
11541
|
|
|
11312
11542
|
/*
|
|
@@ -11320,7 +11550,8 @@ SQLITE_API int sqlite3changeset_start_v2(
|
|
|
11320
11550
|
** inverting a changeset using sqlite3changeset_invert() before applying it.
|
|
11321
11551
|
** It is an error to specify this flag with a patchset.
|
|
11322
11552
|
*/
|
|
11323
|
-
#define SQLITE_CHANGESETSTART_INVERT
|
|
11553
|
+
#define SQLITE_CHANGESETSTART_INVERT 0x0002
|
|
11554
|
+
|
|
11324
11555
|
|
|
11325
11556
|
/*
|
|
11326
11557
|
** CAPI3REF: Advance A Changeset Iterator
|
|
@@ -11363,8 +11594,7 @@ SQLITE_API int sqlite3changeset_next(sqlite3_changeset_iter *pIter);
|
|
|
11363
11594
|
** *pOp is set to one of [SQLITE_INSERT], [SQLITE_DELETE] or [SQLITE_UPDATE],
|
|
11364
11595
|
** depending on the type of change that the iterator currently points to;
|
|
11365
11596
|
**
|
|
11366
|
-
** *pnCol is set to the number of columns in the table affected by the change;
|
|
11367
|
-
*and
|
|
11597
|
+
** *pnCol is set to the number of columns in the table affected by the change; and
|
|
11368
11598
|
**
|
|
11369
11599
|
** *pzTab is set to point to a nul-terminated utf-8 encoded string containing
|
|
11370
11600
|
** the name of the table affected by the current change. The buffer remains
|
|
@@ -11380,12 +11610,12 @@ SQLITE_API int sqlite3changeset_next(sqlite3_changeset_iter *pIter);
|
|
|
11380
11610
|
** SQLite error code is returned. The values of the output variables may not
|
|
11381
11611
|
** be trusted in this case.
|
|
11382
11612
|
*/
|
|
11383
|
-
SQLITE_API int
|
|
11384
|
-
|
|
11385
|
-
|
|
11386
|
-
|
|
11387
|
-
|
|
11388
|
-
|
|
11613
|
+
SQLITE_API int sqlite3changeset_op(
|
|
11614
|
+
sqlite3_changeset_iter *pIter, /* Iterator object */
|
|
11615
|
+
const char **pzTab, /* OUT: Pointer to table name */
|
|
11616
|
+
int *pnCol, /* OUT: Number of columns in table */
|
|
11617
|
+
int *pOp, /* OUT: SQLITE_INSERT, DELETE or UPDATE */
|
|
11618
|
+
int *pbIndirect /* OUT: True for an 'indirect' change */
|
|
11389
11619
|
);
|
|
11390
11620
|
|
|
11391
11621
|
/*
|
|
@@ -11415,9 +11645,9 @@ sqlite3changeset_op(sqlite3_changeset_iter *pIter, /* Iterator object */
|
|
|
11415
11645
|
** above.
|
|
11416
11646
|
*/
|
|
11417
11647
|
SQLITE_API int sqlite3changeset_pk(
|
|
11418
|
-
|
|
11419
|
-
|
|
11420
|
-
|
|
11648
|
+
sqlite3_changeset_iter *pIter, /* Iterator object */
|
|
11649
|
+
unsigned char **pabPK, /* OUT: Array of boolean - true for PK cols */
|
|
11650
|
+
int *pnCol /* OUT: Number of entries in output array */
|
|
11421
11651
|
);
|
|
11422
11652
|
|
|
11423
11653
|
/*
|
|
@@ -11446,9 +11676,9 @@ SQLITE_API int sqlite3changeset_pk(
|
|
|
11446
11676
|
** is returned and *ppValue is set to NULL.
|
|
11447
11677
|
*/
|
|
11448
11678
|
SQLITE_API int sqlite3changeset_old(
|
|
11449
|
-
|
|
11450
|
-
|
|
11451
|
-
|
|
11679
|
+
sqlite3_changeset_iter *pIter, /* Changeset iterator */
|
|
11680
|
+
int iVal, /* Column number */
|
|
11681
|
+
sqlite3_value **ppValue /* OUT: Old value (or NULL pointer) */
|
|
11452
11682
|
);
|
|
11453
11683
|
|
|
11454
11684
|
/*
|
|
@@ -11480,9 +11710,9 @@ SQLITE_API int sqlite3changeset_old(
|
|
|
11480
11710
|
** is returned and *ppValue is set to NULL.
|
|
11481
11711
|
*/
|
|
11482
11712
|
SQLITE_API int sqlite3changeset_new(
|
|
11483
|
-
|
|
11484
|
-
|
|
11485
|
-
|
|
11713
|
+
sqlite3_changeset_iter *pIter, /* Changeset iterator */
|
|
11714
|
+
int iVal, /* Column number */
|
|
11715
|
+
sqlite3_value **ppValue /* OUT: New value (or NULL pointer) */
|
|
11486
11716
|
);
|
|
11487
11717
|
|
|
11488
11718
|
/*
|
|
@@ -11508,9 +11738,9 @@ SQLITE_API int sqlite3changeset_new(
|
|
|
11508
11738
|
** is returned and *ppValue is set to NULL.
|
|
11509
11739
|
*/
|
|
11510
11740
|
SQLITE_API int sqlite3changeset_conflict(
|
|
11511
|
-
|
|
11512
|
-
|
|
11513
|
-
|
|
11741
|
+
sqlite3_changeset_iter *pIter, /* Changeset iterator */
|
|
11742
|
+
int iVal, /* Column number */
|
|
11743
|
+
sqlite3_value **ppValue /* OUT: Value from conflicting row */
|
|
11514
11744
|
);
|
|
11515
11745
|
|
|
11516
11746
|
/*
|
|
@@ -11525,10 +11755,11 @@ SQLITE_API int sqlite3changeset_conflict(
|
|
|
11525
11755
|
** In all other cases this function returns SQLITE_MISUSE.
|
|
11526
11756
|
*/
|
|
11527
11757
|
SQLITE_API int sqlite3changeset_fk_conflicts(
|
|
11528
|
-
|
|
11529
|
-
|
|
11758
|
+
sqlite3_changeset_iter *pIter, /* Changeset iterator */
|
|
11759
|
+
int *pnOut /* OUT: Number of FK violations */
|
|
11530
11760
|
);
|
|
11531
11761
|
|
|
11762
|
+
|
|
11532
11763
|
/*
|
|
11533
11764
|
** CAPI3REF: Finalize A Changeset Iterator
|
|
11534
11765
|
** METHOD: sqlite3_changeset_iter
|
|
@@ -11589,10 +11820,9 @@ SQLITE_API int sqlite3changeset_finalize(sqlite3_changeset_iter *pIter);
|
|
|
11589
11820
|
** WARNING/TODO: This function currently assumes that the input is a valid
|
|
11590
11821
|
** changeset. If it is not, the results are undefined.
|
|
11591
11822
|
*/
|
|
11592
|
-
SQLITE_API int sqlite3changeset_invert(
|
|
11593
|
-
|
|
11594
|
-
|
|
11595
|
-
void **ppOut /* OUT: Inverse of input */
|
|
11823
|
+
SQLITE_API int sqlite3changeset_invert(
|
|
11824
|
+
int nIn, const void *pIn, /* Input changeset */
|
|
11825
|
+
int *pnOut, void **ppOut /* OUT: Inverse of input */
|
|
11596
11826
|
);
|
|
11597
11827
|
|
|
11598
11828
|
/*
|
|
@@ -11622,14 +11852,27 @@ SQLITE_API int sqlite3changeset_invert(int nIn,
|
|
|
11622
11852
|
** Refer to the sqlite3_changegroup documentation below for details.
|
|
11623
11853
|
*/
|
|
11624
11854
|
SQLITE_API int sqlite3changeset_concat(
|
|
11625
|
-
|
|
11626
|
-
|
|
11627
|
-
|
|
11628
|
-
|
|
11629
|
-
|
|
11630
|
-
|
|
11855
|
+
int nA, /* Number of bytes in buffer pA */
|
|
11856
|
+
void *pA, /* Pointer to buffer containing changeset A */
|
|
11857
|
+
int nB, /* Number of bytes in buffer pB */
|
|
11858
|
+
void *pB, /* Pointer to buffer containing changeset B */
|
|
11859
|
+
int *pnOut, /* OUT: Number of bytes in output changeset */
|
|
11860
|
+
void **ppOut /* OUT: Buffer containing output changeset */
|
|
11631
11861
|
);
|
|
11632
11862
|
|
|
11863
|
+
|
|
11864
|
+
/*
|
|
11865
|
+
** CAPI3REF: Upgrade the Schema of a Changeset/Patchset
|
|
11866
|
+
*/
|
|
11867
|
+
SQLITE_API int sqlite3changeset_upgrade(
|
|
11868
|
+
sqlite3 *db,
|
|
11869
|
+
const char *zDb,
|
|
11870
|
+
int nIn, const void *pIn, /* Input changeset */
|
|
11871
|
+
int *pnOut, void **ppOut /* OUT: Inverse of input */
|
|
11872
|
+
);
|
|
11873
|
+
|
|
11874
|
+
|
|
11875
|
+
|
|
11633
11876
|
/*
|
|
11634
11877
|
** CAPI3REF: Changegroup Handle
|
|
11635
11878
|
**
|
|
@@ -11676,6 +11919,38 @@ typedef struct sqlite3_changegroup sqlite3_changegroup;
|
|
|
11676
11919
|
*/
|
|
11677
11920
|
SQLITE_API int sqlite3changegroup_new(sqlite3_changegroup **pp);
|
|
11678
11921
|
|
|
11922
|
+
/*
|
|
11923
|
+
** CAPI3REF: Add a Schema to a Changegroup
|
|
11924
|
+
** METHOD: sqlite3_changegroup_schema
|
|
11925
|
+
**
|
|
11926
|
+
** This method may be used to optionally enforce the rule that the changesets
|
|
11927
|
+
** added to the changegroup handle must match the schema of database zDb
|
|
11928
|
+
** ("main", "temp", or the name of an attached database). If
|
|
11929
|
+
** sqlite3changegroup_add() is called to add a changeset that is not compatible
|
|
11930
|
+
** with the configured schema, SQLITE_SCHEMA is returned and the changegroup
|
|
11931
|
+
** object is left in an undefined state.
|
|
11932
|
+
**
|
|
11933
|
+
** A changeset schema is considered compatible with the database schema in
|
|
11934
|
+
** the same way as for sqlite3changeset_apply(). Specifically, for each
|
|
11935
|
+
** table in the changeset, there exists a database table with:
|
|
11936
|
+
**
|
|
11937
|
+
** <ul>
|
|
11938
|
+
** <li> The name identified by the changeset, and
|
|
11939
|
+
** <li> at least as many columns as recorded in the changeset, and
|
|
11940
|
+
** <li> the primary key columns in the same position as recorded in
|
|
11941
|
+
** the changeset.
|
|
11942
|
+
** </ul>
|
|
11943
|
+
**
|
|
11944
|
+
** The output of the changegroup object always has the same schema as the
|
|
11945
|
+
** database nominated using this function. In cases where changesets passed
|
|
11946
|
+
** to sqlite3changegroup_add() have fewer columns than the corresponding table
|
|
11947
|
+
** in the database schema, these are filled in using the default column
|
|
11948
|
+
** values from the database schema. This makes it possible to combined
|
|
11949
|
+
** changesets that have different numbers of columns for a single table
|
|
11950
|
+
** within a changegroup, provided that they are otherwise compatible.
|
|
11951
|
+
*/
|
|
11952
|
+
SQLITE_API int sqlite3changegroup_schema(sqlite3_changegroup*, sqlite3*, const char *zDb);
|
|
11953
|
+
|
|
11679
11954
|
/*
|
|
11680
11955
|
** CAPI3REF: Add A Changeset To A Changegroup
|
|
11681
11956
|
** METHOD: sqlite3_changegroup
|
|
@@ -11744,16 +12019,20 @@ SQLITE_API int sqlite3changegroup_new(sqlite3_changegroup **pp);
|
|
|
11744
12019
|
** If the new changeset contains changes to a table that is already present
|
|
11745
12020
|
** in the changegroup, then the number of columns and the position of the
|
|
11746
12021
|
** primary key columns for the table must be consistent. If this is not the
|
|
11747
|
-
** case, this function fails with SQLITE_SCHEMA.
|
|
11748
|
-
**
|
|
11749
|
-
**
|
|
11750
|
-
**
|
|
11751
|
-
**
|
|
12022
|
+
** case, this function fails with SQLITE_SCHEMA. Except, if the changegroup
|
|
12023
|
+
** object has been configured with a database schema using the
|
|
12024
|
+
** sqlite3changegroup_schema() API, then it is possible to combine changesets
|
|
12025
|
+
** with different numbers of columns for a single table, provided that
|
|
12026
|
+
** they are otherwise compatible.
|
|
11752
12027
|
**
|
|
11753
|
-
** If
|
|
12028
|
+
** If the input changeset appears to be corrupt and the corruption is
|
|
12029
|
+
** detected, SQLITE_CORRUPT is returned. Or, if an out-of-memory condition
|
|
12030
|
+
** occurs during processing, this function returns SQLITE_NOMEM.
|
|
12031
|
+
**
|
|
12032
|
+
** In all cases, if an error occurs the state of the final contents of the
|
|
12033
|
+
** changegroup is undefined. If no error occurs, SQLITE_OK is returned.
|
|
11754
12034
|
*/
|
|
11755
|
-
SQLITE_API int sqlite3changegroup_add(sqlite3_changegroup
|
|
11756
|
-
void *pData);
|
|
12035
|
+
SQLITE_API int sqlite3changegroup_add(sqlite3_changegroup*, int nData, void *pData);
|
|
11757
12036
|
|
|
11758
12037
|
/*
|
|
11759
12038
|
** CAPI3REF: Obtain A Composite Changeset From A Changegroup
|
|
@@ -11780,17 +12059,17 @@ SQLITE_API int sqlite3changegroup_add(sqlite3_changegroup *, int nData,
|
|
|
11780
12059
|
** responsibility of the caller to eventually free the buffer using a
|
|
11781
12060
|
** call to sqlite3_free().
|
|
11782
12061
|
*/
|
|
11783
|
-
SQLITE_API int
|
|
11784
|
-
|
|
11785
|
-
|
|
11786
|
-
|
|
12062
|
+
SQLITE_API int sqlite3changegroup_output(
|
|
12063
|
+
sqlite3_changegroup*,
|
|
12064
|
+
int *pnData, /* OUT: Size of output buffer in bytes */
|
|
12065
|
+
void **ppData /* OUT: Pointer to output buffer */
|
|
11787
12066
|
);
|
|
11788
12067
|
|
|
11789
12068
|
/*
|
|
11790
12069
|
** CAPI3REF: Delete A Changegroup Object
|
|
11791
12070
|
** DESTRUCTOR: sqlite3_changegroup
|
|
11792
12071
|
*/
|
|
11793
|
-
SQLITE_API void sqlite3changegroup_delete(sqlite3_changegroup
|
|
12072
|
+
SQLITE_API void sqlite3changegroup_delete(sqlite3_changegroup*);
|
|
11794
12073
|
|
|
11795
12074
|
/*
|
|
11796
12075
|
** CAPI3REF: Apply A Changeset To A Database
|
|
@@ -11951,34 +12230,36 @@ SQLITE_API void sqlite3changegroup_delete(sqlite3_changegroup *);
|
|
|
11951
12230
|
** and therefore subject to change.
|
|
11952
12231
|
*/
|
|
11953
12232
|
SQLITE_API int sqlite3changeset_apply(
|
|
11954
|
-
|
|
11955
|
-
|
|
11956
|
-
|
|
11957
|
-
|
|
11958
|
-
|
|
11959
|
-
|
|
11960
|
-
|
|
11961
|
-
|
|
11962
|
-
|
|
11963
|
-
|
|
11964
|
-
|
|
11965
|
-
|
|
12233
|
+
sqlite3 *db, /* Apply change to "main" db of this handle */
|
|
12234
|
+
int nChangeset, /* Size of changeset in bytes */
|
|
12235
|
+
void *pChangeset, /* Changeset blob */
|
|
12236
|
+
int(*xFilter)(
|
|
12237
|
+
void *pCtx, /* Copy of sixth arg to _apply() */
|
|
12238
|
+
const char *zTab /* Table name */
|
|
12239
|
+
),
|
|
12240
|
+
int(*xConflict)(
|
|
12241
|
+
void *pCtx, /* Copy of sixth arg to _apply() */
|
|
12242
|
+
int eConflict, /* DATA, MISSING, CONFLICT, CONSTRAINT */
|
|
12243
|
+
sqlite3_changeset_iter *p /* Handle describing change and conflict */
|
|
12244
|
+
),
|
|
12245
|
+
void *pCtx /* First argument passed to xConflict */
|
|
11966
12246
|
);
|
|
11967
12247
|
SQLITE_API int sqlite3changeset_apply_v2(
|
|
11968
|
-
|
|
11969
|
-
|
|
11970
|
-
|
|
11971
|
-
|
|
11972
|
-
|
|
11973
|
-
|
|
11974
|
-
|
|
11975
|
-
|
|
11976
|
-
|
|
11977
|
-
|
|
11978
|
-
|
|
11979
|
-
|
|
11980
|
-
|
|
11981
|
-
|
|
12248
|
+
sqlite3 *db, /* Apply change to "main" db of this handle */
|
|
12249
|
+
int nChangeset, /* Size of changeset in bytes */
|
|
12250
|
+
void *pChangeset, /* Changeset blob */
|
|
12251
|
+
int(*xFilter)(
|
|
12252
|
+
void *pCtx, /* Copy of sixth arg to _apply() */
|
|
12253
|
+
const char *zTab /* Table name */
|
|
12254
|
+
),
|
|
12255
|
+
int(*xConflict)(
|
|
12256
|
+
void *pCtx, /* Copy of sixth arg to _apply() */
|
|
12257
|
+
int eConflict, /* DATA, MISSING, CONFLICT, CONSTRAINT */
|
|
12258
|
+
sqlite3_changeset_iter *p /* Handle describing change and conflict */
|
|
12259
|
+
),
|
|
12260
|
+
void *pCtx, /* First argument passed to xConflict */
|
|
12261
|
+
void **ppRebase, int *pnRebase, /* OUT: Rebase data */
|
|
12262
|
+
int flags /* SESSION_CHANGESETAPPLY_* flags */
|
|
11982
12263
|
);
|
|
11983
12264
|
|
|
11984
12265
|
/*
|
|
@@ -12014,10 +12295,17 @@ SQLITE_API int sqlite3changeset_apply_v2(
|
|
|
12014
12295
|
** <li>an insert change if all fields of the conflicting row match
|
|
12015
12296
|
** the row being inserted.
|
|
12016
12297
|
** </ul>
|
|
12298
|
+
**
|
|
12299
|
+
** <dt>SQLITE_CHANGESETAPPLY_FKNOACTION <dd>
|
|
12300
|
+
** If this flag it set, then all foreign key constraints in the target
|
|
12301
|
+
** database behave as if they were declared with "ON UPDATE NO ACTION ON
|
|
12302
|
+
** DELETE NO ACTION", even if they are actually CASCADE, RESTRICT, SET NULL
|
|
12303
|
+
** or SET DEFAULT.
|
|
12017
12304
|
*/
|
|
12018
|
-
#define SQLITE_CHANGESETAPPLY_NOSAVEPOINT
|
|
12019
|
-
#define SQLITE_CHANGESETAPPLY_INVERT
|
|
12020
|
-
#define SQLITE_CHANGESETAPPLY_IGNORENOOP
|
|
12305
|
+
#define SQLITE_CHANGESETAPPLY_NOSAVEPOINT 0x0001
|
|
12306
|
+
#define SQLITE_CHANGESETAPPLY_INVERT 0x0002
|
|
12307
|
+
#define SQLITE_CHANGESETAPPLY_IGNORENOOP 0x0004
|
|
12308
|
+
#define SQLITE_CHANGESETAPPLY_FKNOACTION 0x0008
|
|
12021
12309
|
|
|
12022
12310
|
/*
|
|
12023
12311
|
** CAPI3REF: Constants Passed To The Conflict Handler
|
|
@@ -12074,10 +12362,10 @@ SQLITE_API int sqlite3changeset_apply_v2(
|
|
|
12074
12362
|
**
|
|
12075
12363
|
** </dl>
|
|
12076
12364
|
*/
|
|
12077
|
-
#define SQLITE_CHANGESET_DATA
|
|
12078
|
-
#define SQLITE_CHANGESET_NOTFOUND
|
|
12079
|
-
#define SQLITE_CHANGESET_CONFLICT
|
|
12080
|
-
#define SQLITE_CHANGESET_CONSTRAINT
|
|
12365
|
+
#define SQLITE_CHANGESET_DATA 1
|
|
12366
|
+
#define SQLITE_CHANGESET_NOTFOUND 2
|
|
12367
|
+
#define SQLITE_CHANGESET_CONFLICT 3
|
|
12368
|
+
#define SQLITE_CHANGESET_CONSTRAINT 4
|
|
12081
12369
|
#define SQLITE_CHANGESET_FOREIGN_KEY 5
|
|
12082
12370
|
|
|
12083
12371
|
/*
|
|
@@ -12111,9 +12399,9 @@ SQLITE_API int sqlite3changeset_apply_v2(
|
|
|
12111
12399
|
** and the call to sqlite3changeset_apply() returns SQLITE_ABORT.
|
|
12112
12400
|
** </dl>
|
|
12113
12401
|
*/
|
|
12114
|
-
#define SQLITE_CHANGESET_OMIT
|
|
12115
|
-
#define SQLITE_CHANGESET_REPLACE
|
|
12116
|
-
#define SQLITE_CHANGESET_ABORT
|
|
12402
|
+
#define SQLITE_CHANGESET_OMIT 0
|
|
12403
|
+
#define SQLITE_CHANGESET_REPLACE 1
|
|
12404
|
+
#define SQLITE_CHANGESET_ABORT 2
|
|
12117
12405
|
|
|
12118
12406
|
/*
|
|
12119
12407
|
** CAPI3REF: Rebasing changesets
|
|
@@ -12235,8 +12523,10 @@ SQLITE_API int sqlite3rebaser_create(sqlite3_rebaser **ppNew);
|
|
|
12235
12523
|
** bytes), which must have been obtained from a previous call to
|
|
12236
12524
|
** sqlite3changeset_apply_v2().
|
|
12237
12525
|
*/
|
|
12238
|
-
SQLITE_API int sqlite3rebaser_configure(
|
|
12239
|
-
|
|
12526
|
+
SQLITE_API int sqlite3rebaser_configure(
|
|
12527
|
+
sqlite3_rebaser*,
|
|
12528
|
+
int nRebase, const void *pRebase
|
|
12529
|
+
);
|
|
12240
12530
|
|
|
12241
12531
|
/*
|
|
12242
12532
|
** CAPI3REF: Rebase a changeset
|
|
@@ -12252,8 +12542,11 @@ SQLITE_API int sqlite3rebaser_configure(sqlite3_rebaser *, int nRebase,
|
|
|
12252
12542
|
** sqlite3_free(). Otherwise, if an error occurs, (*ppOut) and (*pnOut)
|
|
12253
12543
|
** are set to zero and an SQLite error code returned.
|
|
12254
12544
|
*/
|
|
12255
|
-
SQLITE_API int sqlite3rebaser_rebase(
|
|
12256
|
-
|
|
12545
|
+
SQLITE_API int sqlite3rebaser_rebase(
|
|
12546
|
+
sqlite3_rebaser*,
|
|
12547
|
+
int nIn, const void *pIn,
|
|
12548
|
+
int *pnOut, void **ppOut
|
|
12549
|
+
);
|
|
12257
12550
|
|
|
12258
12551
|
/*
|
|
12259
12552
|
** CAPI3REF: Delete a changeset rebaser object.
|
|
@@ -12356,64 +12649,87 @@ SQLITE_API void sqlite3rebaser_delete(sqlite3_rebaser *p);
|
|
|
12356
12649
|
** no guarantees are made as to the size of the chunks of data returned.
|
|
12357
12650
|
*/
|
|
12358
12651
|
SQLITE_API int sqlite3changeset_apply_strm(
|
|
12359
|
-
|
|
12360
|
-
|
|
12361
|
-
|
|
12362
|
-
|
|
12363
|
-
|
|
12364
|
-
|
|
12365
|
-
|
|
12366
|
-
|
|
12367
|
-
|
|
12368
|
-
|
|
12369
|
-
|
|
12370
|
-
|
|
12652
|
+
sqlite3 *db, /* Apply change to "main" db of this handle */
|
|
12653
|
+
int (*xInput)(void *pIn, void *pData, int *pnData), /* Input function */
|
|
12654
|
+
void *pIn, /* First arg for xInput */
|
|
12655
|
+
int(*xFilter)(
|
|
12656
|
+
void *pCtx, /* Copy of sixth arg to _apply() */
|
|
12657
|
+
const char *zTab /* Table name */
|
|
12658
|
+
),
|
|
12659
|
+
int(*xConflict)(
|
|
12660
|
+
void *pCtx, /* Copy of sixth arg to _apply() */
|
|
12661
|
+
int eConflict, /* DATA, MISSING, CONFLICT, CONSTRAINT */
|
|
12662
|
+
sqlite3_changeset_iter *p /* Handle describing change and conflict */
|
|
12663
|
+
),
|
|
12664
|
+
void *pCtx /* First argument passed to xConflict */
|
|
12371
12665
|
);
|
|
12372
12666
|
SQLITE_API int sqlite3changeset_apply_v2_strm(
|
|
12373
|
-
|
|
12374
|
-
|
|
12375
|
-
|
|
12376
|
-
|
|
12377
|
-
|
|
12378
|
-
|
|
12379
|
-
|
|
12380
|
-
|
|
12381
|
-
|
|
12382
|
-
|
|
12383
|
-
|
|
12384
|
-
|
|
12385
|
-
|
|
12667
|
+
sqlite3 *db, /* Apply change to "main" db of this handle */
|
|
12668
|
+
int (*xInput)(void *pIn, void *pData, int *pnData), /* Input function */
|
|
12669
|
+
void *pIn, /* First arg for xInput */
|
|
12670
|
+
int(*xFilter)(
|
|
12671
|
+
void *pCtx, /* Copy of sixth arg to _apply() */
|
|
12672
|
+
const char *zTab /* Table name */
|
|
12673
|
+
),
|
|
12674
|
+
int(*xConflict)(
|
|
12675
|
+
void *pCtx, /* Copy of sixth arg to _apply() */
|
|
12676
|
+
int eConflict, /* DATA, MISSING, CONFLICT, CONSTRAINT */
|
|
12677
|
+
sqlite3_changeset_iter *p /* Handle describing change and conflict */
|
|
12678
|
+
),
|
|
12679
|
+
void *pCtx, /* First argument passed to xConflict */
|
|
12680
|
+
void **ppRebase, int *pnRebase,
|
|
12681
|
+
int flags
|
|
12682
|
+
);
|
|
12386
12683
|
SQLITE_API int sqlite3changeset_concat_strm(
|
|
12387
|
-
|
|
12388
|
-
|
|
12389
|
-
|
|
12684
|
+
int (*xInputA)(void *pIn, void *pData, int *pnData),
|
|
12685
|
+
void *pInA,
|
|
12686
|
+
int (*xInputB)(void *pIn, void *pData, int *pnData),
|
|
12687
|
+
void *pInB,
|
|
12688
|
+
int (*xOutput)(void *pOut, const void *pData, int nData),
|
|
12689
|
+
void *pOut
|
|
12690
|
+
);
|
|
12390
12691
|
SQLITE_API int sqlite3changeset_invert_strm(
|
|
12391
|
-
|
|
12392
|
-
|
|
12393
|
-
|
|
12394
|
-
|
|
12395
|
-
|
|
12396
|
-
|
|
12692
|
+
int (*xInput)(void *pIn, void *pData, int *pnData),
|
|
12693
|
+
void *pIn,
|
|
12694
|
+
int (*xOutput)(void *pOut, const void *pData, int nData),
|
|
12695
|
+
void *pOut
|
|
12696
|
+
);
|
|
12697
|
+
SQLITE_API int sqlite3changeset_start_strm(
|
|
12698
|
+
sqlite3_changeset_iter **pp,
|
|
12699
|
+
int (*xInput)(void *pIn, void *pData, int *pnData),
|
|
12700
|
+
void *pIn
|
|
12701
|
+
);
|
|
12397
12702
|
SQLITE_API int sqlite3changeset_start_v2_strm(
|
|
12398
|
-
|
|
12399
|
-
|
|
12703
|
+
sqlite3_changeset_iter **pp,
|
|
12704
|
+
int (*xInput)(void *pIn, void *pData, int *pnData),
|
|
12705
|
+
void *pIn,
|
|
12706
|
+
int flags
|
|
12707
|
+
);
|
|
12400
12708
|
SQLITE_API int sqlite3session_changeset_strm(
|
|
12401
|
-
|
|
12402
|
-
|
|
12709
|
+
sqlite3_session *pSession,
|
|
12710
|
+
int (*xOutput)(void *pOut, const void *pData, int nData),
|
|
12711
|
+
void *pOut
|
|
12712
|
+
);
|
|
12403
12713
|
SQLITE_API int sqlite3session_patchset_strm(
|
|
12404
|
-
|
|
12405
|
-
|
|
12406
|
-
|
|
12407
|
-
|
|
12408
|
-
|
|
12409
|
-
|
|
12410
|
-
|
|
12411
|
-
|
|
12412
|
-
|
|
12714
|
+
sqlite3_session *pSession,
|
|
12715
|
+
int (*xOutput)(void *pOut, const void *pData, int nData),
|
|
12716
|
+
void *pOut
|
|
12717
|
+
);
|
|
12718
|
+
SQLITE_API int sqlite3changegroup_add_strm(sqlite3_changegroup*,
|
|
12719
|
+
int (*xInput)(void *pIn, void *pData, int *pnData),
|
|
12720
|
+
void *pIn
|
|
12721
|
+
);
|
|
12722
|
+
SQLITE_API int sqlite3changegroup_output_strm(sqlite3_changegroup*,
|
|
12723
|
+
int (*xOutput)(void *pOut, const void *pData, int nData),
|
|
12724
|
+
void *pOut
|
|
12725
|
+
);
|
|
12413
12726
|
SQLITE_API int sqlite3rebaser_rebase_strm(
|
|
12414
|
-
|
|
12415
|
-
|
|
12416
|
-
|
|
12727
|
+
sqlite3_rebaser *pRebaser,
|
|
12728
|
+
int (*xInput)(void *pIn, void *pData, int *pnData),
|
|
12729
|
+
void *pIn,
|
|
12730
|
+
int (*xOutput)(void *pOut, const void *pData, int nData),
|
|
12731
|
+
void *pOut
|
|
12732
|
+
);
|
|
12417
12733
|
|
|
12418
12734
|
/*
|
|
12419
12735
|
** CAPI3REF: Configure global parameters
|
|
@@ -12462,7 +12778,7 @@ SQLITE_API int sqlite3session_config(int op, void *pArg);
|
|
|
12462
12778
|
}
|
|
12463
12779
|
#endif
|
|
12464
12780
|
|
|
12465
|
-
#endif
|
|
12781
|
+
#endif /* !defined(__SQLITESESSION_H_) && defined(SQLITE_ENABLE_SESSION) */
|
|
12466
12782
|
|
|
12467
12783
|
/******** End of sqlite3session.h *********/
|
|
12468
12784
|
/******** Begin file fts5.h *********/
|
|
@@ -12485,9 +12801,11 @@ SQLITE_API int sqlite3session_config(int op, void *pArg);
|
|
|
12485
12801
|
** * custom auxiliary functions.
|
|
12486
12802
|
*/
|
|
12487
12803
|
|
|
12804
|
+
|
|
12488
12805
|
#ifndef _FTS5_H
|
|
12489
12806
|
#define _FTS5_H
|
|
12490
12807
|
|
|
12808
|
+
|
|
12491
12809
|
#ifdef __cplusplus
|
|
12492
12810
|
extern "C" {
|
|
12493
12811
|
#endif
|
|
@@ -12504,11 +12822,11 @@ typedef struct Fts5Context Fts5Context;
|
|
|
12504
12822
|
typedef struct Fts5PhraseIter Fts5PhraseIter;
|
|
12505
12823
|
|
|
12506
12824
|
typedef void (*fts5_extension_function)(
|
|
12507
|
-
|
|
12508
|
-
|
|
12509
|
-
|
|
12510
|
-
|
|
12511
|
-
|
|
12825
|
+
const Fts5ExtensionApi *pApi, /* API offered by current FTS version */
|
|
12826
|
+
Fts5Context *pFts, /* First arg to pass to pApi functions */
|
|
12827
|
+
sqlite3_context *pCtx, /* Context for returning result/error */
|
|
12828
|
+
int nVal, /* Number of values in apVal[] array */
|
|
12829
|
+
sqlite3_value **apVal /* Array of trailing arguments */
|
|
12512
12830
|
);
|
|
12513
12831
|
|
|
12514
12832
|
struct Fts5PhraseIter {
|
|
@@ -12728,43 +13046,41 @@ struct Fts5PhraseIter {
|
|
|
12728
13046
|
** See xPhraseFirstColumn above.
|
|
12729
13047
|
*/
|
|
12730
13048
|
struct Fts5ExtensionApi {
|
|
12731
|
-
int iVersion;
|
|
13049
|
+
int iVersion; /* Currently always set to 2 */
|
|
12732
13050
|
|
|
12733
|
-
void *(*xUserData)(Fts5Context
|
|
13051
|
+
void *(*xUserData)(Fts5Context*);
|
|
12734
13052
|
|
|
12735
|
-
int (*xColumnCount)(Fts5Context
|
|
12736
|
-
int (*xRowCount)(Fts5Context
|
|
12737
|
-
int (*xColumnTotalSize)(Fts5Context
|
|
13053
|
+
int (*xColumnCount)(Fts5Context*);
|
|
13054
|
+
int (*xRowCount)(Fts5Context*, sqlite3_int64 *pnRow);
|
|
13055
|
+
int (*xColumnTotalSize)(Fts5Context*, int iCol, sqlite3_int64 *pnToken);
|
|
12738
13056
|
|
|
12739
|
-
int (*xTokenize)(Fts5Context
|
|
12740
|
-
|
|
12741
|
-
|
|
12742
|
-
|
|
12743
|
-
int) /* Callback */
|
|
13057
|
+
int (*xTokenize)(Fts5Context*,
|
|
13058
|
+
const char *pText, int nText, /* Text to tokenize */
|
|
13059
|
+
void *pCtx, /* Context passed to xToken() */
|
|
13060
|
+
int (*xToken)(void*, int, const char*, int, int, int) /* Callback */
|
|
12744
13061
|
);
|
|
12745
13062
|
|
|
12746
|
-
int (*xPhraseCount)(Fts5Context
|
|
12747
|
-
int (*xPhraseSize)(Fts5Context
|
|
13063
|
+
int (*xPhraseCount)(Fts5Context*);
|
|
13064
|
+
int (*xPhraseSize)(Fts5Context*, int iPhrase);
|
|
12748
13065
|
|
|
12749
|
-
int (*xInstCount)(Fts5Context
|
|
12750
|
-
int (*xInst)(Fts5Context
|
|
13066
|
+
int (*xInstCount)(Fts5Context*, int *pnInst);
|
|
13067
|
+
int (*xInst)(Fts5Context*, int iIdx, int *piPhrase, int *piCol, int *piOff);
|
|
12751
13068
|
|
|
12752
|
-
sqlite3_int64 (*xRowid)(Fts5Context
|
|
12753
|
-
int (*xColumnText)(Fts5Context
|
|
12754
|
-
int (*xColumnSize)(Fts5Context
|
|
13069
|
+
sqlite3_int64 (*xRowid)(Fts5Context*);
|
|
13070
|
+
int (*xColumnText)(Fts5Context*, int iCol, const char **pz, int *pn);
|
|
13071
|
+
int (*xColumnSize)(Fts5Context*, int iCol, int *pnToken);
|
|
12755
13072
|
|
|
12756
|
-
int (*xQueryPhrase)(Fts5Context
|
|
12757
|
-
|
|
12758
|
-
|
|
12759
|
-
|
|
13073
|
+
int (*xQueryPhrase)(Fts5Context*, int iPhrase, void *pUserData,
|
|
13074
|
+
int(*)(const Fts5ExtensionApi*,Fts5Context*,void*)
|
|
13075
|
+
);
|
|
13076
|
+
int (*xSetAuxdata)(Fts5Context*, void *pAux, void(*xDelete)(void*));
|
|
13077
|
+
void *(*xGetAuxdata)(Fts5Context*, int bClear);
|
|
12760
13078
|
|
|
12761
|
-
int (*xPhraseFirst)(Fts5Context
|
|
12762
|
-
|
|
12763
|
-
void (*xPhraseNext)(Fts5Context *, Fts5PhraseIter *, int *piCol, int *piOff);
|
|
13079
|
+
int (*xPhraseFirst)(Fts5Context*, int iPhrase, Fts5PhraseIter*, int*, int*);
|
|
13080
|
+
void (*xPhraseNext)(Fts5Context*, Fts5PhraseIter*, int *piCol, int *piOff);
|
|
12764
13081
|
|
|
12765
|
-
int (*xPhraseFirstColumn)(Fts5Context
|
|
12766
|
-
|
|
12767
|
-
void (*xPhraseNextColumn)(Fts5Context *, Fts5PhraseIter *, int *piCol);
|
|
13082
|
+
int (*xPhraseFirstColumn)(Fts5Context*, int iPhrase, Fts5PhraseIter*, int*);
|
|
13083
|
+
void (*xPhraseNextColumn)(Fts5Context*, Fts5PhraseIter*, int *piCol);
|
|
12768
13084
|
};
|
|
12769
13085
|
|
|
12770
13086
|
/*
|
|
@@ -12959,37 +13275,39 @@ struct Fts5ExtensionApi {
|
|
|
12959
13275
|
** as separate queries of the FTS index are required for each synonym.
|
|
12960
13276
|
**
|
|
12961
13277
|
** When using methods (2) or (3), it is important that the tokenizer only
|
|
12962
|
-
** provide synonyms when tokenizing document text (method (
|
|
12963
|
-
** text (method (
|
|
13278
|
+
** provide synonyms when tokenizing document text (method (3)) or query
|
|
13279
|
+
** text (method (2)), not both. Doing so will not cause any errors, but is
|
|
12964
13280
|
** inefficient.
|
|
12965
13281
|
*/
|
|
12966
13282
|
typedef struct Fts5Tokenizer Fts5Tokenizer;
|
|
12967
13283
|
typedef struct fts5_tokenizer fts5_tokenizer;
|
|
12968
13284
|
struct fts5_tokenizer {
|
|
12969
|
-
int (*xCreate)(void
|
|
12970
|
-
void (*xDelete)(Fts5Tokenizer
|
|
12971
|
-
int (*xTokenize)(
|
|
12972
|
-
|
|
12973
|
-
int flags,
|
|
13285
|
+
int (*xCreate)(void*, const char **azArg, int nArg, Fts5Tokenizer **ppOut);
|
|
13286
|
+
void (*xDelete)(Fts5Tokenizer*);
|
|
13287
|
+
int (*xTokenize)(Fts5Tokenizer*,
|
|
13288
|
+
void *pCtx,
|
|
13289
|
+
int flags, /* Mask of FTS5_TOKENIZE_* flags */
|
|
12974
13290
|
const char *pText, int nText,
|
|
12975
|
-
int (*xToken)(
|
|
12976
|
-
|
|
12977
|
-
|
|
12978
|
-
|
|
12979
|
-
|
|
12980
|
-
|
|
12981
|
-
|
|
13291
|
+
int (*xToken)(
|
|
13292
|
+
void *pCtx, /* Copy of 2nd argument to xTokenize() */
|
|
13293
|
+
int tflags, /* Mask of FTS5_TOKEN_* flags */
|
|
13294
|
+
const char *pToken, /* Pointer to buffer containing token */
|
|
13295
|
+
int nToken, /* Size of token in bytes */
|
|
13296
|
+
int iStart, /* Byte offset of token within input text */
|
|
13297
|
+
int iEnd /* Byte offset of end of token within input text */
|
|
13298
|
+
)
|
|
13299
|
+
);
|
|
12982
13300
|
};
|
|
12983
13301
|
|
|
12984
13302
|
/* Flags that may be passed as the third argument to xTokenize() */
|
|
12985
|
-
#define FTS5_TOKENIZE_QUERY
|
|
12986
|
-
#define FTS5_TOKENIZE_PREFIX
|
|
12987
|
-
#define FTS5_TOKENIZE_DOCUMENT
|
|
12988
|
-
#define FTS5_TOKENIZE_AUX
|
|
13303
|
+
#define FTS5_TOKENIZE_QUERY 0x0001
|
|
13304
|
+
#define FTS5_TOKENIZE_PREFIX 0x0002
|
|
13305
|
+
#define FTS5_TOKENIZE_DOCUMENT 0x0004
|
|
13306
|
+
#define FTS5_TOKENIZE_AUX 0x0008
|
|
12989
13307
|
|
|
12990
13308
|
/* Flags that may be passed by the tokenizer implementation back to FTS5
|
|
12991
13309
|
** as the third argument to the supplied xToken callback. */
|
|
12992
|
-
#define FTS5_TOKEN_COLOCATED
|
|
13310
|
+
#define FTS5_TOKEN_COLOCATED 0x0001 /* Same position as prev. token */
|
|
12993
13311
|
|
|
12994
13312
|
/*
|
|
12995
13313
|
** END OF CUSTOM TOKENIZERS
|
|
@@ -13000,20 +13318,33 @@ struct fts5_tokenizer {
|
|
|
13000
13318
|
*/
|
|
13001
13319
|
typedef struct fts5_api fts5_api;
|
|
13002
13320
|
struct fts5_api {
|
|
13003
|
-
int iVersion;
|
|
13321
|
+
int iVersion; /* Currently always set to 2 */
|
|
13004
13322
|
|
|
13005
13323
|
/* Create a new tokenizer */
|
|
13006
|
-
int (*xCreateTokenizer)(
|
|
13007
|
-
|
|
13324
|
+
int (*xCreateTokenizer)(
|
|
13325
|
+
fts5_api *pApi,
|
|
13326
|
+
const char *zName,
|
|
13327
|
+
void *pUserData,
|
|
13328
|
+
fts5_tokenizer *pTokenizer,
|
|
13329
|
+
void (*xDestroy)(void*)
|
|
13330
|
+
);
|
|
13008
13331
|
|
|
13009
13332
|
/* Find an existing tokenizer */
|
|
13010
|
-
int (*xFindTokenizer)(
|
|
13011
|
-
|
|
13333
|
+
int (*xFindTokenizer)(
|
|
13334
|
+
fts5_api *pApi,
|
|
13335
|
+
const char *zName,
|
|
13336
|
+
void **ppUserData,
|
|
13337
|
+
fts5_tokenizer *pTokenizer
|
|
13338
|
+
);
|
|
13012
13339
|
|
|
13013
13340
|
/* Create a new auxiliary function */
|
|
13014
|
-
int (*xCreateFunction)(
|
|
13015
|
-
|
|
13016
|
-
|
|
13341
|
+
int (*xCreateFunction)(
|
|
13342
|
+
fts5_api *pApi,
|
|
13343
|
+
const char *zName,
|
|
13344
|
+
void *pUserData,
|
|
13345
|
+
fts5_extension_function xFunction,
|
|
13346
|
+
void (*xDestroy)(void*)
|
|
13347
|
+
);
|
|
13017
13348
|
};
|
|
13018
13349
|
|
|
13019
13350
|
/*
|
|
@@ -13021,7 +13352,7 @@ struct fts5_api {
|
|
|
13021
13352
|
*************************************************************************/
|
|
13022
13353
|
|
|
13023
13354
|
#ifdef __cplusplus
|
|
13024
|
-
}
|
|
13355
|
+
} /* end of the 'extern "C"' block */
|
|
13025
13356
|
#endif
|
|
13026
13357
|
|
|
13027
13358
|
#endif /* _FTS5_H */
|