@op-engineering/op-sqlite 2.0.1 → 2.0.3
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/README.md +57 -17
- package/android/CMakeLists.txt +4 -2
- package/cpp/DumbHostObject.cpp +32 -27
- package/cpp/DumbHostObject.h +16 -16
- package/cpp/PreparedStatementHostObject.cpp +88 -0
- package/cpp/PreparedStatementHostObject.h +36 -0
- package/cpp/SmartHostObject.cpp +33 -0
- package/cpp/SmartHostObject.h +26 -0
- package/cpp/ThreadPool.cpp +103 -116
- package/cpp/ThreadPool.h +27 -27
- package/cpp/bindings.cpp +525 -530
- package/cpp/bindings.h +6 -5
- package/cpp/bridge.cpp +713 -651
- package/cpp/bridge.h +41 -19
- package/cpp/logs.h +17 -17
- package/cpp/macros.h +1 -1
- package/cpp/sqlbatchexecutor.cpp +75 -77
- package/cpp/sqlbatchexecutor.h +9 -8
- package/cpp/sqlite3.h +1295 -1389
- package/cpp/types.h +5 -4
- package/cpp/utils.cpp +159 -191
- package/cpp/utils.h +28 -35
- package/lib/commonjs/index.js +2 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/index.js +2 -1
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/index.d.ts +6 -0
- package/op-sqlite.podspec +1 -1
- package/package.json +2 -1
- package/src/index.ts +8 -0
- package/cpp/DynamicHostObject.cpp +0 -32
- package/cpp/DynamicHostObject.h +0 -26
package/cpp/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,7 +41,6 @@
|
|
|
41
41
|
extern "C" {
|
|
42
42
|
#endif
|
|
43
43
|
|
|
44
|
-
|
|
45
44
|
/*
|
|
46
45
|
** Facilitate override of interface linkage and calling conventions.
|
|
47
46
|
** Be aware that these macros may not be used within this particular
|
|
@@ -69,25 +68,25 @@ extern "C" {
|
|
|
69
68
|
** that require non-default calling conventions.
|
|
70
69
|
*/
|
|
71
70
|
#ifndef SQLITE_EXTERN
|
|
72
|
-
#
|
|
71
|
+
#define SQLITE_EXTERN extern
|
|
73
72
|
#endif
|
|
74
73
|
#ifndef SQLITE_API
|
|
75
|
-
#
|
|
74
|
+
#define SQLITE_API
|
|
76
75
|
#endif
|
|
77
76
|
#ifndef SQLITE_CDECL
|
|
78
|
-
#
|
|
77
|
+
#define SQLITE_CDECL
|
|
79
78
|
#endif
|
|
80
79
|
#ifndef SQLITE_APICALL
|
|
81
|
-
#
|
|
80
|
+
#define SQLITE_APICALL
|
|
82
81
|
#endif
|
|
83
82
|
#ifndef SQLITE_STDCALL
|
|
84
|
-
#
|
|
83
|
+
#define SQLITE_STDCALL SQLITE_APICALL
|
|
85
84
|
#endif
|
|
86
85
|
#ifndef SQLITE_CALLBACK
|
|
87
|
-
#
|
|
86
|
+
#define SQLITE_CALLBACK
|
|
88
87
|
#endif
|
|
89
88
|
#ifndef SQLITE_SYSAPI
|
|
90
|
-
#
|
|
89
|
+
#define SQLITE_SYSAPI
|
|
91
90
|
#endif
|
|
92
91
|
|
|
93
92
|
/*
|
|
@@ -110,10 +109,10 @@ extern "C" {
|
|
|
110
109
|
** Ensure these symbols were not defined by some previous header file.
|
|
111
110
|
*/
|
|
112
111
|
#ifdef SQLITE_VERSION
|
|
113
|
-
#
|
|
112
|
+
#undef SQLITE_VERSION
|
|
114
113
|
#endif
|
|
115
114
|
#ifdef SQLITE_VERSION_NUMBER
|
|
116
|
-
#
|
|
115
|
+
#undef SQLITE_VERSION_NUMBER
|
|
117
116
|
#endif
|
|
118
117
|
|
|
119
118
|
/*
|
|
@@ -146,9 +145,11 @@ extern "C" {
|
|
|
146
145
|
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
|
|
147
146
|
** [sqlite_version()] and [sqlite_source_id()].
|
|
148
147
|
*/
|
|
149
|
-
#define SQLITE_VERSION
|
|
148
|
+
#define SQLITE_VERSION "3.44.0"
|
|
150
149
|
#define SQLITE_VERSION_NUMBER 3044000
|
|
151
|
-
#define SQLITE_SOURCE_ID
|
|
150
|
+
#define SQLITE_SOURCE_ID \
|
|
151
|
+
"2023-11-01 11:23:50 " \
|
|
152
|
+
"17129ba1ff7f0daf37100ee82d507aef7827cf38de1866e2633096ae6ad81301"
|
|
152
153
|
|
|
153
154
|
/*
|
|
154
155
|
** CAPI3REF: Run-Time Library Version Numbers
|
|
@@ -213,8 +214,8 @@ SQLITE_API int sqlite3_libversion_number(void);
|
|
|
213
214
|
SQLITE_API int sqlite3_compileoption_used(const char *zOptName);
|
|
214
215
|
SQLITE_API const char *sqlite3_compileoption_get(int N);
|
|
215
216
|
#else
|
|
216
|
-
#
|
|
217
|
-
#
|
|
217
|
+
#define sqlite3_compileoption_used(X) 0
|
|
218
|
+
#define sqlite3_compileoption_get(X) ((void *)0)
|
|
218
219
|
#endif
|
|
219
220
|
|
|
220
221
|
/*
|
|
@@ -288,18 +289,18 @@ typedef struct sqlite3 sqlite3;
|
|
|
288
289
|
** between 0 and +18446744073709551615 inclusive.
|
|
289
290
|
*/
|
|
290
291
|
#ifdef SQLITE_INT64_TYPE
|
|
291
|
-
|
|
292
|
-
#
|
|
293
|
-
|
|
294
|
-
#
|
|
295
|
-
|
|
296
|
-
#
|
|
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
|
|
297
298
|
#elif defined(_MSC_VER) || defined(__BORLANDC__)
|
|
298
|
-
|
|
299
|
-
|
|
299
|
+
typedef __int64 sqlite_int64;
|
|
300
|
+
typedef unsigned __int64 sqlite_uint64;
|
|
300
301
|
#else
|
|
301
|
-
|
|
302
|
-
|
|
302
|
+
typedef long long int sqlite_int64;
|
|
303
|
+
typedef unsigned long long int sqlite_uint64;
|
|
303
304
|
#endif
|
|
304
305
|
typedef sqlite_int64 sqlite3_int64;
|
|
305
306
|
typedef sqlite_uint64 sqlite3_uint64;
|
|
@@ -309,7 +310,7 @@ typedef sqlite_uint64 sqlite3_uint64;
|
|
|
309
310
|
** substitute integer for floating-point.
|
|
310
311
|
*/
|
|
311
312
|
#ifdef SQLITE_OMIT_FLOATING_POINT
|
|
312
|
-
#
|
|
313
|
+
#define double sqlite3_int64
|
|
313
314
|
#endif
|
|
314
315
|
|
|
315
316
|
/*
|
|
@@ -350,15 +351,15 @@ typedef sqlite_uint64 sqlite3_uint64;
|
|
|
350
351
|
** ^Calling sqlite3_close() or sqlite3_close_v2() with a NULL pointer
|
|
351
352
|
** argument is a harmless no-op.
|
|
352
353
|
*/
|
|
353
|
-
SQLITE_API int sqlite3_close(sqlite3*);
|
|
354
|
-
SQLITE_API int sqlite3_close_v2(sqlite3*);
|
|
354
|
+
SQLITE_API int sqlite3_close(sqlite3 *);
|
|
355
|
+
SQLITE_API int sqlite3_close_v2(sqlite3 *);
|
|
355
356
|
|
|
356
357
|
/*
|
|
357
358
|
** The type for a callback function.
|
|
358
359
|
** This is legacy and deprecated. It is included for historical
|
|
359
360
|
** compatibility and is not documented.
|
|
360
361
|
*/
|
|
361
|
-
typedef int (*sqlite3_callback)(void*,int,char**, char**);
|
|
362
|
+
typedef int (*sqlite3_callback)(void *, int, char **, char **);
|
|
362
363
|
|
|
363
364
|
/*
|
|
364
365
|
** CAPI3REF: One-Step Query Execution Interface
|
|
@@ -422,12 +423,12 @@ typedef int (*sqlite3_callback)(void*,int,char**, char**);
|
|
|
422
423
|
** the 2nd parameter of sqlite3_exec() while sqlite3_exec() is running.
|
|
423
424
|
** </ul>
|
|
424
425
|
*/
|
|
425
|
-
SQLITE_API int sqlite3_exec(
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
426
|
+
SQLITE_API int sqlite3_exec(sqlite3 *, /* An open database */
|
|
427
|
+
const char *sql, /* SQL to be evaluated */
|
|
428
|
+
int (*callback)(void *, int, char **,
|
|
429
|
+
char **), /* Callback function */
|
|
430
|
+
void *, /* 1st argument to callback */
|
|
431
|
+
char **errmsg /* Error msg written here */
|
|
431
432
|
);
|
|
432
433
|
|
|
433
434
|
/*
|
|
@@ -441,38 +442,38 @@ SQLITE_API int sqlite3_exec(
|
|
|
441
442
|
**
|
|
442
443
|
** See also: [extended result code definitions]
|
|
443
444
|
*/
|
|
444
|
-
#define SQLITE_OK
|
|
445
|
+
#define SQLITE_OK 0 /* Successful result */
|
|
445
446
|
/* beginning-of-error-codes */
|
|
446
|
-
#define SQLITE_ERROR
|
|
447
|
-
#define SQLITE_INTERNAL
|
|
448
|
-
#define SQLITE_PERM
|
|
449
|
-
#define SQLITE_ABORT
|
|
450
|
-
#define SQLITE_BUSY
|
|
451
|
-
#define SQLITE_LOCKED
|
|
452
|
-
#define SQLITE_NOMEM
|
|
453
|
-
#define SQLITE_READONLY
|
|
454
|
-
#define SQLITE_INTERRUPT
|
|
455
|
-
#define SQLITE_IOERR
|
|
456
|
-
#define SQLITE_CORRUPT
|
|
457
|
-
#define SQLITE_NOTFOUND
|
|
458
|
-
#define SQLITE_FULL
|
|
459
|
-
#define SQLITE_CANTOPEN
|
|
460
|
-
#define SQLITE_PROTOCOL
|
|
461
|
-
#define SQLITE_EMPTY
|
|
462
|
-
#define SQLITE_SCHEMA
|
|
463
|
-
#define SQLITE_TOOBIG
|
|
464
|
-
#define SQLITE_CONSTRAINT
|
|
465
|
-
#define SQLITE_MISMATCH
|
|
466
|
-
#define SQLITE_MISUSE
|
|
467
|
-
#define SQLITE_NOLFS
|
|
468
|
-
#define SQLITE_AUTH
|
|
469
|
-
#define SQLITE_FORMAT
|
|
470
|
-
#define SQLITE_RANGE
|
|
471
|
-
#define SQLITE_NOTADB
|
|
472
|
-
#define SQLITE_NOTICE
|
|
473
|
-
#define SQLITE_WARNING
|
|
474
|
-
#define SQLITE_ROW
|
|
475
|
-
#define SQLITE_DONE
|
|
447
|
+
#define SQLITE_ERROR 1 /* Generic error */
|
|
448
|
+
#define SQLITE_INTERNAL 2 /* Internal logic error in SQLite */
|
|
449
|
+
#define SQLITE_PERM 3 /* Access permission denied */
|
|
450
|
+
#define SQLITE_ABORT 4 /* Callback routine requested an abort */
|
|
451
|
+
#define SQLITE_BUSY 5 /* The database file is locked */
|
|
452
|
+
#define SQLITE_LOCKED 6 /* A table in the database is locked */
|
|
453
|
+
#define SQLITE_NOMEM 7 /* A malloc() failed */
|
|
454
|
+
#define SQLITE_READONLY 8 /* Attempt to write a readonly database */
|
|
455
|
+
#define SQLITE_INTERRUPT 9 /* Operation terminated by sqlite3_interrupt()*/
|
|
456
|
+
#define SQLITE_IOERR 10 /* Some kind of disk I/O error occurred */
|
|
457
|
+
#define SQLITE_CORRUPT 11 /* The database disk image is malformed */
|
|
458
|
+
#define SQLITE_NOTFOUND 12 /* Unknown opcode in sqlite3_file_control() */
|
|
459
|
+
#define SQLITE_FULL 13 /* Insertion failed because database is full */
|
|
460
|
+
#define SQLITE_CANTOPEN 14 /* Unable to open the database file */
|
|
461
|
+
#define SQLITE_PROTOCOL 15 /* Database lock protocol error */
|
|
462
|
+
#define SQLITE_EMPTY 16 /* Internal use only */
|
|
463
|
+
#define SQLITE_SCHEMA 17 /* The database schema changed */
|
|
464
|
+
#define SQLITE_TOOBIG 18 /* String or BLOB exceeds size limit */
|
|
465
|
+
#define SQLITE_CONSTRAINT 19 /* Abort due to constraint violation */
|
|
466
|
+
#define SQLITE_MISMATCH 20 /* Data type mismatch */
|
|
467
|
+
#define SQLITE_MISUSE 21 /* Library used incorrectly */
|
|
468
|
+
#define SQLITE_NOLFS 22 /* Uses OS features not supported on host */
|
|
469
|
+
#define SQLITE_AUTH 23 /* Authorization denied */
|
|
470
|
+
#define SQLITE_FORMAT 24 /* Not used */
|
|
471
|
+
#define SQLITE_RANGE 25 /* 2nd parameter to sqlite3_bind out of range */
|
|
472
|
+
#define SQLITE_NOTADB 26 /* File opened that is not a database file */
|
|
473
|
+
#define SQLITE_NOTICE 27 /* Notifications from sqlite3_log() */
|
|
474
|
+
#define SQLITE_WARNING 28 /* Warnings from sqlite3_log() */
|
|
475
|
+
#define SQLITE_ROW 100 /* sqlite3_step() has another row ready */
|
|
476
|
+
#define SQLITE_DONE 101 /* sqlite3_step() has finished executing */
|
|
476
477
|
/* end-of-error-codes */
|
|
477
478
|
|
|
478
479
|
/*
|
|
@@ -492,83 +493,83 @@ SQLITE_API int sqlite3_exec(
|
|
|
492
493
|
** the most recent error can be obtained using
|
|
493
494
|
** [sqlite3_extended_errcode()].
|
|
494
495
|
*/
|
|
495
|
-
#define SQLITE_ERROR_MISSING_COLLSEQ
|
|
496
|
-
#define SQLITE_ERROR_RETRY
|
|
497
|
-
#define SQLITE_ERROR_SNAPSHOT
|
|
498
|
-
#define SQLITE_IOERR_READ
|
|
499
|
-
#define SQLITE_IOERR_SHORT_READ
|
|
500
|
-
#define SQLITE_IOERR_WRITE
|
|
501
|
-
#define SQLITE_IOERR_FSYNC
|
|
502
|
-
#define SQLITE_IOERR_DIR_FSYNC
|
|
503
|
-
#define SQLITE_IOERR_TRUNCATE
|
|
504
|
-
#define SQLITE_IOERR_FSTAT
|
|
505
|
-
#define SQLITE_IOERR_UNLOCK
|
|
506
|
-
#define SQLITE_IOERR_RDLOCK
|
|
507
|
-
#define SQLITE_IOERR_DELETE
|
|
508
|
-
#define SQLITE_IOERR_BLOCKED
|
|
509
|
-
#define SQLITE_IOERR_NOMEM
|
|
510
|
-
#define SQLITE_IOERR_ACCESS
|
|
511
|
-
#define SQLITE_IOERR_CHECKRESERVEDLOCK (SQLITE_IOERR | (14<<8))
|
|
512
|
-
#define SQLITE_IOERR_LOCK
|
|
513
|
-
#define SQLITE_IOERR_CLOSE
|
|
514
|
-
#define SQLITE_IOERR_DIR_CLOSE
|
|
515
|
-
#define SQLITE_IOERR_SHMOPEN
|
|
516
|
-
#define SQLITE_IOERR_SHMSIZE
|
|
517
|
-
#define SQLITE_IOERR_SHMLOCK
|
|
518
|
-
#define SQLITE_IOERR_SHMMAP
|
|
519
|
-
#define SQLITE_IOERR_SEEK
|
|
520
|
-
#define SQLITE_IOERR_DELETE_NOENT
|
|
521
|
-
#define SQLITE_IOERR_MMAP
|
|
522
|
-
#define SQLITE_IOERR_GETTEMPPATH
|
|
523
|
-
#define SQLITE_IOERR_CONVPATH
|
|
524
|
-
#define SQLITE_IOERR_VNODE
|
|
525
|
-
#define SQLITE_IOERR_AUTH
|
|
526
|
-
#define SQLITE_IOERR_BEGIN_ATOMIC
|
|
527
|
-
#define SQLITE_IOERR_COMMIT_ATOMIC
|
|
528
|
-
#define SQLITE_IOERR_ROLLBACK_ATOMIC
|
|
529
|
-
#define SQLITE_IOERR_DATA
|
|
530
|
-
#define SQLITE_IOERR_CORRUPTFS
|
|
531
|
-
#define SQLITE_IOERR_IN_PAGE
|
|
532
|
-
#define SQLITE_LOCKED_SHAREDCACHE
|
|
533
|
-
#define SQLITE_LOCKED_VTAB
|
|
534
|
-
#define SQLITE_BUSY_RECOVERY
|
|
535
|
-
#define SQLITE_BUSY_SNAPSHOT
|
|
536
|
-
#define SQLITE_BUSY_TIMEOUT
|
|
537
|
-
#define SQLITE_CANTOPEN_NOTEMPDIR
|
|
538
|
-
#define SQLITE_CANTOPEN_ISDIR
|
|
539
|
-
#define SQLITE_CANTOPEN_FULLPATH
|
|
540
|
-
#define SQLITE_CANTOPEN_CONVPATH
|
|
541
|
-
#define SQLITE_CANTOPEN_DIRTYWAL
|
|
542
|
-
#define SQLITE_CANTOPEN_SYMLINK
|
|
543
|
-
#define SQLITE_CORRUPT_VTAB
|
|
544
|
-
#define SQLITE_CORRUPT_SEQUENCE
|
|
545
|
-
#define SQLITE_CORRUPT_INDEX
|
|
546
|
-
#define SQLITE_READONLY_RECOVERY
|
|
547
|
-
#define SQLITE_READONLY_CANTLOCK
|
|
548
|
-
#define SQLITE_READONLY_ROLLBACK
|
|
549
|
-
#define SQLITE_READONLY_DBMOVED
|
|
550
|
-
#define SQLITE_READONLY_CANTINIT
|
|
551
|
-
#define SQLITE_READONLY_DIRECTORY
|
|
552
|
-
#define SQLITE_ABORT_ROLLBACK
|
|
553
|
-
#define SQLITE_CONSTRAINT_CHECK
|
|
554
|
-
#define SQLITE_CONSTRAINT_COMMITHOOK
|
|
555
|
-
#define SQLITE_CONSTRAINT_FOREIGNKEY
|
|
556
|
-
#define SQLITE_CONSTRAINT_FUNCTION
|
|
557
|
-
#define SQLITE_CONSTRAINT_NOTNULL
|
|
558
|
-
#define SQLITE_CONSTRAINT_PRIMARYKEY
|
|
559
|
-
#define SQLITE_CONSTRAINT_TRIGGER
|
|
560
|
-
#define SQLITE_CONSTRAINT_UNIQUE
|
|
561
|
-
#define SQLITE_CONSTRAINT_VTAB
|
|
562
|
-
#define SQLITE_CONSTRAINT_ROWID
|
|
563
|
-
#define SQLITE_CONSTRAINT_PINNED
|
|
564
|
-
#define SQLITE_CONSTRAINT_DATATYPE
|
|
565
|
-
#define SQLITE_NOTICE_RECOVER_WAL
|
|
566
|
-
#define SQLITE_NOTICE_RECOVER_ROLLBACK (SQLITE_NOTICE | (2<<8))
|
|
567
|
-
#define SQLITE_NOTICE_RBU
|
|
568
|
-
#define SQLITE_WARNING_AUTOINDEX
|
|
569
|
-
#define SQLITE_AUTH_USER
|
|
570
|
-
#define SQLITE_OK_LOAD_PERMANENTLY
|
|
571
|
-
#define SQLITE_OK_SYMLINK
|
|
496
|
+
#define SQLITE_ERROR_MISSING_COLLSEQ (SQLITE_ERROR | (1 << 8))
|
|
497
|
+
#define SQLITE_ERROR_RETRY (SQLITE_ERROR | (2 << 8))
|
|
498
|
+
#define SQLITE_ERROR_SNAPSHOT (SQLITE_ERROR | (3 << 8))
|
|
499
|
+
#define SQLITE_IOERR_READ (SQLITE_IOERR | (1 << 8))
|
|
500
|
+
#define SQLITE_IOERR_SHORT_READ (SQLITE_IOERR | (2 << 8))
|
|
501
|
+
#define SQLITE_IOERR_WRITE (SQLITE_IOERR | (3 << 8))
|
|
502
|
+
#define SQLITE_IOERR_FSYNC (SQLITE_IOERR | (4 << 8))
|
|
503
|
+
#define SQLITE_IOERR_DIR_FSYNC (SQLITE_IOERR | (5 << 8))
|
|
504
|
+
#define SQLITE_IOERR_TRUNCATE (SQLITE_IOERR | (6 << 8))
|
|
505
|
+
#define SQLITE_IOERR_FSTAT (SQLITE_IOERR | (7 << 8))
|
|
506
|
+
#define SQLITE_IOERR_UNLOCK (SQLITE_IOERR | (8 << 8))
|
|
507
|
+
#define SQLITE_IOERR_RDLOCK (SQLITE_IOERR | (9 << 8))
|
|
508
|
+
#define SQLITE_IOERR_DELETE (SQLITE_IOERR | (10 << 8))
|
|
509
|
+
#define SQLITE_IOERR_BLOCKED (SQLITE_IOERR | (11 << 8))
|
|
510
|
+
#define SQLITE_IOERR_NOMEM (SQLITE_IOERR | (12 << 8))
|
|
511
|
+
#define SQLITE_IOERR_ACCESS (SQLITE_IOERR | (13 << 8))
|
|
512
|
+
#define SQLITE_IOERR_CHECKRESERVEDLOCK (SQLITE_IOERR | (14 << 8))
|
|
513
|
+
#define SQLITE_IOERR_LOCK (SQLITE_IOERR | (15 << 8))
|
|
514
|
+
#define SQLITE_IOERR_CLOSE (SQLITE_IOERR | (16 << 8))
|
|
515
|
+
#define SQLITE_IOERR_DIR_CLOSE (SQLITE_IOERR | (17 << 8))
|
|
516
|
+
#define SQLITE_IOERR_SHMOPEN (SQLITE_IOERR | (18 << 8))
|
|
517
|
+
#define SQLITE_IOERR_SHMSIZE (SQLITE_IOERR | (19 << 8))
|
|
518
|
+
#define SQLITE_IOERR_SHMLOCK (SQLITE_IOERR | (20 << 8))
|
|
519
|
+
#define SQLITE_IOERR_SHMMAP (SQLITE_IOERR | (21 << 8))
|
|
520
|
+
#define SQLITE_IOERR_SEEK (SQLITE_IOERR | (22 << 8))
|
|
521
|
+
#define SQLITE_IOERR_DELETE_NOENT (SQLITE_IOERR | (23 << 8))
|
|
522
|
+
#define SQLITE_IOERR_MMAP (SQLITE_IOERR | (24 << 8))
|
|
523
|
+
#define SQLITE_IOERR_GETTEMPPATH (SQLITE_IOERR | (25 << 8))
|
|
524
|
+
#define SQLITE_IOERR_CONVPATH (SQLITE_IOERR | (26 << 8))
|
|
525
|
+
#define SQLITE_IOERR_VNODE (SQLITE_IOERR | (27 << 8))
|
|
526
|
+
#define SQLITE_IOERR_AUTH (SQLITE_IOERR | (28 << 8))
|
|
527
|
+
#define SQLITE_IOERR_BEGIN_ATOMIC (SQLITE_IOERR | (29 << 8))
|
|
528
|
+
#define SQLITE_IOERR_COMMIT_ATOMIC (SQLITE_IOERR | (30 << 8))
|
|
529
|
+
#define SQLITE_IOERR_ROLLBACK_ATOMIC (SQLITE_IOERR | (31 << 8))
|
|
530
|
+
#define SQLITE_IOERR_DATA (SQLITE_IOERR | (32 << 8))
|
|
531
|
+
#define SQLITE_IOERR_CORRUPTFS (SQLITE_IOERR | (33 << 8))
|
|
532
|
+
#define SQLITE_IOERR_IN_PAGE (SQLITE_IOERR | (34 << 8))
|
|
533
|
+
#define SQLITE_LOCKED_SHAREDCACHE (SQLITE_LOCKED | (1 << 8))
|
|
534
|
+
#define SQLITE_LOCKED_VTAB (SQLITE_LOCKED | (2 << 8))
|
|
535
|
+
#define SQLITE_BUSY_RECOVERY (SQLITE_BUSY | (1 << 8))
|
|
536
|
+
#define SQLITE_BUSY_SNAPSHOT (SQLITE_BUSY | (2 << 8))
|
|
537
|
+
#define SQLITE_BUSY_TIMEOUT (SQLITE_BUSY | (3 << 8))
|
|
538
|
+
#define SQLITE_CANTOPEN_NOTEMPDIR (SQLITE_CANTOPEN | (1 << 8))
|
|
539
|
+
#define SQLITE_CANTOPEN_ISDIR (SQLITE_CANTOPEN | (2 << 8))
|
|
540
|
+
#define SQLITE_CANTOPEN_FULLPATH (SQLITE_CANTOPEN | (3 << 8))
|
|
541
|
+
#define SQLITE_CANTOPEN_CONVPATH (SQLITE_CANTOPEN | (4 << 8))
|
|
542
|
+
#define SQLITE_CANTOPEN_DIRTYWAL (SQLITE_CANTOPEN | (5 << 8)) /* Not Used */
|
|
543
|
+
#define SQLITE_CANTOPEN_SYMLINK (SQLITE_CANTOPEN | (6 << 8))
|
|
544
|
+
#define SQLITE_CORRUPT_VTAB (SQLITE_CORRUPT | (1 << 8))
|
|
545
|
+
#define SQLITE_CORRUPT_SEQUENCE (SQLITE_CORRUPT | (2 << 8))
|
|
546
|
+
#define SQLITE_CORRUPT_INDEX (SQLITE_CORRUPT | (3 << 8))
|
|
547
|
+
#define SQLITE_READONLY_RECOVERY (SQLITE_READONLY | (1 << 8))
|
|
548
|
+
#define SQLITE_READONLY_CANTLOCK (SQLITE_READONLY | (2 << 8))
|
|
549
|
+
#define SQLITE_READONLY_ROLLBACK (SQLITE_READONLY | (3 << 8))
|
|
550
|
+
#define SQLITE_READONLY_DBMOVED (SQLITE_READONLY | (4 << 8))
|
|
551
|
+
#define SQLITE_READONLY_CANTINIT (SQLITE_READONLY | (5 << 8))
|
|
552
|
+
#define SQLITE_READONLY_DIRECTORY (SQLITE_READONLY | (6 << 8))
|
|
553
|
+
#define SQLITE_ABORT_ROLLBACK (SQLITE_ABORT | (2 << 8))
|
|
554
|
+
#define SQLITE_CONSTRAINT_CHECK (SQLITE_CONSTRAINT | (1 << 8))
|
|
555
|
+
#define SQLITE_CONSTRAINT_COMMITHOOK (SQLITE_CONSTRAINT | (2 << 8))
|
|
556
|
+
#define SQLITE_CONSTRAINT_FOREIGNKEY (SQLITE_CONSTRAINT | (3 << 8))
|
|
557
|
+
#define SQLITE_CONSTRAINT_FUNCTION (SQLITE_CONSTRAINT | (4 << 8))
|
|
558
|
+
#define SQLITE_CONSTRAINT_NOTNULL (SQLITE_CONSTRAINT | (5 << 8))
|
|
559
|
+
#define SQLITE_CONSTRAINT_PRIMARYKEY (SQLITE_CONSTRAINT | (6 << 8))
|
|
560
|
+
#define SQLITE_CONSTRAINT_TRIGGER (SQLITE_CONSTRAINT | (7 << 8))
|
|
561
|
+
#define SQLITE_CONSTRAINT_UNIQUE (SQLITE_CONSTRAINT | (8 << 8))
|
|
562
|
+
#define SQLITE_CONSTRAINT_VTAB (SQLITE_CONSTRAINT | (9 << 8))
|
|
563
|
+
#define SQLITE_CONSTRAINT_ROWID (SQLITE_CONSTRAINT | (10 << 8))
|
|
564
|
+
#define SQLITE_CONSTRAINT_PINNED (SQLITE_CONSTRAINT | (11 << 8))
|
|
565
|
+
#define SQLITE_CONSTRAINT_DATATYPE (SQLITE_CONSTRAINT | (12 << 8))
|
|
566
|
+
#define SQLITE_NOTICE_RECOVER_WAL (SQLITE_NOTICE | (1 << 8))
|
|
567
|
+
#define SQLITE_NOTICE_RECOVER_ROLLBACK (SQLITE_NOTICE | (2 << 8))
|
|
568
|
+
#define SQLITE_NOTICE_RBU (SQLITE_NOTICE | (3 << 8))
|
|
569
|
+
#define SQLITE_WARNING_AUTOINDEX (SQLITE_WARNING | (1 << 8))
|
|
570
|
+
#define SQLITE_AUTH_USER (SQLITE_AUTH | (1 << 8))
|
|
571
|
+
#define SQLITE_OK_LOAD_PERMANENTLY (SQLITE_OK | (1 << 8))
|
|
572
|
+
#define SQLITE_OK_SYMLINK (SQLITE_OK | (2 << 8)) /* internal use only */
|
|
572
573
|
|
|
573
574
|
/*
|
|
574
575
|
** CAPI3REF: Flags For File Open Operations
|
|
@@ -590,33 +591,32 @@ SQLITE_API int sqlite3_exec(
|
|
|
590
591
|
** [sqlite3_open_v2()] has historically be a no-op and might become an
|
|
591
592
|
** error in future versions of SQLite.
|
|
592
593
|
*/
|
|
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
|
|
594
|
+
#define SQLITE_OPEN_READONLY 0x00000001 /* Ok for sqlite3_open_v2() */
|
|
595
|
+
#define SQLITE_OPEN_READWRITE 0x00000002 /* Ok for sqlite3_open_v2() */
|
|
596
|
+
#define SQLITE_OPEN_CREATE 0x00000004 /* Ok for sqlite3_open_v2() */
|
|
597
|
+
#define SQLITE_OPEN_DELETEONCLOSE 0x00000008 /* VFS only */
|
|
598
|
+
#define SQLITE_OPEN_EXCLUSIVE 0x00000010 /* VFS only */
|
|
599
|
+
#define SQLITE_OPEN_AUTOPROXY 0x00000020 /* VFS only */
|
|
600
|
+
#define SQLITE_OPEN_URI 0x00000040 /* Ok for sqlite3_open_v2() */
|
|
601
|
+
#define SQLITE_OPEN_MEMORY 0x00000080 /* Ok for sqlite3_open_v2() */
|
|
602
|
+
#define SQLITE_OPEN_MAIN_DB 0x00000100 /* VFS only */
|
|
603
|
+
#define SQLITE_OPEN_TEMP_DB 0x00000200 /* VFS only */
|
|
604
|
+
#define SQLITE_OPEN_TRANSIENT_DB 0x00000400 /* VFS only */
|
|
605
|
+
#define SQLITE_OPEN_MAIN_JOURNAL 0x00000800 /* VFS only */
|
|
606
|
+
#define SQLITE_OPEN_TEMP_JOURNAL 0x00001000 /* VFS only */
|
|
607
|
+
#define SQLITE_OPEN_SUBJOURNAL 0x00002000 /* VFS only */
|
|
608
|
+
#define SQLITE_OPEN_SUPER_JOURNAL 0x00004000 /* VFS only */
|
|
609
|
+
#define SQLITE_OPEN_NOMUTEX 0x00008000 /* Ok for sqlite3_open_v2() */
|
|
610
|
+
#define SQLITE_OPEN_FULLMUTEX 0x00010000 /* Ok for sqlite3_open_v2() */
|
|
611
|
+
#define SQLITE_OPEN_SHAREDCACHE 0x00020000 /* Ok for sqlite3_open_v2() */
|
|
612
|
+
#define SQLITE_OPEN_PRIVATECACHE 0x00040000 /* Ok for sqlite3_open_v2() */
|
|
613
|
+
#define SQLITE_OPEN_WAL 0x00080000 /* VFS only */
|
|
614
|
+
#define SQLITE_OPEN_NOFOLLOW 0x01000000 /* Ok for sqlite3_open_v2() */
|
|
615
|
+
#define SQLITE_OPEN_EXRESCODE 0x02000000 /* Extended result codes */
|
|
615
616
|
|
|
616
617
|
/* Reserved: 0x00F00000 */
|
|
617
618
|
/* Legacy compatibility: */
|
|
618
|
-
#define SQLITE_OPEN_MASTER_JOURNAL
|
|
619
|
-
|
|
619
|
+
#define SQLITE_OPEN_MASTER_JOURNAL 0x00004000 /* VFS only */
|
|
620
620
|
|
|
621
621
|
/*
|
|
622
622
|
** CAPI3REF: Device Characteristics
|
|
@@ -651,21 +651,21 @@ SQLITE_API int sqlite3_exec(
|
|
|
651
651
|
** write operations are bracketed by [SQLITE_FCNTL_BEGIN_ATOMIC_WRITE] and
|
|
652
652
|
** [SQLITE_FCNTL_COMMIT_ATOMIC_WRITE].
|
|
653
653
|
*/
|
|
654
|
-
#define SQLITE_IOCAP_ATOMIC
|
|
655
|
-
#define SQLITE_IOCAP_ATOMIC512
|
|
656
|
-
#define SQLITE_IOCAP_ATOMIC1K
|
|
657
|
-
#define SQLITE_IOCAP_ATOMIC2K
|
|
658
|
-
#define SQLITE_IOCAP_ATOMIC4K
|
|
659
|
-
#define SQLITE_IOCAP_ATOMIC8K
|
|
660
|
-
#define SQLITE_IOCAP_ATOMIC16K
|
|
661
|
-
#define SQLITE_IOCAP_ATOMIC32K
|
|
662
|
-
#define SQLITE_IOCAP_ATOMIC64K
|
|
663
|
-
#define SQLITE_IOCAP_SAFE_APPEND
|
|
664
|
-
#define SQLITE_IOCAP_SEQUENTIAL
|
|
665
|
-
#define SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN
|
|
666
|
-
#define SQLITE_IOCAP_POWERSAFE_OVERWRITE
|
|
667
|
-
#define SQLITE_IOCAP_IMMUTABLE
|
|
668
|
-
#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
|
|
669
669
|
|
|
670
670
|
/*
|
|
671
671
|
** CAPI3REF: File Locking Levels
|
|
@@ -678,11 +678,11 @@ SQLITE_API int sqlite3_exec(
|
|
|
678
678
|
** The argument to xLock() is always SHARED or higher. The argument to
|
|
679
679
|
** xUnlock is either SHARED or NONE.
|
|
680
680
|
*/
|
|
681
|
-
#define SQLITE_LOCK_NONE
|
|
682
|
-
#define SQLITE_LOCK_SHARED
|
|
683
|
-
#define SQLITE_LOCK_RESERVED
|
|
684
|
-
#define SQLITE_LOCK_PENDING
|
|
685
|
-
#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 */
|
|
686
686
|
|
|
687
687
|
/*
|
|
688
688
|
** CAPI3REF: Synchronization Type Flags
|
|
@@ -710,9 +710,9 @@ SQLITE_API int sqlite3_exec(
|
|
|
710
710
|
** operating systems natively supported by SQLite, only Mac OSX
|
|
711
711
|
** cares about the difference.)
|
|
712
712
|
*/
|
|
713
|
-
#define SQLITE_SYNC_NORMAL
|
|
714
|
-
#define SQLITE_SYNC_FULL
|
|
715
|
-
#define SQLITE_SYNC_DATAONLY
|
|
713
|
+
#define SQLITE_SYNC_NORMAL 0x00002
|
|
714
|
+
#define SQLITE_SYNC_FULL 0x00003
|
|
715
|
+
#define SQLITE_SYNC_DATAONLY 0x00010
|
|
716
716
|
|
|
717
717
|
/*
|
|
718
718
|
** CAPI3REF: OS Interface Open File Handle
|
|
@@ -727,7 +727,7 @@ SQLITE_API int sqlite3_exec(
|
|
|
727
727
|
*/
|
|
728
728
|
typedef struct sqlite3_file sqlite3_file;
|
|
729
729
|
struct sqlite3_file {
|
|
730
|
-
const struct sqlite3_io_methods *pMethods;
|
|
730
|
+
const struct sqlite3_io_methods *pMethods; /* Methods for an open file */
|
|
731
731
|
};
|
|
732
732
|
|
|
733
733
|
/*
|
|
@@ -834,26 +834,26 @@ struct sqlite3_file {
|
|
|
834
834
|
typedef struct sqlite3_io_methods sqlite3_io_methods;
|
|
835
835
|
struct sqlite3_io_methods {
|
|
836
836
|
int iVersion;
|
|
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*);
|
|
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 *);
|
|
849
849
|
/* Methods above are valid for version 1 */
|
|
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);
|
|
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);
|
|
854
854
|
/* Methods above are valid for version 2 */
|
|
855
|
-
int (*xFetch)(sqlite3_file*, sqlite3_int64 iOfst, int iAmt, void **pp);
|
|
856
|
-
int (*xUnfetch)(sqlite3_file*, sqlite3_int64 iOfst, void *p);
|
|
855
|
+
int (*xFetch)(sqlite3_file *, sqlite3_int64 iOfst, int iAmt, void **pp);
|
|
856
|
+
int (*xUnfetch)(sqlite3_file *, sqlite3_int64 iOfst, void *p);
|
|
857
857
|
/* Methods above are valid for version 3 */
|
|
858
858
|
/* Additional methods may be added in future releases */
|
|
859
859
|
};
|
|
@@ -1201,53 +1201,52 @@ struct sqlite3_io_methods {
|
|
|
1201
1201
|
** transaction, or if the db is a temp-db, this opcode is a no-op, not an error.
|
|
1202
1202
|
** </ul>
|
|
1203
1203
|
*/
|
|
1204
|
-
#define SQLITE_FCNTL_LOCKSTATE
|
|
1205
|
-
#define SQLITE_FCNTL_GET_LOCKPROXYFILE
|
|
1206
|
-
#define SQLITE_FCNTL_SET_LOCKPROXYFILE
|
|
1207
|
-
#define SQLITE_FCNTL_LAST_ERRNO
|
|
1208
|
-
#define SQLITE_FCNTL_SIZE_HINT
|
|
1209
|
-
#define SQLITE_FCNTL_CHUNK_SIZE
|
|
1210
|
-
#define SQLITE_FCNTL_FILE_POINTER
|
|
1211
|
-
#define SQLITE_FCNTL_SYNC_OMITTED
|
|
1212
|
-
#define SQLITE_FCNTL_WIN32_AV_RETRY
|
|
1213
|
-
#define SQLITE_FCNTL_PERSIST_WAL
|
|
1214
|
-
#define SQLITE_FCNTL_OVERWRITE
|
|
1215
|
-
#define SQLITE_FCNTL_VFSNAME
|
|
1216
|
-
#define SQLITE_FCNTL_POWERSAFE_OVERWRITE
|
|
1217
|
-
#define SQLITE_FCNTL_PRAGMA
|
|
1218
|
-
#define SQLITE_FCNTL_BUSYHANDLER
|
|
1219
|
-
#define SQLITE_FCNTL_TEMPFILENAME
|
|
1220
|
-
#define SQLITE_FCNTL_MMAP_SIZE
|
|
1221
|
-
#define SQLITE_FCNTL_TRACE
|
|
1222
|
-
#define SQLITE_FCNTL_HAS_MOVED
|
|
1223
|
-
#define SQLITE_FCNTL_SYNC
|
|
1224
|
-
#define SQLITE_FCNTL_COMMIT_PHASETWO
|
|
1225
|
-
#define SQLITE_FCNTL_WIN32_SET_HANDLE
|
|
1226
|
-
#define SQLITE_FCNTL_WAL_BLOCK
|
|
1227
|
-
#define SQLITE_FCNTL_ZIPVFS
|
|
1228
|
-
#define SQLITE_FCNTL_RBU
|
|
1229
|
-
#define SQLITE_FCNTL_VFS_POINTER
|
|
1230
|
-
#define SQLITE_FCNTL_JOURNAL_POINTER
|
|
1231
|
-
#define SQLITE_FCNTL_WIN32_GET_HANDLE
|
|
1232
|
-
#define SQLITE_FCNTL_PDB
|
|
1233
|
-
#define SQLITE_FCNTL_BEGIN_ATOMIC_WRITE
|
|
1234
|
-
#define SQLITE_FCNTL_COMMIT_ATOMIC_WRITE
|
|
1235
|
-
#define SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE
|
|
1236
|
-
#define SQLITE_FCNTL_LOCK_TIMEOUT
|
|
1237
|
-
#define SQLITE_FCNTL_DATA_VERSION
|
|
1238
|
-
#define SQLITE_FCNTL_SIZE_LIMIT
|
|
1239
|
-
#define SQLITE_FCNTL_CKPT_DONE
|
|
1240
|
-
#define SQLITE_FCNTL_RESERVE_BYTES
|
|
1241
|
-
#define SQLITE_FCNTL_CKPT_START
|
|
1242
|
-
#define SQLITE_FCNTL_EXTERNAL_READER
|
|
1243
|
-
#define SQLITE_FCNTL_CKSM_FILE
|
|
1244
|
-
#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
|
|
1245
1245
|
|
|
1246
1246
|
/* deprecated names */
|
|
1247
|
-
#define SQLITE_GET_LOCKPROXYFILE
|
|
1248
|
-
#define SQLITE_SET_LOCKPROXYFILE
|
|
1249
|
-
#define SQLITE_LAST_ERRNO
|
|
1250
|
-
|
|
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
|
|
1251
1250
|
|
|
1252
1251
|
/*
|
|
1253
1252
|
** CAPI3REF: Mutex Handle
|
|
@@ -1463,37 +1462,37 @@ typedef const char *sqlite3_filename;
|
|
|
1463
1462
|
typedef struct sqlite3_vfs sqlite3_vfs;
|
|
1464
1463
|
typedef void (*sqlite3_syscall_ptr)(void);
|
|
1465
1464
|
struct sqlite3_vfs {
|
|
1466
|
-
int iVersion;
|
|
1467
|
-
int szOsFile;
|
|
1468
|
-
int mxPathname;
|
|
1469
|
-
sqlite3_vfs *pNext;
|
|
1470
|
-
const char *zName;
|
|
1471
|
-
void *pAppData;
|
|
1472
|
-
int (*xOpen)(sqlite3_vfs*, sqlite3_filename zName, sqlite3_file*,
|
|
1473
|
-
int
|
|
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 *);
|
|
1465
|
+
int iVersion; /* Structure version number (currently 3) */
|
|
1466
|
+
int szOsFile; /* Size of subclassed sqlite3_file */
|
|
1467
|
+
int mxPathname; /* Maximum file pathname length */
|
|
1468
|
+
sqlite3_vfs *pNext; /* Next registered VFS */
|
|
1469
|
+
const char *zName; /* Name of this virtual file system */
|
|
1470
|
+
void *pAppData; /* Pointer to application-specific data */
|
|
1471
|
+
int (*xOpen)(sqlite3_vfs *, sqlite3_filename zName, sqlite3_file *, int flags,
|
|
1472
|
+
int *pOutFlags);
|
|
1473
|
+
int (*xDelete)(sqlite3_vfs *, const char *zName, int syncDir);
|
|
1474
|
+
int (*xAccess)(sqlite3_vfs *, const char *zName, int flags, int *pResOut);
|
|
1475
|
+
int (*xFullPathname)(sqlite3_vfs *, const char *zName, int nOut, char *zOut);
|
|
1476
|
+
void *(*xDlOpen)(sqlite3_vfs *, const char *zFilename);
|
|
1477
|
+
void (*xDlError)(sqlite3_vfs *, int nByte, char *zErrMsg);
|
|
1478
|
+
void (*(*xDlSym)(sqlite3_vfs *, void *, const char *zSymbol))(void);
|
|
1479
|
+
void (*xDlClose)(sqlite3_vfs *, void *);
|
|
1480
|
+
int (*xRandomness)(sqlite3_vfs *, int nByte, char *zOut);
|
|
1481
|
+
int (*xSleep)(sqlite3_vfs *, int microseconds);
|
|
1482
|
+
int (*xCurrentTime)(sqlite3_vfs *, double *);
|
|
1483
|
+
int (*xGetLastError)(sqlite3_vfs *, int, char *);
|
|
1485
1484
|
/*
|
|
1486
1485
|
** The methods above are in version 1 of the sqlite_vfs object
|
|
1487
1486
|
** definition. Those that follow are added in version 2 or later
|
|
1488
1487
|
*/
|
|
1489
|
-
int (*xCurrentTimeInt64)(sqlite3_vfs*, sqlite3_int64*);
|
|
1488
|
+
int (*xCurrentTimeInt64)(sqlite3_vfs *, sqlite3_int64 *);
|
|
1490
1489
|
/*
|
|
1491
1490
|
** The methods above are in versions 1 and 2 of the sqlite_vfs object.
|
|
1492
1491
|
** Those below are for version 3 and greater.
|
|
1493
1492
|
*/
|
|
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);
|
|
1493
|
+
int (*xSetSystemCall)(sqlite3_vfs *, const char *zName, sqlite3_syscall_ptr);
|
|
1494
|
+
sqlite3_syscall_ptr (*xGetSystemCall)(sqlite3_vfs *, const char *zName);
|
|
1495
|
+
const char *(*xNextSystemCall)(sqlite3_vfs *, const char *zName);
|
|
1497
1496
|
/*
|
|
1498
1497
|
** The methods above are in versions 1 through 3 of the sqlite_vfs object.
|
|
1499
1498
|
** New fields may be appended in future versions. The iVersion
|
|
@@ -1521,9 +1520,9 @@ struct sqlite3_vfs {
|
|
|
1521
1520
|
** currently unused, though it might be used in a future release of
|
|
1522
1521
|
** SQLite.
|
|
1523
1522
|
*/
|
|
1524
|
-
#define SQLITE_ACCESS_EXISTS
|
|
1525
|
-
#define SQLITE_ACCESS_READWRITE 1
|
|
1526
|
-
#define SQLITE_ACCESS_READ
|
|
1523
|
+
#define SQLITE_ACCESS_EXISTS 0
|
|
1524
|
+
#define SQLITE_ACCESS_READWRITE 1 /* Used by PRAGMA temp_store_directory */
|
|
1525
|
+
#define SQLITE_ACCESS_READ 2 /* Unused */
|
|
1527
1526
|
|
|
1528
1527
|
/*
|
|
1529
1528
|
** CAPI3REF: Flags for the xShmLock VFS method
|
|
@@ -1547,10 +1546,10 @@ struct sqlite3_vfs {
|
|
|
1547
1546
|
** between unlocked and EXCLUSIVE. It cannot transition between SHARED
|
|
1548
1547
|
** and EXCLUSIVE.
|
|
1549
1548
|
*/
|
|
1550
|
-
#define SQLITE_SHM_UNLOCK
|
|
1551
|
-
#define SQLITE_SHM_LOCK
|
|
1552
|
-
#define SQLITE_SHM_SHARED
|
|
1553
|
-
#define SQLITE_SHM_EXCLUSIVE
|
|
1549
|
+
#define SQLITE_SHM_UNLOCK 1
|
|
1550
|
+
#define SQLITE_SHM_LOCK 2
|
|
1551
|
+
#define SQLITE_SHM_SHARED 4
|
|
1552
|
+
#define SQLITE_SHM_EXCLUSIVE 8
|
|
1554
1553
|
|
|
1555
1554
|
/*
|
|
1556
1555
|
** CAPI3REF: Maximum xShmLock index
|
|
@@ -1560,8 +1559,7 @@ struct sqlite3_vfs {
|
|
|
1560
1559
|
** The SQLite core will never attempt to acquire or release a
|
|
1561
1560
|
** lock outside of this range
|
|
1562
1561
|
*/
|
|
1563
|
-
#define SQLITE_SHM_NLOCK
|
|
1564
|
-
|
|
1562
|
+
#define SQLITE_SHM_NLOCK 8
|
|
1565
1563
|
|
|
1566
1564
|
/*
|
|
1567
1565
|
** CAPI3REF: Initialize The SQLite Library
|
|
@@ -1669,7 +1667,8 @@ SQLITE_API int sqlite3_os_end(void);
|
|
|
1669
1667
|
** are called "anytime configuration options".
|
|
1670
1668
|
** ^If sqlite3_config() is called after [sqlite3_initialize()] and before
|
|
1671
1669
|
** [sqlite3_shutdown()] with a first argument that is not an anytime
|
|
1672
|
-
** configuration option, then the sqlite3_config() call will return
|
|
1670
|
+
** configuration option, then the sqlite3_config() call will return
|
|
1671
|
+
*SQLITE_MISUSE.
|
|
1673
1672
|
** Note, however, that ^sqlite3_config() can be called as part of the
|
|
1674
1673
|
** implementation of an application-defined [sqlite3_os_init()].
|
|
1675
1674
|
**
|
|
@@ -1696,7 +1695,7 @@ SQLITE_API int sqlite3_config(int, ...);
|
|
|
1696
1695
|
** ^Calls to sqlite3_db_config() return SQLITE_OK if and only if
|
|
1697
1696
|
** the call is considered successful.
|
|
1698
1697
|
*/
|
|
1699
|
-
SQLITE_API int sqlite3_db_config(sqlite3*, int op, ...);
|
|
1698
|
+
SQLITE_API int sqlite3_db_config(sqlite3 *, int op, ...);
|
|
1700
1699
|
|
|
1701
1700
|
/*
|
|
1702
1701
|
** CAPI3REF: Memory Allocation Routines
|
|
@@ -1763,14 +1762,14 @@ SQLITE_API int sqlite3_db_config(sqlite3*, int op, ...);
|
|
|
1763
1762
|
*/
|
|
1764
1763
|
typedef struct sqlite3_mem_methods sqlite3_mem_methods;
|
|
1765
1764
|
struct sqlite3_mem_methods {
|
|
1766
|
-
void *(*xMalloc)(int);
|
|
1767
|
-
void (*xFree)(void*); /* Free a prior allocation */
|
|
1768
|
-
void *(*xRealloc)(void*,int);
|
|
1769
|
-
int (*xSize)(void*); /* Return the size of an allocation */
|
|
1770
|
-
int (*xRoundup)(int);
|
|
1771
|
-
int (*xInit)(void*); /* Initialize the memory allocator */
|
|
1772
|
-
void (*xShutdown)(void*); /* Deinitialize the memory allocator */
|
|
1773
|
-
void *pAppData;
|
|
1765
|
+
void *(*xMalloc)(int); /* Memory allocation function */
|
|
1766
|
+
void (*xFree)(void *); /* Free a prior allocation */
|
|
1767
|
+
void *(*xRealloc)(void *, int); /* Resize an allocation */
|
|
1768
|
+
int (*xSize)(void *); /* Return the size of an allocation */
|
|
1769
|
+
int (*xRoundup)(int); /* Round up request size to allocation size */
|
|
1770
|
+
int (*xInit)(void *); /* Initialize the memory allocator */
|
|
1771
|
+
void (*xShutdown)(void *); /* Deinitialize the memory allocator */
|
|
1772
|
+
void *pAppData; /* Argument to xInit() and xShutdown() */
|
|
1774
1773
|
};
|
|
1775
1774
|
|
|
1776
1775
|
/*
|
|
@@ -2143,35 +2142,35 @@ struct sqlite3_mem_methods {
|
|
|
2143
2142
|
** compile-time option is not set, then the default maximum is 1073741824.
|
|
2144
2143
|
** </dl>
|
|
2145
2144
|
*/
|
|
2146
|
-
#define SQLITE_CONFIG_SINGLETHREAD
|
|
2147
|
-
#define SQLITE_CONFIG_MULTITHREAD
|
|
2148
|
-
#define SQLITE_CONFIG_SERIALIZED
|
|
2149
|
-
#define SQLITE_CONFIG_MALLOC
|
|
2150
|
-
#define SQLITE_CONFIG_GETMALLOC
|
|
2151
|
-
#define SQLITE_CONFIG_SCRATCH
|
|
2152
|
-
#define SQLITE_CONFIG_PAGECACHE
|
|
2153
|
-
#define SQLITE_CONFIG_HEAP
|
|
2154
|
-
#define SQLITE_CONFIG_MEMSTATUS
|
|
2155
|
-
#define SQLITE_CONFIG_MUTEX
|
|
2156
|
-
#define SQLITE_CONFIG_GETMUTEX
|
|
2145
|
+
#define SQLITE_CONFIG_SINGLETHREAD 1 /* nil */
|
|
2146
|
+
#define SQLITE_CONFIG_MULTITHREAD 2 /* nil */
|
|
2147
|
+
#define SQLITE_CONFIG_SERIALIZED 3 /* nil */
|
|
2148
|
+
#define SQLITE_CONFIG_MALLOC 4 /* sqlite3_mem_methods* */
|
|
2149
|
+
#define SQLITE_CONFIG_GETMALLOC 5 /* sqlite3_mem_methods* */
|
|
2150
|
+
#define SQLITE_CONFIG_SCRATCH 6 /* No longer used */
|
|
2151
|
+
#define SQLITE_CONFIG_PAGECACHE 7 /* void*, int sz, int N */
|
|
2152
|
+
#define SQLITE_CONFIG_HEAP 8 /* void*, int nByte, int min */
|
|
2153
|
+
#define SQLITE_CONFIG_MEMSTATUS 9 /* boolean */
|
|
2154
|
+
#define SQLITE_CONFIG_MUTEX 10 /* sqlite3_mutex_methods* */
|
|
2155
|
+
#define SQLITE_CONFIG_GETMUTEX 11 /* sqlite3_mutex_methods* */
|
|
2157
2156
|
/* previously SQLITE_CONFIG_CHUNKALLOC 12 which is now unused. */
|
|
2158
|
-
#define SQLITE_CONFIG_LOOKASIDE
|
|
2159
|
-
#define SQLITE_CONFIG_PCACHE
|
|
2160
|
-
#define SQLITE_CONFIG_GETPCACHE
|
|
2161
|
-
#define SQLITE_CONFIG_LOG
|
|
2162
|
-
#define SQLITE_CONFIG_URI
|
|
2163
|
-
#define SQLITE_CONFIG_PCACHE2
|
|
2164
|
-
#define SQLITE_CONFIG_GETPCACHE2
|
|
2165
|
-
#define SQLITE_CONFIG_COVERING_INDEX_SCAN 20
|
|
2166
|
-
#define SQLITE_CONFIG_SQLLOG
|
|
2167
|
-
#define SQLITE_CONFIG_MMAP_SIZE
|
|
2168
|
-
#define SQLITE_CONFIG_WIN32_HEAPSIZE
|
|
2169
|
-
#define SQLITE_CONFIG_PCACHE_HDRSZ
|
|
2170
|
-
#define SQLITE_CONFIG_PMASZ
|
|
2171
|
-
#define SQLITE_CONFIG_STMTJRNL_SPILL
|
|
2172
|
-
#define SQLITE_CONFIG_SMALL_MALLOC
|
|
2173
|
-
#define SQLITE_CONFIG_SORTERREF_SIZE
|
|
2174
|
-
#define SQLITE_CONFIG_MEMDB_MAXSIZE
|
|
2157
|
+
#define SQLITE_CONFIG_LOOKASIDE 13 /* int int */
|
|
2158
|
+
#define SQLITE_CONFIG_PCACHE 14 /* no-op */
|
|
2159
|
+
#define SQLITE_CONFIG_GETPCACHE 15 /* no-op */
|
|
2160
|
+
#define SQLITE_CONFIG_LOG 16 /* xFunc, void* */
|
|
2161
|
+
#define SQLITE_CONFIG_URI 17 /* int */
|
|
2162
|
+
#define SQLITE_CONFIG_PCACHE2 18 /* sqlite3_pcache_methods2* */
|
|
2163
|
+
#define SQLITE_CONFIG_GETPCACHE2 19 /* sqlite3_pcache_methods2* */
|
|
2164
|
+
#define SQLITE_CONFIG_COVERING_INDEX_SCAN 20 /* int */
|
|
2165
|
+
#define SQLITE_CONFIG_SQLLOG 21 /* xSqllog, void* */
|
|
2166
|
+
#define SQLITE_CONFIG_MMAP_SIZE 22 /* sqlite3_int64, sqlite3_int64 */
|
|
2167
|
+
#define SQLITE_CONFIG_WIN32_HEAPSIZE 23 /* int nByte */
|
|
2168
|
+
#define SQLITE_CONFIG_PCACHE_HDRSZ 24 /* int *psz */
|
|
2169
|
+
#define SQLITE_CONFIG_PMASZ 25 /* unsigned int szPma */
|
|
2170
|
+
#define SQLITE_CONFIG_STMTJRNL_SPILL 26 /* int nByte */
|
|
2171
|
+
#define SQLITE_CONFIG_SMALL_MALLOC 27 /* boolean */
|
|
2172
|
+
#define SQLITE_CONFIG_SORTERREF_SIZE 28 /* int nByte */
|
|
2173
|
+
#define SQLITE_CONFIG_MEMDB_MAXSIZE 29 /* sqlite3_int64 */
|
|
2175
2174
|
|
|
2176
2175
|
/*
|
|
2177
2176
|
** CAPI3REF: Database Connection Configuration Options
|
|
@@ -2491,27 +2490,27 @@ struct sqlite3_mem_methods {
|
|
|
2491
2490
|
**
|
|
2492
2491
|
** </dl>
|
|
2493
2492
|
*/
|
|
2494
|
-
#define SQLITE_DBCONFIG_MAINDBNAME
|
|
2495
|
-
#define SQLITE_DBCONFIG_LOOKASIDE
|
|
2496
|
-
#define SQLITE_DBCONFIG_ENABLE_FKEY
|
|
2497
|
-
#define SQLITE_DBCONFIG_ENABLE_TRIGGER
|
|
2493
|
+
#define SQLITE_DBCONFIG_MAINDBNAME 1000 /* const char* */
|
|
2494
|
+
#define SQLITE_DBCONFIG_LOOKASIDE 1001 /* void* int int */
|
|
2495
|
+
#define SQLITE_DBCONFIG_ENABLE_FKEY 1002 /* int int* */
|
|
2496
|
+
#define SQLITE_DBCONFIG_ENABLE_TRIGGER 1003 /* int int* */
|
|
2498
2497
|
#define SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER 1004 /* int int* */
|
|
2499
2498
|
#define SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION 1005 /* int int* */
|
|
2500
|
-
#define SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE
|
|
2501
|
-
#define SQLITE_DBCONFIG_ENABLE_QPSG
|
|
2502
|
-
#define SQLITE_DBCONFIG_TRIGGER_EQP
|
|
2503
|
-
#define SQLITE_DBCONFIG_RESET_DATABASE
|
|
2504
|
-
#define SQLITE_DBCONFIG_DEFENSIVE
|
|
2505
|
-
#define SQLITE_DBCONFIG_WRITABLE_SCHEMA
|
|
2506
|
-
#define SQLITE_DBCONFIG_LEGACY_ALTER_TABLE
|
|
2507
|
-
#define SQLITE_DBCONFIG_DQS_DML
|
|
2508
|
-
#define SQLITE_DBCONFIG_DQS_DDL
|
|
2509
|
-
#define SQLITE_DBCONFIG_ENABLE_VIEW
|
|
2510
|
-
#define SQLITE_DBCONFIG_LEGACY_FILE_FORMAT
|
|
2511
|
-
#define SQLITE_DBCONFIG_TRUSTED_SCHEMA
|
|
2512
|
-
#define SQLITE_DBCONFIG_STMT_SCANSTATUS
|
|
2513
|
-
#define SQLITE_DBCONFIG_REVERSE_SCANORDER
|
|
2514
|
-
#define SQLITE_DBCONFIG_MAX
|
|
2499
|
+
#define SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE 1006 /* int int* */
|
|
2500
|
+
#define SQLITE_DBCONFIG_ENABLE_QPSG 1007 /* int int* */
|
|
2501
|
+
#define SQLITE_DBCONFIG_TRIGGER_EQP 1008 /* int int* */
|
|
2502
|
+
#define SQLITE_DBCONFIG_RESET_DATABASE 1009 /* int int* */
|
|
2503
|
+
#define SQLITE_DBCONFIG_DEFENSIVE 1010 /* int int* */
|
|
2504
|
+
#define SQLITE_DBCONFIG_WRITABLE_SCHEMA 1011 /* int int* */
|
|
2505
|
+
#define SQLITE_DBCONFIG_LEGACY_ALTER_TABLE 1012 /* int int* */
|
|
2506
|
+
#define SQLITE_DBCONFIG_DQS_DML 1013 /* int int* */
|
|
2507
|
+
#define SQLITE_DBCONFIG_DQS_DDL 1014 /* int int* */
|
|
2508
|
+
#define SQLITE_DBCONFIG_ENABLE_VIEW 1015 /* int int* */
|
|
2509
|
+
#define SQLITE_DBCONFIG_LEGACY_FILE_FORMAT 1016 /* int int* */
|
|
2510
|
+
#define SQLITE_DBCONFIG_TRUSTED_SCHEMA 1017 /* int int* */
|
|
2511
|
+
#define SQLITE_DBCONFIG_STMT_SCANSTATUS 1018 /* int int* */
|
|
2512
|
+
#define SQLITE_DBCONFIG_REVERSE_SCANORDER 1019 /* int int* */
|
|
2513
|
+
#define SQLITE_DBCONFIG_MAX 1019 /* Largest DBCONFIG */
|
|
2515
2514
|
|
|
2516
2515
|
/*
|
|
2517
2516
|
** CAPI3REF: Enable Or Disable Extended Result Codes
|
|
@@ -2521,7 +2520,7 @@ struct sqlite3_mem_methods {
|
|
|
2521
2520
|
** [extended result codes] feature of SQLite. ^The extended result
|
|
2522
2521
|
** codes are disabled by default for historical compatibility.
|
|
2523
2522
|
*/
|
|
2524
|
-
SQLITE_API int sqlite3_extended_result_codes(sqlite3*, int onoff);
|
|
2523
|
+
SQLITE_API int sqlite3_extended_result_codes(sqlite3 *, int onoff);
|
|
2525
2524
|
|
|
2526
2525
|
/*
|
|
2527
2526
|
** CAPI3REF: Last Insert Rowid
|
|
@@ -2583,7 +2582,7 @@ SQLITE_API int sqlite3_extended_result_codes(sqlite3*, int onoff);
|
|
|
2583
2582
|
** unpredictable and might not equal either the old or the new
|
|
2584
2583
|
** last insert [rowid].
|
|
2585
2584
|
*/
|
|
2586
|
-
SQLITE_API sqlite3_int64 sqlite3_last_insert_rowid(sqlite3*);
|
|
2585
|
+
SQLITE_API sqlite3_int64 sqlite3_last_insert_rowid(sqlite3 *);
|
|
2587
2586
|
|
|
2588
2587
|
/*
|
|
2589
2588
|
** CAPI3REF: Set the Last Insert Rowid value.
|
|
@@ -2593,7 +2592,7 @@ SQLITE_API sqlite3_int64 sqlite3_last_insert_rowid(sqlite3*);
|
|
|
2593
2592
|
** set the value returned by calling sqlite3_last_insert_rowid(D) to R
|
|
2594
2593
|
** without inserting a row into the database.
|
|
2595
2594
|
*/
|
|
2596
|
-
SQLITE_API void sqlite3_set_last_insert_rowid(sqlite3*,sqlite3_int64);
|
|
2595
|
+
SQLITE_API void sqlite3_set_last_insert_rowid(sqlite3 *, sqlite3_int64);
|
|
2597
2596
|
|
|
2598
2597
|
/*
|
|
2599
2598
|
** CAPI3REF: Count The Number Of Rows Modified
|
|
@@ -2654,8 +2653,8 @@ SQLITE_API void sqlite3_set_last_insert_rowid(sqlite3*,sqlite3_int64);
|
|
|
2654
2653
|
** <li> the [data_version pragma]
|
|
2655
2654
|
** </ul>
|
|
2656
2655
|
*/
|
|
2657
|
-
SQLITE_API int sqlite3_changes(sqlite3*);
|
|
2658
|
-
SQLITE_API sqlite3_int64 sqlite3_changes64(sqlite3*);
|
|
2656
|
+
SQLITE_API int sqlite3_changes(sqlite3 *);
|
|
2657
|
+
SQLITE_API sqlite3_int64 sqlite3_changes64(sqlite3 *);
|
|
2659
2658
|
|
|
2660
2659
|
/*
|
|
2661
2660
|
** CAPI3REF: Total Number Of Rows Modified
|
|
@@ -2696,8 +2695,8 @@ SQLITE_API sqlite3_int64 sqlite3_changes64(sqlite3*);
|
|
|
2696
2695
|
** <li> the [SQLITE_FCNTL_DATA_VERSION] [file control]
|
|
2697
2696
|
** </ul>
|
|
2698
2697
|
*/
|
|
2699
|
-
SQLITE_API int sqlite3_total_changes(sqlite3*);
|
|
2700
|
-
SQLITE_API sqlite3_int64 sqlite3_total_changes64(sqlite3*);
|
|
2698
|
+
SQLITE_API int sqlite3_total_changes(sqlite3 *);
|
|
2699
|
+
SQLITE_API sqlite3_int64 sqlite3_total_changes64(sqlite3 *);
|
|
2701
2700
|
|
|
2702
2701
|
/*
|
|
2703
2702
|
** CAPI3REF: Interrupt A Long-Running Query
|
|
@@ -2738,8 +2737,8 @@ SQLITE_API sqlite3_int64 sqlite3_total_changes64(sqlite3*);
|
|
|
2738
2737
|
** or not an interrupt is currently in effect for [database connection] D.
|
|
2739
2738
|
** It returns 1 if an interrupt is currently in effect, or 0 otherwise.
|
|
2740
2739
|
*/
|
|
2741
|
-
SQLITE_API void sqlite3_interrupt(sqlite3*);
|
|
2742
|
-
SQLITE_API int sqlite3_is_interrupted(sqlite3*);
|
|
2740
|
+
SQLITE_API void sqlite3_interrupt(sqlite3 *);
|
|
2741
|
+
SQLITE_API int sqlite3_is_interrupted(sqlite3 *);
|
|
2743
2742
|
|
|
2744
2743
|
/*
|
|
2745
2744
|
** CAPI3REF: Determine If An SQL Statement Is Complete
|
|
@@ -2836,7 +2835,7 @@ SQLITE_API int sqlite3_complete16(const void *sql);
|
|
|
2836
2835
|
** A busy handler must not close the database connection
|
|
2837
2836
|
** or [prepared statement] that invoked the busy handler.
|
|
2838
2837
|
*/
|
|
2839
|
-
SQLITE_API int sqlite3_busy_handler(sqlite3*,int(*)(void*,int),void*);
|
|
2838
|
+
SQLITE_API int sqlite3_busy_handler(sqlite3 *, int (*)(void *, int), void *);
|
|
2840
2839
|
|
|
2841
2840
|
/*
|
|
2842
2841
|
** CAPI3REF: Set A Busy Timeout
|
|
@@ -2859,7 +2858,7 @@ SQLITE_API int sqlite3_busy_handler(sqlite3*,int(*)(void*,int),void*);
|
|
|
2859
2858
|
**
|
|
2860
2859
|
** See also: [PRAGMA busy_timeout]
|
|
2861
2860
|
*/
|
|
2862
|
-
SQLITE_API int sqlite3_busy_timeout(sqlite3*, int ms);
|
|
2861
|
+
SQLITE_API int sqlite3_busy_timeout(sqlite3 *, int ms);
|
|
2863
2862
|
|
|
2864
2863
|
/*
|
|
2865
2864
|
** CAPI3REF: Convenience Routines For Running Queries
|
|
@@ -2934,13 +2933,13 @@ SQLITE_API int sqlite3_busy_timeout(sqlite3*, int ms);
|
|
|
2934
2933
|
** reflected in subsequent calls to [sqlite3_errcode()] or
|
|
2935
2934
|
** [sqlite3_errmsg()].
|
|
2936
2935
|
*/
|
|
2937
|
-
SQLITE_API int
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2936
|
+
SQLITE_API int
|
|
2937
|
+
sqlite3_get_table(sqlite3 *db, /* An open database */
|
|
2938
|
+
const char *zSql, /* SQL to be evaluated */
|
|
2939
|
+
char ***pazResult, /* Results of the query */
|
|
2940
|
+
int *pnRow, /* Number of result rows written here */
|
|
2941
|
+
int *pnColumn, /* Number of result columns written here */
|
|
2942
|
+
char **pzErrmsg /* Error msg written here */
|
|
2944
2943
|
);
|
|
2945
2944
|
SQLITE_API void sqlite3_free_table(char **result);
|
|
2946
2945
|
|
|
@@ -2984,10 +2983,10 @@ SQLITE_API void sqlite3_free_table(char **result);
|
|
|
2984
2983
|
**
|
|
2985
2984
|
** See also: [built-in printf()], [printf() SQL function]
|
|
2986
2985
|
*/
|
|
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);
|
|
2986
|
+
SQLITE_API char *sqlite3_mprintf(const char *, ...);
|
|
2987
|
+
SQLITE_API char *sqlite3_vmprintf(const char *, va_list);
|
|
2988
|
+
SQLITE_API char *sqlite3_snprintf(int, char *, const char *, ...);
|
|
2989
|
+
SQLITE_API char *sqlite3_vsnprintf(int, char *, const char *, va_list);
|
|
2991
2990
|
|
|
2992
2991
|
/*
|
|
2993
2992
|
** CAPI3REF: Memory Allocation Subsystem
|
|
@@ -3066,10 +3065,10 @@ SQLITE_API char *sqlite3_vsnprintf(int,char*,const char*, va_list);
|
|
|
3066
3065
|
*/
|
|
3067
3066
|
SQLITE_API void *sqlite3_malloc(int);
|
|
3068
3067
|
SQLITE_API void *sqlite3_malloc64(sqlite3_uint64);
|
|
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*);
|
|
3068
|
+
SQLITE_API void *sqlite3_realloc(void *, int);
|
|
3069
|
+
SQLITE_API void *sqlite3_realloc64(void *, sqlite3_uint64);
|
|
3070
|
+
SQLITE_API void sqlite3_free(void *);
|
|
3071
|
+
SQLITE_API sqlite3_uint64 sqlite3_msize(void *);
|
|
3073
3072
|
|
|
3074
3073
|
/*
|
|
3075
3074
|
** CAPI3REF: Memory Allocator Statistics
|
|
@@ -3209,11 +3208,11 @@ SQLITE_API void sqlite3_randomness(int N, void *P);
|
|
|
3209
3208
|
** as stated in the previous paragraph, sqlite3_step() invokes
|
|
3210
3209
|
** sqlite3_prepare_v2() to reprepare a statement after a schema change.
|
|
3211
3210
|
*/
|
|
3212
|
-
SQLITE_API int sqlite3_set_authorizer(
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
);
|
|
3211
|
+
SQLITE_API int sqlite3_set_authorizer(sqlite3 *,
|
|
3212
|
+
int (*xAuth)(void *, int, const char *,
|
|
3213
|
+
const char *, const char *,
|
|
3214
|
+
const char *),
|
|
3215
|
+
void *pUserData);
|
|
3217
3216
|
|
|
3218
3217
|
/*
|
|
3219
3218
|
** CAPI3REF: Authorizer Return Codes
|
|
@@ -3227,8 +3226,8 @@ SQLITE_API int sqlite3_set_authorizer(
|
|
|
3227
3226
|
** Note that SQLITE_IGNORE is also used as a [conflict resolution mode]
|
|
3228
3227
|
** returned from the [sqlite3_vtab_on_conflict()] interface.
|
|
3229
3228
|
*/
|
|
3230
|
-
#define SQLITE_DENY
|
|
3231
|
-
#define SQLITE_IGNORE 2
|
|
3229
|
+
#define SQLITE_DENY 1 /* Abort the SQL statement with an error */
|
|
3230
|
+
#define SQLITE_IGNORE 2 /* Don't allow access, but don't generate an error */
|
|
3232
3231
|
|
|
3233
3232
|
/*
|
|
3234
3233
|
** CAPI3REF: Authorizer Action Codes
|
|
@@ -3250,40 +3249,40 @@ SQLITE_API int sqlite3_set_authorizer(
|
|
|
3250
3249
|
** top-level SQL code.
|
|
3251
3250
|
*/
|
|
3252
3251
|
/******************************************* 3rd ************ 4th ***********/
|
|
3253
|
-
#define SQLITE_CREATE_INDEX
|
|
3254
|
-
#define SQLITE_CREATE_TABLE
|
|
3255
|
-
#define SQLITE_CREATE_TEMP_INDEX
|
|
3256
|
-
#define SQLITE_CREATE_TEMP_TABLE
|
|
3257
|
-
#define SQLITE_CREATE_TEMP_TRIGGER
|
|
3258
|
-
#define SQLITE_CREATE_TEMP_VIEW
|
|
3259
|
-
#define SQLITE_CREATE_TRIGGER
|
|
3260
|
-
#define SQLITE_CREATE_VIEW
|
|
3261
|
-
#define SQLITE_DELETE
|
|
3262
|
-
#define SQLITE_DROP_INDEX
|
|
3263
|
-
#define SQLITE_DROP_TABLE
|
|
3264
|
-
#define SQLITE_DROP_TEMP_INDEX
|
|
3265
|
-
#define SQLITE_DROP_TEMP_TABLE
|
|
3266
|
-
#define SQLITE_DROP_TEMP_TRIGGER
|
|
3267
|
-
#define SQLITE_DROP_TEMP_VIEW
|
|
3268
|
-
#define SQLITE_DROP_TRIGGER
|
|
3269
|
-
#define SQLITE_DROP_VIEW
|
|
3270
|
-
#define SQLITE_INSERT
|
|
3271
|
-
#define SQLITE_PRAGMA
|
|
3272
|
-
#define SQLITE_READ
|
|
3273
|
-
#define SQLITE_SELECT
|
|
3274
|
-
#define SQLITE_TRANSACTION
|
|
3275
|
-
#define SQLITE_UPDATE
|
|
3276
|
-
#define SQLITE_ATTACH
|
|
3277
|
-
#define SQLITE_DETACH
|
|
3278
|
-
#define SQLITE_ALTER_TABLE
|
|
3279
|
-
#define SQLITE_REINDEX
|
|
3280
|
-
#define SQLITE_ANALYZE
|
|
3281
|
-
#define SQLITE_CREATE_VTABLE
|
|
3282
|
-
#define SQLITE_DROP_VTABLE
|
|
3283
|
-
#define SQLITE_FUNCTION
|
|
3284
|
-
#define SQLITE_SAVEPOINT
|
|
3285
|
-
#define SQLITE_COPY
|
|
3286
|
-
#define SQLITE_RECURSIVE
|
|
3252
|
+
#define SQLITE_CREATE_INDEX 1 /* Index Name Table Name */
|
|
3253
|
+
#define SQLITE_CREATE_TABLE 2 /* Table Name NULL */
|
|
3254
|
+
#define SQLITE_CREATE_TEMP_INDEX 3 /* Index Name Table Name */
|
|
3255
|
+
#define SQLITE_CREATE_TEMP_TABLE 4 /* Table Name NULL */
|
|
3256
|
+
#define SQLITE_CREATE_TEMP_TRIGGER 5 /* Trigger Name Table Name */
|
|
3257
|
+
#define SQLITE_CREATE_TEMP_VIEW 6 /* View Name NULL */
|
|
3258
|
+
#define SQLITE_CREATE_TRIGGER 7 /* Trigger Name Table Name */
|
|
3259
|
+
#define SQLITE_CREATE_VIEW 8 /* View Name NULL */
|
|
3260
|
+
#define SQLITE_DELETE 9 /* Table Name NULL */
|
|
3261
|
+
#define SQLITE_DROP_INDEX 10 /* Index Name Table Name */
|
|
3262
|
+
#define SQLITE_DROP_TABLE 11 /* Table Name NULL */
|
|
3263
|
+
#define SQLITE_DROP_TEMP_INDEX 12 /* Index Name Table Name */
|
|
3264
|
+
#define SQLITE_DROP_TEMP_TABLE 13 /* Table Name NULL */
|
|
3265
|
+
#define SQLITE_DROP_TEMP_TRIGGER 14 /* Trigger Name Table Name */
|
|
3266
|
+
#define SQLITE_DROP_TEMP_VIEW 15 /* View Name NULL */
|
|
3267
|
+
#define SQLITE_DROP_TRIGGER 16 /* Trigger Name Table Name */
|
|
3268
|
+
#define SQLITE_DROP_VIEW 17 /* View Name NULL */
|
|
3269
|
+
#define SQLITE_INSERT 18 /* Table Name NULL */
|
|
3270
|
+
#define SQLITE_PRAGMA 19 /* Pragma Name 1st arg or NULL */
|
|
3271
|
+
#define SQLITE_READ 20 /* Table Name Column Name */
|
|
3272
|
+
#define SQLITE_SELECT 21 /* NULL NULL */
|
|
3273
|
+
#define SQLITE_TRANSACTION 22 /* Operation NULL */
|
|
3274
|
+
#define SQLITE_UPDATE 23 /* Table Name Column Name */
|
|
3275
|
+
#define SQLITE_ATTACH 24 /* Filename NULL */
|
|
3276
|
+
#define SQLITE_DETACH 25 /* Database Name NULL */
|
|
3277
|
+
#define SQLITE_ALTER_TABLE 26 /* Database Name Table Name */
|
|
3278
|
+
#define SQLITE_REINDEX 27 /* Index Name NULL */
|
|
3279
|
+
#define SQLITE_ANALYZE 28 /* Table Name NULL */
|
|
3280
|
+
#define SQLITE_CREATE_VTABLE 29 /* Table Name Module Name */
|
|
3281
|
+
#define SQLITE_DROP_VTABLE 30 /* Table Name Module Name */
|
|
3282
|
+
#define SQLITE_FUNCTION 31 /* NULL Function Name */
|
|
3283
|
+
#define SQLITE_SAVEPOINT 32 /* Operation Savepoint Name */
|
|
3284
|
+
#define SQLITE_COPY 0 /* No longer used */
|
|
3285
|
+
#define SQLITE_RECURSIVE 33 /* NULL NULL */
|
|
3287
3286
|
|
|
3288
3287
|
/*
|
|
3289
3288
|
** CAPI3REF: Tracing And Profiling Functions
|
|
@@ -3317,10 +3316,11 @@ SQLITE_API int sqlite3_set_authorizer(
|
|
|
3317
3316
|
** either [sqlite3_trace()] or [sqlite3_trace_v2()] will cancel the
|
|
3318
3317
|
** profile callback.
|
|
3319
3318
|
*/
|
|
3320
|
-
SQLITE_API SQLITE_DEPRECATED void *
|
|
3321
|
-
|
|
3322
|
-
SQLITE_API SQLITE_DEPRECATED void *
|
|
3323
|
-
|
|
3319
|
+
SQLITE_API SQLITE_DEPRECATED void *
|
|
3320
|
+
sqlite3_trace(sqlite3 *, void (*xTrace)(void *, const char *), void *);
|
|
3321
|
+
SQLITE_API SQLITE_DEPRECATED void *
|
|
3322
|
+
sqlite3_profile(sqlite3 *,
|
|
3323
|
+
void (*xProfile)(void *, const char *, sqlite3_uint64), void *);
|
|
3324
3324
|
|
|
3325
3325
|
/*
|
|
3326
3326
|
** CAPI3REF: SQL Trace Event Codes
|
|
@@ -3374,10 +3374,10 @@ SQLITE_API SQLITE_DEPRECATED void *sqlite3_profile(sqlite3*,
|
|
|
3374
3374
|
** and the X argument is unused.
|
|
3375
3375
|
** </dl>
|
|
3376
3376
|
*/
|
|
3377
|
-
#define SQLITE_TRACE_STMT
|
|
3378
|
-
#define SQLITE_TRACE_PROFILE
|
|
3379
|
-
#define SQLITE_TRACE_ROW
|
|
3380
|
-
#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
|
|
3381
3381
|
|
|
3382
3382
|
/*
|
|
3383
3383
|
** CAPI3REF: SQL Trace Hook
|
|
@@ -3410,12 +3410,10 @@ SQLITE_API SQLITE_DEPRECATED void *sqlite3_profile(sqlite3*,
|
|
|
3410
3410
|
** interfaces [sqlite3_trace()] and [sqlite3_profile()], both of which
|
|
3411
3411
|
** are deprecated.
|
|
3412
3412
|
*/
|
|
3413
|
-
SQLITE_API int sqlite3_trace_v2(
|
|
3414
|
-
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
void *pCtx
|
|
3418
|
-
);
|
|
3413
|
+
SQLITE_API int sqlite3_trace_v2(sqlite3 *, unsigned uMask,
|
|
3414
|
+
int (*xCallback)(unsigned, void *, void *,
|
|
3415
|
+
void *),
|
|
3416
|
+
void *pCtx);
|
|
3419
3417
|
|
|
3420
3418
|
/*
|
|
3421
3419
|
** CAPI3REF: Query Progress Callbacks
|
|
@@ -3456,7 +3454,8 @@ SQLITE_API int sqlite3_trace_v2(
|
|
|
3456
3454
|
** invoked directly from [sqlite3_prepare()] while analyzing and generating
|
|
3457
3455
|
** code for complex queries.
|
|
3458
3456
|
*/
|
|
3459
|
-
SQLITE_API void sqlite3_progress_handler(sqlite3*, int, int(*)(void*),
|
|
3457
|
+
SQLITE_API void sqlite3_progress_handler(sqlite3 *, int, int (*)(void *),
|
|
3458
|
+
void *);
|
|
3460
3459
|
|
|
3461
3460
|
/*
|
|
3462
3461
|
** CAPI3REF: Opening A New Database Connection
|
|
@@ -3736,19 +3735,19 @@ SQLITE_API void sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*);
|
|
|
3736
3735
|
**
|
|
3737
3736
|
** See also: [sqlite3_temp_directory]
|
|
3738
3737
|
*/
|
|
3739
|
-
SQLITE_API int
|
|
3740
|
-
|
|
3741
|
-
|
|
3738
|
+
SQLITE_API int
|
|
3739
|
+
sqlite3_open(const char *filename, /* Database filename (UTF-8) */
|
|
3740
|
+
sqlite3 **ppDb /* OUT: SQLite db handle */
|
|
3742
3741
|
);
|
|
3743
|
-
SQLITE_API int
|
|
3744
|
-
|
|
3745
|
-
|
|
3742
|
+
SQLITE_API int
|
|
3743
|
+
sqlite3_open16(const void *filename, /* Database filename (UTF-16) */
|
|
3744
|
+
sqlite3 **ppDb /* OUT: SQLite db handle */
|
|
3746
3745
|
);
|
|
3747
|
-
SQLITE_API int
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
|
|
3751
|
-
|
|
3746
|
+
SQLITE_API int
|
|
3747
|
+
sqlite3_open_v2(const char *filename, /* Database filename (UTF-8) */
|
|
3748
|
+
sqlite3 **ppDb, /* OUT: SQLite db handle */
|
|
3749
|
+
int flags, /* Flags */
|
|
3750
|
+
const char *zVfs /* Name of VFS module to use */
|
|
3752
3751
|
);
|
|
3753
3752
|
|
|
3754
3753
|
/*
|
|
@@ -3817,9 +3816,12 @@ SQLITE_API int sqlite3_open_v2(
|
|
|
3817
3816
|
**
|
|
3818
3817
|
** See the [URI filename] documentation for additional information.
|
|
3819
3818
|
*/
|
|
3820
|
-
SQLITE_API const char *sqlite3_uri_parameter(sqlite3_filename z,
|
|
3821
|
-
|
|
3822
|
-
SQLITE_API
|
|
3819
|
+
SQLITE_API const char *sqlite3_uri_parameter(sqlite3_filename z,
|
|
3820
|
+
const char *zParam);
|
|
3821
|
+
SQLITE_API int sqlite3_uri_boolean(sqlite3_filename z, const char *zParam,
|
|
3822
|
+
int bDefault);
|
|
3823
|
+
SQLITE_API sqlite3_int64 sqlite3_uri_int64(sqlite3_filename, const char *,
|
|
3824
|
+
sqlite3_int64);
|
|
3823
3825
|
SQLITE_API const char *sqlite3_uri_key(sqlite3_filename z, int N);
|
|
3824
3826
|
|
|
3825
3827
|
/*
|
|
@@ -3870,7 +3872,7 @@ SQLITE_API const char *sqlite3_filename_wal(sqlite3_filename);
|
|
|
3870
3872
|
** of this routine results in undefined and probably undesirable
|
|
3871
3873
|
** behavior.
|
|
3872
3874
|
*/
|
|
3873
|
-
SQLITE_API sqlite3_file *sqlite3_database_file_object(const char*);
|
|
3875
|
+
SQLITE_API sqlite3_file *sqlite3_database_file_object(const char *);
|
|
3874
3876
|
|
|
3875
3877
|
/*
|
|
3876
3878
|
** CAPI3REF: Create and Destroy VFS Filenames
|
|
@@ -3917,13 +3919,11 @@ SQLITE_API sqlite3_file *sqlite3_database_file_object(const char*);
|
|
|
3917
3919
|
** then the corresponding [sqlite3_module.xClose() method should also be
|
|
3918
3920
|
** invoked prior to calling sqlite3_free_filename(Y).
|
|
3919
3921
|
*/
|
|
3920
|
-
SQLITE_API sqlite3_filename sqlite3_create_filename(
|
|
3921
|
-
|
|
3922
|
-
|
|
3923
|
-
|
|
3924
|
-
|
|
3925
|
-
const char **azParam
|
|
3926
|
-
);
|
|
3922
|
+
SQLITE_API sqlite3_filename sqlite3_create_filename(const char *zDatabase,
|
|
3923
|
+
const char *zJournal,
|
|
3924
|
+
const char *zWal,
|
|
3925
|
+
int nParam,
|
|
3926
|
+
const char **azParam);
|
|
3927
3927
|
SQLITE_API void sqlite3_free_filename(sqlite3_filename);
|
|
3928
3928
|
|
|
3929
3929
|
/*
|
|
@@ -3989,8 +3989,8 @@ SQLITE_API void sqlite3_free_filename(sqlite3_filename);
|
|
|
3989
3989
|
*/
|
|
3990
3990
|
SQLITE_API int sqlite3_errcode(sqlite3 *db);
|
|
3991
3991
|
SQLITE_API int sqlite3_extended_errcode(sqlite3 *db);
|
|
3992
|
-
SQLITE_API const char *sqlite3_errmsg(sqlite3*);
|
|
3993
|
-
SQLITE_API const void *sqlite3_errmsg16(sqlite3*);
|
|
3992
|
+
SQLITE_API const char *sqlite3_errmsg(sqlite3 *);
|
|
3993
|
+
SQLITE_API const void *sqlite3_errmsg16(sqlite3 *);
|
|
3994
3994
|
SQLITE_API const char *sqlite3_errstr(int);
|
|
3995
3995
|
SQLITE_API int sqlite3_error_offset(sqlite3 *db);
|
|
3996
3996
|
|
|
@@ -4060,7 +4060,7 @@ typedef struct sqlite3_stmt sqlite3_stmt;
|
|
|
4060
4060
|
**
|
|
4061
4061
|
** New run-time limit categories may be added in future releases.
|
|
4062
4062
|
*/
|
|
4063
|
-
SQLITE_API int sqlite3_limit(sqlite3*, int id, int newVal);
|
|
4063
|
+
SQLITE_API int sqlite3_limit(sqlite3 *, int id, int newVal);
|
|
4064
4064
|
|
|
4065
4065
|
/*
|
|
4066
4066
|
** CAPI3REF: Run-Time Limit Categories
|
|
@@ -4118,18 +4118,18 @@ SQLITE_API int sqlite3_limit(sqlite3*, int id, int newVal);
|
|
|
4118
4118
|
** [prepared statement] may start.</dd>)^
|
|
4119
4119
|
** </dl>
|
|
4120
4120
|
*/
|
|
4121
|
-
#define SQLITE_LIMIT_LENGTH
|
|
4122
|
-
#define SQLITE_LIMIT_SQL_LENGTH
|
|
4123
|
-
#define SQLITE_LIMIT_COLUMN
|
|
4124
|
-
#define SQLITE_LIMIT_EXPR_DEPTH
|
|
4125
|
-
#define SQLITE_LIMIT_COMPOUND_SELECT
|
|
4126
|
-
#define SQLITE_LIMIT_VDBE_OP
|
|
4127
|
-
#define SQLITE_LIMIT_FUNCTION_ARG
|
|
4128
|
-
#define SQLITE_LIMIT_ATTACHED
|
|
4129
|
-
#define SQLITE_LIMIT_LIKE_PATTERN_LENGTH
|
|
4130
|
-
#define SQLITE_LIMIT_VARIABLE_NUMBER
|
|
4131
|
-
#define SQLITE_LIMIT_TRIGGER_DEPTH
|
|
4132
|
-
#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
|
|
4133
4133
|
|
|
4134
4134
|
/*
|
|
4135
4135
|
** CAPI3REF: Prepare Flags
|
|
@@ -4166,9 +4166,9 @@ SQLITE_API int sqlite3_limit(sqlite3*, int id, int newVal);
|
|
|
4166
4166
|
** any virtual tables.
|
|
4167
4167
|
** </dl>
|
|
4168
4168
|
*/
|
|
4169
|
-
#define SQLITE_PREPARE_PERSISTENT
|
|
4170
|
-
#define SQLITE_PREPARE_NORMALIZE
|
|
4171
|
-
#define SQLITE_PREPARE_NO_VTAB
|
|
4169
|
+
#define SQLITE_PREPARE_PERSISTENT 0x01
|
|
4170
|
+
#define SQLITE_PREPARE_NORMALIZE 0x02
|
|
4171
|
+
#define SQLITE_PREPARE_NO_VTAB 0x04
|
|
4172
4172
|
|
|
4173
4173
|
/*
|
|
4174
4174
|
** CAPI3REF: Compiling An SQL Statement
|
|
@@ -4270,49 +4270,49 @@ SQLITE_API int sqlite3_limit(sqlite3*, int id, int newVal);
|
|
|
4270
4270
|
** sqlite3_prepare_v2() interface works exactly the same as
|
|
4271
4271
|
** sqlite3_prepare_v3() with a zero prepFlags parameter.
|
|
4272
4272
|
*/
|
|
4273
|
-
SQLITE_API int
|
|
4274
|
-
|
|
4275
|
-
|
|
4276
|
-
|
|
4277
|
-
|
|
4278
|
-
|
|
4273
|
+
SQLITE_API int
|
|
4274
|
+
sqlite3_prepare(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 */
|
|
4279
4279
|
);
|
|
4280
4280
|
SQLITE_API int sqlite3_prepare_v2(
|
|
4281
|
-
|
|
4282
|
-
|
|
4283
|
-
|
|
4284
|
-
|
|
4285
|
-
|
|
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 */
|
|
4286
4286
|
);
|
|
4287
4287
|
SQLITE_API int sqlite3_prepare_v3(
|
|
4288
|
-
|
|
4289
|
-
|
|
4290
|
-
|
|
4291
|
-
|
|
4292
|
-
|
|
4293
|
-
|
|
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 */
|
|
4294
4294
|
);
|
|
4295
4295
|
SQLITE_API int sqlite3_prepare16(
|
|
4296
|
-
|
|
4297
|
-
|
|
4298
|
-
|
|
4299
|
-
|
|
4300
|
-
|
|
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 */
|
|
4301
4301
|
);
|
|
4302
4302
|
SQLITE_API int sqlite3_prepare16_v2(
|
|
4303
|
-
|
|
4304
|
-
|
|
4305
|
-
|
|
4306
|
-
|
|
4307
|
-
|
|
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 */
|
|
4308
4308
|
);
|
|
4309
4309
|
SQLITE_API int sqlite3_prepare16_v3(
|
|
4310
|
-
|
|
4311
|
-
|
|
4312
|
-
|
|
4313
|
-
|
|
4314
|
-
|
|
4315
|
-
|
|
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 */
|
|
4316
4316
|
);
|
|
4317
4317
|
|
|
4318
4318
|
/*
|
|
@@ -4477,7 +4477,7 @@ SQLITE_API int sqlite3_stmt_explain(sqlite3_stmt *pStmt, int eMode);
|
|
|
4477
4477
|
** for example, in diagnostic routines to search for prepared
|
|
4478
4478
|
** statements that are holding a transaction open.
|
|
4479
4479
|
*/
|
|
4480
|
-
SQLITE_API int sqlite3_stmt_busy(sqlite3_stmt*);
|
|
4480
|
+
SQLITE_API int sqlite3_stmt_busy(sqlite3_stmt *);
|
|
4481
4481
|
|
|
4482
4482
|
/*
|
|
4483
4483
|
** CAPI3REF: Dynamically Typed Value Object
|
|
@@ -4677,21 +4677,26 @@ typedef struct sqlite3_context sqlite3_context;
|
|
|
4677
4677
|
** See also: [sqlite3_bind_parameter_count()],
|
|
4678
4678
|
** [sqlite3_bind_parameter_name()], and [sqlite3_bind_parameter_index()].
|
|
4679
4679
|
*/
|
|
4680
|
-
SQLITE_API int sqlite3_bind_blob(sqlite3_stmt*, int, const void*, int n,
|
|
4681
|
-
|
|
4682
|
-
|
|
4683
|
-
|
|
4684
|
-
SQLITE_API int
|
|
4685
|
-
SQLITE_API int
|
|
4686
|
-
SQLITE_API int
|
|
4687
|
-
SQLITE_API int
|
|
4688
|
-
SQLITE_API int
|
|
4689
|
-
|
|
4690
|
-
|
|
4691
|
-
|
|
4692
|
-
SQLITE_API int
|
|
4693
|
-
|
|
4694
|
-
|
|
4680
|
+
SQLITE_API int sqlite3_bind_blob(sqlite3_stmt *, int, const void *, int n,
|
|
4681
|
+
void (*)(void *));
|
|
4682
|
+
SQLITE_API int sqlite3_bind_blob64(sqlite3_stmt *, int, const void *,
|
|
4683
|
+
sqlite3_uint64, void (*)(void *));
|
|
4684
|
+
SQLITE_API int sqlite3_bind_double(sqlite3_stmt *, int, double);
|
|
4685
|
+
SQLITE_API int sqlite3_bind_int(sqlite3_stmt *, int, int);
|
|
4686
|
+
SQLITE_API int sqlite3_bind_int64(sqlite3_stmt *, int, sqlite3_int64);
|
|
4687
|
+
SQLITE_API int sqlite3_bind_null(sqlite3_stmt *, int);
|
|
4688
|
+
SQLITE_API int sqlite3_bind_text(sqlite3_stmt *, int, const char *, int,
|
|
4689
|
+
void (*)(void *));
|
|
4690
|
+
SQLITE_API int sqlite3_bind_text16(sqlite3_stmt *, int, const void *, int,
|
|
4691
|
+
void (*)(void *));
|
|
4692
|
+
SQLITE_API int sqlite3_bind_text64(sqlite3_stmt *, int, const char *,
|
|
4693
|
+
sqlite3_uint64, void (*)(void *),
|
|
4694
|
+
unsigned char encoding);
|
|
4695
|
+
SQLITE_API int sqlite3_bind_value(sqlite3_stmt *, int, const sqlite3_value *);
|
|
4696
|
+
SQLITE_API int sqlite3_bind_pointer(sqlite3_stmt *, int, void *, const char *,
|
|
4697
|
+
void (*)(void *));
|
|
4698
|
+
SQLITE_API int sqlite3_bind_zeroblob(sqlite3_stmt *, int, int n);
|
|
4699
|
+
SQLITE_API int sqlite3_bind_zeroblob64(sqlite3_stmt *, int, sqlite3_uint64);
|
|
4695
4700
|
|
|
4696
4701
|
/*
|
|
4697
4702
|
** CAPI3REF: Number Of SQL Parameters
|
|
@@ -4712,7 +4717,7 @@ SQLITE_API int sqlite3_bind_zeroblob64(sqlite3_stmt*, int, sqlite3_uint64);
|
|
|
4712
4717
|
** [sqlite3_bind_parameter_name()], and
|
|
4713
4718
|
** [sqlite3_bind_parameter_index()].
|
|
4714
4719
|
*/
|
|
4715
|
-
SQLITE_API int sqlite3_bind_parameter_count(sqlite3_stmt*);
|
|
4720
|
+
SQLITE_API int sqlite3_bind_parameter_count(sqlite3_stmt *);
|
|
4716
4721
|
|
|
4717
4722
|
/*
|
|
4718
4723
|
** CAPI3REF: Name Of A Host Parameter
|
|
@@ -4740,7 +4745,7 @@ SQLITE_API int sqlite3_bind_parameter_count(sqlite3_stmt*);
|
|
|
4740
4745
|
** [sqlite3_bind_parameter_count()], and
|
|
4741
4746
|
** [sqlite3_bind_parameter_index()].
|
|
4742
4747
|
*/
|
|
4743
|
-
SQLITE_API const char *sqlite3_bind_parameter_name(sqlite3_stmt*, int);
|
|
4748
|
+
SQLITE_API const char *sqlite3_bind_parameter_name(sqlite3_stmt *, int);
|
|
4744
4749
|
|
|
4745
4750
|
/*
|
|
4746
4751
|
** CAPI3REF: Index Of A Parameter With A Given Name
|
|
@@ -4758,7 +4763,7 @@ SQLITE_API const char *sqlite3_bind_parameter_name(sqlite3_stmt*, int);
|
|
|
4758
4763
|
** [sqlite3_bind_parameter_count()], and
|
|
4759
4764
|
** [sqlite3_bind_parameter_name()].
|
|
4760
4765
|
*/
|
|
4761
|
-
SQLITE_API int sqlite3_bind_parameter_index(sqlite3_stmt*, const char *zName);
|
|
4766
|
+
SQLITE_API int sqlite3_bind_parameter_index(sqlite3_stmt *, const char *zName);
|
|
4762
4767
|
|
|
4763
4768
|
/*
|
|
4764
4769
|
** CAPI3REF: Reset All Bindings On A Prepared Statement
|
|
@@ -4768,7 +4773,7 @@ SQLITE_API int sqlite3_bind_parameter_index(sqlite3_stmt*, const char *zName);
|
|
|
4768
4773
|
** the [sqlite3_bind_blob | bindings] on a [prepared statement].
|
|
4769
4774
|
** ^Use this routine to reset all host parameters to NULL.
|
|
4770
4775
|
*/
|
|
4771
|
-
SQLITE_API int sqlite3_clear_bindings(sqlite3_stmt*);
|
|
4776
|
+
SQLITE_API int sqlite3_clear_bindings(sqlite3_stmt *);
|
|
4772
4777
|
|
|
4773
4778
|
/*
|
|
4774
4779
|
** CAPI3REF: Number Of Columns In A Result Set
|
|
@@ -4813,8 +4818,8 @@ SQLITE_API int sqlite3_column_count(sqlite3_stmt *pStmt);
|
|
|
4813
4818
|
** then the name of the column is unspecified and may change from
|
|
4814
4819
|
** one release of SQLite to the next.
|
|
4815
4820
|
*/
|
|
4816
|
-
SQLITE_API const char *sqlite3_column_name(sqlite3_stmt*, int N);
|
|
4817
|
-
SQLITE_API const void *sqlite3_column_name16(sqlite3_stmt*, int N);
|
|
4821
|
+
SQLITE_API const char *sqlite3_column_name(sqlite3_stmt *, int N);
|
|
4822
|
+
SQLITE_API const void *sqlite3_column_name16(sqlite3_stmt *, int N);
|
|
4818
4823
|
|
|
4819
4824
|
/*
|
|
4820
4825
|
** CAPI3REF: Source Of Data In A Query Result
|
|
@@ -4858,12 +4863,12 @@ SQLITE_API const void *sqlite3_column_name16(sqlite3_stmt*, int N);
|
|
|
4858
4863
|
** for the same [prepared statement] and result column
|
|
4859
4864
|
** at the same time then the results are undefined.
|
|
4860
4865
|
*/
|
|
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);
|
|
4866
|
+
SQLITE_API const char *sqlite3_column_database_name(sqlite3_stmt *, int);
|
|
4867
|
+
SQLITE_API const void *sqlite3_column_database_name16(sqlite3_stmt *, int);
|
|
4868
|
+
SQLITE_API const char *sqlite3_column_table_name(sqlite3_stmt *, int);
|
|
4869
|
+
SQLITE_API const void *sqlite3_column_table_name16(sqlite3_stmt *, int);
|
|
4870
|
+
SQLITE_API const char *sqlite3_column_origin_name(sqlite3_stmt *, int);
|
|
4871
|
+
SQLITE_API const void *sqlite3_column_origin_name16(sqlite3_stmt *, int);
|
|
4867
4872
|
|
|
4868
4873
|
/*
|
|
4869
4874
|
** CAPI3REF: Declared Datatype Of A Query Result
|
|
@@ -4895,8 +4900,8 @@ SQLITE_API const void *sqlite3_column_origin_name16(sqlite3_stmt*,int);
|
|
|
4895
4900
|
** is associated with individual values, not with the containers
|
|
4896
4901
|
** used to hold those values.
|
|
4897
4902
|
*/
|
|
4898
|
-
SQLITE_API const char *sqlite3_column_decltype(sqlite3_stmt*,int);
|
|
4899
|
-
SQLITE_API const void *sqlite3_column_decltype16(sqlite3_stmt*,int);
|
|
4903
|
+
SQLITE_API const char *sqlite3_column_decltype(sqlite3_stmt *, int);
|
|
4904
|
+
SQLITE_API const void *sqlite3_column_decltype16(sqlite3_stmt *, int);
|
|
4900
4905
|
|
|
4901
4906
|
/*
|
|
4902
4907
|
** CAPI3REF: Evaluate An SQL Statement
|
|
@@ -4980,7 +4985,7 @@ SQLITE_API const void *sqlite3_column_decltype16(sqlite3_stmt*,int);
|
|
|
4980
4985
|
** then the more specific [error codes] are returned directly
|
|
4981
4986
|
** by sqlite3_step(). The use of the "vX" interfaces is recommended.
|
|
4982
4987
|
*/
|
|
4983
|
-
SQLITE_API int sqlite3_step(sqlite3_stmt*);
|
|
4988
|
+
SQLITE_API int sqlite3_step(sqlite3_stmt *);
|
|
4984
4989
|
|
|
4985
4990
|
/*
|
|
4986
4991
|
** CAPI3REF: Number of columns in a result set
|
|
@@ -5024,16 +5029,16 @@ SQLITE_API int sqlite3_data_count(sqlite3_stmt *pStmt);
|
|
|
5024
5029
|
** SQLite version 2 and SQLite version 3 should use SQLITE3_TEXT, not
|
|
5025
5030
|
** SQLITE_TEXT.
|
|
5026
5031
|
*/
|
|
5027
|
-
#define SQLITE_INTEGER
|
|
5028
|
-
#define SQLITE_FLOAT
|
|
5029
|
-
#define SQLITE_BLOB
|
|
5030
|
-
#define SQLITE_NULL
|
|
5032
|
+
#define SQLITE_INTEGER 1
|
|
5033
|
+
#define SQLITE_FLOAT 2
|
|
5034
|
+
#define SQLITE_BLOB 4
|
|
5035
|
+
#define SQLITE_NULL 5
|
|
5031
5036
|
#ifdef SQLITE_TEXT
|
|
5032
|
-
#
|
|
5037
|
+
#undef SQLITE_TEXT
|
|
5033
5038
|
#else
|
|
5034
|
-
#
|
|
5039
|
+
#define SQLITE_TEXT 3
|
|
5035
5040
|
#endif
|
|
5036
|
-
#define SQLITE3_TEXT
|
|
5041
|
+
#define SQLITE3_TEXT 3
|
|
5037
5042
|
|
|
5038
5043
|
/*
|
|
5039
5044
|
** CAPI3REF: Result Values From A Query
|
|
@@ -5248,16 +5253,16 @@ SQLITE_API int sqlite3_data_count(sqlite3_stmt *pStmt);
|
|
|
5248
5253
|
** return value is obtained and before any
|
|
5249
5254
|
** other SQLite interface is called on the same [database connection].
|
|
5250
5255
|
*/
|
|
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);
|
|
5256
|
+
SQLITE_API const void *sqlite3_column_blob(sqlite3_stmt *, int iCol);
|
|
5257
|
+
SQLITE_API double sqlite3_column_double(sqlite3_stmt *, int iCol);
|
|
5258
|
+
SQLITE_API int sqlite3_column_int(sqlite3_stmt *, int iCol);
|
|
5259
|
+
SQLITE_API sqlite3_int64 sqlite3_column_int64(sqlite3_stmt *, int iCol);
|
|
5260
|
+
SQLITE_API const unsigned char *sqlite3_column_text(sqlite3_stmt *, int iCol);
|
|
5261
|
+
SQLITE_API const void *sqlite3_column_text16(sqlite3_stmt *, int iCol);
|
|
5262
|
+
SQLITE_API sqlite3_value *sqlite3_column_value(sqlite3_stmt *, int iCol);
|
|
5263
|
+
SQLITE_API int sqlite3_column_bytes(sqlite3_stmt *, int iCol);
|
|
5264
|
+
SQLITE_API int sqlite3_column_bytes16(sqlite3_stmt *, int iCol);
|
|
5265
|
+
SQLITE_API int sqlite3_column_type(sqlite3_stmt *, int iCol);
|
|
5261
5266
|
|
|
5262
5267
|
/*
|
|
5263
5268
|
** CAPI3REF: Destroy A Prepared Statement Object
|
|
@@ -5326,7 +5331,6 @@ SQLITE_API int sqlite3_finalize(sqlite3_stmt *pStmt);
|
|
|
5326
5331
|
*/
|
|
5327
5332
|
SQLITE_API int sqlite3_reset(sqlite3_stmt *pStmt);
|
|
5328
5333
|
|
|
5329
|
-
|
|
5330
5334
|
/*
|
|
5331
5335
|
** CAPI3REF: Create Or Redefine SQL Functions
|
|
5332
5336
|
** KEYWORDS: {function creation routines}
|
|
@@ -5450,49 +5454,28 @@ SQLITE_API int sqlite3_reset(sqlite3_stmt *pStmt);
|
|
|
5450
5454
|
** close the database connection nor finalize or reset the prepared
|
|
5451
5455
|
** statement in which the function is running.
|
|
5452
5456
|
*/
|
|
5453
|
-
SQLITE_API int
|
|
5454
|
-
|
|
5455
|
-
|
|
5456
|
-
|
|
5457
|
-
|
|
5458
|
-
|
|
5459
|
-
void (*xFunc)(sqlite3_context*,int,sqlite3_value**),
|
|
5460
|
-
void (*xStep)(sqlite3_context*,int,sqlite3_value**),
|
|
5461
|
-
void (*xFinal)(sqlite3_context*)
|
|
5462
|
-
);
|
|
5457
|
+
SQLITE_API int
|
|
5458
|
+
sqlite3_create_function(sqlite3 *db, const char *zFunctionName, int nArg,
|
|
5459
|
+
int eTextRep, void *pApp,
|
|
5460
|
+
void (*xFunc)(sqlite3_context *, int, sqlite3_value **),
|
|
5461
|
+
void (*xStep)(sqlite3_context *, int, sqlite3_value **),
|
|
5462
|
+
void (*xFinal)(sqlite3_context *));
|
|
5463
5463
|
SQLITE_API int sqlite3_create_function16(
|
|
5464
|
-
|
|
5465
|
-
|
|
5466
|
-
|
|
5467
|
-
|
|
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
|
-
);
|
|
5464
|
+
sqlite3 *db, const void *zFunctionName, int nArg, int eTextRep, void *pApp,
|
|
5465
|
+
void (*xFunc)(sqlite3_context *, int, sqlite3_value **),
|
|
5466
|
+
void (*xStep)(sqlite3_context *, int, sqlite3_value **),
|
|
5467
|
+
void (*xFinal)(sqlite3_context *));
|
|
5473
5468
|
SQLITE_API int sqlite3_create_function_v2(
|
|
5474
|
-
|
|
5475
|
-
|
|
5476
|
-
|
|
5477
|
-
|
|
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
|
-
);
|
|
5469
|
+
sqlite3 *db, const char *zFunctionName, int nArg, int eTextRep, void *pApp,
|
|
5470
|
+
void (*xFunc)(sqlite3_context *, int, sqlite3_value **),
|
|
5471
|
+
void (*xStep)(sqlite3_context *, int, sqlite3_value **),
|
|
5472
|
+
void (*xFinal)(sqlite3_context *), void (*xDestroy)(void *));
|
|
5484
5473
|
SQLITE_API int sqlite3_create_window_function(
|
|
5485
|
-
|
|
5486
|
-
|
|
5487
|
-
|
|
5488
|
-
|
|
5489
|
-
|
|
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
|
-
);
|
|
5474
|
+
sqlite3 *db, const char *zFunctionName, int nArg, int eTextRep, void *pApp,
|
|
5475
|
+
void (*xStep)(sqlite3_context *, int, sqlite3_value **),
|
|
5476
|
+
void (*xFinal)(sqlite3_context *), void (*xValue)(sqlite3_context *),
|
|
5477
|
+
void (*xInverse)(sqlite3_context *, int, sqlite3_value **),
|
|
5478
|
+
void (*xDestroy)(void *));
|
|
5496
5479
|
|
|
5497
5480
|
/*
|
|
5498
5481
|
** CAPI3REF: Text Encodings
|
|
@@ -5500,12 +5483,12 @@ SQLITE_API int sqlite3_create_window_function(
|
|
|
5500
5483
|
** These constant define integer codes that represent the various
|
|
5501
5484
|
** text encodings supported by SQLite.
|
|
5502
5485
|
*/
|
|
5503
|
-
#define SQLITE_UTF8
|
|
5504
|
-
#define SQLITE_UTF16LE
|
|
5505
|
-
#define SQLITE_UTF16BE
|
|
5506
|
-
#define SQLITE_UTF16
|
|
5507
|
-
#define SQLITE_ANY
|
|
5508
|
-
#define SQLITE_UTF16_ALIGNED
|
|
5486
|
+
#define SQLITE_UTF8 1 /* IMP: R-37514-35566 */
|
|
5487
|
+
#define SQLITE_UTF16LE 2 /* IMP: R-03371-37637 */
|
|
5488
|
+
#define SQLITE_UTF16BE 3 /* IMP: R-51971-34154 */
|
|
5489
|
+
#define SQLITE_UTF16 4 /* Use native byte order */
|
|
5490
|
+
#define SQLITE_ANY 5 /* Deprecated */
|
|
5491
|
+
#define SQLITE_UTF16_ALIGNED 8 /* sqlite3_create_collation only */
|
|
5509
5492
|
|
|
5510
5493
|
/*
|
|
5511
5494
|
** CAPI3REF: Function Flags
|
|
@@ -5583,10 +5566,10 @@ SQLITE_API int sqlite3_create_window_function(
|
|
|
5583
5566
|
** </dd>
|
|
5584
5567
|
** </dl>
|
|
5585
5568
|
*/
|
|
5586
|
-
#define SQLITE_DETERMINISTIC
|
|
5587
|
-
#define SQLITE_DIRECTONLY
|
|
5588
|
-
#define SQLITE_SUBTYPE
|
|
5589
|
-
#define SQLITE_INNOCUOUS
|
|
5569
|
+
#define SQLITE_DETERMINISTIC 0x000000800
|
|
5570
|
+
#define SQLITE_DIRECTONLY 0x000080000
|
|
5571
|
+
#define SQLITE_SUBTYPE 0x000100000
|
|
5572
|
+
#define SQLITE_INNOCUOUS 0x000200000
|
|
5590
5573
|
|
|
5591
5574
|
/*
|
|
5592
5575
|
** CAPI3REF: Deprecated Functions
|
|
@@ -5599,13 +5582,15 @@ SQLITE_API int sqlite3_create_window_function(
|
|
|
5599
5582
|
** these functions, we will not explain what they do.
|
|
5600
5583
|
*/
|
|
5601
5584
|
#ifndef SQLITE_OMIT_DEPRECATED
|
|
5602
|
-
SQLITE_API SQLITE_DEPRECATED int sqlite3_aggregate_count(sqlite3_context*);
|
|
5603
|
-
SQLITE_API SQLITE_DEPRECATED int sqlite3_expired(sqlite3_stmt*);
|
|
5604
|
-
SQLITE_API SQLITE_DEPRECATED int sqlite3_transfer_bindings(sqlite3_stmt*,
|
|
5585
|
+
SQLITE_API SQLITE_DEPRECATED int sqlite3_aggregate_count(sqlite3_context *);
|
|
5586
|
+
SQLITE_API SQLITE_DEPRECATED int sqlite3_expired(sqlite3_stmt *);
|
|
5587
|
+
SQLITE_API SQLITE_DEPRECATED int sqlite3_transfer_bindings(sqlite3_stmt *,
|
|
5588
|
+
sqlite3_stmt *);
|
|
5605
5589
|
SQLITE_API SQLITE_DEPRECATED int sqlite3_global_recover(void);
|
|
5606
5590
|
SQLITE_API SQLITE_DEPRECATED void sqlite3_thread_cleanup(void);
|
|
5607
|
-
SQLITE_API SQLITE_DEPRECATED int
|
|
5608
|
-
|
|
5591
|
+
SQLITE_API SQLITE_DEPRECATED int
|
|
5592
|
+
sqlite3_memory_alarm(void (*)(void *, sqlite3_int64, int), void *,
|
|
5593
|
+
sqlite3_int64);
|
|
5609
5594
|
#endif
|
|
5610
5595
|
|
|
5611
5596
|
/*
|
|
@@ -5736,21 +5721,21 @@ SQLITE_API SQLITE_DEPRECATED int sqlite3_memory_alarm(void(*)(void*,sqlite3_int6
|
|
|
5736
5721
|
** return value is obtained and before any
|
|
5737
5722
|
** other SQLite interface is called on the same [database connection].
|
|
5738
5723
|
*/
|
|
5739
|
-
SQLITE_API const void *sqlite3_value_blob(sqlite3_value*);
|
|
5740
|
-
SQLITE_API double sqlite3_value_double(sqlite3_value*);
|
|
5741
|
-
SQLITE_API int sqlite3_value_int(sqlite3_value*);
|
|
5742
|
-
SQLITE_API sqlite3_int64 sqlite3_value_int64(sqlite3_value*);
|
|
5743
|
-
SQLITE_API void *sqlite3_value_pointer(sqlite3_value*, const char*);
|
|
5744
|
-
SQLITE_API const unsigned char *sqlite3_value_text(sqlite3_value*);
|
|
5745
|
-
SQLITE_API const void *sqlite3_value_text16(sqlite3_value*);
|
|
5746
|
-
SQLITE_API const void *sqlite3_value_text16le(sqlite3_value*);
|
|
5747
|
-
SQLITE_API const void *sqlite3_value_text16be(sqlite3_value*);
|
|
5748
|
-
SQLITE_API int sqlite3_value_bytes(sqlite3_value*);
|
|
5749
|
-
SQLITE_API int sqlite3_value_bytes16(sqlite3_value*);
|
|
5750
|
-
SQLITE_API int sqlite3_value_type(sqlite3_value*);
|
|
5751
|
-
SQLITE_API int sqlite3_value_numeric_type(sqlite3_value*);
|
|
5752
|
-
SQLITE_API int sqlite3_value_nochange(sqlite3_value*);
|
|
5753
|
-
SQLITE_API int sqlite3_value_frombind(sqlite3_value*);
|
|
5724
|
+
SQLITE_API const void *sqlite3_value_blob(sqlite3_value *);
|
|
5725
|
+
SQLITE_API double sqlite3_value_double(sqlite3_value *);
|
|
5726
|
+
SQLITE_API int sqlite3_value_int(sqlite3_value *);
|
|
5727
|
+
SQLITE_API sqlite3_int64 sqlite3_value_int64(sqlite3_value *);
|
|
5728
|
+
SQLITE_API void *sqlite3_value_pointer(sqlite3_value *, const char *);
|
|
5729
|
+
SQLITE_API const unsigned char *sqlite3_value_text(sqlite3_value *);
|
|
5730
|
+
SQLITE_API const void *sqlite3_value_text16(sqlite3_value *);
|
|
5731
|
+
SQLITE_API const void *sqlite3_value_text16le(sqlite3_value *);
|
|
5732
|
+
SQLITE_API const void *sqlite3_value_text16be(sqlite3_value *);
|
|
5733
|
+
SQLITE_API int sqlite3_value_bytes(sqlite3_value *);
|
|
5734
|
+
SQLITE_API int sqlite3_value_bytes16(sqlite3_value *);
|
|
5735
|
+
SQLITE_API int sqlite3_value_type(sqlite3_value *);
|
|
5736
|
+
SQLITE_API int sqlite3_value_numeric_type(sqlite3_value *);
|
|
5737
|
+
SQLITE_API int sqlite3_value_nochange(sqlite3_value *);
|
|
5738
|
+
SQLITE_API int sqlite3_value_frombind(sqlite3_value *);
|
|
5754
5739
|
|
|
5755
5740
|
/*
|
|
5756
5741
|
** CAPI3REF: Report the internal text encoding state of an sqlite3_value object
|
|
@@ -5761,7 +5746,8 @@ SQLITE_API int sqlite3_value_frombind(sqlite3_value*);
|
|
|
5761
5746
|
** of the value X, assuming that X has type TEXT.)^ If sqlite3_value_type(X)
|
|
5762
5747
|
** returns something other than SQLITE_TEXT, then the return value from
|
|
5763
5748
|
** sqlite3_value_encoding(X) is meaningless. ^Calls to
|
|
5764
|
-
** [sqlite3_value_text(X)], [sqlite3_value_text16(X)],
|
|
5749
|
+
** [sqlite3_value_text(X)], [sqlite3_value_text16(X)],
|
|
5750
|
+
*[sqlite3_value_text16be(X)],
|
|
5765
5751
|
** [sqlite3_value_text16le(X)], [sqlite3_value_bytes(X)], or
|
|
5766
5752
|
** [sqlite3_value_bytes16(X)] might change the encoding of the value X and
|
|
5767
5753
|
** thus change the return from subsequent calls to sqlite3_value_encoding(X).
|
|
@@ -5772,7 +5758,7 @@ SQLITE_API int sqlite3_value_frombind(sqlite3_value*);
|
|
|
5772
5758
|
** not need to know what the internal state of an sqlite3_value object is and
|
|
5773
5759
|
** hence should not need to use this interface.
|
|
5774
5760
|
*/
|
|
5775
|
-
SQLITE_API int sqlite3_value_encoding(sqlite3_value*);
|
|
5761
|
+
SQLITE_API int sqlite3_value_encoding(sqlite3_value *);
|
|
5776
5762
|
|
|
5777
5763
|
/*
|
|
5778
5764
|
** CAPI3REF: Finding The Subtype Of SQL Values
|
|
@@ -5784,7 +5770,7 @@ SQLITE_API int sqlite3_value_encoding(sqlite3_value*);
|
|
|
5784
5770
|
** one SQL function to another. Use the [sqlite3_result_subtype()]
|
|
5785
5771
|
** routine to set the subtype for the return value of an SQL function.
|
|
5786
5772
|
*/
|
|
5787
|
-
SQLITE_API unsigned int sqlite3_value_subtype(sqlite3_value*);
|
|
5773
|
+
SQLITE_API unsigned int sqlite3_value_subtype(sqlite3_value *);
|
|
5788
5774
|
|
|
5789
5775
|
/*
|
|
5790
5776
|
** CAPI3REF: Copy And Free SQL Values
|
|
@@ -5801,8 +5787,8 @@ SQLITE_API unsigned int sqlite3_value_subtype(sqlite3_value*);
|
|
|
5801
5787
|
** previously obtained from [sqlite3_value_dup()]. ^If V is a NULL pointer
|
|
5802
5788
|
** then sqlite3_value_free(V) is a harmless no-op.
|
|
5803
5789
|
*/
|
|
5804
|
-
SQLITE_API sqlite3_value *sqlite3_value_dup(const sqlite3_value*);
|
|
5805
|
-
SQLITE_API void sqlite3_value_free(sqlite3_value*);
|
|
5790
|
+
SQLITE_API sqlite3_value *sqlite3_value_dup(const sqlite3_value *);
|
|
5791
|
+
SQLITE_API void sqlite3_value_free(sqlite3_value *);
|
|
5806
5792
|
|
|
5807
5793
|
/*
|
|
5808
5794
|
** CAPI3REF: Obtain Aggregate Function Context
|
|
@@ -5847,7 +5833,7 @@ SQLITE_API void sqlite3_value_free(sqlite3_value*);
|
|
|
5847
5833
|
** This routine must be called from the same thread in which
|
|
5848
5834
|
** the aggregate SQL function is running.
|
|
5849
5835
|
*/
|
|
5850
|
-
SQLITE_API void *sqlite3_aggregate_context(sqlite3_context*, int nBytes);
|
|
5836
|
+
SQLITE_API void *sqlite3_aggregate_context(sqlite3_context *, int nBytes);
|
|
5851
5837
|
|
|
5852
5838
|
/*
|
|
5853
5839
|
** CAPI3REF: User Data For Functions
|
|
@@ -5862,7 +5848,7 @@ SQLITE_API void *sqlite3_aggregate_context(sqlite3_context*, int nBytes);
|
|
|
5862
5848
|
** This routine must be called from the same thread in which
|
|
5863
5849
|
** the application-defined function is running.
|
|
5864
5850
|
*/
|
|
5865
|
-
SQLITE_API void *sqlite3_user_data(sqlite3_context*);
|
|
5851
|
+
SQLITE_API void *sqlite3_user_data(sqlite3_context *);
|
|
5866
5852
|
|
|
5867
5853
|
/*
|
|
5868
5854
|
** CAPI3REF: Database Connection For Functions
|
|
@@ -5874,7 +5860,7 @@ SQLITE_API void *sqlite3_user_data(sqlite3_context*);
|
|
|
5874
5860
|
** and [sqlite3_create_function16()] routines that originally
|
|
5875
5861
|
** registered the application defined function.
|
|
5876
5862
|
*/
|
|
5877
|
-
SQLITE_API sqlite3 *sqlite3_context_db_handle(sqlite3_context*);
|
|
5863
|
+
SQLITE_API sqlite3 *sqlite3_context_db_handle(sqlite3_context *);
|
|
5878
5864
|
|
|
5879
5865
|
/*
|
|
5880
5866
|
** CAPI3REF: Function Auxiliary Data
|
|
@@ -5886,12 +5872,14 @@ SQLITE_API sqlite3 *sqlite3_context_db_handle(sqlite3_context*);
|
|
|
5886
5872
|
** query execution, under some circumstances the associated auxiliary data
|
|
5887
5873
|
** might be preserved. An example of where this might be useful is in a
|
|
5888
5874
|
** regular-expression matching function. The compiled version of the regular
|
|
5889
|
-
** expression can be stored as auxiliary data associated with the pattern
|
|
5875
|
+
** expression can be stored as auxiliary data associated with the pattern
|
|
5876
|
+
*string.
|
|
5890
5877
|
** Then as long as the pattern string remains the same,
|
|
5891
5878
|
** the compiled regular expression can be reused on multiple
|
|
5892
5879
|
** invocations of the same function.
|
|
5893
5880
|
**
|
|
5894
|
-
** ^The sqlite3_get_auxdata(C,N) interface returns a pointer to the auxiliary
|
|
5881
|
+
** ^The sqlite3_get_auxdata(C,N) interface returns a pointer to the auxiliary
|
|
5882
|
+
*data
|
|
5895
5883
|
** associated by the sqlite3_set_auxdata(C,N,P,X) function with the Nth argument
|
|
5896
5884
|
** value to the application-defined function. ^N is zero for the left-most
|
|
5897
5885
|
** function argument. ^If there is no auxiliary data
|
|
@@ -5935,8 +5923,9 @@ SQLITE_API sqlite3 *sqlite3_context_db_handle(sqlite3_context*);
|
|
|
5935
5923
|
**
|
|
5936
5924
|
** See also: [sqlite3_get_clientdata()] and [sqlite3_set_clientdata()].
|
|
5937
5925
|
*/
|
|
5938
|
-
SQLITE_API void *sqlite3_get_auxdata(sqlite3_context*, int N);
|
|
5939
|
-
SQLITE_API void sqlite3_set_auxdata(sqlite3_context*, int N, void*,
|
|
5926
|
+
SQLITE_API void *sqlite3_get_auxdata(sqlite3_context *, int N);
|
|
5927
|
+
SQLITE_API void sqlite3_set_auxdata(sqlite3_context *, int N, void *,
|
|
5928
|
+
void (*)(void *));
|
|
5940
5929
|
|
|
5941
5930
|
/*
|
|
5942
5931
|
** CAPI3REF: Database Connection Client Data
|
|
@@ -5991,8 +5980,9 @@ SQLITE_API void sqlite3_set_auxdata(sqlite3_context*, int N, void*, void (*)(voi
|
|
|
5991
5980
|
**
|
|
5992
5981
|
** See also: [sqlite3_set_auxdata()] and [sqlite3_get_auxdata()].
|
|
5993
5982
|
*/
|
|
5994
|
-
SQLITE_API void *sqlite3_get_clientdata(sqlite3*,const char*);
|
|
5995
|
-
SQLITE_API int sqlite3_set_clientdata(sqlite3*, const char*, void*,
|
|
5983
|
+
SQLITE_API void *sqlite3_get_clientdata(sqlite3 *, const char *);
|
|
5984
|
+
SQLITE_API int sqlite3_set_clientdata(sqlite3 *, const char *, void *,
|
|
5985
|
+
void (*)(void *));
|
|
5996
5986
|
|
|
5997
5987
|
/*
|
|
5998
5988
|
** CAPI3REF: Constants Defining Special Destructor Behavior
|
|
@@ -6008,9 +5998,9 @@ SQLITE_API int sqlite3_set_clientdata(sqlite3*, const char*, void*, void(*)(void
|
|
|
6008
5998
|
** The typedef is necessary to work around problems in certain
|
|
6009
5999
|
** C++ compilers.
|
|
6010
6000
|
*/
|
|
6011
|
-
typedef void (*sqlite3_destructor_type)(void*);
|
|
6012
|
-
#define SQLITE_STATIC
|
|
6013
|
-
#define SQLITE_TRANSIENT
|
|
6001
|
+
typedef void (*sqlite3_destructor_type)(void *);
|
|
6002
|
+
#define SQLITE_STATIC ((sqlite3_destructor_type)0)
|
|
6003
|
+
#define SQLITE_TRANSIENT ((sqlite3_destructor_type)-1)
|
|
6014
6004
|
|
|
6015
6005
|
/*
|
|
6016
6006
|
** CAPI3REF: Setting The Result Of An SQL Function
|
|
@@ -6159,29 +6149,35 @@ typedef void (*sqlite3_destructor_type)(void*);
|
|
|
6159
6149
|
** than the one containing the application-defined function that received
|
|
6160
6150
|
** the [sqlite3_context] pointer, the results are undefined.
|
|
6161
6151
|
*/
|
|
6162
|
-
SQLITE_API void sqlite3_result_blob(sqlite3_context*, const void*, int,
|
|
6163
|
-
|
|
6164
|
-
|
|
6165
|
-
|
|
6166
|
-
SQLITE_API void
|
|
6167
|
-
SQLITE_API void
|
|
6168
|
-
SQLITE_API void
|
|
6169
|
-
SQLITE_API void
|
|
6170
|
-
SQLITE_API void
|
|
6171
|
-
SQLITE_API void
|
|
6172
|
-
SQLITE_API void
|
|
6173
|
-
SQLITE_API void
|
|
6174
|
-
SQLITE_API void
|
|
6175
|
-
SQLITE_API void
|
|
6176
|
-
|
|
6177
|
-
SQLITE_API void
|
|
6178
|
-
|
|
6179
|
-
|
|
6180
|
-
SQLITE_API void
|
|
6181
|
-
|
|
6182
|
-
SQLITE_API void
|
|
6183
|
-
|
|
6184
|
-
|
|
6152
|
+
SQLITE_API void sqlite3_result_blob(sqlite3_context *, const void *, int,
|
|
6153
|
+
void (*)(void *));
|
|
6154
|
+
SQLITE_API void sqlite3_result_blob64(sqlite3_context *, const void *,
|
|
6155
|
+
sqlite3_uint64, void (*)(void *));
|
|
6156
|
+
SQLITE_API void sqlite3_result_double(sqlite3_context *, double);
|
|
6157
|
+
SQLITE_API void sqlite3_result_error(sqlite3_context *, const char *, int);
|
|
6158
|
+
SQLITE_API void sqlite3_result_error16(sqlite3_context *, const void *, int);
|
|
6159
|
+
SQLITE_API void sqlite3_result_error_toobig(sqlite3_context *);
|
|
6160
|
+
SQLITE_API void sqlite3_result_error_nomem(sqlite3_context *);
|
|
6161
|
+
SQLITE_API void sqlite3_result_error_code(sqlite3_context *, int);
|
|
6162
|
+
SQLITE_API void sqlite3_result_int(sqlite3_context *, int);
|
|
6163
|
+
SQLITE_API void sqlite3_result_int64(sqlite3_context *, sqlite3_int64);
|
|
6164
|
+
SQLITE_API void sqlite3_result_null(sqlite3_context *);
|
|
6165
|
+
SQLITE_API void sqlite3_result_text(sqlite3_context *, const char *, int,
|
|
6166
|
+
void (*)(void *));
|
|
6167
|
+
SQLITE_API void sqlite3_result_text64(sqlite3_context *, const char *,
|
|
6168
|
+
sqlite3_uint64, void (*)(void *),
|
|
6169
|
+
unsigned char encoding);
|
|
6170
|
+
SQLITE_API void sqlite3_result_text16(sqlite3_context *, const void *, int,
|
|
6171
|
+
void (*)(void *));
|
|
6172
|
+
SQLITE_API void sqlite3_result_text16le(sqlite3_context *, const void *, int,
|
|
6173
|
+
void (*)(void *));
|
|
6174
|
+
SQLITE_API void sqlite3_result_text16be(sqlite3_context *, const void *, int,
|
|
6175
|
+
void (*)(void *));
|
|
6176
|
+
SQLITE_API void sqlite3_result_value(sqlite3_context *, sqlite3_value *);
|
|
6177
|
+
SQLITE_API void sqlite3_result_pointer(sqlite3_context *, void *, const char *,
|
|
6178
|
+
void (*)(void *));
|
|
6179
|
+
SQLITE_API void sqlite3_result_zeroblob(sqlite3_context *, int n);
|
|
6180
|
+
SQLITE_API int sqlite3_result_zeroblob64(sqlite3_context *, sqlite3_uint64 n);
|
|
6185
6181
|
|
|
6186
6182
|
/*
|
|
6187
6183
|
** CAPI3REF: Setting The Subtype Of An SQL Function
|
|
@@ -6195,7 +6191,7 @@ SQLITE_API int sqlite3_result_zeroblob64(sqlite3_context*, sqlite3_uint64 n);
|
|
|
6195
6191
|
** The number of subtype bytes preserved by SQLite might increase
|
|
6196
6192
|
** in future releases of SQLite.
|
|
6197
6193
|
*/
|
|
6198
|
-
SQLITE_API void sqlite3_result_subtype(sqlite3_context*,unsigned int);
|
|
6194
|
+
SQLITE_API void sqlite3_result_subtype(sqlite3_context *, unsigned int);
|
|
6199
6195
|
|
|
6200
6196
|
/*
|
|
6201
6197
|
** CAPI3REF: Define New Collating Sequences
|
|
@@ -6279,27 +6275,15 @@ SQLITE_API void sqlite3_result_subtype(sqlite3_context*,unsigned int);
|
|
|
6279
6275
|
** See also: [sqlite3_collation_needed()] and [sqlite3_collation_needed16()].
|
|
6280
6276
|
*/
|
|
6281
6277
|
SQLITE_API int sqlite3_create_collation(
|
|
6282
|
-
|
|
6283
|
-
|
|
6284
|
-
int eTextRep,
|
|
6285
|
-
void *pArg,
|
|
6286
|
-
int(*xCompare)(void*,int,const void*,int,const void*)
|
|
6287
|
-
);
|
|
6278
|
+
sqlite3 *, const char *zName, int eTextRep, void *pArg,
|
|
6279
|
+
int (*xCompare)(void *, int, const void *, int, const void *));
|
|
6288
6280
|
SQLITE_API int sqlite3_create_collation_v2(
|
|
6289
|
-
|
|
6290
|
-
|
|
6291
|
-
|
|
6292
|
-
void *pArg,
|
|
6293
|
-
int(*xCompare)(void*,int,const void*,int,const void*),
|
|
6294
|
-
void(*xDestroy)(void*)
|
|
6295
|
-
);
|
|
6281
|
+
sqlite3 *, const char *zName, int eTextRep, void *pArg,
|
|
6282
|
+
int (*xCompare)(void *, int, const void *, int, const void *),
|
|
6283
|
+
void (*xDestroy)(void *));
|
|
6296
6284
|
SQLITE_API int sqlite3_create_collation16(
|
|
6297
|
-
|
|
6298
|
-
|
|
6299
|
-
int eTextRep,
|
|
6300
|
-
void *pArg,
|
|
6301
|
-
int(*xCompare)(void*,int,const void*,int,const void*)
|
|
6302
|
-
);
|
|
6285
|
+
sqlite3 *, const void *zName, int eTextRep, void *pArg,
|
|
6286
|
+
int (*xCompare)(void *, int, const void *, int, const void *));
|
|
6303
6287
|
|
|
6304
6288
|
/*
|
|
6305
6289
|
** CAPI3REF: Collation Needed Callbacks
|
|
@@ -6328,24 +6312,20 @@ SQLITE_API int sqlite3_create_collation16(
|
|
|
6328
6312
|
** [sqlite3_create_collation()], [sqlite3_create_collation16()], or
|
|
6329
6313
|
** [sqlite3_create_collation_v2()].
|
|
6330
6314
|
*/
|
|
6331
|
-
SQLITE_API int sqlite3_collation_needed(
|
|
6332
|
-
|
|
6333
|
-
|
|
6334
|
-
|
|
6335
|
-
)
|
|
6336
|
-
|
|
6337
|
-
sqlite3*,
|
|
6338
|
-
void*,
|
|
6339
|
-
void(*)(void*,sqlite3*,int eTextRep,const void*)
|
|
6340
|
-
);
|
|
6315
|
+
SQLITE_API int sqlite3_collation_needed(sqlite3 *, void *,
|
|
6316
|
+
void (*)(void *, sqlite3 *,
|
|
6317
|
+
int eTextRep, const char *));
|
|
6318
|
+
SQLITE_API int sqlite3_collation_needed16(sqlite3 *, void *,
|
|
6319
|
+
void (*)(void *, sqlite3 *,
|
|
6320
|
+
int eTextRep, const void *));
|
|
6341
6321
|
|
|
6342
6322
|
#ifdef SQLITE_ENABLE_CEROD
|
|
6343
6323
|
/*
|
|
6344
6324
|
** Specify the activation key for a CEROD database. Unless
|
|
6345
6325
|
** activated, none of the CEROD routines will work.
|
|
6346
6326
|
*/
|
|
6347
|
-
SQLITE_API void
|
|
6348
|
-
|
|
6327
|
+
SQLITE_API void
|
|
6328
|
+
sqlite3_activate_cerod(const char *zPassPhrase /* Activation phrase */
|
|
6349
6329
|
);
|
|
6350
6330
|
#endif
|
|
6351
6331
|
|
|
@@ -6490,11 +6470,13 @@ SQLITE_API SQLITE_EXTERN char *sqlite3_data_directory;
|
|
|
6490
6470
|
** UTF-8 or UTF-16, respectively.
|
|
6491
6471
|
*/
|
|
6492
6472
|
SQLITE_API int sqlite3_win32_set_directory(
|
|
6493
|
-
|
|
6494
|
-
|
|
6473
|
+
unsigned long type, /* Identifier for directory being set or reset */
|
|
6474
|
+
void *zValue /* New value for directory being set or reset */
|
|
6495
6475
|
);
|
|
6496
|
-
SQLITE_API int sqlite3_win32_set_directory8(unsigned long type,
|
|
6497
|
-
|
|
6476
|
+
SQLITE_API int sqlite3_win32_set_directory8(unsigned long type,
|
|
6477
|
+
const char *zValue);
|
|
6478
|
+
SQLITE_API int sqlite3_win32_set_directory16(unsigned long type,
|
|
6479
|
+
const void *zValue);
|
|
6498
6480
|
|
|
6499
6481
|
/*
|
|
6500
6482
|
** CAPI3REF: Win32 Directory Types
|
|
@@ -6502,8 +6484,8 @@ SQLITE_API int sqlite3_win32_set_directory16(unsigned long type, const void *zVa
|
|
|
6502
6484
|
** These macros are only available on Windows. They define the allowed values
|
|
6503
6485
|
** for the type argument to the [sqlite3_win32_set_directory] interface.
|
|
6504
6486
|
*/
|
|
6505
|
-
#define SQLITE_WIN32_DATA_DIRECTORY_TYPE
|
|
6506
|
-
#define SQLITE_WIN32_TEMP_DIRECTORY_TYPE
|
|
6487
|
+
#define SQLITE_WIN32_DATA_DIRECTORY_TYPE 1
|
|
6488
|
+
#define SQLITE_WIN32_TEMP_DIRECTORY_TYPE 2
|
|
6507
6489
|
|
|
6508
6490
|
/*
|
|
6509
6491
|
** CAPI3REF: Test For Auto-Commit Mode
|
|
@@ -6527,7 +6509,7 @@ SQLITE_API int sqlite3_win32_set_directory16(unsigned long type, const void *zVa
|
|
|
6527
6509
|
** connection while this routine is running, then the return value
|
|
6528
6510
|
** is undefined.
|
|
6529
6511
|
*/
|
|
6530
|
-
SQLITE_API int sqlite3_get_autocommit(sqlite3*);
|
|
6512
|
+
SQLITE_API int sqlite3_get_autocommit(sqlite3 *);
|
|
6531
6513
|
|
|
6532
6514
|
/*
|
|
6533
6515
|
** CAPI3REF: Find The Database Handle Of A Prepared Statement
|
|
@@ -6540,7 +6522,7 @@ SQLITE_API int sqlite3_get_autocommit(sqlite3*);
|
|
|
6540
6522
|
** to the [sqlite3_prepare_v2()] call (or its variants) that was used to
|
|
6541
6523
|
** create the statement in the first place.
|
|
6542
6524
|
*/
|
|
6543
|
-
SQLITE_API sqlite3 *sqlite3_db_handle(sqlite3_stmt*);
|
|
6525
|
+
SQLITE_API sqlite3 *sqlite3_db_handle(sqlite3_stmt *);
|
|
6544
6526
|
|
|
6545
6527
|
/*
|
|
6546
6528
|
** CAPI3REF: Return The Schema Name For A Database Connection
|
|
@@ -6594,7 +6576,8 @@ SQLITE_API const char *sqlite3_db_name(sqlite3 *db, int N);
|
|
|
6594
6576
|
** <li> [sqlite3_filename_wal()]
|
|
6595
6577
|
** </ul>
|
|
6596
6578
|
*/
|
|
6597
|
-
SQLITE_API sqlite3_filename sqlite3_db_filename(sqlite3 *db,
|
|
6579
|
+
SQLITE_API sqlite3_filename sqlite3_db_filename(sqlite3 *db,
|
|
6580
|
+
const char *zDbName);
|
|
6598
6581
|
|
|
6599
6582
|
/*
|
|
6600
6583
|
** CAPI3REF: Determine if a database is read-only
|
|
@@ -6622,7 +6605,7 @@ SQLITE_API int sqlite3_db_readonly(sqlite3 *db, const char *zDbName);
|
|
|
6622
6605
|
** ^If the S argument to sqlite3_txn_state(D,S) is not the name of
|
|
6623
6606
|
** a valid schema, then -1 is returned.
|
|
6624
6607
|
*/
|
|
6625
|
-
SQLITE_API int sqlite3_txn_state(sqlite3*,const char *zSchema);
|
|
6608
|
+
SQLITE_API int sqlite3_txn_state(sqlite3 *, const char *zSchema);
|
|
6626
6609
|
|
|
6627
6610
|
/*
|
|
6628
6611
|
** CAPI3REF: Allowed return values from sqlite3_txn_state()
|
|
@@ -6653,8 +6636,8 @@ SQLITE_API int sqlite3_txn_state(sqlite3*,const char *zSchema);
|
|
|
6653
6636
|
** but has not yet committed. The transaction state will change to
|
|
6654
6637
|
** to SQLITE_TXN_NONE at the next [ROLLBACK] or [COMMIT].</dd>
|
|
6655
6638
|
*/
|
|
6656
|
-
#define SQLITE_TXN_NONE
|
|
6657
|
-
#define SQLITE_TXN_READ
|
|
6639
|
+
#define SQLITE_TXN_NONE 0
|
|
6640
|
+
#define SQLITE_TXN_READ 1
|
|
6658
6641
|
#define SQLITE_TXN_WRITE 2
|
|
6659
6642
|
|
|
6660
6643
|
/*
|
|
@@ -6720,8 +6703,8 @@ SQLITE_API sqlite3_stmt *sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt);
|
|
|
6720
6703
|
**
|
|
6721
6704
|
** See also the [sqlite3_update_hook()] interface.
|
|
6722
6705
|
*/
|
|
6723
|
-
SQLITE_API void *sqlite3_commit_hook(sqlite3*, int(*)(void*), void*);
|
|
6724
|
-
SQLITE_API void *sqlite3_rollback_hook(sqlite3*, void(*)(void *), void*);
|
|
6706
|
+
SQLITE_API void *sqlite3_commit_hook(sqlite3 *, int (*)(void *), void *);
|
|
6707
|
+
SQLITE_API void *sqlite3_rollback_hook(sqlite3 *, void (*)(void *), void *);
|
|
6725
6708
|
|
|
6726
6709
|
/*
|
|
6727
6710
|
** CAPI3REF: Autovacuum Compaction Amount Callback
|
|
@@ -6781,13 +6764,11 @@ SQLITE_API void *sqlite3_rollback_hook(sqlite3*, void(*)(void *), void*);
|
|
|
6781
6764
|
** }
|
|
6782
6765
|
** </pre></blockquote>
|
|
6783
6766
|
*/
|
|
6784
|
-
SQLITE_API int
|
|
6785
|
-
|
|
6786
|
-
|
|
6787
|
-
|
|
6788
|
-
|
|
6789
|
-
);
|
|
6790
|
-
|
|
6767
|
+
SQLITE_API int
|
|
6768
|
+
sqlite3_autovacuum_pages(sqlite3 *db,
|
|
6769
|
+
unsigned int (*)(void *, const char *, unsigned int,
|
|
6770
|
+
unsigned int, unsigned int),
|
|
6771
|
+
void *, void (*)(void *));
|
|
6791
6772
|
|
|
6792
6773
|
/*
|
|
6793
6774
|
** CAPI3REF: Data Change Notification Callbacks
|
|
@@ -6838,11 +6819,10 @@ SQLITE_API int sqlite3_autovacuum_pages(
|
|
|
6838
6819
|
** See also the [sqlite3_commit_hook()], [sqlite3_rollback_hook()],
|
|
6839
6820
|
** and [sqlite3_preupdate_hook()] interfaces.
|
|
6840
6821
|
*/
|
|
6841
|
-
SQLITE_API void *sqlite3_update_hook(
|
|
6842
|
-
|
|
6843
|
-
|
|
6844
|
-
|
|
6845
|
-
);
|
|
6822
|
+
SQLITE_API void *sqlite3_update_hook(sqlite3 *,
|
|
6823
|
+
void (*)(void *, int, char const *,
|
|
6824
|
+
char const *, sqlite3_int64),
|
|
6825
|
+
void *);
|
|
6846
6826
|
|
|
6847
6827
|
/*
|
|
6848
6828
|
** CAPI3REF: Enable Or Disable Shared Pager Cache
|
|
@@ -6918,7 +6898,7 @@ SQLITE_API int sqlite3_release_memory(int);
|
|
|
6918
6898
|
**
|
|
6919
6899
|
** See also: [sqlite3_release_memory()]
|
|
6920
6900
|
*/
|
|
6921
|
-
SQLITE_API int sqlite3_db_release_memory(sqlite3*);
|
|
6901
|
+
SQLITE_API int sqlite3_db_release_memory(sqlite3 *);
|
|
6922
6902
|
|
|
6923
6903
|
/*
|
|
6924
6904
|
** CAPI3REF: Impose A Limit On Heap Size
|
|
@@ -6998,7 +6978,6 @@ SQLITE_API sqlite3_int64 sqlite3_hard_heap_limit64(sqlite3_int64 N);
|
|
|
6998
6978
|
*/
|
|
6999
6979
|
SQLITE_API SQLITE_DEPRECATED void sqlite3_soft_heap_limit(int N);
|
|
7000
6980
|
|
|
7001
|
-
|
|
7002
6981
|
/*
|
|
7003
6982
|
** CAPI3REF: Extract Metadata About A Column Of A Table
|
|
7004
6983
|
** METHOD: sqlite3
|
|
@@ -7069,15 +7048,15 @@ SQLITE_API SQLITE_DEPRECATED void sqlite3_soft_heap_limit(int N);
|
|
|
7069
7048
|
** any errors are encountered while loading the schema.
|
|
7070
7049
|
*/
|
|
7071
7050
|
SQLITE_API int sqlite3_table_column_metadata(
|
|
7072
|
-
|
|
7073
|
-
|
|
7074
|
-
|
|
7075
|
-
|
|
7076
|
-
|
|
7077
|
-
|
|
7078
|
-
|
|
7079
|
-
|
|
7080
|
-
|
|
7051
|
+
sqlite3 *db, /* Connection handle */
|
|
7052
|
+
const char *zDbName, /* Database name or NULL */
|
|
7053
|
+
const char *zTableName, /* Table name */
|
|
7054
|
+
const char *zColumnName, /* Column name */
|
|
7055
|
+
char const **pzDataType, /* OUTPUT: Declared data type */
|
|
7056
|
+
char const **pzCollSeq, /* OUTPUT: Collation sequence name */
|
|
7057
|
+
int *pNotNull, /* OUTPUT: True if NOT NULL constraint exists */
|
|
7058
|
+
int *pPrimaryKey, /* OUTPUT: True if column part of PK */
|
|
7059
|
+
int *pAutoinc /* OUTPUT: True if column is auto-increment */
|
|
7081
7060
|
);
|
|
7082
7061
|
|
|
7083
7062
|
/*
|
|
@@ -7125,10 +7104,10 @@ SQLITE_API int sqlite3_table_column_metadata(
|
|
|
7125
7104
|
** See also the [load_extension() SQL function].
|
|
7126
7105
|
*/
|
|
7127
7106
|
SQLITE_API int sqlite3_load_extension(
|
|
7128
|
-
|
|
7129
|
-
|
|
7130
|
-
|
|
7131
|
-
|
|
7107
|
+
sqlite3 *db, /* Load the extension into this database connection */
|
|
7108
|
+
const char *zFile, /* Name of the shared library containing extension */
|
|
7109
|
+
const char *zProc, /* Entry point. Derived from zFile if 0 */
|
|
7110
|
+
char **pzErrMsg /* Put error message here if not 0 */
|
|
7132
7111
|
);
|
|
7133
7112
|
|
|
7134
7113
|
/*
|
|
@@ -7194,7 +7173,7 @@ SQLITE_API int sqlite3_enable_load_extension(sqlite3 *db, int onoff);
|
|
|
7194
7173
|
** See also: [sqlite3_reset_auto_extension()]
|
|
7195
7174
|
** and [sqlite3_cancel_auto_extension()]
|
|
7196
7175
|
*/
|
|
7197
|
-
SQLITE_API int sqlite3_auto_extension(void(*xEntryPoint)(void));
|
|
7176
|
+
SQLITE_API int sqlite3_auto_extension(void (*xEntryPoint)(void));
|
|
7198
7177
|
|
|
7199
7178
|
/*
|
|
7200
7179
|
** CAPI3REF: Cancel Automatic Extension Loading
|
|
@@ -7206,7 +7185,7 @@ SQLITE_API int sqlite3_auto_extension(void(*xEntryPoint)(void));
|
|
|
7206
7185
|
** unregistered and it returns 0 if X was not on the list of initialization
|
|
7207
7186
|
** routines.
|
|
7208
7187
|
*/
|
|
7209
|
-
SQLITE_API int sqlite3_cancel_auto_extension(void(*xEntryPoint)(void));
|
|
7188
|
+
SQLITE_API int sqlite3_cancel_auto_extension(void (*xEntryPoint)(void));
|
|
7210
7189
|
|
|
7211
7190
|
/*
|
|
7212
7191
|
** CAPI3REF: Reset Automatic Extension Loading
|
|
@@ -7242,30 +7221,29 @@ typedef struct sqlite3_module sqlite3_module;
|
|
|
7242
7221
|
*/
|
|
7243
7222
|
struct sqlite3_module {
|
|
7244
7223
|
int iVersion;
|
|
7245
|
-
int (*xCreate)(sqlite3*, void *pAux,
|
|
7246
|
-
|
|
7247
|
-
|
|
7248
|
-
|
|
7249
|
-
|
|
7250
|
-
sqlite3_vtab **ppVTab, char**);
|
|
7251
|
-
int (*xBestIndex)(sqlite3_vtab *pVTab, sqlite3_index_info*);
|
|
7224
|
+
int (*xCreate)(sqlite3 *, void *pAux, int argc, const char *const *argv,
|
|
7225
|
+
sqlite3_vtab **ppVTab, char **);
|
|
7226
|
+
int (*xConnect)(sqlite3 *, void *pAux, int argc, const char *const *argv,
|
|
7227
|
+
sqlite3_vtab **ppVTab, char **);
|
|
7228
|
+
int (*xBestIndex)(sqlite3_vtab *pVTab, sqlite3_index_info *);
|
|
7252
7229
|
int (*xDisconnect)(sqlite3_vtab *pVTab);
|
|
7253
7230
|
int (*xDestroy)(sqlite3_vtab *pVTab);
|
|
7254
7231
|
int (*xOpen)(sqlite3_vtab *pVTab, sqlite3_vtab_cursor **ppCursor);
|
|
7255
|
-
int (*xClose)(sqlite3_vtab_cursor*);
|
|
7256
|
-
int (*xFilter)(sqlite3_vtab_cursor*, int idxNum, const char *idxStr,
|
|
7257
|
-
|
|
7258
|
-
int (*xNext)(sqlite3_vtab_cursor*);
|
|
7259
|
-
int (*xEof)(sqlite3_vtab_cursor*);
|
|
7260
|
-
int (*xColumn)(sqlite3_vtab_cursor*, sqlite3_context*, int);
|
|
7261
|
-
int (*xRowid)(sqlite3_vtab_cursor*, sqlite3_int64 *pRowid);
|
|
7232
|
+
int (*xClose)(sqlite3_vtab_cursor *);
|
|
7233
|
+
int (*xFilter)(sqlite3_vtab_cursor *, int idxNum, const char *idxStr,
|
|
7234
|
+
int argc, sqlite3_value **argv);
|
|
7235
|
+
int (*xNext)(sqlite3_vtab_cursor *);
|
|
7236
|
+
int (*xEof)(sqlite3_vtab_cursor *);
|
|
7237
|
+
int (*xColumn)(sqlite3_vtab_cursor *, sqlite3_context *, int);
|
|
7238
|
+
int (*xRowid)(sqlite3_vtab_cursor *, sqlite3_int64 *pRowid);
|
|
7262
7239
|
int (*xUpdate)(sqlite3_vtab *, int, sqlite3_value **, sqlite3_int64 *);
|
|
7263
7240
|
int (*xBegin)(sqlite3_vtab *pVTab);
|
|
7264
7241
|
int (*xSync)(sqlite3_vtab *pVTab);
|
|
7265
7242
|
int (*xCommit)(sqlite3_vtab *pVTab);
|
|
7266
7243
|
int (*xRollback)(sqlite3_vtab *pVTab);
|
|
7267
7244
|
int (*xFindFunction)(sqlite3_vtab *pVtab, int nArg, const char *zName,
|
|
7268
|
-
void (**pxFunc)(sqlite3_context*,int,
|
|
7245
|
+
void (**pxFunc)(sqlite3_context *, int,
|
|
7246
|
+
sqlite3_value **),
|
|
7269
7247
|
void **ppArg);
|
|
7270
7248
|
int (*xRename)(sqlite3_vtab *pVtab, const char *zNew);
|
|
7271
7249
|
/* The methods above are in version 1 of the sqlite_module object. Those
|
|
@@ -7275,7 +7253,7 @@ struct sqlite3_module {
|
|
|
7275
7253
|
int (*xRollbackTo)(sqlite3_vtab *pVTab, int);
|
|
7276
7254
|
/* The methods above are in versions 1 and 2 of the sqlite_module object.
|
|
7277
7255
|
** Those below are for version 3 and greater. */
|
|
7278
|
-
int (*xShadowName)(const char*);
|
|
7256
|
+
int (*xShadowName)(const char *);
|
|
7279
7257
|
/* The methods above are in versions 1 through 3 of the sqlite_module object.
|
|
7280
7258
|
** Those below are for version 4 and greater. */
|
|
7281
7259
|
int (*xIntegrity)(sqlite3_vtab *pVTab, const char *zSchema,
|
|
@@ -7386,34 +7364,34 @@ struct sqlite3_module {
|
|
|
7386
7364
|
*/
|
|
7387
7365
|
struct sqlite3_index_info {
|
|
7388
7366
|
/* Inputs */
|
|
7389
|
-
int nConstraint;
|
|
7367
|
+
int nConstraint; /* Number of entries in aConstraint */
|
|
7390
7368
|
struct sqlite3_index_constraint {
|
|
7391
|
-
|
|
7392
|
-
|
|
7393
|
-
|
|
7394
|
-
|
|
7395
|
-
} *aConstraint;
|
|
7396
|
-
int nOrderBy;
|
|
7369
|
+
int iColumn; /* Column constrained. -1 for ROWID */
|
|
7370
|
+
unsigned char op; /* Constraint operator */
|
|
7371
|
+
unsigned char usable; /* True if this constraint is usable */
|
|
7372
|
+
int iTermOffset; /* Used internally - xBestIndex should ignore */
|
|
7373
|
+
} * aConstraint; /* Table of WHERE clause constraints */
|
|
7374
|
+
int nOrderBy; /* Number of terms in the ORDER BY clause */
|
|
7397
7375
|
struct sqlite3_index_orderby {
|
|
7398
|
-
|
|
7399
|
-
|
|
7400
|
-
} *aOrderBy;
|
|
7376
|
+
int iColumn; /* Column number */
|
|
7377
|
+
unsigned char desc; /* True for DESC. False for ASC. */
|
|
7378
|
+
} * aOrderBy; /* The ORDER BY clause */
|
|
7401
7379
|
/* Outputs */
|
|
7402
7380
|
struct sqlite3_index_constraint_usage {
|
|
7403
|
-
int argvIndex;
|
|
7404
|
-
unsigned char omit;
|
|
7405
|
-
} *aConstraintUsage;
|
|
7406
|
-
int idxNum;
|
|
7407
|
-
char *idxStr;
|
|
7408
|
-
int needToFreeIdxStr;
|
|
7409
|
-
int orderByConsumed;
|
|
7410
|
-
double estimatedCost;
|
|
7381
|
+
int argvIndex; /* if >0, constraint is part of argv to xFilter */
|
|
7382
|
+
unsigned char omit; /* Do not code a test for this constraint */
|
|
7383
|
+
} * aConstraintUsage;
|
|
7384
|
+
int idxNum; /* Number used to identify the index */
|
|
7385
|
+
char *idxStr; /* String, possibly obtained from sqlite3_malloc */
|
|
7386
|
+
int needToFreeIdxStr; /* Free idxStr using sqlite3_free() if true */
|
|
7387
|
+
int orderByConsumed; /* True if output is already ordered */
|
|
7388
|
+
double estimatedCost; /* Estimated cost of using this index */
|
|
7411
7389
|
/* Fields below are only available in SQLite 3.8.2 and later */
|
|
7412
|
-
sqlite3_int64 estimatedRows;
|
|
7390
|
+
sqlite3_int64 estimatedRows; /* Estimated number of rows returned */
|
|
7413
7391
|
/* Fields below are only available in SQLite 3.9.0 and later */
|
|
7414
|
-
int idxFlags;
|
|
7392
|
+
int idxFlags; /* Mask of SQLITE_INDEX_SCAN_* flags */
|
|
7415
7393
|
/* Fields below are only available in SQLite 3.10.0 and later */
|
|
7416
|
-
sqlite3_uint64 colUsed;
|
|
7394
|
+
sqlite3_uint64 colUsed; /* Input: Mask of columns used by statement */
|
|
7417
7395
|
};
|
|
7418
7396
|
|
|
7419
7397
|
/*
|
|
@@ -7423,7 +7401,7 @@ struct sqlite3_index_info {
|
|
|
7423
7401
|
** [sqlite3_index_info].idxFlags field to some combination of
|
|
7424
7402
|
** these bits.
|
|
7425
7403
|
*/
|
|
7426
|
-
#define SQLITE_INDEX_SCAN_UNIQUE
|
|
7404
|
+
#define SQLITE_INDEX_SCAN_UNIQUE 1 /* Scan visits at most 1 row */
|
|
7427
7405
|
|
|
7428
7406
|
/*
|
|
7429
7407
|
** CAPI3REF: Virtual Table Constraint Operator Codes
|
|
@@ -7463,23 +7441,23 @@ struct sqlite3_index_info {
|
|
|
7463
7441
|
** because the constraints are numeric) and so the sqlite3_vtab_collation()
|
|
7464
7442
|
** interface is not commonly needed.
|
|
7465
7443
|
*/
|
|
7466
|
-
#define SQLITE_INDEX_CONSTRAINT_EQ
|
|
7467
|
-
#define SQLITE_INDEX_CONSTRAINT_GT
|
|
7468
|
-
#define SQLITE_INDEX_CONSTRAINT_LE
|
|
7469
|
-
#define SQLITE_INDEX_CONSTRAINT_LT
|
|
7470
|
-
#define SQLITE_INDEX_CONSTRAINT_GE
|
|
7471
|
-
#define SQLITE_INDEX_CONSTRAINT_MATCH
|
|
7472
|
-
#define SQLITE_INDEX_CONSTRAINT_LIKE
|
|
7473
|
-
#define SQLITE_INDEX_CONSTRAINT_GLOB
|
|
7474
|
-
#define SQLITE_INDEX_CONSTRAINT_REGEXP
|
|
7475
|
-
#define SQLITE_INDEX_CONSTRAINT_NE
|
|
7476
|
-
#define SQLITE_INDEX_CONSTRAINT_ISNOT
|
|
7477
|
-
#define SQLITE_INDEX_CONSTRAINT_ISNOTNULL
|
|
7478
|
-
#define SQLITE_INDEX_CONSTRAINT_ISNULL
|
|
7479
|
-
#define SQLITE_INDEX_CONSTRAINT_IS
|
|
7480
|
-
#define SQLITE_INDEX_CONSTRAINT_LIMIT
|
|
7481
|
-
#define SQLITE_INDEX_CONSTRAINT_OFFSET
|
|
7482
|
-
#define SQLITE_INDEX_CONSTRAINT_FUNCTION
|
|
7444
|
+
#define SQLITE_INDEX_CONSTRAINT_EQ 2
|
|
7445
|
+
#define SQLITE_INDEX_CONSTRAINT_GT 4
|
|
7446
|
+
#define SQLITE_INDEX_CONSTRAINT_LE 8
|
|
7447
|
+
#define SQLITE_INDEX_CONSTRAINT_LT 16
|
|
7448
|
+
#define SQLITE_INDEX_CONSTRAINT_GE 32
|
|
7449
|
+
#define SQLITE_INDEX_CONSTRAINT_MATCH 64
|
|
7450
|
+
#define SQLITE_INDEX_CONSTRAINT_LIKE 65
|
|
7451
|
+
#define SQLITE_INDEX_CONSTRAINT_GLOB 66
|
|
7452
|
+
#define SQLITE_INDEX_CONSTRAINT_REGEXP 67
|
|
7453
|
+
#define SQLITE_INDEX_CONSTRAINT_NE 68
|
|
7454
|
+
#define SQLITE_INDEX_CONSTRAINT_ISNOT 69
|
|
7455
|
+
#define SQLITE_INDEX_CONSTRAINT_ISNOTNULL 70
|
|
7456
|
+
#define SQLITE_INDEX_CONSTRAINT_ISNULL 71
|
|
7457
|
+
#define SQLITE_INDEX_CONSTRAINT_IS 72
|
|
7458
|
+
#define SQLITE_INDEX_CONSTRAINT_LIMIT 73
|
|
7459
|
+
#define SQLITE_INDEX_CONSTRAINT_OFFSET 74
|
|
7460
|
+
#define SQLITE_INDEX_CONSTRAINT_FUNCTION 150
|
|
7483
7461
|
|
|
7484
7462
|
/*
|
|
7485
7463
|
** CAPI3REF: Register A Virtual Table Implementation
|
|
@@ -7514,17 +7492,17 @@ struct sqlite3_index_info {
|
|
|
7514
7492
|
** See also: [sqlite3_drop_modules()]
|
|
7515
7493
|
*/
|
|
7516
7494
|
SQLITE_API int sqlite3_create_module(
|
|
7517
|
-
|
|
7518
|
-
|
|
7519
|
-
|
|
7520
|
-
|
|
7495
|
+
sqlite3 *db, /* SQLite connection to register module with */
|
|
7496
|
+
const char *zName, /* Name of the module */
|
|
7497
|
+
const sqlite3_module *p, /* Methods for the module */
|
|
7498
|
+
void *pClientData /* Client data for xCreate/xConnect */
|
|
7521
7499
|
);
|
|
7522
7500
|
SQLITE_API int sqlite3_create_module_v2(
|
|
7523
|
-
|
|
7524
|
-
|
|
7525
|
-
|
|
7526
|
-
|
|
7527
|
-
|
|
7501
|
+
sqlite3 *db, /* SQLite connection to register module with */
|
|
7502
|
+
const char *zName, /* Name of the module */
|
|
7503
|
+
const sqlite3_module *p, /* Methods for the module */
|
|
7504
|
+
void *pClientData, /* Client data for xCreate/xConnect */
|
|
7505
|
+
void (*xDestroy)(void *) /* Module destructor function */
|
|
7528
7506
|
);
|
|
7529
7507
|
|
|
7530
7508
|
/*
|
|
@@ -7540,8 +7518,8 @@ SQLITE_API int sqlite3_create_module_v2(
|
|
|
7540
7518
|
** See also: [sqlite3_create_module()]
|
|
7541
7519
|
*/
|
|
7542
7520
|
SQLITE_API int sqlite3_drop_modules(
|
|
7543
|
-
|
|
7544
|
-
|
|
7521
|
+
sqlite3 *db, /* Remove modules from this connection */
|
|
7522
|
+
const char **azKeep /* Except, do not remove the ones named here */
|
|
7545
7523
|
);
|
|
7546
7524
|
|
|
7547
7525
|
/*
|
|
@@ -7563,9 +7541,9 @@ SQLITE_API int sqlite3_drop_modules(
|
|
|
7563
7541
|
** freed by sqlite3_free() and the zErrMsg field will be zeroed.
|
|
7564
7542
|
*/
|
|
7565
7543
|
struct sqlite3_vtab {
|
|
7566
|
-
const sqlite3_module *pModule;
|
|
7567
|
-
int nRef;
|
|
7568
|
-
char *zErrMsg;
|
|
7544
|
+
const sqlite3_module *pModule; /* The module for this virtual table */
|
|
7545
|
+
int nRef; /* Number of open cursors */
|
|
7546
|
+
char *zErrMsg; /* Error message from sqlite3_mprintf() */
|
|
7569
7547
|
/* Virtual table implementations will typically add additional fields */
|
|
7570
7548
|
};
|
|
7571
7549
|
|
|
@@ -7587,7 +7565,7 @@ struct sqlite3_vtab {
|
|
|
7587
7565
|
** are common to all implementations.
|
|
7588
7566
|
*/
|
|
7589
7567
|
struct sqlite3_vtab_cursor {
|
|
7590
|
-
sqlite3_vtab *pVtab;
|
|
7568
|
+
sqlite3_vtab *pVtab; /* Virtual table of this cursor */
|
|
7591
7569
|
/* Virtual table implementations will typically add additional fields */
|
|
7592
7570
|
};
|
|
7593
7571
|
|
|
@@ -7599,7 +7577,7 @@ struct sqlite3_vtab_cursor {
|
|
|
7599
7577
|
** to declare the format (the names and datatypes of the columns) of
|
|
7600
7578
|
** the virtual tables they implement.
|
|
7601
7579
|
*/
|
|
7602
|
-
SQLITE_API int sqlite3_declare_vtab(sqlite3*, const char *zSQL);
|
|
7580
|
+
SQLITE_API int sqlite3_declare_vtab(sqlite3 *, const char *zSQL);
|
|
7603
7581
|
|
|
7604
7582
|
/*
|
|
7605
7583
|
** CAPI3REF: Overload A Function For A Virtual Table
|
|
@@ -7618,7 +7596,8 @@ SQLITE_API int sqlite3_declare_vtab(sqlite3*, const char *zSQL);
|
|
|
7618
7596
|
** purpose is to be a placeholder function that can be overloaded
|
|
7619
7597
|
** by a [virtual table].
|
|
7620
7598
|
*/
|
|
7621
|
-
SQLITE_API int sqlite3_overload_function(sqlite3*, const char *zFuncName,
|
|
7599
|
+
SQLITE_API int sqlite3_overload_function(sqlite3 *, const char *zFuncName,
|
|
7600
|
+
int nArg);
|
|
7622
7601
|
|
|
7623
7602
|
/*
|
|
7624
7603
|
** CAPI3REF: A Handle To An Open BLOB
|
|
@@ -7717,15 +7696,9 @@ typedef struct sqlite3_blob sqlite3_blob;
|
|
|
7717
7696
|
** [sqlite3_blob_reopen()], [sqlite3_blob_read()],
|
|
7718
7697
|
** [sqlite3_blob_bytes()], [sqlite3_blob_write()].
|
|
7719
7698
|
*/
|
|
7720
|
-
SQLITE_API int sqlite3_blob_open(
|
|
7721
|
-
|
|
7722
|
-
|
|
7723
|
-
const char *zTable,
|
|
7724
|
-
const char *zColumn,
|
|
7725
|
-
sqlite3_int64 iRow,
|
|
7726
|
-
int flags,
|
|
7727
|
-
sqlite3_blob **ppBlob
|
|
7728
|
-
);
|
|
7699
|
+
SQLITE_API int sqlite3_blob_open(sqlite3 *, const char *zDb, const char *zTable,
|
|
7700
|
+
const char *zColumn, sqlite3_int64 iRow,
|
|
7701
|
+
int flags, sqlite3_blob **ppBlob);
|
|
7729
7702
|
|
|
7730
7703
|
/*
|
|
7731
7704
|
** CAPI3REF: Move a BLOB Handle to a New Row
|
|
@@ -7860,7 +7833,8 @@ SQLITE_API int sqlite3_blob_read(sqlite3_blob *, void *Z, int N, int iOffset);
|
|
|
7860
7833
|
**
|
|
7861
7834
|
** See also: [sqlite3_blob_read()].
|
|
7862
7835
|
*/
|
|
7863
|
-
SQLITE_API int sqlite3_blob_write(sqlite3_blob *, const void *z, int n,
|
|
7836
|
+
SQLITE_API int sqlite3_blob_write(sqlite3_blob *, const void *z, int n,
|
|
7837
|
+
int iOffset);
|
|
7864
7838
|
|
|
7865
7839
|
/*
|
|
7866
7840
|
** CAPI3REF: Virtual File System Objects
|
|
@@ -7892,8 +7866,8 @@ SQLITE_API int sqlite3_blob_write(sqlite3_blob *, const void *z, int n, int iOff
|
|
|
7892
7866
|
** the default. The choice for the new VFS is arbitrary.)^
|
|
7893
7867
|
*/
|
|
7894
7868
|
SQLITE_API sqlite3_vfs *sqlite3_vfs_find(const char *zVfsName);
|
|
7895
|
-
SQLITE_API int sqlite3_vfs_register(sqlite3_vfs*, int makeDflt);
|
|
7896
|
-
SQLITE_API int sqlite3_vfs_unregister(sqlite3_vfs*);
|
|
7869
|
+
SQLITE_API int sqlite3_vfs_register(sqlite3_vfs *, int makeDflt);
|
|
7870
|
+
SQLITE_API int sqlite3_vfs_unregister(sqlite3_vfs *);
|
|
7897
7871
|
|
|
7898
7872
|
/*
|
|
7899
7873
|
** CAPI3REF: Mutexes
|
|
@@ -8010,10 +7984,10 @@ SQLITE_API int sqlite3_vfs_unregister(sqlite3_vfs*);
|
|
|
8010
7984
|
** See also: [sqlite3_mutex_held()] and [sqlite3_mutex_notheld()].
|
|
8011
7985
|
*/
|
|
8012
7986
|
SQLITE_API sqlite3_mutex *sqlite3_mutex_alloc(int);
|
|
8013
|
-
SQLITE_API void sqlite3_mutex_free(sqlite3_mutex*);
|
|
8014
|
-
SQLITE_API void sqlite3_mutex_enter(sqlite3_mutex*);
|
|
8015
|
-
SQLITE_API int sqlite3_mutex_try(sqlite3_mutex*);
|
|
8016
|
-
SQLITE_API void sqlite3_mutex_leave(sqlite3_mutex*);
|
|
7987
|
+
SQLITE_API void sqlite3_mutex_free(sqlite3_mutex *);
|
|
7988
|
+
SQLITE_API void sqlite3_mutex_enter(sqlite3_mutex *);
|
|
7989
|
+
SQLITE_API int sqlite3_mutex_try(sqlite3_mutex *);
|
|
7990
|
+
SQLITE_API void sqlite3_mutex_leave(sqlite3_mutex *);
|
|
8017
7991
|
|
|
8018
7992
|
/*
|
|
8019
7993
|
** CAPI3REF: Mutex Methods Object
|
|
@@ -8123,8 +8097,8 @@ struct sqlite3_mutex_methods {
|
|
|
8123
8097
|
** interface should also return 1 when given a NULL pointer.
|
|
8124
8098
|
*/
|
|
8125
8099
|
#ifndef NDEBUG
|
|
8126
|
-
SQLITE_API int sqlite3_mutex_held(sqlite3_mutex*);
|
|
8127
|
-
SQLITE_API int sqlite3_mutex_notheld(sqlite3_mutex*);
|
|
8100
|
+
SQLITE_API int sqlite3_mutex_held(sqlite3_mutex *);
|
|
8101
|
+
SQLITE_API int sqlite3_mutex_notheld(sqlite3_mutex *);
|
|
8128
8102
|
#endif
|
|
8129
8103
|
|
|
8130
8104
|
/*
|
|
@@ -8137,26 +8111,25 @@ SQLITE_API int sqlite3_mutex_notheld(sqlite3_mutex*);
|
|
|
8137
8111
|
** next. Applications that override the built-in mutex logic must be
|
|
8138
8112
|
** prepared to accommodate additional static mutexes.
|
|
8139
8113
|
*/
|
|
8140
|
-
#define SQLITE_MUTEX_FAST
|
|
8141
|
-
#define SQLITE_MUTEX_RECURSIVE
|
|
8142
|
-
#define SQLITE_MUTEX_STATIC_MAIN
|
|
8143
|
-
#define SQLITE_MUTEX_STATIC_MEM
|
|
8144
|
-
#define SQLITE_MUTEX_STATIC_MEM2
|
|
8145
|
-
#define SQLITE_MUTEX_STATIC_OPEN
|
|
8146
|
-
#define SQLITE_MUTEX_STATIC_PRNG
|
|
8147
|
-
#define SQLITE_MUTEX_STATIC_LRU
|
|
8148
|
-
#define SQLITE_MUTEX_STATIC_LRU2
|
|
8149
|
-
#define SQLITE_MUTEX_STATIC_PMEM
|
|
8150
|
-
#define SQLITE_MUTEX_STATIC_APP1
|
|
8151
|
-
#define SQLITE_MUTEX_STATIC_APP2
|
|
8152
|
-
#define SQLITE_MUTEX_STATIC_APP3
|
|
8153
|
-
#define SQLITE_MUTEX_STATIC_VFS1
|
|
8154
|
-
#define SQLITE_MUTEX_STATIC_VFS2
|
|
8155
|
-
#define SQLITE_MUTEX_STATIC_VFS3
|
|
8114
|
+
#define SQLITE_MUTEX_FAST 0
|
|
8115
|
+
#define SQLITE_MUTEX_RECURSIVE 1
|
|
8116
|
+
#define SQLITE_MUTEX_STATIC_MAIN 2
|
|
8117
|
+
#define SQLITE_MUTEX_STATIC_MEM 3 /* sqlite3_malloc() */
|
|
8118
|
+
#define SQLITE_MUTEX_STATIC_MEM2 4 /* NOT USED */
|
|
8119
|
+
#define SQLITE_MUTEX_STATIC_OPEN 4 /* sqlite3BtreeOpen() */
|
|
8120
|
+
#define SQLITE_MUTEX_STATIC_PRNG 5 /* sqlite3_randomness() */
|
|
8121
|
+
#define SQLITE_MUTEX_STATIC_LRU 6 /* lru page list */
|
|
8122
|
+
#define SQLITE_MUTEX_STATIC_LRU2 7 /* NOT USED */
|
|
8123
|
+
#define SQLITE_MUTEX_STATIC_PMEM 7 /* sqlite3PageMalloc() */
|
|
8124
|
+
#define SQLITE_MUTEX_STATIC_APP1 8 /* For use by application */
|
|
8125
|
+
#define SQLITE_MUTEX_STATIC_APP2 9 /* For use by application */
|
|
8126
|
+
#define SQLITE_MUTEX_STATIC_APP3 10 /* For use by application */
|
|
8127
|
+
#define SQLITE_MUTEX_STATIC_VFS1 11 /* For use by built-in VFS */
|
|
8128
|
+
#define SQLITE_MUTEX_STATIC_VFS2 12 /* For use by extension VFS */
|
|
8129
|
+
#define SQLITE_MUTEX_STATIC_VFS3 13 /* For use by application VFS */
|
|
8156
8130
|
|
|
8157
8131
|
/* Legacy compatibility: */
|
|
8158
|
-
#define SQLITE_MUTEX_STATIC_MASTER
|
|
8159
|
-
|
|
8132
|
+
#define SQLITE_MUTEX_STATIC_MASTER 2
|
|
8160
8133
|
|
|
8161
8134
|
/*
|
|
8162
8135
|
** CAPI3REF: Retrieve the mutex for a database connection
|
|
@@ -8168,7 +8141,7 @@ SQLITE_API int sqlite3_mutex_notheld(sqlite3_mutex*);
|
|
|
8168
8141
|
** ^If the [threading mode] is Single-thread or Multi-thread then this
|
|
8169
8142
|
** routine returns a NULL pointer.
|
|
8170
8143
|
*/
|
|
8171
|
-
SQLITE_API sqlite3_mutex *sqlite3_db_mutex(sqlite3*);
|
|
8144
|
+
SQLITE_API sqlite3_mutex *sqlite3_db_mutex(sqlite3 *);
|
|
8172
8145
|
|
|
8173
8146
|
/*
|
|
8174
8147
|
** CAPI3REF: Low-Level Control Of Database Files
|
|
@@ -8211,7 +8184,8 @@ SQLITE_API sqlite3_mutex *sqlite3_db_mutex(sqlite3*);
|
|
|
8211
8184
|
**
|
|
8212
8185
|
** See also: [file control opcodes]
|
|
8213
8186
|
*/
|
|
8214
|
-
SQLITE_API int sqlite3_file_control(sqlite3*, const char *zDbName, int op,
|
|
8187
|
+
SQLITE_API int sqlite3_file_control(sqlite3 *, const char *zDbName, int op,
|
|
8188
|
+
void *);
|
|
8215
8189
|
|
|
8216
8190
|
/*
|
|
8217
8191
|
** CAPI3REF: Testing Interface
|
|
@@ -8243,41 +8217,41 @@ SQLITE_API int sqlite3_test_control(int op, ...);
|
|
|
8243
8217
|
** Applications should not use any of these parameters or the
|
|
8244
8218
|
** [sqlite3_test_control()] interface.
|
|
8245
8219
|
*/
|
|
8246
|
-
#define SQLITE_TESTCTRL_FIRST
|
|
8247
|
-
#define SQLITE_TESTCTRL_PRNG_SAVE
|
|
8248
|
-
#define SQLITE_TESTCTRL_PRNG_RESTORE
|
|
8249
|
-
#define SQLITE_TESTCTRL_PRNG_RESET
|
|
8250
|
-
#define SQLITE_TESTCTRL_FK_NO_ACTION
|
|
8251
|
-
#define SQLITE_TESTCTRL_BITVEC_TEST
|
|
8252
|
-
#define SQLITE_TESTCTRL_FAULT_INSTALL
|
|
8253
|
-
#define SQLITE_TESTCTRL_BENIGN_MALLOC_HOOKS
|
|
8254
|
-
#define SQLITE_TESTCTRL_PENDING_BYTE
|
|
8255
|
-
#define SQLITE_TESTCTRL_ASSERT
|
|
8256
|
-
#define SQLITE_TESTCTRL_ALWAYS
|
|
8257
|
-
#define SQLITE_TESTCTRL_RESERVE
|
|
8258
|
-
#define SQLITE_TESTCTRL_OPTIMIZATIONS
|
|
8259
|
-
#define SQLITE_TESTCTRL_ISKEYWORD
|
|
8260
|
-
#define SQLITE_TESTCTRL_SCRATCHMALLOC
|
|
8261
|
-
#define SQLITE_TESTCTRL_INTERNAL_FUNCTIONS
|
|
8262
|
-
#define SQLITE_TESTCTRL_LOCALTIME_FAULT
|
|
8263
|
-
#define SQLITE_TESTCTRL_EXPLAIN_STMT
|
|
8264
|
-
#define SQLITE_TESTCTRL_ONCE_RESET_THRESHOLD
|
|
8265
|
-
#define SQLITE_TESTCTRL_NEVER_CORRUPT
|
|
8266
|
-
#define SQLITE_TESTCTRL_VDBE_COVERAGE
|
|
8267
|
-
#define SQLITE_TESTCTRL_BYTEORDER
|
|
8268
|
-
#define SQLITE_TESTCTRL_ISINIT
|
|
8269
|
-
#define SQLITE_TESTCTRL_SORTER_MMAP
|
|
8270
|
-
#define SQLITE_TESTCTRL_IMPOSTER
|
|
8271
|
-
#define SQLITE_TESTCTRL_PARSER_COVERAGE
|
|
8272
|
-
#define SQLITE_TESTCTRL_RESULT_INTREAL
|
|
8273
|
-
#define SQLITE_TESTCTRL_PRNG_SEED
|
|
8274
|
-
#define SQLITE_TESTCTRL_EXTRA_SCHEMA_CHECKS
|
|
8275
|
-
#define SQLITE_TESTCTRL_SEEK_COUNT
|
|
8276
|
-
#define SQLITE_TESTCTRL_TRACEFLAGS
|
|
8277
|
-
#define SQLITE_TESTCTRL_TUNE
|
|
8278
|
-
#define SQLITE_TESTCTRL_LOGEST
|
|
8279
|
-
#define SQLITE_TESTCTRL_USELONGDOUBLE
|
|
8280
|
-
#define SQLITE_TESTCTRL_LAST
|
|
8220
|
+
#define SQLITE_TESTCTRL_FIRST 5
|
|
8221
|
+
#define SQLITE_TESTCTRL_PRNG_SAVE 5
|
|
8222
|
+
#define SQLITE_TESTCTRL_PRNG_RESTORE 6
|
|
8223
|
+
#define SQLITE_TESTCTRL_PRNG_RESET 7 /* NOT USED */
|
|
8224
|
+
#define SQLITE_TESTCTRL_FK_NO_ACTION 7
|
|
8225
|
+
#define SQLITE_TESTCTRL_BITVEC_TEST 8
|
|
8226
|
+
#define SQLITE_TESTCTRL_FAULT_INSTALL 9
|
|
8227
|
+
#define SQLITE_TESTCTRL_BENIGN_MALLOC_HOOKS 10
|
|
8228
|
+
#define SQLITE_TESTCTRL_PENDING_BYTE 11
|
|
8229
|
+
#define SQLITE_TESTCTRL_ASSERT 12
|
|
8230
|
+
#define SQLITE_TESTCTRL_ALWAYS 13
|
|
8231
|
+
#define SQLITE_TESTCTRL_RESERVE 14 /* NOT USED */
|
|
8232
|
+
#define SQLITE_TESTCTRL_OPTIMIZATIONS 15
|
|
8233
|
+
#define SQLITE_TESTCTRL_ISKEYWORD 16 /* NOT USED */
|
|
8234
|
+
#define SQLITE_TESTCTRL_SCRATCHMALLOC 17 /* NOT USED */
|
|
8235
|
+
#define SQLITE_TESTCTRL_INTERNAL_FUNCTIONS 17
|
|
8236
|
+
#define SQLITE_TESTCTRL_LOCALTIME_FAULT 18
|
|
8237
|
+
#define SQLITE_TESTCTRL_EXPLAIN_STMT 19 /* NOT USED */
|
|
8238
|
+
#define SQLITE_TESTCTRL_ONCE_RESET_THRESHOLD 19
|
|
8239
|
+
#define SQLITE_TESTCTRL_NEVER_CORRUPT 20
|
|
8240
|
+
#define SQLITE_TESTCTRL_VDBE_COVERAGE 21
|
|
8241
|
+
#define SQLITE_TESTCTRL_BYTEORDER 22
|
|
8242
|
+
#define SQLITE_TESTCTRL_ISINIT 23
|
|
8243
|
+
#define SQLITE_TESTCTRL_SORTER_MMAP 24
|
|
8244
|
+
#define SQLITE_TESTCTRL_IMPOSTER 25
|
|
8245
|
+
#define SQLITE_TESTCTRL_PARSER_COVERAGE 26
|
|
8246
|
+
#define SQLITE_TESTCTRL_RESULT_INTREAL 27
|
|
8247
|
+
#define SQLITE_TESTCTRL_PRNG_SEED 28
|
|
8248
|
+
#define SQLITE_TESTCTRL_EXTRA_SCHEMA_CHECKS 29
|
|
8249
|
+
#define SQLITE_TESTCTRL_SEEK_COUNT 30
|
|
8250
|
+
#define SQLITE_TESTCTRL_TRACEFLAGS 31
|
|
8251
|
+
#define SQLITE_TESTCTRL_TUNE 32
|
|
8252
|
+
#define SQLITE_TESTCTRL_LOGEST 33
|
|
8253
|
+
#define SQLITE_TESTCTRL_USELONGDOUBLE 34
|
|
8254
|
+
#define SQLITE_TESTCTRL_LAST 34 /* Largest TESTCTRL */
|
|
8281
8255
|
|
|
8282
8256
|
/*
|
|
8283
8257
|
** CAPI3REF: SQL Keyword Checking
|
|
@@ -8327,8 +8301,8 @@ SQLITE_API int sqlite3_test_control(int op, ...);
|
|
|
8327
8301
|
** new keywords may be added to future releases of SQLite.
|
|
8328
8302
|
*/
|
|
8329
8303
|
SQLITE_API int sqlite3_keyword_count(void);
|
|
8330
|
-
SQLITE_API int sqlite3_keyword_name(int,const char**,int*);
|
|
8331
|
-
SQLITE_API int sqlite3_keyword_check(const char*,int);
|
|
8304
|
+
SQLITE_API int sqlite3_keyword_name(int, const char **, int *);
|
|
8305
|
+
SQLITE_API int sqlite3_keyword_check(const char *, int);
|
|
8332
8306
|
|
|
8333
8307
|
/*
|
|
8334
8308
|
** CAPI3REF: Dynamic String Object
|
|
@@ -8373,7 +8347,7 @@ typedef struct sqlite3_str sqlite3_str;
|
|
|
8373
8347
|
** the value set for [sqlite3_limit](D,[SQLITE_LIMIT_LENGTH]) instead
|
|
8374
8348
|
** of [SQLITE_MAX_LENGTH].
|
|
8375
8349
|
*/
|
|
8376
|
-
SQLITE_API sqlite3_str *sqlite3_str_new(sqlite3*);
|
|
8350
|
+
SQLITE_API sqlite3_str *sqlite3_str_new(sqlite3 *);
|
|
8377
8351
|
|
|
8378
8352
|
/*
|
|
8379
8353
|
** CAPI3REF: Finalize A Dynamic String
|
|
@@ -8388,7 +8362,7 @@ SQLITE_API sqlite3_str *sqlite3_str_new(sqlite3*);
|
|
|
8388
8362
|
** [sqlite3_str_finish(X)] interface will also return a NULL pointer if the
|
|
8389
8363
|
** string in [sqlite3_str] object X is zero bytes long.
|
|
8390
8364
|
*/
|
|
8391
|
-
SQLITE_API char *sqlite3_str_finish(sqlite3_str*);
|
|
8365
|
+
SQLITE_API char *sqlite3_str_finish(sqlite3_str *);
|
|
8392
8366
|
|
|
8393
8367
|
/*
|
|
8394
8368
|
** CAPI3REF: Add Content To A Dynamic String
|
|
@@ -8422,12 +8396,13 @@ SQLITE_API char *sqlite3_str_finish(sqlite3_str*);
|
|
|
8422
8396
|
** is recorded in the [sqlite3_str] object and can be recovered by a
|
|
8423
8397
|
** subsequent call to [sqlite3_str_errcode(X)].
|
|
8424
8398
|
*/
|
|
8425
|
-
SQLITE_API void sqlite3_str_appendf(sqlite3_str*, const char *zFormat, ...);
|
|
8426
|
-
SQLITE_API void sqlite3_str_vappendf(sqlite3_str*, const char *zFormat,
|
|
8427
|
-
|
|
8428
|
-
SQLITE_API void
|
|
8429
|
-
SQLITE_API void
|
|
8430
|
-
SQLITE_API void
|
|
8399
|
+
SQLITE_API void sqlite3_str_appendf(sqlite3_str *, const char *zFormat, ...);
|
|
8400
|
+
SQLITE_API void sqlite3_str_vappendf(sqlite3_str *, const char *zFormat,
|
|
8401
|
+
va_list);
|
|
8402
|
+
SQLITE_API void sqlite3_str_append(sqlite3_str *, const char *zIn, int N);
|
|
8403
|
+
SQLITE_API void sqlite3_str_appendall(sqlite3_str *, const char *zIn);
|
|
8404
|
+
SQLITE_API void sqlite3_str_appendchar(sqlite3_str *, int N, char C);
|
|
8405
|
+
SQLITE_API void sqlite3_str_reset(sqlite3_str *);
|
|
8431
8406
|
|
|
8432
8407
|
/*
|
|
8433
8408
|
** CAPI3REF: Status Of A Dynamic String
|
|
@@ -8458,9 +8433,9 @@ SQLITE_API void sqlite3_str_reset(sqlite3_str*);
|
|
|
8458
8433
|
** outside the range of 0 to [sqlite3_str_length(X)] and do not read or
|
|
8459
8434
|
** write any byte after any subsequent sqlite3_str method call.
|
|
8460
8435
|
*/
|
|
8461
|
-
SQLITE_API int sqlite3_str_errcode(sqlite3_str*);
|
|
8462
|
-
SQLITE_API int sqlite3_str_length(sqlite3_str*);
|
|
8463
|
-
SQLITE_API char *sqlite3_str_value(sqlite3_str*);
|
|
8436
|
+
SQLITE_API int sqlite3_str_errcode(sqlite3_str *);
|
|
8437
|
+
SQLITE_API int sqlite3_str_length(sqlite3_str *);
|
|
8438
|
+
SQLITE_API char *sqlite3_str_value(sqlite3_str *);
|
|
8464
8439
|
|
|
8465
8440
|
/*
|
|
8466
8441
|
** CAPI3REF: SQLite Runtime Status
|
|
@@ -8488,14 +8463,10 @@ SQLITE_API char *sqlite3_str_value(sqlite3_str*);
|
|
|
8488
8463
|
**
|
|
8489
8464
|
** See also: [sqlite3_db_status()]
|
|
8490
8465
|
*/
|
|
8491
|
-
SQLITE_API int sqlite3_status(int op, int *pCurrent, int *pHighwater,
|
|
8492
|
-
|
|
8493
|
-
|
|
8494
|
-
|
|
8495
|
-
sqlite3_int64 *pHighwater,
|
|
8496
|
-
int resetFlag
|
|
8497
|
-
);
|
|
8498
|
-
|
|
8466
|
+
SQLITE_API int sqlite3_status(int op, int *pCurrent, int *pHighwater,
|
|
8467
|
+
int resetFlag);
|
|
8468
|
+
SQLITE_API int sqlite3_status64(int op, sqlite3_int64 *pCurrent,
|
|
8469
|
+
sqlite3_int64 *pHighwater, int resetFlag);
|
|
8499
8470
|
|
|
8500
8471
|
/*
|
|
8501
8472
|
** CAPI3REF: Status Parameters
|
|
@@ -8564,16 +8535,16 @@ SQLITE_API int sqlite3_status64(
|
|
|
8564
8535
|
**
|
|
8565
8536
|
** New status parameters may be added from time to time.
|
|
8566
8537
|
*/
|
|
8567
|
-
#define SQLITE_STATUS_MEMORY_USED
|
|
8568
|
-
#define SQLITE_STATUS_PAGECACHE_USED
|
|
8569
|
-
#define SQLITE_STATUS_PAGECACHE_OVERFLOW
|
|
8570
|
-
#define SQLITE_STATUS_SCRATCH_USED
|
|
8571
|
-
#define SQLITE_STATUS_SCRATCH_OVERFLOW
|
|
8572
|
-
#define SQLITE_STATUS_MALLOC_SIZE
|
|
8573
|
-
#define SQLITE_STATUS_PARSER_STACK
|
|
8574
|
-
#define SQLITE_STATUS_PAGECACHE_SIZE
|
|
8575
|
-
#define SQLITE_STATUS_SCRATCH_SIZE
|
|
8576
|
-
#define SQLITE_STATUS_MALLOC_COUNT
|
|
8538
|
+
#define SQLITE_STATUS_MEMORY_USED 0
|
|
8539
|
+
#define SQLITE_STATUS_PAGECACHE_USED 1
|
|
8540
|
+
#define SQLITE_STATUS_PAGECACHE_OVERFLOW 2
|
|
8541
|
+
#define SQLITE_STATUS_SCRATCH_USED 3 /* NOT USED */
|
|
8542
|
+
#define SQLITE_STATUS_SCRATCH_OVERFLOW 4 /* NOT USED */
|
|
8543
|
+
#define SQLITE_STATUS_MALLOC_SIZE 5
|
|
8544
|
+
#define SQLITE_STATUS_PARSER_STACK 6
|
|
8545
|
+
#define SQLITE_STATUS_PAGECACHE_SIZE 7
|
|
8546
|
+
#define SQLITE_STATUS_SCRATCH_SIZE 8 /* NOT USED */
|
|
8547
|
+
#define SQLITE_STATUS_MALLOC_COUNT 9
|
|
8577
8548
|
|
|
8578
8549
|
/*
|
|
8579
8550
|
** CAPI3REF: Database Connection Status
|
|
@@ -8598,7 +8569,8 @@ SQLITE_API int sqlite3_status64(
|
|
|
8598
8569
|
**
|
|
8599
8570
|
** See also: [sqlite3_status()] and [sqlite3_stmt_status()].
|
|
8600
8571
|
*/
|
|
8601
|
-
SQLITE_API int sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr,
|
|
8572
|
+
SQLITE_API int sqlite3_db_status(sqlite3 *, int op, int *pCur, int *pHiwtr,
|
|
8573
|
+
int resetFlg);
|
|
8602
8574
|
|
|
8603
8575
|
/*
|
|
8604
8576
|
** CAPI3REF: Status Parameters for database connections
|
|
@@ -8711,21 +8683,20 @@ SQLITE_API int sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int r
|
|
|
8711
8683
|
** </dd>
|
|
8712
8684
|
** </dl>
|
|
8713
8685
|
*/
|
|
8714
|
-
#define SQLITE_DBSTATUS_LOOKASIDE_USED
|
|
8715
|
-
#define SQLITE_DBSTATUS_CACHE_USED
|
|
8716
|
-
#define SQLITE_DBSTATUS_SCHEMA_USED
|
|
8717
|
-
#define SQLITE_DBSTATUS_STMT_USED
|
|
8718
|
-
#define SQLITE_DBSTATUS_LOOKASIDE_HIT
|
|
8719
|
-
#define SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE
|
|
8720
|
-
#define SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL
|
|
8721
|
-
#define SQLITE_DBSTATUS_CACHE_HIT
|
|
8722
|
-
#define SQLITE_DBSTATUS_CACHE_MISS
|
|
8723
|
-
#define SQLITE_DBSTATUS_CACHE_WRITE
|
|
8724
|
-
#define SQLITE_DBSTATUS_DEFERRED_FKS
|
|
8725
|
-
#define SQLITE_DBSTATUS_CACHE_USED_SHARED
|
|
8726
|
-
#define SQLITE_DBSTATUS_CACHE_SPILL
|
|
8727
|
-
#define SQLITE_DBSTATUS_MAX
|
|
8728
|
-
|
|
8686
|
+
#define SQLITE_DBSTATUS_LOOKASIDE_USED 0
|
|
8687
|
+
#define SQLITE_DBSTATUS_CACHE_USED 1
|
|
8688
|
+
#define SQLITE_DBSTATUS_SCHEMA_USED 2
|
|
8689
|
+
#define SQLITE_DBSTATUS_STMT_USED 3
|
|
8690
|
+
#define SQLITE_DBSTATUS_LOOKASIDE_HIT 4
|
|
8691
|
+
#define SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE 5
|
|
8692
|
+
#define SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL 6
|
|
8693
|
+
#define SQLITE_DBSTATUS_CACHE_HIT 7
|
|
8694
|
+
#define SQLITE_DBSTATUS_CACHE_MISS 8
|
|
8695
|
+
#define SQLITE_DBSTATUS_CACHE_WRITE 9
|
|
8696
|
+
#define SQLITE_DBSTATUS_DEFERRED_FKS 10
|
|
8697
|
+
#define SQLITE_DBSTATUS_CACHE_USED_SHARED 11
|
|
8698
|
+
#define SQLITE_DBSTATUS_CACHE_SPILL 12
|
|
8699
|
+
#define SQLITE_DBSTATUS_MAX 12 /* Largest defined DBSTATUS */
|
|
8729
8700
|
|
|
8730
8701
|
/*
|
|
8731
8702
|
** CAPI3REF: Prepared Statement Status
|
|
@@ -8751,7 +8722,7 @@ SQLITE_API int sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int r
|
|
|
8751
8722
|
**
|
|
8752
8723
|
** See also: [sqlite3_status()] and [sqlite3_db_status()].
|
|
8753
8724
|
*/
|
|
8754
|
-
SQLITE_API int sqlite3_stmt_status(sqlite3_stmt*, int op,int resetFlg);
|
|
8725
|
+
SQLITE_API int sqlite3_stmt_status(sqlite3_stmt *, int op, int resetFlg);
|
|
8755
8726
|
|
|
8756
8727
|
/*
|
|
8757
8728
|
** CAPI3REF: Status Parameters for prepared statements
|
|
@@ -8818,15 +8789,15 @@ SQLITE_API int sqlite3_stmt_status(sqlite3_stmt*, int op,int resetFlg);
|
|
|
8818
8789
|
** </dd>
|
|
8819
8790
|
** </dl>
|
|
8820
8791
|
*/
|
|
8821
|
-
#define SQLITE_STMTSTATUS_FULLSCAN_STEP
|
|
8822
|
-
#define SQLITE_STMTSTATUS_SORT
|
|
8823
|
-
#define SQLITE_STMTSTATUS_AUTOINDEX
|
|
8824
|
-
#define SQLITE_STMTSTATUS_VM_STEP
|
|
8825
|
-
#define SQLITE_STMTSTATUS_REPREPARE
|
|
8826
|
-
#define SQLITE_STMTSTATUS_RUN
|
|
8827
|
-
#define SQLITE_STMTSTATUS_FILTER_MISS
|
|
8828
|
-
#define SQLITE_STMTSTATUS_FILTER_HIT
|
|
8829
|
-
#define SQLITE_STMTSTATUS_MEMUSED
|
|
8792
|
+
#define SQLITE_STMTSTATUS_FULLSCAN_STEP 1
|
|
8793
|
+
#define SQLITE_STMTSTATUS_SORT 2
|
|
8794
|
+
#define SQLITE_STMTSTATUS_AUTOINDEX 3
|
|
8795
|
+
#define SQLITE_STMTSTATUS_VM_STEP 4
|
|
8796
|
+
#define SQLITE_STMTSTATUS_REPREPARE 5
|
|
8797
|
+
#define SQLITE_STMTSTATUS_RUN 6
|
|
8798
|
+
#define SQLITE_STMTSTATUS_FILTER_MISS 7
|
|
8799
|
+
#define SQLITE_STMTSTATUS_FILTER_HIT 8
|
|
8800
|
+
#define SQLITE_STMTSTATUS_MEMUSED 99
|
|
8830
8801
|
|
|
8831
8802
|
/*
|
|
8832
8803
|
** CAPI3REF: Custom Page Cache Object
|
|
@@ -8853,8 +8824,8 @@ typedef struct sqlite3_pcache sqlite3_pcache;
|
|
|
8853
8824
|
*/
|
|
8854
8825
|
typedef struct sqlite3_pcache_page sqlite3_pcache_page;
|
|
8855
8826
|
struct sqlite3_pcache_page {
|
|
8856
|
-
void *pBuf;
|
|
8857
|
-
void *pExtra;
|
|
8827
|
+
void *pBuf; /* The content of the page */
|
|
8828
|
+
void *pExtra; /* Extra information associated with the page */
|
|
8858
8829
|
};
|
|
8859
8830
|
|
|
8860
8831
|
/*
|
|
@@ -9020,18 +8991,19 @@ typedef struct sqlite3_pcache_methods2 sqlite3_pcache_methods2;
|
|
|
9020
8991
|
struct sqlite3_pcache_methods2 {
|
|
9021
8992
|
int iVersion;
|
|
9022
8993
|
void *pArg;
|
|
9023
|
-
int (*xInit)(void*);
|
|
9024
|
-
void (*xShutdown)(void*);
|
|
8994
|
+
int (*xInit)(void *);
|
|
8995
|
+
void (*xShutdown)(void *);
|
|
9025
8996
|
sqlite3_pcache *(*xCreate)(int szPage, int szExtra, int bPurgeable);
|
|
9026
|
-
void (*xCachesize)(sqlite3_pcache*, int nCachesize);
|
|
9027
|
-
int (*xPagecount)(sqlite3_pcache*);
|
|
9028
|
-
sqlite3_pcache_page *(*xFetch)(sqlite3_pcache*, unsigned key,
|
|
9029
|
-
|
|
9030
|
-
void (*
|
|
9031
|
-
|
|
9032
|
-
|
|
9033
|
-
void (*
|
|
9034
|
-
void (*
|
|
8997
|
+
void (*xCachesize)(sqlite3_pcache *, int nCachesize);
|
|
8998
|
+
int (*xPagecount)(sqlite3_pcache *);
|
|
8999
|
+
sqlite3_pcache_page *(*xFetch)(sqlite3_pcache *, unsigned key,
|
|
9000
|
+
int createFlag);
|
|
9001
|
+
void (*xUnpin)(sqlite3_pcache *, sqlite3_pcache_page *, int discard);
|
|
9002
|
+
void (*xRekey)(sqlite3_pcache *, sqlite3_pcache_page *, unsigned oldKey,
|
|
9003
|
+
unsigned newKey);
|
|
9004
|
+
void (*xTruncate)(sqlite3_pcache *, unsigned iLimit);
|
|
9005
|
+
void (*xDestroy)(sqlite3_pcache *);
|
|
9006
|
+
void (*xShrink)(sqlite3_pcache *);
|
|
9035
9007
|
};
|
|
9036
9008
|
|
|
9037
9009
|
/*
|
|
@@ -9042,19 +9014,18 @@ struct sqlite3_pcache_methods2 {
|
|
|
9042
9014
|
typedef struct sqlite3_pcache_methods sqlite3_pcache_methods;
|
|
9043
9015
|
struct sqlite3_pcache_methods {
|
|
9044
9016
|
void *pArg;
|
|
9045
|
-
int (*xInit)(void*);
|
|
9046
|
-
void (*xShutdown)(void*);
|
|
9017
|
+
int (*xInit)(void *);
|
|
9018
|
+
void (*xShutdown)(void *);
|
|
9047
9019
|
sqlite3_pcache *(*xCreate)(int szPage, int bPurgeable);
|
|
9048
|
-
void (*xCachesize)(sqlite3_pcache*, int nCachesize);
|
|
9049
|
-
int (*xPagecount)(sqlite3_pcache*);
|
|
9050
|
-
void *(*xFetch)(sqlite3_pcache*, unsigned key, int createFlag);
|
|
9051
|
-
void (*xUnpin)(sqlite3_pcache*, void*, int discard);
|
|
9052
|
-
void (*xRekey)(sqlite3_pcache*, void*, unsigned oldKey, unsigned newKey);
|
|
9053
|
-
void (*xTruncate)(sqlite3_pcache*, unsigned iLimit);
|
|
9054
|
-
void (*xDestroy)(sqlite3_pcache*);
|
|
9020
|
+
void (*xCachesize)(sqlite3_pcache *, int nCachesize);
|
|
9021
|
+
int (*xPagecount)(sqlite3_pcache *);
|
|
9022
|
+
void *(*xFetch)(sqlite3_pcache *, unsigned key, int createFlag);
|
|
9023
|
+
void (*xUnpin)(sqlite3_pcache *, void *, int discard);
|
|
9024
|
+
void (*xRekey)(sqlite3_pcache *, void *, unsigned oldKey, unsigned newKey);
|
|
9025
|
+
void (*xTruncate)(sqlite3_pcache *, unsigned iLimit);
|
|
9026
|
+
void (*xDestroy)(sqlite3_pcache *);
|
|
9055
9027
|
};
|
|
9056
9028
|
|
|
9057
|
-
|
|
9058
9029
|
/*
|
|
9059
9030
|
** CAPI3REF: Online Backup Object
|
|
9060
9031
|
**
|
|
@@ -9253,11 +9224,11 @@ typedef struct sqlite3_backup sqlite3_backup;
|
|
|
9253
9224
|
** same time as another thread is invoking sqlite3_backup_step() it is
|
|
9254
9225
|
** possible that they return invalid values.
|
|
9255
9226
|
*/
|
|
9256
|
-
SQLITE_API sqlite3_backup *
|
|
9257
|
-
|
|
9258
|
-
|
|
9259
|
-
|
|
9260
|
-
|
|
9227
|
+
SQLITE_API sqlite3_backup *
|
|
9228
|
+
sqlite3_backup_init(sqlite3 *pDest, /* Destination database handle */
|
|
9229
|
+
const char *zDestName, /* Destination database name */
|
|
9230
|
+
sqlite3 *pSource, /* Source database handle */
|
|
9231
|
+
const char *zSourceName /* Source database name */
|
|
9261
9232
|
);
|
|
9262
9233
|
SQLITE_API int sqlite3_backup_step(sqlite3_backup *p, int nPage);
|
|
9263
9234
|
SQLITE_API int sqlite3_backup_finish(sqlite3_backup *p);
|
|
@@ -9380,12 +9351,11 @@ SQLITE_API int sqlite3_backup_pagecount(sqlite3_backup *p);
|
|
|
9380
9351
|
** SQLITE_LOCKED.)^
|
|
9381
9352
|
*/
|
|
9382
9353
|
SQLITE_API int sqlite3_unlock_notify(
|
|
9383
|
-
|
|
9384
|
-
|
|
9385
|
-
|
|
9354
|
+
sqlite3 *pBlocked, /* Waiting connection */
|
|
9355
|
+
void (*xNotify)(void **apArg, int nArg), /* Callback function to invoke */
|
|
9356
|
+
void *pNotifyArg /* Argument to pass to xNotify */
|
|
9386
9357
|
);
|
|
9387
9358
|
|
|
9388
|
-
|
|
9389
9359
|
/*
|
|
9390
9360
|
** CAPI3REF: String Comparison
|
|
9391
9361
|
**
|
|
@@ -9435,7 +9405,8 @@ SQLITE_API int sqlite3_strglob(const char *zGlob, const char *zStr);
|
|
|
9435
9405
|
**
|
|
9436
9406
|
** See also: [sqlite3_strglob()].
|
|
9437
9407
|
*/
|
|
9438
|
-
SQLITE_API int sqlite3_strlike(const char *zGlob, const char *zStr,
|
|
9408
|
+
SQLITE_API int sqlite3_strlike(const char *zGlob, const char *zStr,
|
|
9409
|
+
unsigned int cEsc);
|
|
9439
9410
|
|
|
9440
9411
|
/*
|
|
9441
9412
|
** CAPI3REF: Error Logging Interface
|
|
@@ -9495,11 +9466,9 @@ SQLITE_API void sqlite3_log(int iErrCode, const char *zFormat, ...);
|
|
|
9495
9466
|
** [wal_autocheckpoint pragma] both invoke [sqlite3_wal_hook()] and will
|
|
9496
9467
|
** overwrite any prior [sqlite3_wal_hook()] settings.
|
|
9497
9468
|
*/
|
|
9498
|
-
SQLITE_API void *sqlite3_wal_hook(
|
|
9499
|
-
|
|
9500
|
-
|
|
9501
|
-
void*
|
|
9502
|
-
);
|
|
9469
|
+
SQLITE_API void *sqlite3_wal_hook(sqlite3 *,
|
|
9470
|
+
int (*)(void *, sqlite3 *, const char *, int),
|
|
9471
|
+
void *);
|
|
9503
9472
|
|
|
9504
9473
|
/*
|
|
9505
9474
|
** CAPI3REF: Configure an auto-checkpoint
|
|
@@ -9647,11 +9616,11 @@ SQLITE_API int sqlite3_wal_checkpoint(sqlite3 *db, const char *zDb);
|
|
|
9647
9616
|
** from SQL.
|
|
9648
9617
|
*/
|
|
9649
9618
|
SQLITE_API int sqlite3_wal_checkpoint_v2(
|
|
9650
|
-
|
|
9651
|
-
|
|
9652
|
-
|
|
9653
|
-
|
|
9654
|
-
|
|
9619
|
+
sqlite3 *db, /* Database handle */
|
|
9620
|
+
const char *zDb, /* Name of attached database (or NULL) */
|
|
9621
|
+
int eMode, /* SQLITE_CHECKPOINT_* value */
|
|
9622
|
+
int *pnLog, /* OUT: Size of WAL log in frames */
|
|
9623
|
+
int *pnCkpt /* OUT: Total number of frames checkpointed */
|
|
9655
9624
|
);
|
|
9656
9625
|
|
|
9657
9626
|
/*
|
|
@@ -9663,10 +9632,10 @@ SQLITE_API int sqlite3_wal_checkpoint_v2(
|
|
|
9663
9632
|
** See the [sqlite3_wal_checkpoint_v2()] documentation for details on the
|
|
9664
9633
|
** meaning of each of these checkpoint modes.
|
|
9665
9634
|
*/
|
|
9666
|
-
#define SQLITE_CHECKPOINT_PASSIVE
|
|
9667
|
-
#define SQLITE_CHECKPOINT_FULL
|
|
9668
|
-
#define SQLITE_CHECKPOINT_RESTART
|
|
9669
|
-
#define SQLITE_CHECKPOINT_TRUNCATE 3
|
|
9635
|
+
#define SQLITE_CHECKPOINT_PASSIVE 0 /* Do as much as possible w/o blocking */
|
|
9636
|
+
#define SQLITE_CHECKPOINT_FULL 1 /* Wait for writers, then checkpoint */
|
|
9637
|
+
#define SQLITE_CHECKPOINT_RESTART 2 /* Like FULL but wait for readers */
|
|
9638
|
+
#define SQLITE_CHECKPOINT_TRUNCATE 3 /* Like RESTART but also truncate WAL */
|
|
9670
9639
|
|
|
9671
9640
|
/*
|
|
9672
9641
|
** CAPI3REF: Virtual Table Interface Configuration
|
|
@@ -9686,7 +9655,7 @@ SQLITE_API int sqlite3_wal_checkpoint_v2(
|
|
|
9686
9655
|
** of parameters after C depend on which [virtual table configuration option]
|
|
9687
9656
|
** is used.
|
|
9688
9657
|
*/
|
|
9689
|
-
SQLITE_API int sqlite3_vtab_config(sqlite3*, int op, ...);
|
|
9658
|
+
SQLITE_API int sqlite3_vtab_config(sqlite3 *, int op, ...);
|
|
9690
9659
|
|
|
9691
9660
|
/*
|
|
9692
9661
|
** CAPI3REF: Virtual Table Configuration Options
|
|
@@ -9760,9 +9729,9 @@ SQLITE_API int sqlite3_vtab_config(sqlite3*, int op, ...);
|
|
|
9760
9729
|
** </dl>
|
|
9761
9730
|
*/
|
|
9762
9731
|
#define SQLITE_VTAB_CONSTRAINT_SUPPORT 1
|
|
9763
|
-
#define SQLITE_VTAB_INNOCUOUS
|
|
9764
|
-
#define SQLITE_VTAB_DIRECTONLY
|
|
9765
|
-
#define SQLITE_VTAB_USES_ALL_SCHEMAS
|
|
9732
|
+
#define SQLITE_VTAB_INNOCUOUS 2
|
|
9733
|
+
#define SQLITE_VTAB_DIRECTONLY 3
|
|
9734
|
+
#define SQLITE_VTAB_USES_ALL_SCHEMAS 4
|
|
9766
9735
|
|
|
9767
9736
|
/*
|
|
9768
9737
|
** CAPI3REF: Determine The Virtual Table Conflict Policy
|
|
@@ -9800,7 +9769,7 @@ SQLITE_API int sqlite3_vtab_on_conflict(sqlite3 *);
|
|
|
9800
9769
|
** current implementation, the sqlite3_vtab_nochange() interface does always
|
|
9801
9770
|
** returns false for the enhanced [UPDATE FROM] statement.
|
|
9802
9771
|
*/
|
|
9803
|
-
SQLITE_API int sqlite3_vtab_nochange(sqlite3_context*);
|
|
9772
|
+
SQLITE_API int sqlite3_vtab_nochange(sqlite3_context *);
|
|
9804
9773
|
|
|
9805
9774
|
/*
|
|
9806
9775
|
** CAPI3REF: Determine The Collation For a Virtual Table Constraint
|
|
@@ -9835,7 +9804,7 @@ SQLITE_API int sqlite3_vtab_nochange(sqlite3_context*);
|
|
|
9835
9804
|
** <li><p> Otherwise, "BINARY" is returned.
|
|
9836
9805
|
** </ol>
|
|
9837
9806
|
*/
|
|
9838
|
-
SQLITE_API const char *sqlite3_vtab_collation(sqlite3_index_info*,int);
|
|
9807
|
+
SQLITE_API const char *sqlite3_vtab_collation(sqlite3_index_info *, int);
|
|
9839
9808
|
|
|
9840
9809
|
/*
|
|
9841
9810
|
** CAPI3REF: Determine if a virtual table query is DISTINCT
|
|
@@ -9908,7 +9877,7 @@ SQLITE_API const char *sqlite3_vtab_collation(sqlite3_index_info*,int);
|
|
|
9908
9877
|
** valid to do so, on the other hand, might cause SQLite to return incorrect
|
|
9909
9878
|
** results.
|
|
9910
9879
|
*/
|
|
9911
|
-
SQLITE_API int sqlite3_vtab_distinct(sqlite3_index_info*);
|
|
9880
|
+
SQLITE_API int sqlite3_vtab_distinct(sqlite3_index_info *);
|
|
9912
9881
|
|
|
9913
9882
|
/*
|
|
9914
9883
|
** CAPI3REF: Identify and handle IN constraints in xBestIndex
|
|
@@ -9981,7 +9950,7 @@ SQLITE_API int sqlite3_vtab_distinct(sqlite3_index_info*);
|
|
|
9981
9950
|
** [sqlite3_vtab_in_next()] to find all values on the right-hand side
|
|
9982
9951
|
** of the IN constraint.
|
|
9983
9952
|
*/
|
|
9984
|
-
SQLITE_API int sqlite3_vtab_in(sqlite3_index_info*, int iCons, int bHandle);
|
|
9953
|
+
SQLITE_API int sqlite3_vtab_in(sqlite3_index_info *, int iCons, int bHandle);
|
|
9985
9954
|
|
|
9986
9955
|
/*
|
|
9987
9956
|
** CAPI3REF: Find all elements on the right-hand side of an IN constraint.
|
|
@@ -10028,7 +9997,8 @@ SQLITE_API int sqlite3_vtab_in(sqlite3_index_info*, int iCons, int bHandle);
|
|
|
10028
9997
|
** implementation needs to retain the *ppOut values for longer, it must make
|
|
10029
9998
|
** copies. The *ppOut values are [protected sqlite3_value|protected].
|
|
10030
9999
|
*/
|
|
10031
|
-
SQLITE_API int sqlite3_vtab_in_first(sqlite3_value *pVal,
|
|
10000
|
+
SQLITE_API int sqlite3_vtab_in_first(sqlite3_value *pVal,
|
|
10001
|
+
sqlite3_value **ppOut);
|
|
10032
10002
|
SQLITE_API int sqlite3_vtab_in_next(sqlite3_value *pVal, sqlite3_value **ppOut);
|
|
10033
10003
|
|
|
10034
10004
|
/*
|
|
@@ -10071,7 +10041,8 @@ SQLITE_API int sqlite3_vtab_in_next(sqlite3_value *pVal, sqlite3_value **ppOut);
|
|
|
10071
10041
|
** The "_rhs_" in the name of this routine is an abbreviation for
|
|
10072
10042
|
** "Right-Hand Side".
|
|
10073
10043
|
*/
|
|
10074
|
-
SQLITE_API int sqlite3_vtab_rhs_value(sqlite3_index_info*, int,
|
|
10044
|
+
SQLITE_API int sqlite3_vtab_rhs_value(sqlite3_index_info *, int,
|
|
10045
|
+
sqlite3_value **ppVal);
|
|
10075
10046
|
|
|
10076
10047
|
/*
|
|
10077
10048
|
** CAPI3REF: Conflict resolution modes
|
|
@@ -10087,9 +10058,9 @@ SQLITE_API int sqlite3_vtab_rhs_value(sqlite3_index_info*, int, sqlite3_value **
|
|
|
10087
10058
|
*/
|
|
10088
10059
|
#define SQLITE_ROLLBACK 1
|
|
10089
10060
|
/* #define SQLITE_IGNORE 2 // Also used by sqlite3_authorizer() callback */
|
|
10090
|
-
#define SQLITE_FAIL
|
|
10061
|
+
#define SQLITE_FAIL 3
|
|
10091
10062
|
/* #define SQLITE_ABORT 4 // Also an error code */
|
|
10092
|
-
#define SQLITE_REPLACE
|
|
10063
|
+
#define SQLITE_REPLACE 5
|
|
10093
10064
|
|
|
10094
10065
|
/*
|
|
10095
10066
|
** CAPI3REF: Prepared Statement Scan Status Opcodes
|
|
@@ -10154,14 +10125,14 @@ SQLITE_API int sqlite3_vtab_rhs_value(sqlite3_index_info*, int, sqlite3_value **
|
|
|
10154
10125
|
** set to -1.
|
|
10155
10126
|
** </dl>
|
|
10156
10127
|
*/
|
|
10157
|
-
#define SQLITE_SCANSTAT_NLOOP
|
|
10158
|
-
#define SQLITE_SCANSTAT_NVISIT
|
|
10159
|
-
#define SQLITE_SCANSTAT_EST
|
|
10160
|
-
#define SQLITE_SCANSTAT_NAME
|
|
10161
|
-
#define SQLITE_SCANSTAT_EXPLAIN
|
|
10128
|
+
#define SQLITE_SCANSTAT_NLOOP 0
|
|
10129
|
+
#define SQLITE_SCANSTAT_NVISIT 1
|
|
10130
|
+
#define SQLITE_SCANSTAT_EST 2
|
|
10131
|
+
#define SQLITE_SCANSTAT_NAME 3
|
|
10132
|
+
#define SQLITE_SCANSTAT_EXPLAIN 4
|
|
10162
10133
|
#define SQLITE_SCANSTAT_SELECTID 5
|
|
10163
10134
|
#define SQLITE_SCANSTAT_PARENTID 6
|
|
10164
|
-
#define SQLITE_SCANSTAT_NCYCLE
|
|
10135
|
+
#define SQLITE_SCANSTAT_NCYCLE 7
|
|
10165
10136
|
|
|
10166
10137
|
/*
|
|
10167
10138
|
** CAPI3REF: Prepared Statement Scan Status
|
|
@@ -10201,17 +10172,17 @@ SQLITE_API int sqlite3_vtab_rhs_value(sqlite3_index_info*, int, sqlite3_value **
|
|
|
10201
10172
|
** See also: [sqlite3_stmt_scanstatus_reset()]
|
|
10202
10173
|
*/
|
|
10203
10174
|
SQLITE_API int sqlite3_stmt_scanstatus(
|
|
10204
|
-
|
|
10205
|
-
|
|
10206
|
-
|
|
10207
|
-
|
|
10175
|
+
sqlite3_stmt *pStmt, /* Prepared statement for which info desired */
|
|
10176
|
+
int idx, /* Index of loop to report on */
|
|
10177
|
+
int iScanStatusOp, /* Information desired. SQLITE_SCANSTAT_* */
|
|
10178
|
+
void *pOut /* Result written here */
|
|
10208
10179
|
);
|
|
10209
10180
|
SQLITE_API int sqlite3_stmt_scanstatus_v2(
|
|
10210
|
-
|
|
10211
|
-
|
|
10212
|
-
|
|
10213
|
-
|
|
10214
|
-
|
|
10181
|
+
sqlite3_stmt *pStmt, /* Prepared statement for which info desired */
|
|
10182
|
+
int idx, /* Index of loop to report on */
|
|
10183
|
+
int iScanStatusOp, /* Information desired. SQLITE_SCANSTAT_* */
|
|
10184
|
+
int flags, /* Mask of flags defined below */
|
|
10185
|
+
void *pOut /* Result written here */
|
|
10215
10186
|
);
|
|
10216
10187
|
|
|
10217
10188
|
/*
|
|
@@ -10229,7 +10200,7 @@ SQLITE_API int sqlite3_stmt_scanstatus_v2(
|
|
|
10229
10200
|
** This API is only available if the library is built with pre-processor
|
|
10230
10201
|
** symbol [SQLITE_ENABLE_STMT_SCANSTATUS] defined.
|
|
10231
10202
|
*/
|
|
10232
|
-
SQLITE_API void sqlite3_stmt_scanstatus_reset(sqlite3_stmt*);
|
|
10203
|
+
SQLITE_API void sqlite3_stmt_scanstatus_reset(sqlite3_stmt *);
|
|
10233
10204
|
|
|
10234
10205
|
/*
|
|
10235
10206
|
** CAPI3REF: Flush caches to disk mid-transaction
|
|
@@ -10262,7 +10233,7 @@ SQLITE_API void sqlite3_stmt_scanstatus_reset(sqlite3_stmt*);
|
|
|
10262
10233
|
** ^This function does not set the database handle error code or message
|
|
10263
10234
|
** returned by the [sqlite3_errcode()] and [sqlite3_errmsg()] functions.
|
|
10264
10235
|
*/
|
|
10265
|
-
SQLITE_API int sqlite3_db_cacheflush(sqlite3*);
|
|
10236
|
+
SQLITE_API int sqlite3_db_cacheflush(sqlite3 *);
|
|
10266
10237
|
|
|
10267
10238
|
/*
|
|
10268
10239
|
** CAPI3REF: The pre-update hook.
|
|
@@ -10362,18 +10333,17 @@ SQLITE_API int sqlite3_db_cacheflush(sqlite3*);
|
|
|
10362
10333
|
*/
|
|
10363
10334
|
#if defined(SQLITE_ENABLE_PREUPDATE_HOOK)
|
|
10364
10335
|
SQLITE_API void *sqlite3_preupdate_hook(
|
|
10365
|
-
|
|
10366
|
-
|
|
10367
|
-
|
|
10368
|
-
|
|
10369
|
-
|
|
10370
|
-
|
|
10371
|
-
|
|
10372
|
-
|
|
10373
|
-
|
|
10374
|
-
|
|
10375
|
-
|
|
10376
|
-
);
|
|
10336
|
+
sqlite3 *db,
|
|
10337
|
+
void (*xPreUpdate)(
|
|
10338
|
+
void *pCtx, /* Copy of third arg to preupdate_hook() */
|
|
10339
|
+
sqlite3 *db, /* Database handle */
|
|
10340
|
+
int op, /* SQLITE_UPDATE, DELETE or INSERT */
|
|
10341
|
+
char const *zDb, /* Database name */
|
|
10342
|
+
char const *zName, /* Table name */
|
|
10343
|
+
sqlite3_int64 iKey1, /* Rowid of row about to be deleted/updated */
|
|
10344
|
+
sqlite3_int64 iKey2 /* New rowid value (for a rowid UPDATE) */
|
|
10345
|
+
),
|
|
10346
|
+
void *);
|
|
10377
10347
|
SQLITE_API int sqlite3_preupdate_old(sqlite3 *, int, sqlite3_value **);
|
|
10378
10348
|
SQLITE_API int sqlite3_preupdate_count(sqlite3 *);
|
|
10379
10349
|
SQLITE_API int sqlite3_preupdate_depth(sqlite3 *);
|
|
@@ -10392,7 +10362,7 @@ SQLITE_API int sqlite3_preupdate_blobwrite(sqlite3 *);
|
|
|
10392
10362
|
** called to get back the underlying "errno" that caused the problem, such
|
|
10393
10363
|
** as ENOSPC, EAUTH, EISDIR, and so forth.
|
|
10394
10364
|
*/
|
|
10395
|
-
SQLITE_API int sqlite3_system_errno(sqlite3*);
|
|
10365
|
+
SQLITE_API int sqlite3_system_errno(sqlite3 *);
|
|
10396
10366
|
|
|
10397
10367
|
/*
|
|
10398
10368
|
** CAPI3REF: Database Snapshot
|
|
@@ -10461,11 +10431,9 @@ typedef struct sqlite3_snapshot {
|
|
|
10461
10431
|
** The [sqlite3_snapshot_get()] interface is only available when the
|
|
10462
10432
|
** [SQLITE_ENABLE_SNAPSHOT] compile-time option is used.
|
|
10463
10433
|
*/
|
|
10464
|
-
SQLITE_API SQLITE_EXPERIMENTAL int
|
|
10465
|
-
|
|
10466
|
-
|
|
10467
|
-
sqlite3_snapshot **ppSnapshot
|
|
10468
|
-
);
|
|
10434
|
+
SQLITE_API SQLITE_EXPERIMENTAL int
|
|
10435
|
+
sqlite3_snapshot_get(sqlite3 *db, const char *zSchema,
|
|
10436
|
+
sqlite3_snapshot **ppSnapshot);
|
|
10469
10437
|
|
|
10470
10438
|
/*
|
|
10471
10439
|
** CAPI3REF: Start a read transaction on an historical snapshot
|
|
@@ -10510,11 +10478,9 @@ SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_get(
|
|
|
10510
10478
|
** The [sqlite3_snapshot_open()] interface is only available when the
|
|
10511
10479
|
** [SQLITE_ENABLE_SNAPSHOT] compile-time option is used.
|
|
10512
10480
|
*/
|
|
10513
|
-
SQLITE_API SQLITE_EXPERIMENTAL int
|
|
10514
|
-
|
|
10515
|
-
|
|
10516
|
-
sqlite3_snapshot *pSnapshot
|
|
10517
|
-
);
|
|
10481
|
+
SQLITE_API SQLITE_EXPERIMENTAL int
|
|
10482
|
+
sqlite3_snapshot_open(sqlite3 *db, const char *zSchema,
|
|
10483
|
+
sqlite3_snapshot *pSnapshot);
|
|
10518
10484
|
|
|
10519
10485
|
/*
|
|
10520
10486
|
** CAPI3REF: Destroy a snapshot
|
|
@@ -10527,7 +10493,7 @@ SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_open(
|
|
|
10527
10493
|
** The [sqlite3_snapshot_free()] interface is only available when the
|
|
10528
10494
|
** [SQLITE_ENABLE_SNAPSHOT] compile-time option is used.
|
|
10529
10495
|
*/
|
|
10530
|
-
SQLITE_API SQLITE_EXPERIMENTAL void sqlite3_snapshot_free(sqlite3_snapshot*);
|
|
10496
|
+
SQLITE_API SQLITE_EXPERIMENTAL void sqlite3_snapshot_free(sqlite3_snapshot *);
|
|
10531
10497
|
|
|
10532
10498
|
/*
|
|
10533
10499
|
** CAPI3REF: Compare the ages of two snapshot handles.
|
|
@@ -10554,10 +10520,8 @@ SQLITE_API SQLITE_EXPERIMENTAL void sqlite3_snapshot_free(sqlite3_snapshot*);
|
|
|
10554
10520
|
** This interface is only available if SQLite is compiled with the
|
|
10555
10521
|
** [SQLITE_ENABLE_SNAPSHOT] option.
|
|
10556
10522
|
*/
|
|
10557
|
-
SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_cmp(
|
|
10558
|
-
|
|
10559
|
-
sqlite3_snapshot *p2
|
|
10560
|
-
);
|
|
10523
|
+
SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_cmp(sqlite3_snapshot *p1,
|
|
10524
|
+
sqlite3_snapshot *p2);
|
|
10561
10525
|
|
|
10562
10526
|
/*
|
|
10563
10527
|
** CAPI3REF: Recover snapshots from a wal file
|
|
@@ -10582,7 +10546,8 @@ SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_cmp(
|
|
|
10582
10546
|
** This interface is only available if SQLite is compiled with the
|
|
10583
10547
|
** [SQLITE_ENABLE_SNAPSHOT] option.
|
|
10584
10548
|
*/
|
|
10585
|
-
SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_recover(sqlite3 *db,
|
|
10549
|
+
SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_recover(sqlite3 *db,
|
|
10550
|
+
const char *zDb);
|
|
10586
10551
|
|
|
10587
10552
|
/*
|
|
10588
10553
|
** CAPI3REF: Serialize a database
|
|
@@ -10628,10 +10593,10 @@ SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_recover(sqlite3 *db, const c
|
|
|
10628
10593
|
** [SQLITE_OMIT_DESERIALIZE] option.
|
|
10629
10594
|
*/
|
|
10630
10595
|
SQLITE_API unsigned char *sqlite3_serialize(
|
|
10631
|
-
|
|
10632
|
-
|
|
10633
|
-
|
|
10634
|
-
|
|
10596
|
+
sqlite3 *db, /* The database connection */
|
|
10597
|
+
const char *zSchema, /* Which DB to serialize. ex: "main", "temp", ... */
|
|
10598
|
+
sqlite3_int64 *piSize, /* Write size of the DB here, if not NULL */
|
|
10599
|
+
unsigned int mFlags /* Zero or more SQLITE_SERIALIZE_* flags */
|
|
10635
10600
|
);
|
|
10636
10601
|
|
|
10637
10602
|
/*
|
|
@@ -10648,7 +10613,7 @@ SQLITE_API unsigned char *sqlite3_serialize(
|
|
|
10648
10613
|
** using a contiguous in-memory database if it has been initialized by a
|
|
10649
10614
|
** prior call to [sqlite3_deserialize()].
|
|
10650
10615
|
*/
|
|
10651
|
-
#define SQLITE_SERIALIZE_NOCOPY 0x001
|
|
10616
|
+
#define SQLITE_SERIALIZE_NOCOPY 0x001 /* Do no memory allocations */
|
|
10652
10617
|
|
|
10653
10618
|
/*
|
|
10654
10619
|
** CAPI3REF: Deserialize a database
|
|
@@ -10694,12 +10659,12 @@ SQLITE_API unsigned char *sqlite3_serialize(
|
|
|
10694
10659
|
** [SQLITE_OMIT_DESERIALIZE] option.
|
|
10695
10660
|
*/
|
|
10696
10661
|
SQLITE_API int sqlite3_deserialize(
|
|
10697
|
-
|
|
10698
|
-
|
|
10699
|
-
|
|
10700
|
-
|
|
10701
|
-
|
|
10702
|
-
|
|
10662
|
+
sqlite3 *db, /* The database connection */
|
|
10663
|
+
const char *zSchema, /* Which DB to reopen with the deserialization */
|
|
10664
|
+
unsigned char *pData, /* The serialized database content */
|
|
10665
|
+
sqlite3_int64 szDb, /* Number bytes in the deserialization */
|
|
10666
|
+
sqlite3_int64 szBuf, /* Total size of buffer pData[] */
|
|
10667
|
+
unsigned mFlags /* Zero or more SQLITE_DESERIALIZE_* flags */
|
|
10703
10668
|
);
|
|
10704
10669
|
|
|
10705
10670
|
/*
|
|
@@ -10724,32 +10689,32 @@ SQLITE_API int sqlite3_deserialize(
|
|
|
10724
10689
|
** should be treated as read-only.
|
|
10725
10690
|
*/
|
|
10726
10691
|
#define SQLITE_DESERIALIZE_FREEONCLOSE 1 /* Call sqlite3_free() on close */
|
|
10727
|
-
#define SQLITE_DESERIALIZE_RESIZEABLE
|
|
10728
|
-
#define SQLITE_DESERIALIZE_READONLY
|
|
10692
|
+
#define SQLITE_DESERIALIZE_RESIZEABLE 2 /* Resize using sqlite3_realloc64() */
|
|
10693
|
+
#define SQLITE_DESERIALIZE_READONLY 4 /* Database is read-only */
|
|
10729
10694
|
|
|
10730
10695
|
/*
|
|
10731
10696
|
** Undo the hack that converts floating point types to integer for
|
|
10732
10697
|
** builds on processors without floating point support.
|
|
10733
10698
|
*/
|
|
10734
10699
|
#ifdef SQLITE_OMIT_FLOATING_POINT
|
|
10735
|
-
#
|
|
10700
|
+
#undef double
|
|
10736
10701
|
#endif
|
|
10737
10702
|
|
|
10738
10703
|
#if defined(__wasi__)
|
|
10739
|
-
#
|
|
10740
|
-
#
|
|
10741
|
-
#
|
|
10742
|
-
#
|
|
10743
|
-
#
|
|
10744
|
-
#
|
|
10745
|
-
#
|
|
10746
|
-
#
|
|
10747
|
-
#
|
|
10748
|
-
#
|
|
10704
|
+
#undef SQLITE_WASI
|
|
10705
|
+
#define SQLITE_WASI 1
|
|
10706
|
+
#undef SQLITE_OMIT_WAL
|
|
10707
|
+
#define SQLITE_OMIT_WAL 1 /* because it requires shared memory APIs */
|
|
10708
|
+
#ifndef SQLITE_OMIT_LOAD_EXTENSION
|
|
10709
|
+
#define SQLITE_OMIT_LOAD_EXTENSION
|
|
10710
|
+
#endif
|
|
10711
|
+
#ifndef SQLITE_THREADSAFE
|
|
10712
|
+
#define SQLITE_THREADSAFE 0
|
|
10713
|
+
#endif
|
|
10749
10714
|
#endif
|
|
10750
10715
|
|
|
10751
10716
|
#ifdef __cplusplus
|
|
10752
|
-
}
|
|
10717
|
+
} /* End of the 'extern "C"' block */
|
|
10753
10718
|
#endif
|
|
10754
10719
|
#endif /* SQLITE3_H */
|
|
10755
10720
|
|
|
@@ -10770,7 +10735,6 @@ SQLITE_API int sqlite3_deserialize(
|
|
|
10770
10735
|
#ifndef _SQLITE3RTREE_H_
|
|
10771
10736
|
#define _SQLITE3RTREE_H_
|
|
10772
10737
|
|
|
10773
|
-
|
|
10774
10738
|
#ifdef __cplusplus
|
|
10775
10739
|
extern "C" {
|
|
10776
10740
|
#endif
|
|
@@ -10782,9 +10746,9 @@ typedef struct sqlite3_rtree_query_info sqlite3_rtree_query_info;
|
|
|
10782
10746
|
** SQLITE_RTREE_INT_ONLY compile-time option.
|
|
10783
10747
|
*/
|
|
10784
10748
|
#ifdef SQLITE_RTREE_INT_ONLY
|
|
10785
|
-
|
|
10749
|
+
typedef sqlite3_int64 sqlite3_rtree_dbl;
|
|
10786
10750
|
#else
|
|
10787
|
-
|
|
10751
|
+
typedef double sqlite3_rtree_dbl;
|
|
10788
10752
|
#endif
|
|
10789
10753
|
|
|
10790
10754
|
/*
|
|
@@ -10794,23 +10758,20 @@ typedef struct sqlite3_rtree_query_info sqlite3_rtree_query_info;
|
|
|
10794
10758
|
** SELECT ... FROM <rtree> WHERE <rtree col> MATCH $zGeom(... params ...)
|
|
10795
10759
|
*/
|
|
10796
10760
|
SQLITE_API int sqlite3_rtree_geometry_callback(
|
|
10797
|
-
|
|
10798
|
-
|
|
10799
|
-
|
|
10800
|
-
void *pContext
|
|
10801
|
-
);
|
|
10802
|
-
|
|
10761
|
+
sqlite3 *db, const char *zGeom,
|
|
10762
|
+
int (*xGeom)(sqlite3_rtree_geometry *, int, sqlite3_rtree_dbl *, int *),
|
|
10763
|
+
void *pContext);
|
|
10803
10764
|
|
|
10804
10765
|
/*
|
|
10805
10766
|
** A pointer to a structure of the following type is passed as the first
|
|
10806
10767
|
** argument to callbacks registered using rtree_geometry_callback().
|
|
10807
10768
|
*/
|
|
10808
10769
|
struct sqlite3_rtree_geometry {
|
|
10809
|
-
void *pContext;
|
|
10810
|
-
int nParam;
|
|
10811
|
-
sqlite3_rtree_dbl *aParam;
|
|
10812
|
-
void *pUser;
|
|
10813
|
-
void (*xDelUser)(void *);
|
|
10770
|
+
void *pContext; /* Copy of pContext passed to s_r_g_c() */
|
|
10771
|
+
int nParam; /* Size of array aParam[] */
|
|
10772
|
+
sqlite3_rtree_dbl *aParam; /* Parameters passed to SQL geom function */
|
|
10773
|
+
void *pUser; /* Callback implementation user data */
|
|
10774
|
+
void (*xDelUser)(void *); /* Called by SQLite to clean up pUser */
|
|
10814
10775
|
};
|
|
10815
10776
|
|
|
10816
10777
|
/*
|
|
@@ -10819,14 +10780,10 @@ struct sqlite3_rtree_geometry {
|
|
|
10819
10780
|
**
|
|
10820
10781
|
** SELECT ... FROM <rtree> WHERE <rtree col> MATCH $zQueryFunc(... params ...)
|
|
10821
10782
|
*/
|
|
10822
|
-
SQLITE_API int
|
|
10823
|
-
|
|
10824
|
-
|
|
10825
|
-
|
|
10826
|
-
void *pContext,
|
|
10827
|
-
void (*xDestructor)(void*)
|
|
10828
|
-
);
|
|
10829
|
-
|
|
10783
|
+
SQLITE_API int
|
|
10784
|
+
sqlite3_rtree_query_callback(sqlite3 *db, const char *zQueryFunc,
|
|
10785
|
+
int (*xQueryFunc)(sqlite3_rtree_query_info *),
|
|
10786
|
+
void *pContext, void (*xDestructor)(void *));
|
|
10830
10787
|
|
|
10831
10788
|
/*
|
|
10832
10789
|
** A pointer to a structure of the following type is passed as the
|
|
@@ -10838,38 +10795,37 @@ SQLITE_API int sqlite3_rtree_query_callback(
|
|
|
10838
10795
|
** sqlite3_rtree_geometry.
|
|
10839
10796
|
*/
|
|
10840
10797
|
struct sqlite3_rtree_query_info {
|
|
10841
|
-
void *pContext;
|
|
10842
|
-
int nParam;
|
|
10843
|
-
sqlite3_rtree_dbl *aParam;
|
|
10844
|
-
void *pUser;
|
|
10845
|
-
void (*xDelUser)(void*);
|
|
10846
|
-
sqlite3_rtree_dbl *aCoord;
|
|
10847
|
-
unsigned int *anQueue;
|
|
10848
|
-
int nCoord;
|
|
10849
|
-
int iLevel;
|
|
10850
|
-
int mxLevel;
|
|
10851
|
-
sqlite3_int64 iRowid;
|
|
10852
|
-
sqlite3_rtree_dbl rParentScore;
|
|
10853
|
-
int eParentWithin;
|
|
10854
|
-
int eWithin;
|
|
10855
|
-
sqlite3_rtree_dbl rScore;
|
|
10798
|
+
void *pContext; /* pContext from when function registered */
|
|
10799
|
+
int nParam; /* Number of function parameters */
|
|
10800
|
+
sqlite3_rtree_dbl *aParam; /* value of function parameters */
|
|
10801
|
+
void *pUser; /* callback can use this, if desired */
|
|
10802
|
+
void (*xDelUser)(void *); /* function to free pUser */
|
|
10803
|
+
sqlite3_rtree_dbl *aCoord; /* Coordinates of node or entry to check */
|
|
10804
|
+
unsigned int *anQueue; /* Number of pending entries in the queue */
|
|
10805
|
+
int nCoord; /* Number of coordinates */
|
|
10806
|
+
int iLevel; /* Level of current node or entry */
|
|
10807
|
+
int mxLevel; /* The largest iLevel value in the tree */
|
|
10808
|
+
sqlite3_int64 iRowid; /* Rowid for current entry */
|
|
10809
|
+
sqlite3_rtree_dbl rParentScore; /* Score of parent node */
|
|
10810
|
+
int eParentWithin; /* Visibility of parent node */
|
|
10811
|
+
int eWithin; /* OUT: Visibility */
|
|
10812
|
+
sqlite3_rtree_dbl rScore; /* OUT: Write the score here */
|
|
10856
10813
|
/* The following fields are only available in 3.8.11 and later */
|
|
10857
|
-
sqlite3_value **apSqlParam;
|
|
10814
|
+
sqlite3_value **apSqlParam; /* Original SQL values of parameters */
|
|
10858
10815
|
};
|
|
10859
10816
|
|
|
10860
10817
|
/*
|
|
10861
10818
|
** Allowed values for sqlite3_rtree_query.eWithin and .eParentWithin.
|
|
10862
10819
|
*/
|
|
10863
|
-
#define NOT_WITHIN
|
|
10864
|
-
#define PARTLY_WITHIN
|
|
10865
|
-
#define FULLY_WITHIN
|
|
10866
|
-
|
|
10820
|
+
#define NOT_WITHIN 0 /* Object completely outside of query region */
|
|
10821
|
+
#define PARTLY_WITHIN 1 /* Object partially overlaps query region */
|
|
10822
|
+
#define FULLY_WITHIN 2 /* Object fully contained within query region */
|
|
10867
10823
|
|
|
10868
10824
|
#ifdef __cplusplus
|
|
10869
|
-
}
|
|
10825
|
+
} /* end of the 'extern "C"' block */
|
|
10870
10826
|
#endif
|
|
10871
10827
|
|
|
10872
|
-
#endif
|
|
10828
|
+
#endif /* ifndef _SQLITE3RTREE_H_ */
|
|
10873
10829
|
|
|
10874
10830
|
/******** End of sqlite3rtree.h *********/
|
|
10875
10831
|
/******** Begin file sqlite3session.h *********/
|
|
@@ -10884,7 +10840,6 @@ struct sqlite3_rtree_query_info {
|
|
|
10884
10840
|
extern "C" {
|
|
10885
10841
|
#endif
|
|
10886
10842
|
|
|
10887
|
-
|
|
10888
10843
|
/*
|
|
10889
10844
|
** CAPI3REF: Session Object Handle
|
|
10890
10845
|
**
|
|
@@ -10932,10 +10887,10 @@ typedef struct sqlite3_changeset_iter sqlite3_changeset_iter;
|
|
|
10932
10887
|
** attached database. It is not an error if database zDb is not attached
|
|
10933
10888
|
** to the database when the session object is created.
|
|
10934
10889
|
*/
|
|
10935
|
-
SQLITE_API int
|
|
10936
|
-
|
|
10937
|
-
|
|
10938
|
-
|
|
10890
|
+
SQLITE_API int
|
|
10891
|
+
sqlite3session_create(sqlite3 *db, /* Database handle */
|
|
10892
|
+
const char *zDb, /* Name of db (e.g. "main") */
|
|
10893
|
+
sqlite3_session **ppSession /* OUT: New session object */
|
|
10939
10894
|
);
|
|
10940
10895
|
|
|
10941
10896
|
/*
|
|
@@ -10962,7 +10917,8 @@ SQLITE_API void sqlite3session_delete(sqlite3_session *pSession);
|
|
|
10962
10917
|
** [SQLITE_SESSION_OBJCONFIG_SIZE] and [SQLITE_SESSION_OBJCONFIG_ROWID].
|
|
10963
10918
|
**
|
|
10964
10919
|
*/
|
|
10965
|
-
SQLITE_API int sqlite3session_object_config(sqlite3_session*, int op,
|
|
10920
|
+
SQLITE_API int sqlite3session_object_config(sqlite3_session *, int op,
|
|
10921
|
+
void *pArg);
|
|
10966
10922
|
|
|
10967
10923
|
/*
|
|
10968
10924
|
** CAPI3REF: Options for sqlite3session_object_config
|
|
@@ -10996,7 +10952,7 @@ SQLITE_API int sqlite3session_object_config(sqlite3_session*, int op, void *pArg
|
|
|
10996
10952
|
** It is an error (SQLITE_MISUSE) to attempt to modify this setting after
|
|
10997
10953
|
** the first table has been attached to the session object.
|
|
10998
10954
|
*/
|
|
10999
|
-
#define SQLITE_SESSION_OBJCONFIG_SIZE
|
|
10955
|
+
#define SQLITE_SESSION_OBJCONFIG_SIZE 1
|
|
11000
10956
|
#define SQLITE_SESSION_OBJCONFIG_ROWID 2
|
|
11001
10957
|
|
|
11002
10958
|
/*
|
|
@@ -11047,7 +11003,8 @@ SQLITE_API int sqlite3session_enable(sqlite3_session *pSession, int bEnable);
|
|
|
11047
11003
|
** The return value indicates the final state of the indirect flag: 0 if
|
|
11048
11004
|
** it is clear, or 1 if it is set.
|
|
11049
11005
|
*/
|
|
11050
|
-
SQLITE_API int sqlite3session_indirect(sqlite3_session *pSession,
|
|
11006
|
+
SQLITE_API int sqlite3session_indirect(sqlite3_session *pSession,
|
|
11007
|
+
int bIndirect);
|
|
11051
11008
|
|
|
11052
11009
|
/*
|
|
11053
11010
|
** CAPI3REF: Attach A Table To A Session Object
|
|
@@ -11107,9 +11064,9 @@ SQLITE_API int sqlite3session_indirect(sqlite3_session *pSession, int bIndirect)
|
|
|
11107
11064
|
** sqlite3changeset_apply() function silently ignore any modifications to the
|
|
11108
11065
|
** sqlite_stat1 table that are part of a changeset or patchset.
|
|
11109
11066
|
*/
|
|
11110
|
-
SQLITE_API int
|
|
11111
|
-
|
|
11112
|
-
|
|
11067
|
+
SQLITE_API int
|
|
11068
|
+
sqlite3session_attach(sqlite3_session *pSession, /* Session object */
|
|
11069
|
+
const char *zTab /* Table name */
|
|
11113
11070
|
);
|
|
11114
11071
|
|
|
11115
11072
|
/*
|
|
@@ -11123,12 +11080,11 @@ SQLITE_API int sqlite3session_attach(
|
|
|
11123
11080
|
** attached, xFilter will not be called again.
|
|
11124
11081
|
*/
|
|
11125
11082
|
SQLITE_API void sqlite3session_table_filter(
|
|
11126
|
-
|
|
11127
|
-
|
|
11128
|
-
|
|
11129
|
-
|
|
11130
|
-
|
|
11131
|
-
void *pCtx /* First argument passed to xFilter */
|
|
11083
|
+
sqlite3_session *pSession, /* Session object */
|
|
11084
|
+
int (*xFilter)(void *pCtx, /* Copy of third arg to _filter_table() */
|
|
11085
|
+
const char *zTab /* Table name */
|
|
11086
|
+
),
|
|
11087
|
+
void *pCtx /* First argument passed to xFilter */
|
|
11132
11088
|
);
|
|
11133
11089
|
|
|
11134
11090
|
/*
|
|
@@ -11237,9 +11193,9 @@ SQLITE_API void sqlite3session_table_filter(
|
|
|
11237
11193
|
** resulting changeset will contain an UPDATE change that updates both fields.
|
|
11238
11194
|
*/
|
|
11239
11195
|
SQLITE_API int sqlite3session_changeset(
|
|
11240
|
-
|
|
11241
|
-
|
|
11242
|
-
|
|
11196
|
+
sqlite3_session *pSession, /* Session object */
|
|
11197
|
+
int *pnChangeset, /* OUT: Size of buffer at *ppChangeset */
|
|
11198
|
+
void **ppChangeset /* OUT: Buffer containing changeset */
|
|
11243
11199
|
);
|
|
11244
11200
|
|
|
11245
11201
|
/*
|
|
@@ -11256,7 +11212,8 @@ SQLITE_API int sqlite3session_changeset(
|
|
|
11256
11212
|
** called. The final changeset size might be equal to or smaller than the
|
|
11257
11213
|
** size in bytes returned by this function.
|
|
11258
11214
|
*/
|
|
11259
|
-
SQLITE_API sqlite3_int64
|
|
11215
|
+
SQLITE_API sqlite3_int64
|
|
11216
|
+
sqlite3session_changeset_size(sqlite3_session *pSession);
|
|
11260
11217
|
|
|
11261
11218
|
/*
|
|
11262
11219
|
** CAPI3REF: Load The Difference Between Tables Into A Session
|
|
@@ -11315,13 +11272,9 @@ SQLITE_API sqlite3_int64 sqlite3session_changeset_size(sqlite3_session *pSession
|
|
|
11315
11272
|
** message. It is the responsibility of the caller to free this buffer using
|
|
11316
11273
|
** sqlite3_free().
|
|
11317
11274
|
*/
|
|
11318
|
-
SQLITE_API int sqlite3session_diff(
|
|
11319
|
-
|
|
11320
|
-
|
|
11321
|
-
const char *zTbl,
|
|
11322
|
-
char **pzErrMsg
|
|
11323
|
-
);
|
|
11324
|
-
|
|
11275
|
+
SQLITE_API int sqlite3session_diff(sqlite3_session *pSession,
|
|
11276
|
+
const char *zFromDb, const char *zTbl,
|
|
11277
|
+
char **pzErrMsg);
|
|
11325
11278
|
|
|
11326
11279
|
/*
|
|
11327
11280
|
** CAPI3REF: Generate A Patchset From A Session Object
|
|
@@ -11353,9 +11306,9 @@ SQLITE_API int sqlite3session_diff(
|
|
|
11353
11306
|
** they were attached to the session object).
|
|
11354
11307
|
*/
|
|
11355
11308
|
SQLITE_API int sqlite3session_patchset(
|
|
11356
|
-
|
|
11357
|
-
|
|
11358
|
-
|
|
11309
|
+
sqlite3_session *pSession, /* Session object */
|
|
11310
|
+
int *pnPatchset, /* OUT: Size of buffer at *ppPatchset */
|
|
11311
|
+
void **ppPatchset /* OUT: Buffer containing patchset */
|
|
11359
11312
|
);
|
|
11360
11313
|
|
|
11361
11314
|
/*
|
|
@@ -11425,15 +11378,15 @@ SQLITE_API sqlite3_int64 sqlite3session_memory_used(sqlite3_session *pSession);
|
|
|
11425
11378
|
** and therefore subject to change.
|
|
11426
11379
|
*/
|
|
11427
11380
|
SQLITE_API int sqlite3changeset_start(
|
|
11428
|
-
|
|
11429
|
-
|
|
11430
|
-
|
|
11381
|
+
sqlite3_changeset_iter **pp, /* OUT: New changeset iterator handle */
|
|
11382
|
+
int nChangeset, /* Size of changeset blob in bytes */
|
|
11383
|
+
void *pChangeset /* Pointer to blob containing changeset */
|
|
11431
11384
|
);
|
|
11432
11385
|
SQLITE_API int sqlite3changeset_start_v2(
|
|
11433
|
-
|
|
11434
|
-
|
|
11435
|
-
|
|
11436
|
-
|
|
11386
|
+
sqlite3_changeset_iter **pp, /* OUT: New changeset iterator handle */
|
|
11387
|
+
int nChangeset, /* Size of changeset blob in bytes */
|
|
11388
|
+
void *pChangeset, /* Pointer to blob containing changeset */
|
|
11389
|
+
int flags /* SESSION_CHANGESETSTART_* flags */
|
|
11437
11390
|
);
|
|
11438
11391
|
|
|
11439
11392
|
/*
|
|
@@ -11447,8 +11400,7 @@ SQLITE_API int sqlite3changeset_start_v2(
|
|
|
11447
11400
|
** inverting a changeset using sqlite3changeset_invert() before applying it.
|
|
11448
11401
|
** It is an error to specify this flag with a patchset.
|
|
11449
11402
|
*/
|
|
11450
|
-
#define SQLITE_CHANGESETSTART_INVERT
|
|
11451
|
-
|
|
11403
|
+
#define SQLITE_CHANGESETSTART_INVERT 0x0002
|
|
11452
11404
|
|
|
11453
11405
|
/*
|
|
11454
11406
|
** CAPI3REF: Advance A Changeset Iterator
|
|
@@ -11491,7 +11443,8 @@ SQLITE_API int sqlite3changeset_next(sqlite3_changeset_iter *pIter);
|
|
|
11491
11443
|
** *pOp is set to one of [SQLITE_INSERT], [SQLITE_DELETE] or [SQLITE_UPDATE],
|
|
11492
11444
|
** depending on the type of change that the iterator currently points to;
|
|
11493
11445
|
**
|
|
11494
|
-
** *pnCol is set to the number of columns in the table affected by the change;
|
|
11446
|
+
** *pnCol is set to the number of columns in the table affected by the change;
|
|
11447
|
+
*and
|
|
11495
11448
|
**
|
|
11496
11449
|
** *pzTab is set to point to a nul-terminated utf-8 encoded string containing
|
|
11497
11450
|
** the name of the table affected by the current change. The buffer remains
|
|
@@ -11507,12 +11460,12 @@ SQLITE_API int sqlite3changeset_next(sqlite3_changeset_iter *pIter);
|
|
|
11507
11460
|
** SQLite error code is returned. The values of the output variables may not
|
|
11508
11461
|
** be trusted in this case.
|
|
11509
11462
|
*/
|
|
11510
|
-
SQLITE_API int
|
|
11511
|
-
|
|
11512
|
-
|
|
11513
|
-
|
|
11514
|
-
|
|
11515
|
-
|
|
11463
|
+
SQLITE_API int
|
|
11464
|
+
sqlite3changeset_op(sqlite3_changeset_iter *pIter, /* Iterator object */
|
|
11465
|
+
const char **pzTab, /* OUT: Pointer to table name */
|
|
11466
|
+
int *pnCol, /* OUT: Number of columns in table */
|
|
11467
|
+
int *pOp, /* OUT: SQLITE_INSERT, DELETE or UPDATE */
|
|
11468
|
+
int *pbIndirect /* OUT: True for an 'indirect' change */
|
|
11516
11469
|
);
|
|
11517
11470
|
|
|
11518
11471
|
/*
|
|
@@ -11542,9 +11495,9 @@ SQLITE_API int sqlite3changeset_op(
|
|
|
11542
11495
|
** above.
|
|
11543
11496
|
*/
|
|
11544
11497
|
SQLITE_API int sqlite3changeset_pk(
|
|
11545
|
-
|
|
11546
|
-
|
|
11547
|
-
|
|
11498
|
+
sqlite3_changeset_iter *pIter, /* Iterator object */
|
|
11499
|
+
unsigned char **pabPK, /* OUT: Array of boolean - true for PK cols */
|
|
11500
|
+
int *pnCol /* OUT: Number of entries in output array */
|
|
11548
11501
|
);
|
|
11549
11502
|
|
|
11550
11503
|
/*
|
|
@@ -11573,9 +11526,9 @@ SQLITE_API int sqlite3changeset_pk(
|
|
|
11573
11526
|
** is returned and *ppValue is set to NULL.
|
|
11574
11527
|
*/
|
|
11575
11528
|
SQLITE_API int sqlite3changeset_old(
|
|
11576
|
-
|
|
11577
|
-
|
|
11578
|
-
|
|
11529
|
+
sqlite3_changeset_iter *pIter, /* Changeset iterator */
|
|
11530
|
+
int iVal, /* Column number */
|
|
11531
|
+
sqlite3_value **ppValue /* OUT: Old value (or NULL pointer) */
|
|
11579
11532
|
);
|
|
11580
11533
|
|
|
11581
11534
|
/*
|
|
@@ -11607,9 +11560,9 @@ SQLITE_API int sqlite3changeset_old(
|
|
|
11607
11560
|
** is returned and *ppValue is set to NULL.
|
|
11608
11561
|
*/
|
|
11609
11562
|
SQLITE_API int sqlite3changeset_new(
|
|
11610
|
-
|
|
11611
|
-
|
|
11612
|
-
|
|
11563
|
+
sqlite3_changeset_iter *pIter, /* Changeset iterator */
|
|
11564
|
+
int iVal, /* Column number */
|
|
11565
|
+
sqlite3_value **ppValue /* OUT: New value (or NULL pointer) */
|
|
11613
11566
|
);
|
|
11614
11567
|
|
|
11615
11568
|
/*
|
|
@@ -11635,9 +11588,9 @@ SQLITE_API int sqlite3changeset_new(
|
|
|
11635
11588
|
** is returned and *ppValue is set to NULL.
|
|
11636
11589
|
*/
|
|
11637
11590
|
SQLITE_API int sqlite3changeset_conflict(
|
|
11638
|
-
|
|
11639
|
-
|
|
11640
|
-
|
|
11591
|
+
sqlite3_changeset_iter *pIter, /* Changeset iterator */
|
|
11592
|
+
int iVal, /* Column number */
|
|
11593
|
+
sqlite3_value **ppValue /* OUT: Value from conflicting row */
|
|
11641
11594
|
);
|
|
11642
11595
|
|
|
11643
11596
|
/*
|
|
@@ -11652,11 +11605,10 @@ SQLITE_API int sqlite3changeset_conflict(
|
|
|
11652
11605
|
** In all other cases this function returns SQLITE_MISUSE.
|
|
11653
11606
|
*/
|
|
11654
11607
|
SQLITE_API int sqlite3changeset_fk_conflicts(
|
|
11655
|
-
|
|
11656
|
-
|
|
11608
|
+
sqlite3_changeset_iter *pIter, /* Changeset iterator */
|
|
11609
|
+
int *pnOut /* OUT: Number of FK violations */
|
|
11657
11610
|
);
|
|
11658
11611
|
|
|
11659
|
-
|
|
11660
11612
|
/*
|
|
11661
11613
|
** CAPI3REF: Finalize A Changeset Iterator
|
|
11662
11614
|
** METHOD: sqlite3_changeset_iter
|
|
@@ -11717,9 +11669,10 @@ SQLITE_API int sqlite3changeset_finalize(sqlite3_changeset_iter *pIter);
|
|
|
11717
11669
|
** WARNING/TODO: This function currently assumes that the input is a valid
|
|
11718
11670
|
** changeset. If it is not, the results are undefined.
|
|
11719
11671
|
*/
|
|
11720
|
-
SQLITE_API int sqlite3changeset_invert(
|
|
11721
|
-
|
|
11722
|
-
|
|
11672
|
+
SQLITE_API int sqlite3changeset_invert(int nIn,
|
|
11673
|
+
const void *pIn, /* Input changeset */
|
|
11674
|
+
int *pnOut,
|
|
11675
|
+
void **ppOut /* OUT: Inverse of input */
|
|
11723
11676
|
);
|
|
11724
11677
|
|
|
11725
11678
|
/*
|
|
@@ -11749,27 +11702,23 @@ SQLITE_API int sqlite3changeset_invert(
|
|
|
11749
11702
|
** Refer to the sqlite3_changegroup documentation below for details.
|
|
11750
11703
|
*/
|
|
11751
11704
|
SQLITE_API int sqlite3changeset_concat(
|
|
11752
|
-
|
|
11753
|
-
|
|
11754
|
-
|
|
11755
|
-
|
|
11756
|
-
|
|
11757
|
-
|
|
11705
|
+
int nA, /* Number of bytes in buffer pA */
|
|
11706
|
+
void *pA, /* Pointer to buffer containing changeset A */
|
|
11707
|
+
int nB, /* Number of bytes in buffer pB */
|
|
11708
|
+
void *pB, /* Pointer to buffer containing changeset B */
|
|
11709
|
+
int *pnOut, /* OUT: Number of bytes in output changeset */
|
|
11710
|
+
void **ppOut /* OUT: Buffer containing output changeset */
|
|
11758
11711
|
);
|
|
11759
11712
|
|
|
11760
|
-
|
|
11761
11713
|
/*
|
|
11762
11714
|
** CAPI3REF: Upgrade the Schema of a Changeset/Patchset
|
|
11763
11715
|
*/
|
|
11764
|
-
SQLITE_API int sqlite3changeset_upgrade(
|
|
11765
|
-
|
|
11766
|
-
|
|
11767
|
-
|
|
11768
|
-
int *pnOut, void **ppOut /* OUT: Inverse of input */
|
|
11716
|
+
SQLITE_API int sqlite3changeset_upgrade(sqlite3 *db, const char *zDb, int nIn,
|
|
11717
|
+
const void *pIn, /* Input changeset */
|
|
11718
|
+
int *pnOut,
|
|
11719
|
+
void **ppOut /* OUT: Inverse of input */
|
|
11769
11720
|
);
|
|
11770
11721
|
|
|
11771
|
-
|
|
11772
|
-
|
|
11773
11722
|
/*
|
|
11774
11723
|
** CAPI3REF: Changegroup Handle
|
|
11775
11724
|
**
|
|
@@ -11846,7 +11795,8 @@ SQLITE_API int sqlite3changegroup_new(sqlite3_changegroup **pp);
|
|
|
11846
11795
|
** changesets that have different numbers of columns for a single table
|
|
11847
11796
|
** within a changegroup, provided that they are otherwise compatible.
|
|
11848
11797
|
*/
|
|
11849
|
-
SQLITE_API int sqlite3changegroup_schema(sqlite3_changegroup*, sqlite3*,
|
|
11798
|
+
SQLITE_API int sqlite3changegroup_schema(sqlite3_changegroup *, sqlite3 *,
|
|
11799
|
+
const char *zDb);
|
|
11850
11800
|
|
|
11851
11801
|
/*
|
|
11852
11802
|
** CAPI3REF: Add A Changeset To A Changegroup
|
|
@@ -11929,7 +11879,8 @@ SQLITE_API int sqlite3changegroup_schema(sqlite3_changegroup*, sqlite3*, const c
|
|
|
11929
11879
|
** In all cases, if an error occurs the state of the final contents of the
|
|
11930
11880
|
** changegroup is undefined. If no error occurs, SQLITE_OK is returned.
|
|
11931
11881
|
*/
|
|
11932
|
-
SQLITE_API int sqlite3changegroup_add(sqlite3_changegroup*, int nData,
|
|
11882
|
+
SQLITE_API int sqlite3changegroup_add(sqlite3_changegroup *, int nData,
|
|
11883
|
+
void *pData);
|
|
11933
11884
|
|
|
11934
11885
|
/*
|
|
11935
11886
|
** CAPI3REF: Obtain A Composite Changeset From A Changegroup
|
|
@@ -11956,17 +11907,17 @@ SQLITE_API int sqlite3changegroup_add(sqlite3_changegroup*, int nData, void *pDa
|
|
|
11956
11907
|
** responsibility of the caller to eventually free the buffer using a
|
|
11957
11908
|
** call to sqlite3_free().
|
|
11958
11909
|
*/
|
|
11959
|
-
SQLITE_API int
|
|
11960
|
-
|
|
11961
|
-
|
|
11962
|
-
|
|
11910
|
+
SQLITE_API int
|
|
11911
|
+
sqlite3changegroup_output(sqlite3_changegroup *,
|
|
11912
|
+
int *pnData, /* OUT: Size of output buffer in bytes */
|
|
11913
|
+
void **ppData /* OUT: Pointer to output buffer */
|
|
11963
11914
|
);
|
|
11964
11915
|
|
|
11965
11916
|
/*
|
|
11966
11917
|
** CAPI3REF: Delete A Changegroup Object
|
|
11967
11918
|
** DESTRUCTOR: sqlite3_changegroup
|
|
11968
11919
|
*/
|
|
11969
|
-
SQLITE_API void sqlite3changegroup_delete(sqlite3_changegroup*);
|
|
11920
|
+
SQLITE_API void sqlite3changegroup_delete(sqlite3_changegroup *);
|
|
11970
11921
|
|
|
11971
11922
|
/*
|
|
11972
11923
|
** CAPI3REF: Apply A Changeset To A Database
|
|
@@ -12127,36 +12078,34 @@ SQLITE_API void sqlite3changegroup_delete(sqlite3_changegroup*);
|
|
|
12127
12078
|
** and therefore subject to change.
|
|
12128
12079
|
*/
|
|
12129
12080
|
SQLITE_API int sqlite3changeset_apply(
|
|
12130
|
-
|
|
12131
|
-
|
|
12132
|
-
|
|
12133
|
-
|
|
12134
|
-
|
|
12135
|
-
|
|
12136
|
-
|
|
12137
|
-
|
|
12138
|
-
|
|
12139
|
-
|
|
12140
|
-
|
|
12141
|
-
|
|
12142
|
-
void *pCtx /* First argument passed to xConflict */
|
|
12081
|
+
sqlite3 *db, /* Apply change to "main" db of this handle */
|
|
12082
|
+
int nChangeset, /* Size of changeset in bytes */
|
|
12083
|
+
void *pChangeset, /* Changeset blob */
|
|
12084
|
+
int (*xFilter)(void *pCtx, /* Copy of sixth arg to _apply() */
|
|
12085
|
+
const char *zTab /* Table name */
|
|
12086
|
+
),
|
|
12087
|
+
int (*xConflict)(
|
|
12088
|
+
void *pCtx, /* Copy of sixth arg to _apply() */
|
|
12089
|
+
int eConflict, /* DATA, MISSING, CONFLICT, CONSTRAINT */
|
|
12090
|
+
sqlite3_changeset_iter *p /* Handle describing change and conflict */
|
|
12091
|
+
),
|
|
12092
|
+
void *pCtx /* First argument passed to xConflict */
|
|
12143
12093
|
);
|
|
12144
12094
|
SQLITE_API int sqlite3changeset_apply_v2(
|
|
12145
|
-
|
|
12146
|
-
|
|
12147
|
-
|
|
12148
|
-
|
|
12149
|
-
|
|
12150
|
-
|
|
12151
|
-
|
|
12152
|
-
|
|
12153
|
-
|
|
12154
|
-
|
|
12155
|
-
|
|
12156
|
-
|
|
12157
|
-
|
|
12158
|
-
|
|
12159
|
-
int flags /* SESSION_CHANGESETAPPLY_* flags */
|
|
12095
|
+
sqlite3 *db, /* Apply change to "main" db of this handle */
|
|
12096
|
+
int nChangeset, /* Size of changeset in bytes */
|
|
12097
|
+
void *pChangeset, /* Changeset blob */
|
|
12098
|
+
int (*xFilter)(void *pCtx, /* Copy of sixth arg to _apply() */
|
|
12099
|
+
const char *zTab /* Table name */
|
|
12100
|
+
),
|
|
12101
|
+
int (*xConflict)(
|
|
12102
|
+
void *pCtx, /* Copy of sixth arg to _apply() */
|
|
12103
|
+
int eConflict, /* DATA, MISSING, CONFLICT, CONSTRAINT */
|
|
12104
|
+
sqlite3_changeset_iter *p /* Handle describing change and conflict */
|
|
12105
|
+
),
|
|
12106
|
+
void *pCtx, /* First argument passed to xConflict */
|
|
12107
|
+
void **ppRebase, int *pnRebase, /* OUT: Rebase data */
|
|
12108
|
+
int flags /* SESSION_CHANGESETAPPLY_* flags */
|
|
12160
12109
|
);
|
|
12161
12110
|
|
|
12162
12111
|
/*
|
|
@@ -12199,10 +12148,10 @@ SQLITE_API int sqlite3changeset_apply_v2(
|
|
|
12199
12148
|
** DELETE NO ACTION", even if they are actually CASCADE, RESTRICT, SET NULL
|
|
12200
12149
|
** or SET DEFAULT.
|
|
12201
12150
|
*/
|
|
12202
|
-
#define SQLITE_CHANGESETAPPLY_NOSAVEPOINT
|
|
12203
|
-
#define SQLITE_CHANGESETAPPLY_INVERT
|
|
12204
|
-
#define SQLITE_CHANGESETAPPLY_IGNORENOOP
|
|
12205
|
-
#define SQLITE_CHANGESETAPPLY_FKNOACTION
|
|
12151
|
+
#define SQLITE_CHANGESETAPPLY_NOSAVEPOINT 0x0001
|
|
12152
|
+
#define SQLITE_CHANGESETAPPLY_INVERT 0x0002
|
|
12153
|
+
#define SQLITE_CHANGESETAPPLY_IGNORENOOP 0x0004
|
|
12154
|
+
#define SQLITE_CHANGESETAPPLY_FKNOACTION 0x0008
|
|
12206
12155
|
|
|
12207
12156
|
/*
|
|
12208
12157
|
** CAPI3REF: Constants Passed To The Conflict Handler
|
|
@@ -12259,10 +12208,10 @@ SQLITE_API int sqlite3changeset_apply_v2(
|
|
|
12259
12208
|
**
|
|
12260
12209
|
** </dl>
|
|
12261
12210
|
*/
|
|
12262
|
-
#define SQLITE_CHANGESET_DATA
|
|
12263
|
-
#define SQLITE_CHANGESET_NOTFOUND
|
|
12264
|
-
#define SQLITE_CHANGESET_CONFLICT
|
|
12265
|
-
#define SQLITE_CHANGESET_CONSTRAINT
|
|
12211
|
+
#define SQLITE_CHANGESET_DATA 1
|
|
12212
|
+
#define SQLITE_CHANGESET_NOTFOUND 2
|
|
12213
|
+
#define SQLITE_CHANGESET_CONFLICT 3
|
|
12214
|
+
#define SQLITE_CHANGESET_CONSTRAINT 4
|
|
12266
12215
|
#define SQLITE_CHANGESET_FOREIGN_KEY 5
|
|
12267
12216
|
|
|
12268
12217
|
/*
|
|
@@ -12296,9 +12245,9 @@ SQLITE_API int sqlite3changeset_apply_v2(
|
|
|
12296
12245
|
** and the call to sqlite3changeset_apply() returns SQLITE_ABORT.
|
|
12297
12246
|
** </dl>
|
|
12298
12247
|
*/
|
|
12299
|
-
#define SQLITE_CHANGESET_OMIT
|
|
12300
|
-
#define SQLITE_CHANGESET_REPLACE
|
|
12301
|
-
#define SQLITE_CHANGESET_ABORT
|
|
12248
|
+
#define SQLITE_CHANGESET_OMIT 0
|
|
12249
|
+
#define SQLITE_CHANGESET_REPLACE 1
|
|
12250
|
+
#define SQLITE_CHANGESET_ABORT 2
|
|
12302
12251
|
|
|
12303
12252
|
/*
|
|
12304
12253
|
** CAPI3REF: Rebasing changesets
|
|
@@ -12420,10 +12369,8 @@ SQLITE_API int sqlite3rebaser_create(sqlite3_rebaser **ppNew);
|
|
|
12420
12369
|
** bytes), which must have been obtained from a previous call to
|
|
12421
12370
|
** sqlite3changeset_apply_v2().
|
|
12422
12371
|
*/
|
|
12423
|
-
SQLITE_API int sqlite3rebaser_configure(
|
|
12424
|
-
|
|
12425
|
-
int nRebase, const void *pRebase
|
|
12426
|
-
);
|
|
12372
|
+
SQLITE_API int sqlite3rebaser_configure(sqlite3_rebaser *, int nRebase,
|
|
12373
|
+
const void *pRebase);
|
|
12427
12374
|
|
|
12428
12375
|
/*
|
|
12429
12376
|
** CAPI3REF: Rebase a changeset
|
|
@@ -12439,11 +12386,8 @@ SQLITE_API int sqlite3rebaser_configure(
|
|
|
12439
12386
|
** sqlite3_free(). Otherwise, if an error occurs, (*ppOut) and (*pnOut)
|
|
12440
12387
|
** are set to zero and an SQLite error code returned.
|
|
12441
12388
|
*/
|
|
12442
|
-
SQLITE_API int sqlite3rebaser_rebase(
|
|
12443
|
-
|
|
12444
|
-
int nIn, const void *pIn,
|
|
12445
|
-
int *pnOut, void **ppOut
|
|
12446
|
-
);
|
|
12389
|
+
SQLITE_API int sqlite3rebaser_rebase(sqlite3_rebaser *, int nIn,
|
|
12390
|
+
const void *pIn, int *pnOut, void **ppOut);
|
|
12447
12391
|
|
|
12448
12392
|
/*
|
|
12449
12393
|
** CAPI3REF: Delete a changeset rebaser object.
|
|
@@ -12546,87 +12490,64 @@ SQLITE_API void sqlite3rebaser_delete(sqlite3_rebaser *p);
|
|
|
12546
12490
|
** no guarantees are made as to the size of the chunks of data returned.
|
|
12547
12491
|
*/
|
|
12548
12492
|
SQLITE_API int sqlite3changeset_apply_strm(
|
|
12549
|
-
|
|
12550
|
-
|
|
12551
|
-
|
|
12552
|
-
|
|
12553
|
-
|
|
12554
|
-
|
|
12555
|
-
|
|
12556
|
-
|
|
12557
|
-
|
|
12558
|
-
|
|
12559
|
-
|
|
12560
|
-
|
|
12561
|
-
void *pCtx /* First argument passed to xConflict */
|
|
12493
|
+
sqlite3 *db, /* Apply change to "main" db of this handle */
|
|
12494
|
+
int (*xInput)(void *pIn, void *pData, int *pnData), /* Input function */
|
|
12495
|
+
void *pIn, /* First arg for xInput */
|
|
12496
|
+
int (*xFilter)(void *pCtx, /* Copy of sixth arg to _apply() */
|
|
12497
|
+
const char *zTab /* Table name */
|
|
12498
|
+
),
|
|
12499
|
+
int (*xConflict)(
|
|
12500
|
+
void *pCtx, /* Copy of sixth arg to _apply() */
|
|
12501
|
+
int eConflict, /* DATA, MISSING, CONFLICT, CONSTRAINT */
|
|
12502
|
+
sqlite3_changeset_iter *p /* Handle describing change and conflict */
|
|
12503
|
+
),
|
|
12504
|
+
void *pCtx /* First argument passed to xConflict */
|
|
12562
12505
|
);
|
|
12563
12506
|
SQLITE_API int sqlite3changeset_apply_v2_strm(
|
|
12564
|
-
|
|
12565
|
-
|
|
12566
|
-
|
|
12567
|
-
|
|
12568
|
-
|
|
12569
|
-
|
|
12570
|
-
|
|
12571
|
-
|
|
12572
|
-
|
|
12573
|
-
|
|
12574
|
-
|
|
12575
|
-
|
|
12576
|
-
|
|
12577
|
-
void **ppRebase, int *pnRebase,
|
|
12578
|
-
int flags
|
|
12579
|
-
);
|
|
12507
|
+
sqlite3 *db, /* Apply change to "main" db of this handle */
|
|
12508
|
+
int (*xInput)(void *pIn, void *pData, int *pnData), /* Input function */
|
|
12509
|
+
void *pIn, /* First arg for xInput */
|
|
12510
|
+
int (*xFilter)(void *pCtx, /* Copy of sixth arg to _apply() */
|
|
12511
|
+
const char *zTab /* Table name */
|
|
12512
|
+
),
|
|
12513
|
+
int (*xConflict)(
|
|
12514
|
+
void *pCtx, /* Copy of sixth arg to _apply() */
|
|
12515
|
+
int eConflict, /* DATA, MISSING, CONFLICT, CONSTRAINT */
|
|
12516
|
+
sqlite3_changeset_iter *p /* Handle describing change and conflict */
|
|
12517
|
+
),
|
|
12518
|
+
void *pCtx, /* First argument passed to xConflict */
|
|
12519
|
+
void **ppRebase, int *pnRebase, int flags);
|
|
12580
12520
|
SQLITE_API int sqlite3changeset_concat_strm(
|
|
12581
|
-
|
|
12582
|
-
|
|
12583
|
-
|
|
12584
|
-
void *pInB,
|
|
12585
|
-
int (*xOutput)(void *pOut, const void *pData, int nData),
|
|
12586
|
-
void *pOut
|
|
12587
|
-
);
|
|
12521
|
+
int (*xInputA)(void *pIn, void *pData, int *pnData), void *pInA,
|
|
12522
|
+
int (*xInputB)(void *pIn, void *pData, int *pnData), void *pInB,
|
|
12523
|
+
int (*xOutput)(void *pOut, const void *pData, int nData), void *pOut);
|
|
12588
12524
|
SQLITE_API int sqlite3changeset_invert_strm(
|
|
12589
|
-
|
|
12590
|
-
|
|
12591
|
-
|
|
12592
|
-
|
|
12593
|
-
)
|
|
12594
|
-
|
|
12595
|
-
sqlite3_changeset_iter **pp,
|
|
12596
|
-
int (*xInput)(void *pIn, void *pData, int *pnData),
|
|
12597
|
-
void *pIn
|
|
12598
|
-
);
|
|
12525
|
+
int (*xInput)(void *pIn, void *pData, int *pnData), void *pIn,
|
|
12526
|
+
int (*xOutput)(void *pOut, const void *pData, int nData), void *pOut);
|
|
12527
|
+
SQLITE_API int sqlite3changeset_start_strm(sqlite3_changeset_iter **pp,
|
|
12528
|
+
int (*xInput)(void *pIn, void *pData,
|
|
12529
|
+
int *pnData),
|
|
12530
|
+
void *pIn);
|
|
12599
12531
|
SQLITE_API int sqlite3changeset_start_v2_strm(
|
|
12600
|
-
|
|
12601
|
-
|
|
12602
|
-
void *pIn,
|
|
12603
|
-
int flags
|
|
12604
|
-
);
|
|
12532
|
+
sqlite3_changeset_iter **pp,
|
|
12533
|
+
int (*xInput)(void *pIn, void *pData, int *pnData), void *pIn, int flags);
|
|
12605
12534
|
SQLITE_API int sqlite3session_changeset_strm(
|
|
12606
|
-
|
|
12607
|
-
|
|
12608
|
-
void *pOut
|
|
12609
|
-
);
|
|
12535
|
+
sqlite3_session *pSession,
|
|
12536
|
+
int (*xOutput)(void *pOut, const void *pData, int nData), void *pOut);
|
|
12610
12537
|
SQLITE_API int sqlite3session_patchset_strm(
|
|
12611
|
-
|
|
12612
|
-
|
|
12613
|
-
|
|
12614
|
-
)
|
|
12615
|
-
|
|
12616
|
-
|
|
12617
|
-
|
|
12618
|
-
|
|
12619
|
-
|
|
12620
|
-
int (*xOutput)(void *pOut, const void *pData, int nData),
|
|
12621
|
-
void *pOut
|
|
12622
|
-
);
|
|
12538
|
+
sqlite3_session *pSession,
|
|
12539
|
+
int (*xOutput)(void *pOut, const void *pData, int nData), void *pOut);
|
|
12540
|
+
SQLITE_API int sqlite3changegroup_add_strm(sqlite3_changegroup *,
|
|
12541
|
+
int (*xInput)(void *pIn, void *pData,
|
|
12542
|
+
int *pnData),
|
|
12543
|
+
void *pIn);
|
|
12544
|
+
SQLITE_API int sqlite3changegroup_output_strm(
|
|
12545
|
+
sqlite3_changegroup *,
|
|
12546
|
+
int (*xOutput)(void *pOut, const void *pData, int nData), void *pOut);
|
|
12623
12547
|
SQLITE_API int sqlite3rebaser_rebase_strm(
|
|
12624
|
-
|
|
12625
|
-
|
|
12626
|
-
|
|
12627
|
-
int (*xOutput)(void *pOut, const void *pData, int nData),
|
|
12628
|
-
void *pOut
|
|
12629
|
-
);
|
|
12548
|
+
sqlite3_rebaser *pRebaser,
|
|
12549
|
+
int (*xInput)(void *pIn, void *pData, int *pnData), void *pIn,
|
|
12550
|
+
int (*xOutput)(void *pOut, const void *pData, int nData), void *pOut);
|
|
12630
12551
|
|
|
12631
12552
|
/*
|
|
12632
12553
|
** CAPI3REF: Configure global parameters
|
|
@@ -12675,7 +12596,7 @@ SQLITE_API int sqlite3session_config(int op, void *pArg);
|
|
|
12675
12596
|
}
|
|
12676
12597
|
#endif
|
|
12677
12598
|
|
|
12678
|
-
#endif
|
|
12599
|
+
#endif /* !defined(__SQLITESESSION_H_) && defined(SQLITE_ENABLE_SESSION) */
|
|
12679
12600
|
|
|
12680
12601
|
/******** End of sqlite3session.h *********/
|
|
12681
12602
|
/******** Begin file fts5.h *********/
|
|
@@ -12698,11 +12619,9 @@ SQLITE_API int sqlite3session_config(int op, void *pArg);
|
|
|
12698
12619
|
** * custom auxiliary functions.
|
|
12699
12620
|
*/
|
|
12700
12621
|
|
|
12701
|
-
|
|
12702
12622
|
#ifndef _FTS5_H
|
|
12703
12623
|
#define _FTS5_H
|
|
12704
12624
|
|
|
12705
|
-
|
|
12706
12625
|
#ifdef __cplusplus
|
|
12707
12626
|
extern "C" {
|
|
12708
12627
|
#endif
|
|
@@ -12719,11 +12638,11 @@ typedef struct Fts5Context Fts5Context;
|
|
|
12719
12638
|
typedef struct Fts5PhraseIter Fts5PhraseIter;
|
|
12720
12639
|
|
|
12721
12640
|
typedef void (*fts5_extension_function)(
|
|
12722
|
-
|
|
12723
|
-
|
|
12724
|
-
|
|
12725
|
-
|
|
12726
|
-
|
|
12641
|
+
const Fts5ExtensionApi *pApi, /* API offered by current FTS version */
|
|
12642
|
+
Fts5Context *pFts, /* First arg to pass to pApi functions */
|
|
12643
|
+
sqlite3_context *pCtx, /* Context for returning result/error */
|
|
12644
|
+
int nVal, /* Number of values in apVal[] array */
|
|
12645
|
+
sqlite3_value **apVal /* Array of trailing arguments */
|
|
12727
12646
|
);
|
|
12728
12647
|
|
|
12729
12648
|
struct Fts5PhraseIter {
|
|
@@ -12943,41 +12862,43 @@ struct Fts5PhraseIter {
|
|
|
12943
12862
|
** See xPhraseFirstColumn above.
|
|
12944
12863
|
*/
|
|
12945
12864
|
struct Fts5ExtensionApi {
|
|
12946
|
-
int iVersion;
|
|
12865
|
+
int iVersion; /* Currently always set to 2 */
|
|
12947
12866
|
|
|
12948
|
-
void *(*xUserData)(Fts5Context*);
|
|
12867
|
+
void *(*xUserData)(Fts5Context *);
|
|
12949
12868
|
|
|
12950
|
-
int (*xColumnCount)(Fts5Context*);
|
|
12951
|
-
int (*xRowCount)(Fts5Context*, sqlite3_int64 *pnRow);
|
|
12952
|
-
int (*xColumnTotalSize)(Fts5Context*, int iCol, sqlite3_int64 *pnToken);
|
|
12869
|
+
int (*xColumnCount)(Fts5Context *);
|
|
12870
|
+
int (*xRowCount)(Fts5Context *, sqlite3_int64 *pnRow);
|
|
12871
|
+
int (*xColumnTotalSize)(Fts5Context *, int iCol, sqlite3_int64 *pnToken);
|
|
12953
12872
|
|
|
12954
|
-
int (*xTokenize)(Fts5Context*,
|
|
12955
|
-
|
|
12956
|
-
|
|
12957
|
-
|
|
12873
|
+
int (*xTokenize)(Fts5Context *, const char *pText,
|
|
12874
|
+
int nText, /* Text to tokenize */
|
|
12875
|
+
void *pCtx, /* Context passed to xToken() */
|
|
12876
|
+
int (*xToken)(void *, int, const char *, int, int,
|
|
12877
|
+
int) /* Callback */
|
|
12958
12878
|
);
|
|
12959
12879
|
|
|
12960
|
-
int (*xPhraseCount)(Fts5Context*);
|
|
12961
|
-
int (*xPhraseSize)(Fts5Context*, int iPhrase);
|
|
12880
|
+
int (*xPhraseCount)(Fts5Context *);
|
|
12881
|
+
int (*xPhraseSize)(Fts5Context *, int iPhrase);
|
|
12962
12882
|
|
|
12963
|
-
int (*xInstCount)(Fts5Context*, int *pnInst);
|
|
12964
|
-
int (*xInst)(Fts5Context*, int iIdx, int *piPhrase, int *piCol, int *piOff);
|
|
12883
|
+
int (*xInstCount)(Fts5Context *, int *pnInst);
|
|
12884
|
+
int (*xInst)(Fts5Context *, int iIdx, int *piPhrase, int *piCol, int *piOff);
|
|
12965
12885
|
|
|
12966
|
-
sqlite3_int64 (*xRowid)(Fts5Context*);
|
|
12967
|
-
int (*xColumnText)(Fts5Context*, int iCol, const char **pz, int *pn);
|
|
12968
|
-
int (*xColumnSize)(Fts5Context*, int iCol, int *pnToken);
|
|
12886
|
+
sqlite3_int64 (*xRowid)(Fts5Context *);
|
|
12887
|
+
int (*xColumnText)(Fts5Context *, int iCol, const char **pz, int *pn);
|
|
12888
|
+
int (*xColumnSize)(Fts5Context *, int iCol, int *pnToken);
|
|
12969
12889
|
|
|
12970
|
-
int (*xQueryPhrase)(Fts5Context*, int iPhrase, void *pUserData,
|
|
12971
|
-
|
|
12972
|
-
);
|
|
12973
|
-
|
|
12974
|
-
void *(*xGetAuxdata)(Fts5Context*, int bClear);
|
|
12890
|
+
int (*xQueryPhrase)(Fts5Context *, int iPhrase, void *pUserData,
|
|
12891
|
+
int (*)(const Fts5ExtensionApi *, Fts5Context *, void *));
|
|
12892
|
+
int (*xSetAuxdata)(Fts5Context *, void *pAux, void (*xDelete)(void *));
|
|
12893
|
+
void *(*xGetAuxdata)(Fts5Context *, int bClear);
|
|
12975
12894
|
|
|
12976
|
-
int (*xPhraseFirst)(Fts5Context*, int iPhrase, Fts5PhraseIter*, int*,
|
|
12977
|
-
|
|
12895
|
+
int (*xPhraseFirst)(Fts5Context *, int iPhrase, Fts5PhraseIter *, int *,
|
|
12896
|
+
int *);
|
|
12897
|
+
void (*xPhraseNext)(Fts5Context *, Fts5PhraseIter *, int *piCol, int *piOff);
|
|
12978
12898
|
|
|
12979
|
-
int (*xPhraseFirstColumn)(Fts5Context*, int iPhrase, Fts5PhraseIter*,
|
|
12980
|
-
|
|
12899
|
+
int (*xPhraseFirstColumn)(Fts5Context *, int iPhrase, Fts5PhraseIter *,
|
|
12900
|
+
int *);
|
|
12901
|
+
void (*xPhraseNextColumn)(Fts5Context *, Fts5PhraseIter *, int *piCol);
|
|
12981
12902
|
};
|
|
12982
12903
|
|
|
12983
12904
|
/*
|
|
@@ -13179,32 +13100,30 @@ struct Fts5ExtensionApi {
|
|
|
13179
13100
|
typedef struct Fts5Tokenizer Fts5Tokenizer;
|
|
13180
13101
|
typedef struct fts5_tokenizer fts5_tokenizer;
|
|
13181
13102
|
struct fts5_tokenizer {
|
|
13182
|
-
int (*xCreate)(void*, const char **azArg, int nArg, Fts5Tokenizer **ppOut);
|
|
13183
|
-
void (*xDelete)(Fts5Tokenizer*);
|
|
13184
|
-
int (*xTokenize)(
|
|
13185
|
-
void *pCtx,
|
|
13186
|
-
int flags,
|
|
13103
|
+
int (*xCreate)(void *, const char **azArg, int nArg, Fts5Tokenizer **ppOut);
|
|
13104
|
+
void (*xDelete)(Fts5Tokenizer *);
|
|
13105
|
+
int (*xTokenize)(
|
|
13106
|
+
Fts5Tokenizer *, void *pCtx,
|
|
13107
|
+
int flags, /* Mask of FTS5_TOKENIZE_* flags */
|
|
13187
13108
|
const char *pText, int nText,
|
|
13188
|
-
int (*xToken)(
|
|
13189
|
-
|
|
13190
|
-
|
|
13191
|
-
|
|
13192
|
-
|
|
13193
|
-
|
|
13194
|
-
|
|
13195
|
-
)
|
|
13196
|
-
);
|
|
13109
|
+
int (*xToken)(void *pCtx, /* Copy of 2nd argument to xTokenize() */
|
|
13110
|
+
int tflags, /* Mask of FTS5_TOKEN_* flags */
|
|
13111
|
+
const char *pToken, /* Pointer to buffer containing token */
|
|
13112
|
+
int nToken, /* Size of token in bytes */
|
|
13113
|
+
int iStart, /* Byte offset of token within input text */
|
|
13114
|
+
int iEnd /* Byte offset of end of token within input text */
|
|
13115
|
+
));
|
|
13197
13116
|
};
|
|
13198
13117
|
|
|
13199
13118
|
/* Flags that may be passed as the third argument to xTokenize() */
|
|
13200
|
-
#define FTS5_TOKENIZE_QUERY
|
|
13201
|
-
#define FTS5_TOKENIZE_PREFIX
|
|
13202
|
-
#define FTS5_TOKENIZE_DOCUMENT
|
|
13203
|
-
#define FTS5_TOKENIZE_AUX
|
|
13119
|
+
#define FTS5_TOKENIZE_QUERY 0x0001
|
|
13120
|
+
#define FTS5_TOKENIZE_PREFIX 0x0002
|
|
13121
|
+
#define FTS5_TOKENIZE_DOCUMENT 0x0004
|
|
13122
|
+
#define FTS5_TOKENIZE_AUX 0x0008
|
|
13204
13123
|
|
|
13205
13124
|
/* Flags that may be passed by the tokenizer implementation back to FTS5
|
|
13206
13125
|
** as the third argument to the supplied xToken callback. */
|
|
13207
|
-
#define FTS5_TOKEN_COLOCATED
|
|
13126
|
+
#define FTS5_TOKEN_COLOCATED 0x0001 /* Same position as prev. token */
|
|
13208
13127
|
|
|
13209
13128
|
/*
|
|
13210
13129
|
** END OF CUSTOM TOKENIZERS
|
|
@@ -13215,33 +13134,20 @@ struct fts5_tokenizer {
|
|
|
13215
13134
|
*/
|
|
13216
13135
|
typedef struct fts5_api fts5_api;
|
|
13217
13136
|
struct fts5_api {
|
|
13218
|
-
int iVersion;
|
|
13137
|
+
int iVersion; /* Currently always set to 2 */
|
|
13219
13138
|
|
|
13220
13139
|
/* Create a new tokenizer */
|
|
13221
|
-
int (*xCreateTokenizer)(
|
|
13222
|
-
|
|
13223
|
-
const char *zName,
|
|
13224
|
-
void *pUserData,
|
|
13225
|
-
fts5_tokenizer *pTokenizer,
|
|
13226
|
-
void (*xDestroy)(void*)
|
|
13227
|
-
);
|
|
13140
|
+
int (*xCreateTokenizer)(fts5_api *pApi, const char *zName, void *pUserData,
|
|
13141
|
+
fts5_tokenizer *pTokenizer, void (*xDestroy)(void *));
|
|
13228
13142
|
|
|
13229
13143
|
/* Find an existing tokenizer */
|
|
13230
|
-
int (*xFindTokenizer)(
|
|
13231
|
-
|
|
13232
|
-
const char *zName,
|
|
13233
|
-
void **ppUserData,
|
|
13234
|
-
fts5_tokenizer *pTokenizer
|
|
13235
|
-
);
|
|
13144
|
+
int (*xFindTokenizer)(fts5_api *pApi, const char *zName, void **ppUserData,
|
|
13145
|
+
fts5_tokenizer *pTokenizer);
|
|
13236
13146
|
|
|
13237
13147
|
/* Create a new auxiliary function */
|
|
13238
|
-
int (*xCreateFunction)(
|
|
13239
|
-
|
|
13240
|
-
|
|
13241
|
-
void *pUserData,
|
|
13242
|
-
fts5_extension_function xFunction,
|
|
13243
|
-
void (*xDestroy)(void*)
|
|
13244
|
-
);
|
|
13148
|
+
int (*xCreateFunction)(fts5_api *pApi, const char *zName, void *pUserData,
|
|
13149
|
+
fts5_extension_function xFunction,
|
|
13150
|
+
void (*xDestroy)(void *));
|
|
13245
13151
|
};
|
|
13246
13152
|
|
|
13247
13153
|
/*
|
|
@@ -13249,7 +13155,7 @@ struct fts5_api {
|
|
|
13249
13155
|
*************************************************************************/
|
|
13250
13156
|
|
|
13251
13157
|
#ifdef __cplusplus
|
|
13252
|
-
}
|
|
13158
|
+
} /* end of the 'extern "C"' block */
|
|
13253
13159
|
#endif
|
|
13254
13160
|
|
|
13255
13161
|
#endif /* _FTS5_H */
|