@op-engineering/op-sqlite 9.2.0 → 9.2.2

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/cpp/sqlite3.h CHANGED
@@ -11,6 +11,7 @@
11
11
  *************************************************************************
12
12
  ** This header file defines the interface that the SQLite library
13
13
  ** presents to client programs. If a C-function, structure, datatype,
14
+ ** or constant definition does not appear in this file, then it is
14
15
  ** not a published API of SQLite, is subject to change without
15
16
  ** notice, and should not be referenced by programs that use SQLite.
16
17
  **
@@ -31,7 +32,7 @@
31
32
  */
32
33
  #ifndef SQLITE3_H
33
34
  #define SQLITE3_H
34
- #include <stdarg.h> /* Needed for the definition of va_list */
35
+ #include <stdarg.h> /* Needed for the definition of va_list */
35
36
 
36
37
  /*
37
38
  ** Make sure we can call this stuff from C++.
@@ -40,6 +41,7 @@
40
41
  extern "C" {
41
42
  #endif
42
43
 
44
+
43
45
  /*
44
46
  ** Facilitate override of interface linkage and calling conventions.
45
47
  ** Be aware that these macros may not be used within this particular
@@ -67,25 +69,25 @@ extern "C" {
67
69
  ** that require non-default calling conventions.
68
70
  */
69
71
  #ifndef SQLITE_EXTERN
70
- #define SQLITE_EXTERN extern
72
+ # define SQLITE_EXTERN extern
71
73
  #endif
72
74
  #ifndef SQLITE_API
73
- #define SQLITE_API
75
+ # define SQLITE_API
74
76
  #endif
75
77
  #ifndef SQLITE_CDECL
76
- #define SQLITE_CDECL
78
+ # define SQLITE_CDECL
77
79
  #endif
78
80
  #ifndef SQLITE_APICALL
79
- #define SQLITE_APICALL
81
+ # define SQLITE_APICALL
80
82
  #endif
81
83
  #ifndef SQLITE_STDCALL
82
- #define SQLITE_STDCALL SQLITE_APICALL
84
+ # define SQLITE_STDCALL SQLITE_APICALL
83
85
  #endif
84
86
  #ifndef SQLITE_CALLBACK
85
- #define SQLITE_CALLBACK
87
+ # define SQLITE_CALLBACK
86
88
  #endif
87
89
  #ifndef SQLITE_SYSAPI
88
- #define SQLITE_SYSAPI
90
+ # define SQLITE_SYSAPI
89
91
  #endif
90
92
 
91
93
  /*
@@ -108,10 +110,10 @@ extern "C" {
108
110
  ** Ensure these symbols were not defined by some previous header file.
109
111
  */
110
112
  #ifdef SQLITE_VERSION
111
- #undef SQLITE_VERSION
113
+ # undef SQLITE_VERSION
112
114
  #endif
113
115
  #ifdef SQLITE_VERSION_NUMBER
114
- #undef SQLITE_VERSION_NUMBER
116
+ # undef SQLITE_VERSION_NUMBER
115
117
  #endif
116
118
 
117
119
  /*
@@ -144,11 +146,9 @@ extern "C" {
144
146
  ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
145
147
  ** [sqlite_version()] and [sqlite_source_id()].
146
148
  */
147
- #define SQLITE_VERSION "3.45.1"
148
- #define SQLITE_VERSION_NUMBER 3045001
149
- #define SQLITE_SOURCE_ID \
150
- "2024-01-30 16:01:20 " \
151
- "e876e51a0ed5c5b3126f52e532044363a014bc594cfefa87ffb5b82257cc467a"
149
+ #define SQLITE_VERSION "3.46.1"
150
+ #define SQLITE_VERSION_NUMBER 3046001
151
+ #define SQLITE_SOURCE_ID "2024-08-13 09:16:08 c9c2ab54ba1f5f46360f1b4f35d849cd3f080e6fc2b6c60e91b16c63f69a1e33"
152
152
 
153
153
  /*
154
154
  ** CAPI3REF: Run-Time Library Version Numbers
@@ -213,8 +213,8 @@ SQLITE_API int sqlite3_libversion_number(void);
213
213
  SQLITE_API int sqlite3_compileoption_used(const char *zOptName);
214
214
  SQLITE_API const char *sqlite3_compileoption_get(int N);
215
215
  #else
216
- #define sqlite3_compileoption_used(X) 0
217
- #define sqlite3_compileoption_get(X) ((void *)0)
216
+ # define sqlite3_compileoption_used(X) 0
217
+ # define sqlite3_compileoption_get(X) ((void*)0)
218
218
  #endif
219
219
 
220
220
  /*
@@ -288,18 +288,18 @@ typedef struct sqlite3 sqlite3;
288
288
  ** between 0 and +18446744073709551615 inclusive.
289
289
  */
290
290
  #ifdef SQLITE_INT64_TYPE
291
- typedef SQLITE_INT64_TYPE sqlite_int64;
292
- #ifdef SQLITE_UINT64_TYPE
293
- typedef SQLITE_UINT64_TYPE sqlite_uint64;
294
- #else
295
- typedef unsigned SQLITE_INT64_TYPE sqlite_uint64;
296
- #endif
291
+ typedef SQLITE_INT64_TYPE sqlite_int64;
292
+ # ifdef SQLITE_UINT64_TYPE
293
+ typedef SQLITE_UINT64_TYPE sqlite_uint64;
294
+ # else
295
+ typedef unsigned SQLITE_INT64_TYPE sqlite_uint64;
296
+ # endif
297
297
  #elif defined(_MSC_VER) || defined(__BORLANDC__)
298
- typedef __int64 sqlite_int64;
299
- typedef unsigned __int64 sqlite_uint64;
298
+ typedef __int64 sqlite_int64;
299
+ typedef unsigned __int64 sqlite_uint64;
300
300
  #else
301
- typedef long long int sqlite_int64;
302
- typedef unsigned long long int sqlite_uint64;
301
+ typedef long long int sqlite_int64;
302
+ typedef unsigned long long int sqlite_uint64;
303
303
  #endif
304
304
  typedef sqlite_int64 sqlite3_int64;
305
305
  typedef sqlite_uint64 sqlite3_uint64;
@@ -309,7 +309,7 @@ typedef sqlite_uint64 sqlite3_uint64;
309
309
  ** substitute integer for floating-point.
310
310
  */
311
311
  #ifdef SQLITE_OMIT_FLOATING_POINT
312
- #define double sqlite3_int64
312
+ # define double sqlite3_int64
313
313
  #endif
314
314
 
315
315
  /*
@@ -350,15 +350,15 @@ typedef sqlite_uint64 sqlite3_uint64;
350
350
  ** ^Calling sqlite3_close() or sqlite3_close_v2() with a NULL pointer
351
351
  ** argument is a harmless no-op.
352
352
  */
353
- SQLITE_API int sqlite3_close(sqlite3 *);
354
- SQLITE_API int sqlite3_close_v2(sqlite3 *);
353
+ SQLITE_API int sqlite3_close(sqlite3*);
354
+ SQLITE_API int sqlite3_close_v2(sqlite3*);
355
355
 
356
356
  /*
357
357
  ** The type for a callback function.
358
358
  ** This is legacy and deprecated. It is included for historical
359
359
  ** compatibility and is not documented.
360
360
  */
361
- typedef int (*sqlite3_callback)(void *, int, char **, char **);
361
+ typedef int (*sqlite3_callback)(void*,int,char**, char**);
362
362
 
363
363
  /*
364
364
  ** CAPI3REF: One-Step Query Execution Interface
@@ -420,14 +420,16 @@ typedef int (*sqlite3_callback)(void *, int, char **, char **);
420
420
  ** the 1st parameter to sqlite3_exec() while sqlite3_exec() is running.
421
421
  ** <li> The application must not modify the SQL statement text passed into
422
422
  ** the 2nd parameter of sqlite3_exec() while sqlite3_exec() is running.
423
+ ** <li> The application must not dereference the arrays or string pointers
424
+ ** passed as the 3rd and 4th callback parameters after it returns.
423
425
  ** </ul>
424
426
  */
425
- SQLITE_API int sqlite3_exec(sqlite3 *, /* An open database */
426
- const char *sql, /* SQL to be evaluated */
427
- int (*callback)(void *, int, char **,
428
- char **), /* Callback function */
429
- void *, /* 1st argument to callback */
430
- char **errmsg /* Error msg written here */
427
+ SQLITE_API int sqlite3_exec(
428
+ sqlite3*, /* An open database */
429
+ const char *sql, /* SQL to be evaluated */
430
+ int (*callback)(void*,int,char**,char**), /* Callback function */
431
+ void *, /* 1st argument to callback */
432
+ char **errmsg /* Error msg written here */
431
433
  );
432
434
 
433
435
  /*
@@ -441,38 +443,38 @@ SQLITE_API int sqlite3_exec(sqlite3 *, /* An open database */
441
443
  **
442
444
  ** See also: [extended result code definitions]
443
445
  */
444
- #define SQLITE_OK 0 /* Successful result */
446
+ #define SQLITE_OK 0 /* Successful result */
445
447
  /* beginning-of-error-codes */
446
- #define SQLITE_ERROR 1 /* Generic error */
447
- #define SQLITE_INTERNAL 2 /* Internal logic error in SQLite */
448
- #define SQLITE_PERM 3 /* Access permission denied */
449
- #define SQLITE_ABORT 4 /* Callback routine requested an abort */
450
- #define SQLITE_BUSY 5 /* The database file is locked */
451
- #define SQLITE_LOCKED 6 /* A table in the database is locked */
452
- #define SQLITE_NOMEM 7 /* A malloc() failed */
453
- #define SQLITE_READONLY 8 /* Attempt to write a readonly database */
454
- #define SQLITE_INTERRUPT 9 /* Operation terminated by sqlite3_interrupt()*/
455
- #define SQLITE_IOERR 10 /* Some kind of disk I/O error occurred */
456
- #define SQLITE_CORRUPT 11 /* The database disk image is malformed */
457
- #define SQLITE_NOTFOUND 12 /* Unknown opcode in sqlite3_file_control() */
458
- #define SQLITE_FULL 13 /* Insertion failed because database is full */
459
- #define SQLITE_CANTOPEN 14 /* Unable to open the database file */
460
- #define SQLITE_PROTOCOL 15 /* Database lock protocol error */
461
- #define SQLITE_EMPTY 16 /* Internal use only */
462
- #define SQLITE_SCHEMA 17 /* The database schema changed */
463
- #define SQLITE_TOOBIG 18 /* String or BLOB exceeds size limit */
464
- #define SQLITE_CONSTRAINT 19 /* Abort due to constraint violation */
465
- #define SQLITE_MISMATCH 20 /* Data type mismatch */
466
- #define SQLITE_MISUSE 21 /* Library used incorrectly */
467
- #define SQLITE_NOLFS 22 /* Uses OS features not supported on host */
468
- #define SQLITE_AUTH 23 /* Authorization denied */
469
- #define SQLITE_FORMAT 24 /* Not used */
470
- #define SQLITE_RANGE 25 /* 2nd parameter to sqlite3_bind out of range */
471
- #define SQLITE_NOTADB 26 /* File opened that is not a database file */
472
- #define SQLITE_NOTICE 27 /* Notifications from sqlite3_log() */
473
- #define SQLITE_WARNING 28 /* Warnings from sqlite3_log() */
474
- #define SQLITE_ROW 100 /* sqlite3_step() has another row ready */
475
- #define SQLITE_DONE 101 /* sqlite3_step() has finished executing */
448
+ #define SQLITE_ERROR 1 /* Generic error */
449
+ #define SQLITE_INTERNAL 2 /* Internal logic error in SQLite */
450
+ #define SQLITE_PERM 3 /* Access permission denied */
451
+ #define SQLITE_ABORT 4 /* Callback routine requested an abort */
452
+ #define SQLITE_BUSY 5 /* The database file is locked */
453
+ #define SQLITE_LOCKED 6 /* A table in the database is locked */
454
+ #define SQLITE_NOMEM 7 /* A malloc() failed */
455
+ #define SQLITE_READONLY 8 /* Attempt to write a readonly database */
456
+ #define SQLITE_INTERRUPT 9 /* Operation terminated by sqlite3_interrupt()*/
457
+ #define SQLITE_IOERR 10 /* Some kind of disk I/O error occurred */
458
+ #define SQLITE_CORRUPT 11 /* The database disk image is malformed */
459
+ #define SQLITE_NOTFOUND 12 /* Unknown opcode in sqlite3_file_control() */
460
+ #define SQLITE_FULL 13 /* Insertion failed because database is full */
461
+ #define SQLITE_CANTOPEN 14 /* Unable to open the database file */
462
+ #define SQLITE_PROTOCOL 15 /* Database lock protocol error */
463
+ #define SQLITE_EMPTY 16 /* Internal use only */
464
+ #define SQLITE_SCHEMA 17 /* The database schema changed */
465
+ #define SQLITE_TOOBIG 18 /* String or BLOB exceeds size limit */
466
+ #define SQLITE_CONSTRAINT 19 /* Abort due to constraint violation */
467
+ #define SQLITE_MISMATCH 20 /* Data type mismatch */
468
+ #define SQLITE_MISUSE 21 /* Library used incorrectly */
469
+ #define SQLITE_NOLFS 22 /* Uses OS features not supported on host */
470
+ #define SQLITE_AUTH 23 /* Authorization denied */
471
+ #define SQLITE_FORMAT 24 /* Not used */
472
+ #define SQLITE_RANGE 25 /* 2nd parameter to sqlite3_bind out of range */
473
+ #define SQLITE_NOTADB 26 /* File opened that is not a database file */
474
+ #define SQLITE_NOTICE 27 /* Notifications from sqlite3_log() */
475
+ #define SQLITE_WARNING 28 /* Warnings from sqlite3_log() */
476
+ #define SQLITE_ROW 100 /* sqlite3_step() has another row ready */
477
+ #define SQLITE_DONE 101 /* sqlite3_step() has finished executing */
476
478
  /* end-of-error-codes */
477
479
 
478
480
  /*
@@ -492,83 +494,83 @@ SQLITE_API int sqlite3_exec(sqlite3 *, /* An open database */
492
494
  ** the most recent error can be obtained using
493
495
  ** [sqlite3_extended_errcode()].
494
496
  */
495
- #define SQLITE_ERROR_MISSING_COLLSEQ (SQLITE_ERROR | (1 << 8))
496
- #define SQLITE_ERROR_RETRY (SQLITE_ERROR | (2 << 8))
497
- #define SQLITE_ERROR_SNAPSHOT (SQLITE_ERROR | (3 << 8))
498
- #define SQLITE_IOERR_READ (SQLITE_IOERR | (1 << 8))
499
- #define SQLITE_IOERR_SHORT_READ (SQLITE_IOERR | (2 << 8))
500
- #define SQLITE_IOERR_WRITE (SQLITE_IOERR | (3 << 8))
501
- #define SQLITE_IOERR_FSYNC (SQLITE_IOERR | (4 << 8))
502
- #define SQLITE_IOERR_DIR_FSYNC (SQLITE_IOERR | (5 << 8))
503
- #define SQLITE_IOERR_TRUNCATE (SQLITE_IOERR | (6 << 8))
504
- #define SQLITE_IOERR_FSTAT (SQLITE_IOERR | (7 << 8))
505
- #define SQLITE_IOERR_UNLOCK (SQLITE_IOERR | (8 << 8))
506
- #define SQLITE_IOERR_RDLOCK (SQLITE_IOERR | (9 << 8))
507
- #define SQLITE_IOERR_DELETE (SQLITE_IOERR | (10 << 8))
508
- #define SQLITE_IOERR_BLOCKED (SQLITE_IOERR | (11 << 8))
509
- #define SQLITE_IOERR_NOMEM (SQLITE_IOERR | (12 << 8))
510
- #define SQLITE_IOERR_ACCESS (SQLITE_IOERR | (13 << 8))
511
- #define SQLITE_IOERR_CHECKRESERVEDLOCK (SQLITE_IOERR | (14 << 8))
512
- #define SQLITE_IOERR_LOCK (SQLITE_IOERR | (15 << 8))
513
- #define SQLITE_IOERR_CLOSE (SQLITE_IOERR | (16 << 8))
514
- #define SQLITE_IOERR_DIR_CLOSE (SQLITE_IOERR | (17 << 8))
515
- #define SQLITE_IOERR_SHMOPEN (SQLITE_IOERR | (18 << 8))
516
- #define SQLITE_IOERR_SHMSIZE (SQLITE_IOERR | (19 << 8))
517
- #define SQLITE_IOERR_SHMLOCK (SQLITE_IOERR | (20 << 8))
518
- #define SQLITE_IOERR_SHMMAP (SQLITE_IOERR | (21 << 8))
519
- #define SQLITE_IOERR_SEEK (SQLITE_IOERR | (22 << 8))
520
- #define SQLITE_IOERR_DELETE_NOENT (SQLITE_IOERR | (23 << 8))
521
- #define SQLITE_IOERR_MMAP (SQLITE_IOERR | (24 << 8))
522
- #define SQLITE_IOERR_GETTEMPPATH (SQLITE_IOERR | (25 << 8))
523
- #define SQLITE_IOERR_CONVPATH (SQLITE_IOERR | (26 << 8))
524
- #define SQLITE_IOERR_VNODE (SQLITE_IOERR | (27 << 8))
525
- #define SQLITE_IOERR_AUTH (SQLITE_IOERR | (28 << 8))
526
- #define SQLITE_IOERR_BEGIN_ATOMIC (SQLITE_IOERR | (29 << 8))
527
- #define SQLITE_IOERR_COMMIT_ATOMIC (SQLITE_IOERR | (30 << 8))
528
- #define SQLITE_IOERR_ROLLBACK_ATOMIC (SQLITE_IOERR | (31 << 8))
529
- #define SQLITE_IOERR_DATA (SQLITE_IOERR | (32 << 8))
530
- #define SQLITE_IOERR_CORRUPTFS (SQLITE_IOERR | (33 << 8))
531
- #define SQLITE_IOERR_IN_PAGE (SQLITE_IOERR | (34 << 8))
532
- #define SQLITE_LOCKED_SHAREDCACHE (SQLITE_LOCKED | (1 << 8))
533
- #define SQLITE_LOCKED_VTAB (SQLITE_LOCKED | (2 << 8))
534
- #define SQLITE_BUSY_RECOVERY (SQLITE_BUSY | (1 << 8))
535
- #define SQLITE_BUSY_SNAPSHOT (SQLITE_BUSY | (2 << 8))
536
- #define SQLITE_BUSY_TIMEOUT (SQLITE_BUSY | (3 << 8))
537
- #define SQLITE_CANTOPEN_NOTEMPDIR (SQLITE_CANTOPEN | (1 << 8))
538
- #define SQLITE_CANTOPEN_ISDIR (SQLITE_CANTOPEN | (2 << 8))
539
- #define SQLITE_CANTOPEN_FULLPATH (SQLITE_CANTOPEN | (3 << 8))
540
- #define SQLITE_CANTOPEN_CONVPATH (SQLITE_CANTOPEN | (4 << 8))
541
- #define SQLITE_CANTOPEN_DIRTYWAL (SQLITE_CANTOPEN | (5 << 8)) /* Not Used */
542
- #define SQLITE_CANTOPEN_SYMLINK (SQLITE_CANTOPEN | (6 << 8))
543
- #define SQLITE_CORRUPT_VTAB (SQLITE_CORRUPT | (1 << 8))
544
- #define SQLITE_CORRUPT_SEQUENCE (SQLITE_CORRUPT | (2 << 8))
545
- #define SQLITE_CORRUPT_INDEX (SQLITE_CORRUPT | (3 << 8))
546
- #define SQLITE_READONLY_RECOVERY (SQLITE_READONLY | (1 << 8))
547
- #define SQLITE_READONLY_CANTLOCK (SQLITE_READONLY | (2 << 8))
548
- #define SQLITE_READONLY_ROLLBACK (SQLITE_READONLY | (3 << 8))
549
- #define SQLITE_READONLY_DBMOVED (SQLITE_READONLY | (4 << 8))
550
- #define SQLITE_READONLY_CANTINIT (SQLITE_READONLY | (5 << 8))
551
- #define SQLITE_READONLY_DIRECTORY (SQLITE_READONLY | (6 << 8))
552
- #define SQLITE_ABORT_ROLLBACK (SQLITE_ABORT | (2 << 8))
553
- #define SQLITE_CONSTRAINT_CHECK (SQLITE_CONSTRAINT | (1 << 8))
554
- #define SQLITE_CONSTRAINT_COMMITHOOK (SQLITE_CONSTRAINT | (2 << 8))
555
- #define SQLITE_CONSTRAINT_FOREIGNKEY (SQLITE_CONSTRAINT | (3 << 8))
556
- #define SQLITE_CONSTRAINT_FUNCTION (SQLITE_CONSTRAINT | (4 << 8))
557
- #define SQLITE_CONSTRAINT_NOTNULL (SQLITE_CONSTRAINT | (5 << 8))
558
- #define SQLITE_CONSTRAINT_PRIMARYKEY (SQLITE_CONSTRAINT | (6 << 8))
559
- #define SQLITE_CONSTRAINT_TRIGGER (SQLITE_CONSTRAINT | (7 << 8))
560
- #define SQLITE_CONSTRAINT_UNIQUE (SQLITE_CONSTRAINT | (8 << 8))
561
- #define SQLITE_CONSTRAINT_VTAB (SQLITE_CONSTRAINT | (9 << 8))
562
- #define SQLITE_CONSTRAINT_ROWID (SQLITE_CONSTRAINT | (10 << 8))
563
- #define SQLITE_CONSTRAINT_PINNED (SQLITE_CONSTRAINT | (11 << 8))
564
- #define SQLITE_CONSTRAINT_DATATYPE (SQLITE_CONSTRAINT | (12 << 8))
565
- #define SQLITE_NOTICE_RECOVER_WAL (SQLITE_NOTICE | (1 << 8))
566
- #define SQLITE_NOTICE_RECOVER_ROLLBACK (SQLITE_NOTICE | (2 << 8))
567
- #define SQLITE_NOTICE_RBU (SQLITE_NOTICE | (3 << 8))
568
- #define SQLITE_WARNING_AUTOINDEX (SQLITE_WARNING | (1 << 8))
569
- #define SQLITE_AUTH_USER (SQLITE_AUTH | (1 << 8))
570
- #define SQLITE_OK_LOAD_PERMANENTLY (SQLITE_OK | (1 << 8))
571
- #define SQLITE_OK_SYMLINK (SQLITE_OK | (2 << 8)) /* internal use only */
497
+ #define SQLITE_ERROR_MISSING_COLLSEQ (SQLITE_ERROR | (1<<8))
498
+ #define SQLITE_ERROR_RETRY (SQLITE_ERROR | (2<<8))
499
+ #define SQLITE_ERROR_SNAPSHOT (SQLITE_ERROR | (3<<8))
500
+ #define SQLITE_IOERR_READ (SQLITE_IOERR | (1<<8))
501
+ #define SQLITE_IOERR_SHORT_READ (SQLITE_IOERR | (2<<8))
502
+ #define SQLITE_IOERR_WRITE (SQLITE_IOERR | (3<<8))
503
+ #define SQLITE_IOERR_FSYNC (SQLITE_IOERR | (4<<8))
504
+ #define SQLITE_IOERR_DIR_FSYNC (SQLITE_IOERR | (5<<8))
505
+ #define SQLITE_IOERR_TRUNCATE (SQLITE_IOERR | (6<<8))
506
+ #define SQLITE_IOERR_FSTAT (SQLITE_IOERR | (7<<8))
507
+ #define SQLITE_IOERR_UNLOCK (SQLITE_IOERR | (8<<8))
508
+ #define SQLITE_IOERR_RDLOCK (SQLITE_IOERR | (9<<8))
509
+ #define SQLITE_IOERR_DELETE (SQLITE_IOERR | (10<<8))
510
+ #define SQLITE_IOERR_BLOCKED (SQLITE_IOERR | (11<<8))
511
+ #define SQLITE_IOERR_NOMEM (SQLITE_IOERR | (12<<8))
512
+ #define SQLITE_IOERR_ACCESS (SQLITE_IOERR | (13<<8))
513
+ #define SQLITE_IOERR_CHECKRESERVEDLOCK (SQLITE_IOERR | (14<<8))
514
+ #define SQLITE_IOERR_LOCK (SQLITE_IOERR | (15<<8))
515
+ #define SQLITE_IOERR_CLOSE (SQLITE_IOERR | (16<<8))
516
+ #define SQLITE_IOERR_DIR_CLOSE (SQLITE_IOERR | (17<<8))
517
+ #define SQLITE_IOERR_SHMOPEN (SQLITE_IOERR | (18<<8))
518
+ #define SQLITE_IOERR_SHMSIZE (SQLITE_IOERR | (19<<8))
519
+ #define SQLITE_IOERR_SHMLOCK (SQLITE_IOERR | (20<<8))
520
+ #define SQLITE_IOERR_SHMMAP (SQLITE_IOERR | (21<<8))
521
+ #define SQLITE_IOERR_SEEK (SQLITE_IOERR | (22<<8))
522
+ #define SQLITE_IOERR_DELETE_NOENT (SQLITE_IOERR | (23<<8))
523
+ #define SQLITE_IOERR_MMAP (SQLITE_IOERR | (24<<8))
524
+ #define SQLITE_IOERR_GETTEMPPATH (SQLITE_IOERR | (25<<8))
525
+ #define SQLITE_IOERR_CONVPATH (SQLITE_IOERR | (26<<8))
526
+ #define SQLITE_IOERR_VNODE (SQLITE_IOERR | (27<<8))
527
+ #define SQLITE_IOERR_AUTH (SQLITE_IOERR | (28<<8))
528
+ #define SQLITE_IOERR_BEGIN_ATOMIC (SQLITE_IOERR | (29<<8))
529
+ #define SQLITE_IOERR_COMMIT_ATOMIC (SQLITE_IOERR | (30<<8))
530
+ #define SQLITE_IOERR_ROLLBACK_ATOMIC (SQLITE_IOERR | (31<<8))
531
+ #define SQLITE_IOERR_DATA (SQLITE_IOERR | (32<<8))
532
+ #define SQLITE_IOERR_CORRUPTFS (SQLITE_IOERR | (33<<8))
533
+ #define SQLITE_IOERR_IN_PAGE (SQLITE_IOERR | (34<<8))
534
+ #define SQLITE_LOCKED_SHAREDCACHE (SQLITE_LOCKED | (1<<8))
535
+ #define SQLITE_LOCKED_VTAB (SQLITE_LOCKED | (2<<8))
536
+ #define SQLITE_BUSY_RECOVERY (SQLITE_BUSY | (1<<8))
537
+ #define SQLITE_BUSY_SNAPSHOT (SQLITE_BUSY | (2<<8))
538
+ #define SQLITE_BUSY_TIMEOUT (SQLITE_BUSY | (3<<8))
539
+ #define SQLITE_CANTOPEN_NOTEMPDIR (SQLITE_CANTOPEN | (1<<8))
540
+ #define SQLITE_CANTOPEN_ISDIR (SQLITE_CANTOPEN | (2<<8))
541
+ #define SQLITE_CANTOPEN_FULLPATH (SQLITE_CANTOPEN | (3<<8))
542
+ #define SQLITE_CANTOPEN_CONVPATH (SQLITE_CANTOPEN | (4<<8))
543
+ #define SQLITE_CANTOPEN_DIRTYWAL (SQLITE_CANTOPEN | (5<<8)) /* Not Used */
544
+ #define SQLITE_CANTOPEN_SYMLINK (SQLITE_CANTOPEN | (6<<8))
545
+ #define SQLITE_CORRUPT_VTAB (SQLITE_CORRUPT | (1<<8))
546
+ #define SQLITE_CORRUPT_SEQUENCE (SQLITE_CORRUPT | (2<<8))
547
+ #define SQLITE_CORRUPT_INDEX (SQLITE_CORRUPT | (3<<8))
548
+ #define SQLITE_READONLY_RECOVERY (SQLITE_READONLY | (1<<8))
549
+ #define SQLITE_READONLY_CANTLOCK (SQLITE_READONLY | (2<<8))
550
+ #define SQLITE_READONLY_ROLLBACK (SQLITE_READONLY | (3<<8))
551
+ #define SQLITE_READONLY_DBMOVED (SQLITE_READONLY | (4<<8))
552
+ #define SQLITE_READONLY_CANTINIT (SQLITE_READONLY | (5<<8))
553
+ #define SQLITE_READONLY_DIRECTORY (SQLITE_READONLY | (6<<8))
554
+ #define SQLITE_ABORT_ROLLBACK (SQLITE_ABORT | (2<<8))
555
+ #define SQLITE_CONSTRAINT_CHECK (SQLITE_CONSTRAINT | (1<<8))
556
+ #define SQLITE_CONSTRAINT_COMMITHOOK (SQLITE_CONSTRAINT | (2<<8))
557
+ #define SQLITE_CONSTRAINT_FOREIGNKEY (SQLITE_CONSTRAINT | (3<<8))
558
+ #define SQLITE_CONSTRAINT_FUNCTION (SQLITE_CONSTRAINT | (4<<8))
559
+ #define SQLITE_CONSTRAINT_NOTNULL (SQLITE_CONSTRAINT | (5<<8))
560
+ #define SQLITE_CONSTRAINT_PRIMARYKEY (SQLITE_CONSTRAINT | (6<<8))
561
+ #define SQLITE_CONSTRAINT_TRIGGER (SQLITE_CONSTRAINT | (7<<8))
562
+ #define SQLITE_CONSTRAINT_UNIQUE (SQLITE_CONSTRAINT | (8<<8))
563
+ #define SQLITE_CONSTRAINT_VTAB (SQLITE_CONSTRAINT | (9<<8))
564
+ #define SQLITE_CONSTRAINT_ROWID (SQLITE_CONSTRAINT |(10<<8))
565
+ #define SQLITE_CONSTRAINT_PINNED (SQLITE_CONSTRAINT |(11<<8))
566
+ #define SQLITE_CONSTRAINT_DATATYPE (SQLITE_CONSTRAINT |(12<<8))
567
+ #define SQLITE_NOTICE_RECOVER_WAL (SQLITE_NOTICE | (1<<8))
568
+ #define SQLITE_NOTICE_RECOVER_ROLLBACK (SQLITE_NOTICE | (2<<8))
569
+ #define SQLITE_NOTICE_RBU (SQLITE_NOTICE | (3<<8))
570
+ #define SQLITE_WARNING_AUTOINDEX (SQLITE_WARNING | (1<<8))
571
+ #define SQLITE_AUTH_USER (SQLITE_AUTH | (1<<8))
572
+ #define SQLITE_OK_LOAD_PERMANENTLY (SQLITE_OK | (1<<8))
573
+ #define SQLITE_OK_SYMLINK (SQLITE_OK | (2<<8)) /* internal use only */
572
574
 
573
575
  /*
574
576
  ** CAPI3REF: Flags For File Open Operations
@@ -590,32 +592,33 @@ SQLITE_API int sqlite3_exec(sqlite3 *, /* An open database */
590
592
  ** [sqlite3_open_v2()] has historically be a no-op and might become an
591
593
  ** error in future versions of SQLite.
592
594
  */
593
- #define SQLITE_OPEN_READONLY 0x00000001 /* Ok for sqlite3_open_v2() */
594
- #define SQLITE_OPEN_READWRITE 0x00000002 /* Ok for sqlite3_open_v2() */
595
- #define SQLITE_OPEN_CREATE 0x00000004 /* Ok for sqlite3_open_v2() */
596
- #define SQLITE_OPEN_DELETEONCLOSE 0x00000008 /* VFS only */
597
- #define SQLITE_OPEN_EXCLUSIVE 0x00000010 /* VFS only */
598
- #define SQLITE_OPEN_AUTOPROXY 0x00000020 /* VFS only */
599
- #define SQLITE_OPEN_URI 0x00000040 /* Ok for sqlite3_open_v2() */
600
- #define SQLITE_OPEN_MEMORY 0x00000080 /* Ok for sqlite3_open_v2() */
601
- #define SQLITE_OPEN_MAIN_DB 0x00000100 /* VFS only */
602
- #define SQLITE_OPEN_TEMP_DB 0x00000200 /* VFS only */
603
- #define SQLITE_OPEN_TRANSIENT_DB 0x00000400 /* VFS only */
604
- #define SQLITE_OPEN_MAIN_JOURNAL 0x00000800 /* VFS only */
605
- #define SQLITE_OPEN_TEMP_JOURNAL 0x00001000 /* VFS only */
606
- #define SQLITE_OPEN_SUBJOURNAL 0x00002000 /* VFS only */
607
- #define SQLITE_OPEN_SUPER_JOURNAL 0x00004000 /* VFS only */
608
- #define SQLITE_OPEN_NOMUTEX 0x00008000 /* Ok for sqlite3_open_v2() */
609
- #define SQLITE_OPEN_FULLMUTEX 0x00010000 /* Ok for sqlite3_open_v2() */
610
- #define SQLITE_OPEN_SHAREDCACHE 0x00020000 /* Ok for sqlite3_open_v2() */
611
- #define SQLITE_OPEN_PRIVATECACHE 0x00040000 /* Ok for sqlite3_open_v2() */
612
- #define SQLITE_OPEN_WAL 0x00080000 /* VFS only */
613
- #define SQLITE_OPEN_NOFOLLOW 0x01000000 /* Ok for sqlite3_open_v2() */
614
- #define SQLITE_OPEN_EXRESCODE 0x02000000 /* Extended result codes */
595
+ #define SQLITE_OPEN_READONLY 0x00000001 /* Ok for sqlite3_open_v2() */
596
+ #define SQLITE_OPEN_READWRITE 0x00000002 /* Ok for sqlite3_open_v2() */
597
+ #define SQLITE_OPEN_CREATE 0x00000004 /* Ok for sqlite3_open_v2() */
598
+ #define SQLITE_OPEN_DELETEONCLOSE 0x00000008 /* VFS only */
599
+ #define SQLITE_OPEN_EXCLUSIVE 0x00000010 /* VFS only */
600
+ #define SQLITE_OPEN_AUTOPROXY 0x00000020 /* VFS only */
601
+ #define SQLITE_OPEN_URI 0x00000040 /* Ok for sqlite3_open_v2() */
602
+ #define SQLITE_OPEN_MEMORY 0x00000080 /* Ok for sqlite3_open_v2() */
603
+ #define SQLITE_OPEN_MAIN_DB 0x00000100 /* VFS only */
604
+ #define SQLITE_OPEN_TEMP_DB 0x00000200 /* VFS only */
605
+ #define SQLITE_OPEN_TRANSIENT_DB 0x00000400 /* VFS only */
606
+ #define SQLITE_OPEN_MAIN_JOURNAL 0x00000800 /* VFS only */
607
+ #define SQLITE_OPEN_TEMP_JOURNAL 0x00001000 /* VFS only */
608
+ #define SQLITE_OPEN_SUBJOURNAL 0x00002000 /* VFS only */
609
+ #define SQLITE_OPEN_SUPER_JOURNAL 0x00004000 /* VFS only */
610
+ #define SQLITE_OPEN_NOMUTEX 0x00008000 /* Ok for sqlite3_open_v2() */
611
+ #define SQLITE_OPEN_FULLMUTEX 0x00010000 /* Ok for sqlite3_open_v2() */
612
+ #define SQLITE_OPEN_SHAREDCACHE 0x00020000 /* Ok for sqlite3_open_v2() */
613
+ #define SQLITE_OPEN_PRIVATECACHE 0x00040000 /* Ok for sqlite3_open_v2() */
614
+ #define SQLITE_OPEN_WAL 0x00080000 /* VFS only */
615
+ #define SQLITE_OPEN_NOFOLLOW 0x01000000 /* Ok for sqlite3_open_v2() */
616
+ #define SQLITE_OPEN_EXRESCODE 0x02000000 /* Extended result codes */
615
617
 
616
618
  /* Reserved: 0x00F00000 */
617
619
  /* Legacy compatibility: */
618
- #define SQLITE_OPEN_MASTER_JOURNAL 0x00004000 /* VFS only */
620
+ #define SQLITE_OPEN_MASTER_JOURNAL 0x00004000 /* VFS only */
621
+
619
622
 
620
623
  /*
621
624
  ** CAPI3REF: Device Characteristics
@@ -650,21 +653,21 @@ SQLITE_API int sqlite3_exec(sqlite3 *, /* An open database */
650
653
  ** write operations are bracketed by [SQLITE_FCNTL_BEGIN_ATOMIC_WRITE] and
651
654
  ** [SQLITE_FCNTL_COMMIT_ATOMIC_WRITE].
652
655
  */
653
- #define SQLITE_IOCAP_ATOMIC 0x00000001
654
- #define SQLITE_IOCAP_ATOMIC512 0x00000002
655
- #define SQLITE_IOCAP_ATOMIC1K 0x00000004
656
- #define SQLITE_IOCAP_ATOMIC2K 0x00000008
657
- #define SQLITE_IOCAP_ATOMIC4K 0x00000010
658
- #define SQLITE_IOCAP_ATOMIC8K 0x00000020
659
- #define SQLITE_IOCAP_ATOMIC16K 0x00000040
660
- #define SQLITE_IOCAP_ATOMIC32K 0x00000080
661
- #define SQLITE_IOCAP_ATOMIC64K 0x00000100
662
- #define SQLITE_IOCAP_SAFE_APPEND 0x00000200
663
- #define SQLITE_IOCAP_SEQUENTIAL 0x00000400
664
- #define SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN 0x00000800
665
- #define SQLITE_IOCAP_POWERSAFE_OVERWRITE 0x00001000
666
- #define SQLITE_IOCAP_IMMUTABLE 0x00002000
667
- #define SQLITE_IOCAP_BATCH_ATOMIC 0x00004000
656
+ #define SQLITE_IOCAP_ATOMIC 0x00000001
657
+ #define SQLITE_IOCAP_ATOMIC512 0x00000002
658
+ #define SQLITE_IOCAP_ATOMIC1K 0x00000004
659
+ #define SQLITE_IOCAP_ATOMIC2K 0x00000008
660
+ #define SQLITE_IOCAP_ATOMIC4K 0x00000010
661
+ #define SQLITE_IOCAP_ATOMIC8K 0x00000020
662
+ #define SQLITE_IOCAP_ATOMIC16K 0x00000040
663
+ #define SQLITE_IOCAP_ATOMIC32K 0x00000080
664
+ #define SQLITE_IOCAP_ATOMIC64K 0x00000100
665
+ #define SQLITE_IOCAP_SAFE_APPEND 0x00000200
666
+ #define SQLITE_IOCAP_SEQUENTIAL 0x00000400
667
+ #define SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN 0x00000800
668
+ #define SQLITE_IOCAP_POWERSAFE_OVERWRITE 0x00001000
669
+ #define SQLITE_IOCAP_IMMUTABLE 0x00002000
670
+ #define SQLITE_IOCAP_BATCH_ATOMIC 0x00004000
668
671
 
669
672
  /*
670
673
  ** CAPI3REF: File Locking Levels
@@ -677,11 +680,11 @@ SQLITE_API int sqlite3_exec(sqlite3 *, /* An open database */
677
680
  ** The argument to xLock() is always SHARED or higher. The argument to
678
681
  ** xUnlock is either SHARED or NONE.
679
682
  */
680
- #define SQLITE_LOCK_NONE 0 /* xUnlock() only */
681
- #define SQLITE_LOCK_SHARED 1 /* xLock() or xUnlock() */
682
- #define SQLITE_LOCK_RESERVED 2 /* xLock() only */
683
- #define SQLITE_LOCK_PENDING 3 /* xLock() only */
684
- #define SQLITE_LOCK_EXCLUSIVE 4 /* xLock() only */
683
+ #define SQLITE_LOCK_NONE 0 /* xUnlock() only */
684
+ #define SQLITE_LOCK_SHARED 1 /* xLock() or xUnlock() */
685
+ #define SQLITE_LOCK_RESERVED 2 /* xLock() only */
686
+ #define SQLITE_LOCK_PENDING 3 /* xLock() only */
687
+ #define SQLITE_LOCK_EXCLUSIVE 4 /* xLock() only */
685
688
 
686
689
  /*
687
690
  ** CAPI3REF: Synchronization Type Flags
@@ -709,9 +712,9 @@ SQLITE_API int sqlite3_exec(sqlite3 *, /* An open database */
709
712
  ** operating systems natively supported by SQLite, only Mac OSX
710
713
  ** cares about the difference.)
711
714
  */
712
- #define SQLITE_SYNC_NORMAL 0x00002
713
- #define SQLITE_SYNC_FULL 0x00003
714
- #define SQLITE_SYNC_DATAONLY 0x00010
715
+ #define SQLITE_SYNC_NORMAL 0x00002
716
+ #define SQLITE_SYNC_FULL 0x00003
717
+ #define SQLITE_SYNC_DATAONLY 0x00010
715
718
 
716
719
  /*
717
720
  ** CAPI3REF: OS Interface Open File Handle
@@ -726,7 +729,7 @@ SQLITE_API int sqlite3_exec(sqlite3 *, /* An open database */
726
729
  */
727
730
  typedef struct sqlite3_file sqlite3_file;
728
731
  struct sqlite3_file {
729
- const struct sqlite3_io_methods *pMethods; /* Methods for an open file */
732
+ const struct sqlite3_io_methods *pMethods; /* Methods for an open file */
730
733
  };
731
734
 
732
735
  /*
@@ -761,11 +764,11 @@ struct sqlite3_file {
761
764
  ** </ul>
762
765
  ** xLock() upgrades the database file lock. In other words, xLock() moves the
763
766
  ** database file lock in the direction NONE toward EXCLUSIVE. The argument to
764
- ** xLock() is always on of SHARED, RESERVED, PENDING, or EXCLUSIVE, never
767
+ ** xLock() is always one of SHARED, RESERVED, PENDING, or EXCLUSIVE, never
765
768
  ** SQLITE_LOCK_NONE. If the database file lock is already at or above the
766
769
  ** requested lock, then the call to xLock() is a no-op.
767
770
  ** xUnlock() downgrades the database file lock to either SHARED or NONE.
768
- * If the lock is already at or below the requested lock state, then the call
771
+ ** If the lock is already at or below the requested lock state, then the call
769
772
  ** to xUnlock() is a no-op.
770
773
  ** The xCheckReservedLock() method checks whether any database connection,
771
774
  ** either in this process or in some other process, is holding a RESERVED,
@@ -833,26 +836,26 @@ struct sqlite3_file {
833
836
  typedef struct sqlite3_io_methods sqlite3_io_methods;
834
837
  struct sqlite3_io_methods {
835
838
  int iVersion;
836
- int (*xClose)(sqlite3_file *);
837
- int (*xRead)(sqlite3_file *, void *, int iAmt, sqlite3_int64 iOfst);
838
- int (*xWrite)(sqlite3_file *, const void *, int iAmt, sqlite3_int64 iOfst);
839
- int (*xTruncate)(sqlite3_file *, sqlite3_int64 size);
840
- int (*xSync)(sqlite3_file *, int flags);
841
- int (*xFileSize)(sqlite3_file *, sqlite3_int64 *pSize);
842
- int (*xLock)(sqlite3_file *, int);
843
- int (*xUnlock)(sqlite3_file *, int);
844
- int (*xCheckReservedLock)(sqlite3_file *, int *pResOut);
845
- int (*xFileControl)(sqlite3_file *, int op, void *pArg);
846
- int (*xSectorSize)(sqlite3_file *);
847
- int (*xDeviceCharacteristics)(sqlite3_file *);
839
+ int (*xClose)(sqlite3_file*);
840
+ int (*xRead)(sqlite3_file*, void*, int iAmt, sqlite3_int64 iOfst);
841
+ int (*xWrite)(sqlite3_file*, const void*, int iAmt, sqlite3_int64 iOfst);
842
+ int (*xTruncate)(sqlite3_file*, sqlite3_int64 size);
843
+ int (*xSync)(sqlite3_file*, int flags);
844
+ int (*xFileSize)(sqlite3_file*, sqlite3_int64 *pSize);
845
+ int (*xLock)(sqlite3_file*, int);
846
+ int (*xUnlock)(sqlite3_file*, int);
847
+ int (*xCheckReservedLock)(sqlite3_file*, int *pResOut);
848
+ int (*xFileControl)(sqlite3_file*, int op, void *pArg);
849
+ int (*xSectorSize)(sqlite3_file*);
850
+ int (*xDeviceCharacteristics)(sqlite3_file*);
848
851
  /* Methods above are valid for version 1 */
849
- int (*xShmMap)(sqlite3_file *, int iPg, int pgsz, int, void volatile **);
850
- int (*xShmLock)(sqlite3_file *, int offset, int n, int flags);
851
- void (*xShmBarrier)(sqlite3_file *);
852
- int (*xShmUnmap)(sqlite3_file *, int deleteFlag);
852
+ int (*xShmMap)(sqlite3_file*, int iPg, int pgsz, int, void volatile**);
853
+ int (*xShmLock)(sqlite3_file*, int offset, int n, int flags);
854
+ void (*xShmBarrier)(sqlite3_file*);
855
+ int (*xShmUnmap)(sqlite3_file*, int deleteFlag);
853
856
  /* Methods above are valid for version 2 */
854
- int (*xFetch)(sqlite3_file *, sqlite3_int64 iOfst, int iAmt, void **pp);
855
- int (*xUnfetch)(sqlite3_file *, sqlite3_int64 iOfst, void *p);
857
+ int (*xFetch)(sqlite3_file*, sqlite3_int64 iOfst, int iAmt, void **pp);
858
+ int (*xUnfetch)(sqlite3_file*, sqlite3_int64 iOfst, void *p);
856
859
  /* Methods above are valid for version 3 */
857
860
  /* Additional methods may be added in future releases */
858
861
  };
@@ -1200,52 +1203,53 @@ struct sqlite3_io_methods {
1200
1203
  ** transaction, or if the db is a temp-db, this opcode is a no-op, not an error.
1201
1204
  ** </ul>
1202
1205
  */
1203
- #define SQLITE_FCNTL_LOCKSTATE 1
1204
- #define SQLITE_FCNTL_GET_LOCKPROXYFILE 2
1205
- #define SQLITE_FCNTL_SET_LOCKPROXYFILE 3
1206
- #define SQLITE_FCNTL_LAST_ERRNO 4
1207
- #define SQLITE_FCNTL_SIZE_HINT 5
1208
- #define SQLITE_FCNTL_CHUNK_SIZE 6
1209
- #define SQLITE_FCNTL_FILE_POINTER 7
1210
- #define SQLITE_FCNTL_SYNC_OMITTED 8
1211
- #define SQLITE_FCNTL_WIN32_AV_RETRY 9
1212
- #define SQLITE_FCNTL_PERSIST_WAL 10
1213
- #define SQLITE_FCNTL_OVERWRITE 11
1214
- #define SQLITE_FCNTL_VFSNAME 12
1215
- #define SQLITE_FCNTL_POWERSAFE_OVERWRITE 13
1216
- #define SQLITE_FCNTL_PRAGMA 14
1217
- #define SQLITE_FCNTL_BUSYHANDLER 15
1218
- #define SQLITE_FCNTL_TEMPFILENAME 16
1219
- #define SQLITE_FCNTL_MMAP_SIZE 18
1220
- #define SQLITE_FCNTL_TRACE 19
1221
- #define SQLITE_FCNTL_HAS_MOVED 20
1222
- #define SQLITE_FCNTL_SYNC 21
1223
- #define SQLITE_FCNTL_COMMIT_PHASETWO 22
1224
- #define SQLITE_FCNTL_WIN32_SET_HANDLE 23
1225
- #define SQLITE_FCNTL_WAL_BLOCK 24
1226
- #define SQLITE_FCNTL_ZIPVFS 25
1227
- #define SQLITE_FCNTL_RBU 26
1228
- #define SQLITE_FCNTL_VFS_POINTER 27
1229
- #define SQLITE_FCNTL_JOURNAL_POINTER 28
1230
- #define SQLITE_FCNTL_WIN32_GET_HANDLE 29
1231
- #define SQLITE_FCNTL_PDB 30
1232
- #define SQLITE_FCNTL_BEGIN_ATOMIC_WRITE 31
1233
- #define SQLITE_FCNTL_COMMIT_ATOMIC_WRITE 32
1234
- #define SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE 33
1235
- #define SQLITE_FCNTL_LOCK_TIMEOUT 34
1236
- #define SQLITE_FCNTL_DATA_VERSION 35
1237
- #define SQLITE_FCNTL_SIZE_LIMIT 36
1238
- #define SQLITE_FCNTL_CKPT_DONE 37
1239
- #define SQLITE_FCNTL_RESERVE_BYTES 38
1240
- #define SQLITE_FCNTL_CKPT_START 39
1241
- #define SQLITE_FCNTL_EXTERNAL_READER 40
1242
- #define SQLITE_FCNTL_CKSM_FILE 41
1243
- #define SQLITE_FCNTL_RESET_CACHE 42
1206
+ #define SQLITE_FCNTL_LOCKSTATE 1
1207
+ #define SQLITE_FCNTL_GET_LOCKPROXYFILE 2
1208
+ #define SQLITE_FCNTL_SET_LOCKPROXYFILE 3
1209
+ #define SQLITE_FCNTL_LAST_ERRNO 4
1210
+ #define SQLITE_FCNTL_SIZE_HINT 5
1211
+ #define SQLITE_FCNTL_CHUNK_SIZE 6
1212
+ #define SQLITE_FCNTL_FILE_POINTER 7
1213
+ #define SQLITE_FCNTL_SYNC_OMITTED 8
1214
+ #define SQLITE_FCNTL_WIN32_AV_RETRY 9
1215
+ #define SQLITE_FCNTL_PERSIST_WAL 10
1216
+ #define SQLITE_FCNTL_OVERWRITE 11
1217
+ #define SQLITE_FCNTL_VFSNAME 12
1218
+ #define SQLITE_FCNTL_POWERSAFE_OVERWRITE 13
1219
+ #define SQLITE_FCNTL_PRAGMA 14
1220
+ #define SQLITE_FCNTL_BUSYHANDLER 15
1221
+ #define SQLITE_FCNTL_TEMPFILENAME 16
1222
+ #define SQLITE_FCNTL_MMAP_SIZE 18
1223
+ #define SQLITE_FCNTL_TRACE 19
1224
+ #define SQLITE_FCNTL_HAS_MOVED 20
1225
+ #define SQLITE_FCNTL_SYNC 21
1226
+ #define SQLITE_FCNTL_COMMIT_PHASETWO 22
1227
+ #define SQLITE_FCNTL_WIN32_SET_HANDLE 23
1228
+ #define SQLITE_FCNTL_WAL_BLOCK 24
1229
+ #define SQLITE_FCNTL_ZIPVFS 25
1230
+ #define SQLITE_FCNTL_RBU 26
1231
+ #define SQLITE_FCNTL_VFS_POINTER 27
1232
+ #define SQLITE_FCNTL_JOURNAL_POINTER 28
1233
+ #define SQLITE_FCNTL_WIN32_GET_HANDLE 29
1234
+ #define SQLITE_FCNTL_PDB 30
1235
+ #define SQLITE_FCNTL_BEGIN_ATOMIC_WRITE 31
1236
+ #define SQLITE_FCNTL_COMMIT_ATOMIC_WRITE 32
1237
+ #define SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE 33
1238
+ #define SQLITE_FCNTL_LOCK_TIMEOUT 34
1239
+ #define SQLITE_FCNTL_DATA_VERSION 35
1240
+ #define SQLITE_FCNTL_SIZE_LIMIT 36
1241
+ #define SQLITE_FCNTL_CKPT_DONE 37
1242
+ #define SQLITE_FCNTL_RESERVE_BYTES 38
1243
+ #define SQLITE_FCNTL_CKPT_START 39
1244
+ #define SQLITE_FCNTL_EXTERNAL_READER 40
1245
+ #define SQLITE_FCNTL_CKSM_FILE 41
1246
+ #define SQLITE_FCNTL_RESET_CACHE 42
1244
1247
 
1245
1248
  /* deprecated names */
1246
- #define SQLITE_GET_LOCKPROXYFILE SQLITE_FCNTL_GET_LOCKPROXYFILE
1247
- #define SQLITE_SET_LOCKPROXYFILE SQLITE_FCNTL_SET_LOCKPROXYFILE
1248
- #define SQLITE_LAST_ERRNO SQLITE_FCNTL_LAST_ERRNO
1249
+ #define SQLITE_GET_LOCKPROXYFILE SQLITE_FCNTL_GET_LOCKPROXYFILE
1250
+ #define SQLITE_SET_LOCKPROXYFILE SQLITE_FCNTL_SET_LOCKPROXYFILE
1251
+ #define SQLITE_LAST_ERRNO SQLITE_FCNTL_LAST_ERRNO
1252
+
1249
1253
 
1250
1254
  /*
1251
1255
  ** CAPI3REF: Mutex Handle
@@ -1461,37 +1465,37 @@ typedef const char *sqlite3_filename;
1461
1465
  typedef struct sqlite3_vfs sqlite3_vfs;
1462
1466
  typedef void (*sqlite3_syscall_ptr)(void);
1463
1467
  struct sqlite3_vfs {
1464
- int iVersion; /* Structure version number (currently 3) */
1465
- int szOsFile; /* Size of subclassed sqlite3_file */
1466
- int mxPathname; /* Maximum file pathname length */
1467
- sqlite3_vfs *pNext; /* Next registered VFS */
1468
- const char *zName; /* Name of this virtual file system */
1469
- void *pAppData; /* Pointer to application-specific data */
1470
- int (*xOpen)(sqlite3_vfs *, sqlite3_filename zName, sqlite3_file *, int flags,
1471
- int *pOutFlags);
1472
- int (*xDelete)(sqlite3_vfs *, const char *zName, int syncDir);
1473
- int (*xAccess)(sqlite3_vfs *, const char *zName, int flags, int *pResOut);
1474
- int (*xFullPathname)(sqlite3_vfs *, const char *zName, int nOut, char *zOut);
1475
- void *(*xDlOpen)(sqlite3_vfs *, const char *zFilename);
1476
- void (*xDlError)(sqlite3_vfs *, int nByte, char *zErrMsg);
1477
- void (*(*xDlSym)(sqlite3_vfs *, void *, const char *zSymbol))(void);
1478
- void (*xDlClose)(sqlite3_vfs *, void *);
1479
- int (*xRandomness)(sqlite3_vfs *, int nByte, char *zOut);
1480
- int (*xSleep)(sqlite3_vfs *, int microseconds);
1481
- int (*xCurrentTime)(sqlite3_vfs *, double *);
1482
- int (*xGetLastError)(sqlite3_vfs *, int, char *);
1468
+ int iVersion; /* Structure version number (currently 3) */
1469
+ int szOsFile; /* Size of subclassed sqlite3_file */
1470
+ int mxPathname; /* Maximum file pathname length */
1471
+ sqlite3_vfs *pNext; /* Next registered VFS */
1472
+ const char *zName; /* Name of this virtual file system */
1473
+ void *pAppData; /* Pointer to application-specific data */
1474
+ int (*xOpen)(sqlite3_vfs*, sqlite3_filename zName, sqlite3_file*,
1475
+ int flags, int *pOutFlags);
1476
+ int (*xDelete)(sqlite3_vfs*, const char *zName, int syncDir);
1477
+ int (*xAccess)(sqlite3_vfs*, const char *zName, int flags, int *pResOut);
1478
+ int (*xFullPathname)(sqlite3_vfs*, const char *zName, int nOut, char *zOut);
1479
+ void *(*xDlOpen)(sqlite3_vfs*, const char *zFilename);
1480
+ void (*xDlError)(sqlite3_vfs*, int nByte, char *zErrMsg);
1481
+ void (*(*xDlSym)(sqlite3_vfs*,void*, const char *zSymbol))(void);
1482
+ void (*xDlClose)(sqlite3_vfs*, void*);
1483
+ int (*xRandomness)(sqlite3_vfs*, int nByte, char *zOut);
1484
+ int (*xSleep)(sqlite3_vfs*, int microseconds);
1485
+ int (*xCurrentTime)(sqlite3_vfs*, double*);
1486
+ int (*xGetLastError)(sqlite3_vfs*, int, char *);
1483
1487
  /*
1484
1488
  ** The methods above are in version 1 of the sqlite_vfs object
1485
1489
  ** definition. Those that follow are added in version 2 or later
1486
1490
  */
1487
- int (*xCurrentTimeInt64)(sqlite3_vfs *, sqlite3_int64 *);
1491
+ int (*xCurrentTimeInt64)(sqlite3_vfs*, sqlite3_int64*);
1488
1492
  /*
1489
1493
  ** The methods above are in versions 1 and 2 of the sqlite_vfs object.
1490
1494
  ** Those below are for version 3 and greater.
1491
1495
  */
1492
- int (*xSetSystemCall)(sqlite3_vfs *, const char *zName, sqlite3_syscall_ptr);
1493
- sqlite3_syscall_ptr (*xGetSystemCall)(sqlite3_vfs *, const char *zName);
1494
- const char *(*xNextSystemCall)(sqlite3_vfs *, const char *zName);
1496
+ int (*xSetSystemCall)(sqlite3_vfs*, const char *zName, sqlite3_syscall_ptr);
1497
+ sqlite3_syscall_ptr (*xGetSystemCall)(sqlite3_vfs*, const char *zName);
1498
+ const char *(*xNextSystemCall)(sqlite3_vfs*, const char *zName);
1495
1499
  /*
1496
1500
  ** The methods above are in versions 1 through 3 of the sqlite_vfs object.
1497
1501
  ** New fields may be appended in future versions. The iVersion
@@ -1519,9 +1523,9 @@ struct sqlite3_vfs {
1519
1523
  ** currently unused, though it might be used in a future release of
1520
1524
  ** SQLite.
1521
1525
  */
1522
- #define SQLITE_ACCESS_EXISTS 0
1523
- #define SQLITE_ACCESS_READWRITE 1 /* Used by PRAGMA temp_store_directory */
1524
- #define SQLITE_ACCESS_READ 2 /* Unused */
1526
+ #define SQLITE_ACCESS_EXISTS 0
1527
+ #define SQLITE_ACCESS_READWRITE 1 /* Used by PRAGMA temp_store_directory */
1528
+ #define SQLITE_ACCESS_READ 2 /* Unused */
1525
1529
 
1526
1530
  /*
1527
1531
  ** CAPI3REF: Flags for the xShmLock VFS method
@@ -1545,10 +1549,10 @@ struct sqlite3_vfs {
1545
1549
  ** between unlocked and EXCLUSIVE. It cannot transition between SHARED
1546
1550
  ** and EXCLUSIVE.
1547
1551
  */
1548
- #define SQLITE_SHM_UNLOCK 1
1549
- #define SQLITE_SHM_LOCK 2
1550
- #define SQLITE_SHM_SHARED 4
1551
- #define SQLITE_SHM_EXCLUSIVE 8
1552
+ #define SQLITE_SHM_UNLOCK 1
1553
+ #define SQLITE_SHM_LOCK 2
1554
+ #define SQLITE_SHM_SHARED 4
1555
+ #define SQLITE_SHM_EXCLUSIVE 8
1552
1556
 
1553
1557
  /*
1554
1558
  ** CAPI3REF: Maximum xShmLock index
@@ -1558,7 +1562,8 @@ struct sqlite3_vfs {
1558
1562
  ** The SQLite core will never attempt to acquire or release a
1559
1563
  ** lock outside of this range
1560
1564
  */
1561
- #define SQLITE_SHM_NLOCK 8
1565
+ #define SQLITE_SHM_NLOCK 8
1566
+
1562
1567
 
1563
1568
  /*
1564
1569
  ** CAPI3REF: Initialize The SQLite Library
@@ -1666,8 +1671,7 @@ SQLITE_API int sqlite3_os_end(void);
1666
1671
  ** are called "anytime configuration options".
1667
1672
  ** ^If sqlite3_config() is called after [sqlite3_initialize()] and before
1668
1673
  ** [sqlite3_shutdown()] with a first argument that is not an anytime
1669
- ** configuration option, then the sqlite3_config() call will return
1670
- *SQLITE_MISUSE.
1674
+ ** configuration option, then the sqlite3_config() call will return SQLITE_MISUSE.
1671
1675
  ** Note, however, that ^sqlite3_config() can be called as part of the
1672
1676
  ** implementation of an application-defined [sqlite3_os_init()].
1673
1677
  **
@@ -1694,7 +1698,7 @@ SQLITE_API int sqlite3_config(int, ...);
1694
1698
  ** ^Calls to sqlite3_db_config() return SQLITE_OK if and only if
1695
1699
  ** the call is considered successful.
1696
1700
  */
1697
- SQLITE_API int sqlite3_db_config(sqlite3 *, int op, ...);
1701
+ SQLITE_API int sqlite3_db_config(sqlite3*, int op, ...);
1698
1702
 
1699
1703
  /*
1700
1704
  ** CAPI3REF: Memory Allocation Routines
@@ -1761,14 +1765,14 @@ SQLITE_API int sqlite3_db_config(sqlite3 *, int op, ...);
1761
1765
  */
1762
1766
  typedef struct sqlite3_mem_methods sqlite3_mem_methods;
1763
1767
  struct sqlite3_mem_methods {
1764
- void *(*xMalloc)(int); /* Memory allocation function */
1765
- void (*xFree)(void *); /* Free a prior allocation */
1766
- void *(*xRealloc)(void *, int); /* Resize an allocation */
1767
- int (*xSize)(void *); /* Return the size of an allocation */
1768
- int (*xRoundup)(int); /* Round up request size to allocation size */
1769
- int (*xInit)(void *); /* Initialize the memory allocator */
1770
- void (*xShutdown)(void *); /* Deinitialize the memory allocator */
1771
- void *pAppData; /* Argument to xInit() and xShutdown() */
1768
+ void *(*xMalloc)(int); /* Memory allocation function */
1769
+ void (*xFree)(void*); /* Free a prior allocation */
1770
+ void *(*xRealloc)(void*,int); /* Resize an allocation */
1771
+ int (*xSize)(void*); /* Return the size of an allocation */
1772
+ int (*xRoundup)(int); /* Round up request size to allocation size */
1773
+ int (*xInit)(void*); /* Initialize the memory allocator */
1774
+ void (*xShutdown)(void*); /* Deinitialize the memory allocator */
1775
+ void *pAppData; /* Argument to xInit() and xShutdown() */
1772
1776
  };
1773
1777
 
1774
1778
  /*
@@ -2139,37 +2143,54 @@ struct sqlite3_mem_methods {
2139
2143
  ** configuration setting is never used, then the default maximum is determined
2140
2144
  ** by the [SQLITE_MEMDB_DEFAULT_MAXSIZE] compile-time option. If that
2141
2145
  ** compile-time option is not set, then the default maximum is 1073741824.
2146
+ **
2147
+ ** [[SQLITE_CONFIG_ROWID_IN_VIEW]]
2148
+ ** <dt>SQLITE_CONFIG_ROWID_IN_VIEW
2149
+ ** <dd>The SQLITE_CONFIG_ROWID_IN_VIEW option enables or disables the ability
2150
+ ** for VIEWs to have a ROWID. The capability can only be enabled if SQLite is
2151
+ ** compiled with -DSQLITE_ALLOW_ROWID_IN_VIEW, in which case the capability
2152
+ ** defaults to on. This configuration option queries the current setting or
2153
+ ** changes the setting to off or on. The argument is a pointer to an integer.
2154
+ ** If that integer initially holds a value of 1, then the ability for VIEWs to
2155
+ ** have ROWIDs is activated. If the integer initially holds zero, then the
2156
+ ** ability is deactivated. Any other initial value for the integer leaves the
2157
+ ** setting unchanged. After changes, if any, the integer is written with
2158
+ ** a 1 or 0, if the ability for VIEWs to have ROWIDs is on or off. If SQLite
2159
+ ** is compiled without -DSQLITE_ALLOW_ROWID_IN_VIEW (which is the usual and
2160
+ ** recommended case) then the integer is always filled with zero, regardless
2161
+ ** if its initial value.
2142
2162
  ** </dl>
2143
2163
  */
2144
- #define SQLITE_CONFIG_SINGLETHREAD 1 /* nil */
2145
- #define SQLITE_CONFIG_MULTITHREAD 2 /* nil */
2146
- #define SQLITE_CONFIG_SERIALIZED 3 /* nil */
2147
- #define SQLITE_CONFIG_MALLOC 4 /* sqlite3_mem_methods* */
2148
- #define SQLITE_CONFIG_GETMALLOC 5 /* sqlite3_mem_methods* */
2149
- #define SQLITE_CONFIG_SCRATCH 6 /* No longer used */
2150
- #define SQLITE_CONFIG_PAGECACHE 7 /* void*, int sz, int N */
2151
- #define SQLITE_CONFIG_HEAP 8 /* void*, int nByte, int min */
2152
- #define SQLITE_CONFIG_MEMSTATUS 9 /* boolean */
2153
- #define SQLITE_CONFIG_MUTEX 10 /* sqlite3_mutex_methods* */
2154
- #define SQLITE_CONFIG_GETMUTEX 11 /* sqlite3_mutex_methods* */
2164
+ #define SQLITE_CONFIG_SINGLETHREAD 1 /* nil */
2165
+ #define SQLITE_CONFIG_MULTITHREAD 2 /* nil */
2166
+ #define SQLITE_CONFIG_SERIALIZED 3 /* nil */
2167
+ #define SQLITE_CONFIG_MALLOC 4 /* sqlite3_mem_methods* */
2168
+ #define SQLITE_CONFIG_GETMALLOC 5 /* sqlite3_mem_methods* */
2169
+ #define SQLITE_CONFIG_SCRATCH 6 /* No longer used */
2170
+ #define SQLITE_CONFIG_PAGECACHE 7 /* void*, int sz, int N */
2171
+ #define SQLITE_CONFIG_HEAP 8 /* void*, int nByte, int min */
2172
+ #define SQLITE_CONFIG_MEMSTATUS 9 /* boolean */
2173
+ #define SQLITE_CONFIG_MUTEX 10 /* sqlite3_mutex_methods* */
2174
+ #define SQLITE_CONFIG_GETMUTEX 11 /* sqlite3_mutex_methods* */
2155
2175
  /* previously SQLITE_CONFIG_CHUNKALLOC 12 which is now unused. */
2156
- #define SQLITE_CONFIG_LOOKASIDE 13 /* int int */
2157
- #define SQLITE_CONFIG_PCACHE 14 /* no-op */
2158
- #define SQLITE_CONFIG_GETPCACHE 15 /* no-op */
2159
- #define SQLITE_CONFIG_LOG 16 /* xFunc, void* */
2160
- #define SQLITE_CONFIG_URI 17 /* int */
2161
- #define SQLITE_CONFIG_PCACHE2 18 /* sqlite3_pcache_methods2* */
2162
- #define SQLITE_CONFIG_GETPCACHE2 19 /* sqlite3_pcache_methods2* */
2163
- #define SQLITE_CONFIG_COVERING_INDEX_SCAN 20 /* int */
2164
- #define SQLITE_CONFIG_SQLLOG 21 /* xSqllog, void* */
2165
- #define SQLITE_CONFIG_MMAP_SIZE 22 /* sqlite3_int64, sqlite3_int64 */
2166
- #define SQLITE_CONFIG_WIN32_HEAPSIZE 23 /* int nByte */
2167
- #define SQLITE_CONFIG_PCACHE_HDRSZ 24 /* int *psz */
2168
- #define SQLITE_CONFIG_PMASZ 25 /* unsigned int szPma */
2169
- #define SQLITE_CONFIG_STMTJRNL_SPILL 26 /* int nByte */
2170
- #define SQLITE_CONFIG_SMALL_MALLOC 27 /* boolean */
2171
- #define SQLITE_CONFIG_SORTERREF_SIZE 28 /* int nByte */
2172
- #define SQLITE_CONFIG_MEMDB_MAXSIZE 29 /* sqlite3_int64 */
2176
+ #define SQLITE_CONFIG_LOOKASIDE 13 /* int int */
2177
+ #define SQLITE_CONFIG_PCACHE 14 /* no-op */
2178
+ #define SQLITE_CONFIG_GETPCACHE 15 /* no-op */
2179
+ #define SQLITE_CONFIG_LOG 16 /* xFunc, void* */
2180
+ #define SQLITE_CONFIG_URI 17 /* int */
2181
+ #define SQLITE_CONFIG_PCACHE2 18 /* sqlite3_pcache_methods2* */
2182
+ #define SQLITE_CONFIG_GETPCACHE2 19 /* sqlite3_pcache_methods2* */
2183
+ #define SQLITE_CONFIG_COVERING_INDEX_SCAN 20 /* int */
2184
+ #define SQLITE_CONFIG_SQLLOG 21 /* xSqllog, void* */
2185
+ #define SQLITE_CONFIG_MMAP_SIZE 22 /* sqlite3_int64, sqlite3_int64 */
2186
+ #define SQLITE_CONFIG_WIN32_HEAPSIZE 23 /* int nByte */
2187
+ #define SQLITE_CONFIG_PCACHE_HDRSZ 24 /* int *psz */
2188
+ #define SQLITE_CONFIG_PMASZ 25 /* unsigned int szPma */
2189
+ #define SQLITE_CONFIG_STMTJRNL_SPILL 26 /* int nByte */
2190
+ #define SQLITE_CONFIG_SMALL_MALLOC 27 /* boolean */
2191
+ #define SQLITE_CONFIG_SORTERREF_SIZE 28 /* int nByte */
2192
+ #define SQLITE_CONFIG_MEMDB_MAXSIZE 29 /* sqlite3_int64 */
2193
+ #define SQLITE_CONFIG_ROWID_IN_VIEW 30 /* int* */
2173
2194
 
2174
2195
  /*
2175
2196
  ** CAPI3REF: Database Connection Configuration Options
@@ -2489,27 +2510,27 @@ struct sqlite3_mem_methods {
2489
2510
  **
2490
2511
  ** </dl>
2491
2512
  */
2492
- #define SQLITE_DBCONFIG_MAINDBNAME 1000 /* const char* */
2493
- #define SQLITE_DBCONFIG_LOOKASIDE 1001 /* void* int int */
2494
- #define SQLITE_DBCONFIG_ENABLE_FKEY 1002 /* int int* */
2495
- #define SQLITE_DBCONFIG_ENABLE_TRIGGER 1003 /* int int* */
2513
+ #define SQLITE_DBCONFIG_MAINDBNAME 1000 /* const char* */
2514
+ #define SQLITE_DBCONFIG_LOOKASIDE 1001 /* void* int int */
2515
+ #define SQLITE_DBCONFIG_ENABLE_FKEY 1002 /* int int* */
2516
+ #define SQLITE_DBCONFIG_ENABLE_TRIGGER 1003 /* int int* */
2496
2517
  #define SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER 1004 /* int int* */
2497
2518
  #define SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION 1005 /* int int* */
2498
- #define SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE 1006 /* int int* */
2499
- #define SQLITE_DBCONFIG_ENABLE_QPSG 1007 /* int int* */
2500
- #define SQLITE_DBCONFIG_TRIGGER_EQP 1008 /* int int* */
2501
- #define SQLITE_DBCONFIG_RESET_DATABASE 1009 /* int int* */
2502
- #define SQLITE_DBCONFIG_DEFENSIVE 1010 /* int int* */
2503
- #define SQLITE_DBCONFIG_WRITABLE_SCHEMA 1011 /* int int* */
2504
- #define SQLITE_DBCONFIG_LEGACY_ALTER_TABLE 1012 /* int int* */
2505
- #define SQLITE_DBCONFIG_DQS_DML 1013 /* int int* */
2506
- #define SQLITE_DBCONFIG_DQS_DDL 1014 /* int int* */
2507
- #define SQLITE_DBCONFIG_ENABLE_VIEW 1015 /* int int* */
2508
- #define SQLITE_DBCONFIG_LEGACY_FILE_FORMAT 1016 /* int int* */
2509
- #define SQLITE_DBCONFIG_TRUSTED_SCHEMA 1017 /* int int* */
2510
- #define SQLITE_DBCONFIG_STMT_SCANSTATUS 1018 /* int int* */
2511
- #define SQLITE_DBCONFIG_REVERSE_SCANORDER 1019 /* int int* */
2512
- #define SQLITE_DBCONFIG_MAX 1019 /* Largest DBCONFIG */
2519
+ #define SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE 1006 /* int int* */
2520
+ #define SQLITE_DBCONFIG_ENABLE_QPSG 1007 /* int int* */
2521
+ #define SQLITE_DBCONFIG_TRIGGER_EQP 1008 /* int int* */
2522
+ #define SQLITE_DBCONFIG_RESET_DATABASE 1009 /* int int* */
2523
+ #define SQLITE_DBCONFIG_DEFENSIVE 1010 /* int int* */
2524
+ #define SQLITE_DBCONFIG_WRITABLE_SCHEMA 1011 /* int int* */
2525
+ #define SQLITE_DBCONFIG_LEGACY_ALTER_TABLE 1012 /* int int* */
2526
+ #define SQLITE_DBCONFIG_DQS_DML 1013 /* int int* */
2527
+ #define SQLITE_DBCONFIG_DQS_DDL 1014 /* int int* */
2528
+ #define SQLITE_DBCONFIG_ENABLE_VIEW 1015 /* int int* */
2529
+ #define SQLITE_DBCONFIG_LEGACY_FILE_FORMAT 1016 /* int int* */
2530
+ #define SQLITE_DBCONFIG_TRUSTED_SCHEMA 1017 /* int int* */
2531
+ #define SQLITE_DBCONFIG_STMT_SCANSTATUS 1018 /* int int* */
2532
+ #define SQLITE_DBCONFIG_REVERSE_SCANORDER 1019 /* int int* */
2533
+ #define SQLITE_DBCONFIG_MAX 1019 /* Largest DBCONFIG */
2513
2534
 
2514
2535
  /*
2515
2536
  ** CAPI3REF: Enable Or Disable Extended Result Codes
@@ -2519,7 +2540,7 @@ struct sqlite3_mem_methods {
2519
2540
  ** [extended result codes] feature of SQLite. ^The extended result
2520
2541
  ** codes are disabled by default for historical compatibility.
2521
2542
  */
2522
- SQLITE_API int sqlite3_extended_result_codes(sqlite3 *, int onoff);
2543
+ SQLITE_API int sqlite3_extended_result_codes(sqlite3*, int onoff);
2523
2544
 
2524
2545
  /*
2525
2546
  ** CAPI3REF: Last Insert Rowid
@@ -2581,7 +2602,7 @@ SQLITE_API int sqlite3_extended_result_codes(sqlite3 *, int onoff);
2581
2602
  ** unpredictable and might not equal either the old or the new
2582
2603
  ** last insert [rowid].
2583
2604
  */
2584
- SQLITE_API sqlite3_int64 sqlite3_last_insert_rowid(sqlite3 *);
2605
+ SQLITE_API sqlite3_int64 sqlite3_last_insert_rowid(sqlite3*);
2585
2606
 
2586
2607
  /*
2587
2608
  ** CAPI3REF: Set the Last Insert Rowid value.
@@ -2591,7 +2612,7 @@ SQLITE_API sqlite3_int64 sqlite3_last_insert_rowid(sqlite3 *);
2591
2612
  ** set the value returned by calling sqlite3_last_insert_rowid(D) to R
2592
2613
  ** without inserting a row into the database.
2593
2614
  */
2594
- SQLITE_API void sqlite3_set_last_insert_rowid(sqlite3 *, sqlite3_int64);
2615
+ SQLITE_API void sqlite3_set_last_insert_rowid(sqlite3*,sqlite3_int64);
2595
2616
 
2596
2617
  /*
2597
2618
  ** CAPI3REF: Count The Number Of Rows Modified
@@ -2652,8 +2673,8 @@ SQLITE_API void sqlite3_set_last_insert_rowid(sqlite3 *, sqlite3_int64);
2652
2673
  ** <li> the [data_version pragma]
2653
2674
  ** </ul>
2654
2675
  */
2655
- SQLITE_API int sqlite3_changes(sqlite3 *);
2656
- SQLITE_API sqlite3_int64 sqlite3_changes64(sqlite3 *);
2676
+ SQLITE_API int sqlite3_changes(sqlite3*);
2677
+ SQLITE_API sqlite3_int64 sqlite3_changes64(sqlite3*);
2657
2678
 
2658
2679
  /*
2659
2680
  ** CAPI3REF: Total Number Of Rows Modified
@@ -2694,8 +2715,8 @@ SQLITE_API sqlite3_int64 sqlite3_changes64(sqlite3 *);
2694
2715
  ** <li> the [SQLITE_FCNTL_DATA_VERSION] [file control]
2695
2716
  ** </ul>
2696
2717
  */
2697
- SQLITE_API int sqlite3_total_changes(sqlite3 *);
2698
- SQLITE_API sqlite3_int64 sqlite3_total_changes64(sqlite3 *);
2718
+ SQLITE_API int sqlite3_total_changes(sqlite3*);
2719
+ SQLITE_API sqlite3_int64 sqlite3_total_changes64(sqlite3*);
2699
2720
 
2700
2721
  /*
2701
2722
  ** CAPI3REF: Interrupt A Long-Running Query
@@ -2736,8 +2757,8 @@ SQLITE_API sqlite3_int64 sqlite3_total_changes64(sqlite3 *);
2736
2757
  ** or not an interrupt is currently in effect for [database connection] D.
2737
2758
  ** It returns 1 if an interrupt is currently in effect, or 0 otherwise.
2738
2759
  */
2739
- SQLITE_API void sqlite3_interrupt(sqlite3 *);
2740
- SQLITE_API int sqlite3_is_interrupted(sqlite3 *);
2760
+ SQLITE_API void sqlite3_interrupt(sqlite3*);
2761
+ SQLITE_API int sqlite3_is_interrupted(sqlite3*);
2741
2762
 
2742
2763
  /*
2743
2764
  ** CAPI3REF: Determine If An SQL Statement Is Complete
@@ -2834,7 +2855,7 @@ SQLITE_API int sqlite3_complete16(const void *sql);
2834
2855
  ** A busy handler must not close the database connection
2835
2856
  ** or [prepared statement] that invoked the busy handler.
2836
2857
  */
2837
- SQLITE_API int sqlite3_busy_handler(sqlite3 *, int (*)(void *, int), void *);
2858
+ SQLITE_API int sqlite3_busy_handler(sqlite3*,int(*)(void*,int),void*);
2838
2859
 
2839
2860
  /*
2840
2861
  ** CAPI3REF: Set A Busy Timeout
@@ -2857,7 +2878,7 @@ SQLITE_API int sqlite3_busy_handler(sqlite3 *, int (*)(void *, int), void *);
2857
2878
  **
2858
2879
  ** See also: [PRAGMA busy_timeout]
2859
2880
  */
2860
- SQLITE_API int sqlite3_busy_timeout(sqlite3 *, int ms);
2881
+ SQLITE_API int sqlite3_busy_timeout(sqlite3*, int ms);
2861
2882
 
2862
2883
  /*
2863
2884
  ** CAPI3REF: Convenience Routines For Running Queries
@@ -2932,13 +2953,13 @@ SQLITE_API int sqlite3_busy_timeout(sqlite3 *, int ms);
2932
2953
  ** reflected in subsequent calls to [sqlite3_errcode()] or
2933
2954
  ** [sqlite3_errmsg()].
2934
2955
  */
2935
- SQLITE_API int
2936
- sqlite3_get_table(sqlite3 *db, /* An open database */
2937
- const char *zSql, /* SQL to be evaluated */
2938
- char ***pazResult, /* Results of the query */
2939
- int *pnRow, /* Number of result rows written here */
2940
- int *pnColumn, /* Number of result columns written here */
2941
- char **pzErrmsg /* Error msg written here */
2956
+ SQLITE_API int sqlite3_get_table(
2957
+ sqlite3 *db, /* An open database */
2958
+ const char *zSql, /* SQL to be evaluated */
2959
+ char ***pazResult, /* Results of the query */
2960
+ int *pnRow, /* Number of result rows written here */
2961
+ int *pnColumn, /* Number of result columns written here */
2962
+ char **pzErrmsg /* Error msg written here */
2942
2963
  );
2943
2964
  SQLITE_API void sqlite3_free_table(char **result);
2944
2965
 
@@ -2982,10 +3003,10 @@ SQLITE_API void sqlite3_free_table(char **result);
2982
3003
  **
2983
3004
  ** See also: [built-in printf()], [printf() SQL function]
2984
3005
  */
2985
- SQLITE_API char *sqlite3_mprintf(const char *, ...);
2986
- SQLITE_API char *sqlite3_vmprintf(const char *, va_list);
2987
- SQLITE_API char *sqlite3_snprintf(int, char *, const char *, ...);
2988
- SQLITE_API char *sqlite3_vsnprintf(int, char *, const char *, va_list);
3006
+ SQLITE_API char *sqlite3_mprintf(const char*,...);
3007
+ SQLITE_API char *sqlite3_vmprintf(const char*, va_list);
3008
+ SQLITE_API char *sqlite3_snprintf(int,char*,const char*, ...);
3009
+ SQLITE_API char *sqlite3_vsnprintf(int,char*,const char*, va_list);
2989
3010
 
2990
3011
  /*
2991
3012
  ** CAPI3REF: Memory Allocation Subsystem
@@ -3064,10 +3085,10 @@ SQLITE_API char *sqlite3_vsnprintf(int, char *, const char *, va_list);
3064
3085
  */
3065
3086
  SQLITE_API void *sqlite3_malloc(int);
3066
3087
  SQLITE_API void *sqlite3_malloc64(sqlite3_uint64);
3067
- SQLITE_API void *sqlite3_realloc(void *, int);
3068
- SQLITE_API void *sqlite3_realloc64(void *, sqlite3_uint64);
3069
- SQLITE_API void sqlite3_free(void *);
3070
- SQLITE_API sqlite3_uint64 sqlite3_msize(void *);
3088
+ SQLITE_API void *sqlite3_realloc(void*, int);
3089
+ SQLITE_API void *sqlite3_realloc64(void*, sqlite3_uint64);
3090
+ SQLITE_API void sqlite3_free(void*);
3091
+ SQLITE_API sqlite3_uint64 sqlite3_msize(void*);
3071
3092
 
3072
3093
  /*
3073
3094
  ** CAPI3REF: Memory Allocator Statistics
@@ -3207,11 +3228,11 @@ SQLITE_API void sqlite3_randomness(int N, void *P);
3207
3228
  ** as stated in the previous paragraph, sqlite3_step() invokes
3208
3229
  ** sqlite3_prepare_v2() to reprepare a statement after a schema change.
3209
3230
  */
3210
- SQLITE_API int sqlite3_set_authorizer(sqlite3 *,
3211
- int (*xAuth)(void *, int, const char *,
3212
- const char *, const char *,
3213
- const char *),
3214
- void *pUserData);
3231
+ SQLITE_API int sqlite3_set_authorizer(
3232
+ sqlite3*,
3233
+ int (*xAuth)(void*,int,const char*,const char*,const char*,const char*),
3234
+ void *pUserData
3235
+ );
3215
3236
 
3216
3237
  /*
3217
3238
  ** CAPI3REF: Authorizer Return Codes
@@ -3225,8 +3246,8 @@ SQLITE_API int sqlite3_set_authorizer(sqlite3 *,
3225
3246
  ** Note that SQLITE_IGNORE is also used as a [conflict resolution mode]
3226
3247
  ** returned from the [sqlite3_vtab_on_conflict()] interface.
3227
3248
  */
3228
- #define SQLITE_DENY 1 /* Abort the SQL statement with an error */
3229
- #define SQLITE_IGNORE 2 /* Don't allow access, but don't generate an error */
3249
+ #define SQLITE_DENY 1 /* Abort the SQL statement with an error */
3250
+ #define SQLITE_IGNORE 2 /* Don't allow access, but don't generate an error */
3230
3251
 
3231
3252
  /*
3232
3253
  ** CAPI3REF: Authorizer Action Codes
@@ -3248,44 +3269,44 @@ SQLITE_API int sqlite3_set_authorizer(sqlite3 *,
3248
3269
  ** top-level SQL code.
3249
3270
  */
3250
3271
  /******************************************* 3rd ************ 4th ***********/
3251
- #define SQLITE_CREATE_INDEX 1 /* Index Name Table Name */
3252
- #define SQLITE_CREATE_TABLE 2 /* Table Name NULL */
3253
- #define SQLITE_CREATE_TEMP_INDEX 3 /* Index Name Table Name */
3254
- #define SQLITE_CREATE_TEMP_TABLE 4 /* Table Name NULL */
3255
- #define SQLITE_CREATE_TEMP_TRIGGER 5 /* Trigger Name Table Name */
3256
- #define SQLITE_CREATE_TEMP_VIEW 6 /* View Name NULL */
3257
- #define SQLITE_CREATE_TRIGGER 7 /* Trigger Name Table Name */
3258
- #define SQLITE_CREATE_VIEW 8 /* View Name NULL */
3259
- #define SQLITE_DELETE 9 /* Table Name NULL */
3260
- #define SQLITE_DROP_INDEX 10 /* Index Name Table Name */
3261
- #define SQLITE_DROP_TABLE 11 /* Table Name NULL */
3262
- #define SQLITE_DROP_TEMP_INDEX 12 /* Index Name Table Name */
3263
- #define SQLITE_DROP_TEMP_TABLE 13 /* Table Name NULL */
3264
- #define SQLITE_DROP_TEMP_TRIGGER 14 /* Trigger Name Table Name */
3265
- #define SQLITE_DROP_TEMP_VIEW 15 /* View Name NULL */
3266
- #define SQLITE_DROP_TRIGGER 16 /* Trigger Name Table Name */
3267
- #define SQLITE_DROP_VIEW 17 /* View Name NULL */
3268
- #define SQLITE_INSERT 18 /* Table Name NULL */
3269
- #define SQLITE_PRAGMA 19 /* Pragma Name 1st arg or NULL */
3270
- #define SQLITE_READ 20 /* Table Name Column Name */
3271
- #define SQLITE_SELECT 21 /* NULL NULL */
3272
- #define SQLITE_TRANSACTION 22 /* Operation NULL */
3273
- #define SQLITE_UPDATE 23 /* Table Name Column Name */
3274
- #define SQLITE_ATTACH 24 /* Filename NULL */
3275
- #define SQLITE_DETACH 25 /* Database Name NULL */
3276
- #define SQLITE_ALTER_TABLE 26 /* Database Name Table Name */
3277
- #define SQLITE_REINDEX 27 /* Index Name NULL */
3278
- #define SQLITE_ANALYZE 28 /* Table Name NULL */
3279
- #define SQLITE_CREATE_VTABLE 29 /* Table Name Module Name */
3280
- #define SQLITE_DROP_VTABLE 30 /* Table Name Module Name */
3281
- #define SQLITE_FUNCTION 31 /* NULL Function Name */
3282
- #define SQLITE_SAVEPOINT 32 /* Operation Savepoint Name */
3283
- #define SQLITE_COPY 0 /* No longer used */
3284
- #define SQLITE_RECURSIVE 33 /* NULL NULL */
3285
-
3286
- /*
3287
- ** CAPI3REF: Tracing And Profiling Functions
3288
- ** METHOD: sqlite3
3272
+ #define SQLITE_CREATE_INDEX 1 /* Index Name Table Name */
3273
+ #define SQLITE_CREATE_TABLE 2 /* Table Name NULL */
3274
+ #define SQLITE_CREATE_TEMP_INDEX 3 /* Index Name Table Name */
3275
+ #define SQLITE_CREATE_TEMP_TABLE 4 /* Table Name NULL */
3276
+ #define SQLITE_CREATE_TEMP_TRIGGER 5 /* Trigger Name Table Name */
3277
+ #define SQLITE_CREATE_TEMP_VIEW 6 /* View Name NULL */
3278
+ #define SQLITE_CREATE_TRIGGER 7 /* Trigger Name Table Name */
3279
+ #define SQLITE_CREATE_VIEW 8 /* View Name NULL */
3280
+ #define SQLITE_DELETE 9 /* Table Name NULL */
3281
+ #define SQLITE_DROP_INDEX 10 /* Index Name Table Name */
3282
+ #define SQLITE_DROP_TABLE 11 /* Table Name NULL */
3283
+ #define SQLITE_DROP_TEMP_INDEX 12 /* Index Name Table Name */
3284
+ #define SQLITE_DROP_TEMP_TABLE 13 /* Table Name NULL */
3285
+ #define SQLITE_DROP_TEMP_TRIGGER 14 /* Trigger Name Table Name */
3286
+ #define SQLITE_DROP_TEMP_VIEW 15 /* View Name NULL */
3287
+ #define SQLITE_DROP_TRIGGER 16 /* Trigger Name Table Name */
3288
+ #define SQLITE_DROP_VIEW 17 /* View Name NULL */
3289
+ #define SQLITE_INSERT 18 /* Table Name NULL */
3290
+ #define SQLITE_PRAGMA 19 /* Pragma Name 1st arg or NULL */
3291
+ #define SQLITE_READ 20 /* Table Name Column Name */
3292
+ #define SQLITE_SELECT 21 /* NULL NULL */
3293
+ #define SQLITE_TRANSACTION 22 /* Operation NULL */
3294
+ #define SQLITE_UPDATE 23 /* Table Name Column Name */
3295
+ #define SQLITE_ATTACH 24 /* Filename NULL */
3296
+ #define SQLITE_DETACH 25 /* Database Name NULL */
3297
+ #define SQLITE_ALTER_TABLE 26 /* Database Name Table Name */
3298
+ #define SQLITE_REINDEX 27 /* Index Name NULL */
3299
+ #define SQLITE_ANALYZE 28 /* Table Name NULL */
3300
+ #define SQLITE_CREATE_VTABLE 29 /* Table Name Module Name */
3301
+ #define SQLITE_DROP_VTABLE 30 /* Table Name Module Name */
3302
+ #define SQLITE_FUNCTION 31 /* NULL Function Name */
3303
+ #define SQLITE_SAVEPOINT 32 /* Operation Savepoint Name */
3304
+ #define SQLITE_COPY 0 /* No longer used */
3305
+ #define SQLITE_RECURSIVE 33 /* NULL NULL */
3306
+
3307
+ /*
3308
+ ** CAPI3REF: Deprecated Tracing And Profiling Functions
3309
+ ** DEPRECATED
3289
3310
  **
3290
3311
  ** These routines are deprecated. Use the [sqlite3_trace_v2()] interface
3291
3312
  ** instead of the routines described here.
@@ -3315,11 +3336,10 @@ SQLITE_API int sqlite3_set_authorizer(sqlite3 *,
3315
3336
  ** either [sqlite3_trace()] or [sqlite3_trace_v2()] will cancel the
3316
3337
  ** profile callback.
3317
3338
  */
3318
- SQLITE_API SQLITE_DEPRECATED void *
3319
- sqlite3_trace(sqlite3 *, void (*xTrace)(void *, const char *), void *);
3320
- SQLITE_API SQLITE_DEPRECATED void *
3321
- sqlite3_profile(sqlite3 *,
3322
- void (*xProfile)(void *, const char *, sqlite3_uint64), void *);
3339
+ SQLITE_API SQLITE_DEPRECATED void *sqlite3_trace(sqlite3*,
3340
+ void(*xTrace)(void*,const char*), void*);
3341
+ SQLITE_API SQLITE_DEPRECATED void *sqlite3_profile(sqlite3*,
3342
+ void(*xProfile)(void*,const char*,sqlite3_uint64), void*);
3323
3343
 
3324
3344
  /*
3325
3345
  ** CAPI3REF: SQL Trace Event Codes
@@ -3373,10 +3393,10 @@ sqlite3_profile(sqlite3 *,
3373
3393
  ** and the X argument is unused.
3374
3394
  ** </dl>
3375
3395
  */
3376
- #define SQLITE_TRACE_STMT 0x01
3377
- #define SQLITE_TRACE_PROFILE 0x02
3378
- #define SQLITE_TRACE_ROW 0x04
3379
- #define SQLITE_TRACE_CLOSE 0x08
3396
+ #define SQLITE_TRACE_STMT 0x01
3397
+ #define SQLITE_TRACE_PROFILE 0x02
3398
+ #define SQLITE_TRACE_ROW 0x04
3399
+ #define SQLITE_TRACE_CLOSE 0x08
3380
3400
 
3381
3401
  /*
3382
3402
  ** CAPI3REF: SQL Trace Hook
@@ -3409,10 +3429,12 @@ sqlite3_profile(sqlite3 *,
3409
3429
  ** interfaces [sqlite3_trace()] and [sqlite3_profile()], both of which
3410
3430
  ** are deprecated.
3411
3431
  */
3412
- SQLITE_API int sqlite3_trace_v2(sqlite3 *, unsigned uMask,
3413
- int (*xCallback)(unsigned, void *, void *,
3414
- void *),
3415
- void *pCtx);
3432
+ SQLITE_API int sqlite3_trace_v2(
3433
+ sqlite3*,
3434
+ unsigned uMask,
3435
+ int(*xCallback)(unsigned,void*,void*,void*),
3436
+ void *pCtx
3437
+ );
3416
3438
 
3417
3439
  /*
3418
3440
  ** CAPI3REF: Query Progress Callbacks
@@ -3453,8 +3475,7 @@ SQLITE_API int sqlite3_trace_v2(sqlite3 *, unsigned uMask,
3453
3475
  ** invoked directly from [sqlite3_prepare()] while analyzing and generating
3454
3476
  ** code for complex queries.
3455
3477
  */
3456
- SQLITE_API void sqlite3_progress_handler(sqlite3 *, int, int (*)(void *),
3457
- void *);
3478
+ SQLITE_API void sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*);
3458
3479
 
3459
3480
  /*
3460
3481
  ** CAPI3REF: Opening A New Database Connection
@@ -3734,19 +3755,19 @@ SQLITE_API void sqlite3_progress_handler(sqlite3 *, int, int (*)(void *),
3734
3755
  **
3735
3756
  ** See also: [sqlite3_temp_directory]
3736
3757
  */
3737
- SQLITE_API int
3738
- sqlite3_open(const char *filename, /* Database filename (UTF-8) */
3739
- sqlite3 **ppDb /* OUT: SQLite db handle */
3758
+ SQLITE_API int sqlite3_open(
3759
+ const char *filename, /* Database filename (UTF-8) */
3760
+ sqlite3 **ppDb /* OUT: SQLite db handle */
3740
3761
  );
3741
- SQLITE_API int
3742
- sqlite3_open16(const void *filename, /* Database filename (UTF-16) */
3743
- sqlite3 **ppDb /* OUT: SQLite db handle */
3762
+ SQLITE_API int sqlite3_open16(
3763
+ const void *filename, /* Database filename (UTF-16) */
3764
+ sqlite3 **ppDb /* OUT: SQLite db handle */
3744
3765
  );
3745
- SQLITE_API int
3746
- sqlite3_open_v2(const char *filename, /* Database filename (UTF-8) */
3747
- sqlite3 **ppDb, /* OUT: SQLite db handle */
3748
- int flags, /* Flags */
3749
- const char *zVfs /* Name of VFS module to use */
3766
+ SQLITE_API int sqlite3_open_v2(
3767
+ const char *filename, /* Database filename (UTF-8) */
3768
+ sqlite3 **ppDb, /* OUT: SQLite db handle */
3769
+ int flags, /* Flags */
3770
+ const char *zVfs /* Name of VFS module to use */
3750
3771
  );
3751
3772
 
3752
3773
  /*
@@ -3815,12 +3836,9 @@ sqlite3_open_v2(const char *filename, /* Database filename (UTF-8) */
3815
3836
  **
3816
3837
  ** See the [URI filename] documentation for additional information.
3817
3838
  */
3818
- SQLITE_API const char *sqlite3_uri_parameter(sqlite3_filename z,
3819
- const char *zParam);
3820
- SQLITE_API int sqlite3_uri_boolean(sqlite3_filename z, const char *zParam,
3821
- int bDefault);
3822
- SQLITE_API sqlite3_int64 sqlite3_uri_int64(sqlite3_filename, const char *,
3823
- sqlite3_int64);
3839
+ SQLITE_API const char *sqlite3_uri_parameter(sqlite3_filename z, const char *zParam);
3840
+ SQLITE_API int sqlite3_uri_boolean(sqlite3_filename z, const char *zParam, int bDefault);
3841
+ SQLITE_API sqlite3_int64 sqlite3_uri_int64(sqlite3_filename, const char*, sqlite3_int64);
3824
3842
  SQLITE_API const char *sqlite3_uri_key(sqlite3_filename z, int N);
3825
3843
 
3826
3844
  /*
@@ -3871,7 +3889,7 @@ SQLITE_API const char *sqlite3_filename_wal(sqlite3_filename);
3871
3889
  ** of this routine results in undefined and probably undesirable
3872
3890
  ** behavior.
3873
3891
  */
3874
- SQLITE_API sqlite3_file *sqlite3_database_file_object(const char *);
3892
+ SQLITE_API sqlite3_file *sqlite3_database_file_object(const char*);
3875
3893
 
3876
3894
  /*
3877
3895
  ** CAPI3REF: Create and Destroy VFS Filenames
@@ -3918,11 +3936,13 @@ SQLITE_API sqlite3_file *sqlite3_database_file_object(const char *);
3918
3936
  ** then the corresponding [sqlite3_module.xClose() method should also be
3919
3937
  ** invoked prior to calling sqlite3_free_filename(Y).
3920
3938
  */
3921
- SQLITE_API sqlite3_filename sqlite3_create_filename(const char *zDatabase,
3922
- const char *zJournal,
3923
- const char *zWal,
3924
- int nParam,
3925
- const char **azParam);
3939
+ SQLITE_API sqlite3_filename sqlite3_create_filename(
3940
+ const char *zDatabase,
3941
+ const char *zJournal,
3942
+ const char *zWal,
3943
+ int nParam,
3944
+ const char **azParam
3945
+ );
3926
3946
  SQLITE_API void sqlite3_free_filename(sqlite3_filename);
3927
3947
 
3928
3948
  /*
@@ -3990,8 +4010,8 @@ SQLITE_API void sqlite3_free_filename(sqlite3_filename);
3990
4010
  */
3991
4011
  SQLITE_API int sqlite3_errcode(sqlite3 *db);
3992
4012
  SQLITE_API int sqlite3_extended_errcode(sqlite3 *db);
3993
- SQLITE_API const char *sqlite3_errmsg(sqlite3 *);
3994
- SQLITE_API const void *sqlite3_errmsg16(sqlite3 *);
4013
+ SQLITE_API const char *sqlite3_errmsg(sqlite3*);
4014
+ SQLITE_API const void *sqlite3_errmsg16(sqlite3*);
3995
4015
  SQLITE_API const char *sqlite3_errstr(int);
3996
4016
  SQLITE_API int sqlite3_error_offset(sqlite3 *db);
3997
4017
 
@@ -4061,7 +4081,7 @@ typedef struct sqlite3_stmt sqlite3_stmt;
4061
4081
  **
4062
4082
  ** New run-time limit categories may be added in future releases.
4063
4083
  */
4064
- SQLITE_API int sqlite3_limit(sqlite3 *, int id, int newVal);
4084
+ SQLITE_API int sqlite3_limit(sqlite3*, int id, int newVal);
4065
4085
 
4066
4086
  /*
4067
4087
  ** CAPI3REF: Run-Time Limit Categories
@@ -4119,18 +4139,18 @@ SQLITE_API int sqlite3_limit(sqlite3 *, int id, int newVal);
4119
4139
  ** [prepared statement] may start.</dd>)^
4120
4140
  ** </dl>
4121
4141
  */
4122
- #define SQLITE_LIMIT_LENGTH 0
4123
- #define SQLITE_LIMIT_SQL_LENGTH 1
4124
- #define SQLITE_LIMIT_COLUMN 2
4125
- #define SQLITE_LIMIT_EXPR_DEPTH 3
4126
- #define SQLITE_LIMIT_COMPOUND_SELECT 4
4127
- #define SQLITE_LIMIT_VDBE_OP 5
4128
- #define SQLITE_LIMIT_FUNCTION_ARG 6
4129
- #define SQLITE_LIMIT_ATTACHED 7
4130
- #define SQLITE_LIMIT_LIKE_PATTERN_LENGTH 8
4131
- #define SQLITE_LIMIT_VARIABLE_NUMBER 9
4132
- #define SQLITE_LIMIT_TRIGGER_DEPTH 10
4133
- #define SQLITE_LIMIT_WORKER_THREADS 11
4142
+ #define SQLITE_LIMIT_LENGTH 0
4143
+ #define SQLITE_LIMIT_SQL_LENGTH 1
4144
+ #define SQLITE_LIMIT_COLUMN 2
4145
+ #define SQLITE_LIMIT_EXPR_DEPTH 3
4146
+ #define SQLITE_LIMIT_COMPOUND_SELECT 4
4147
+ #define SQLITE_LIMIT_VDBE_OP 5
4148
+ #define SQLITE_LIMIT_FUNCTION_ARG 6
4149
+ #define SQLITE_LIMIT_ATTACHED 7
4150
+ #define SQLITE_LIMIT_LIKE_PATTERN_LENGTH 8
4151
+ #define SQLITE_LIMIT_VARIABLE_NUMBER 9
4152
+ #define SQLITE_LIMIT_TRIGGER_DEPTH 10
4153
+ #define SQLITE_LIMIT_WORKER_THREADS 11
4134
4154
 
4135
4155
  /*
4136
4156
  ** CAPI3REF: Prepare Flags
@@ -4167,9 +4187,9 @@ SQLITE_API int sqlite3_limit(sqlite3 *, int id, int newVal);
4167
4187
  ** any virtual tables.
4168
4188
  ** </dl>
4169
4189
  */
4170
- #define SQLITE_PREPARE_PERSISTENT 0x01
4171
- #define SQLITE_PREPARE_NORMALIZE 0x02
4172
- #define SQLITE_PREPARE_NO_VTAB 0x04
4190
+ #define SQLITE_PREPARE_PERSISTENT 0x01
4191
+ #define SQLITE_PREPARE_NORMALIZE 0x02
4192
+ #define SQLITE_PREPARE_NO_VTAB 0x04
4173
4193
 
4174
4194
  /*
4175
4195
  ** CAPI3REF: Compiling An SQL Statement
@@ -4271,49 +4291,49 @@ SQLITE_API int sqlite3_limit(sqlite3 *, int id, int newVal);
4271
4291
  ** sqlite3_prepare_v2() interface works exactly the same as
4272
4292
  ** sqlite3_prepare_v3() with a zero prepFlags parameter.
4273
4293
  */
4274
- SQLITE_API int
4275
- sqlite3_prepare(sqlite3 *db, /* Database handle */
4276
- const char *zSql, /* SQL statement, UTF-8 encoded */
4277
- int nByte, /* Maximum length of zSql in bytes. */
4278
- sqlite3_stmt **ppStmt, /* OUT: Statement handle */
4279
- const char **pzTail /* OUT: Pointer to unused portion of zSql */
4294
+ SQLITE_API int sqlite3_prepare(
4295
+ sqlite3 *db, /* Database handle */
4296
+ const char *zSql, /* SQL statement, UTF-8 encoded */
4297
+ int nByte, /* Maximum length of zSql in bytes. */
4298
+ sqlite3_stmt **ppStmt, /* OUT: Statement handle */
4299
+ const char **pzTail /* OUT: Pointer to unused portion of zSql */
4280
4300
  );
4281
4301
  SQLITE_API int sqlite3_prepare_v2(
4282
- sqlite3 *db, /* Database handle */
4283
- const char *zSql, /* SQL statement, UTF-8 encoded */
4284
- int nByte, /* Maximum length of zSql in bytes. */
4285
- sqlite3_stmt **ppStmt, /* OUT: Statement handle */
4286
- const char **pzTail /* OUT: Pointer to unused portion of zSql */
4302
+ sqlite3 *db, /* Database handle */
4303
+ const char *zSql, /* SQL statement, UTF-8 encoded */
4304
+ int nByte, /* Maximum length of zSql in bytes. */
4305
+ sqlite3_stmt **ppStmt, /* OUT: Statement handle */
4306
+ const char **pzTail /* OUT: Pointer to unused portion of zSql */
4287
4307
  );
4288
4308
  SQLITE_API int sqlite3_prepare_v3(
4289
- sqlite3 *db, /* Database handle */
4290
- const char *zSql, /* SQL statement, UTF-8 encoded */
4291
- int nByte, /* Maximum length of zSql in bytes. */
4292
- unsigned int prepFlags, /* Zero or more SQLITE_PREPARE_ flags */
4293
- sqlite3_stmt **ppStmt, /* OUT: Statement handle */
4294
- const char **pzTail /* OUT: Pointer to unused portion of zSql */
4309
+ sqlite3 *db, /* Database handle */
4310
+ const char *zSql, /* SQL statement, UTF-8 encoded */
4311
+ int nByte, /* Maximum length of zSql in bytes. */
4312
+ unsigned int prepFlags, /* Zero or more SQLITE_PREPARE_ flags */
4313
+ sqlite3_stmt **ppStmt, /* OUT: Statement handle */
4314
+ const char **pzTail /* OUT: Pointer to unused portion of zSql */
4295
4315
  );
4296
4316
  SQLITE_API int sqlite3_prepare16(
4297
- sqlite3 *db, /* Database handle */
4298
- const void *zSql, /* SQL statement, UTF-16 encoded */
4299
- int nByte, /* Maximum length of zSql in bytes. */
4300
- sqlite3_stmt **ppStmt, /* OUT: Statement handle */
4301
- const void **pzTail /* OUT: Pointer to unused portion of zSql */
4317
+ sqlite3 *db, /* Database handle */
4318
+ const void *zSql, /* SQL statement, UTF-16 encoded */
4319
+ int nByte, /* Maximum length of zSql in bytes. */
4320
+ sqlite3_stmt **ppStmt, /* OUT: Statement handle */
4321
+ const void **pzTail /* OUT: Pointer to unused portion of zSql */
4302
4322
  );
4303
4323
  SQLITE_API int sqlite3_prepare16_v2(
4304
- sqlite3 *db, /* Database handle */
4305
- const void *zSql, /* SQL statement, UTF-16 encoded */
4306
- int nByte, /* Maximum length of zSql in bytes. */
4307
- sqlite3_stmt **ppStmt, /* OUT: Statement handle */
4308
- const void **pzTail /* OUT: Pointer to unused portion of zSql */
4324
+ sqlite3 *db, /* Database handle */
4325
+ const void *zSql, /* SQL statement, UTF-16 encoded */
4326
+ int nByte, /* Maximum length of zSql in bytes. */
4327
+ sqlite3_stmt **ppStmt, /* OUT: Statement handle */
4328
+ const void **pzTail /* OUT: Pointer to unused portion of zSql */
4309
4329
  );
4310
4330
  SQLITE_API int sqlite3_prepare16_v3(
4311
- sqlite3 *db, /* Database handle */
4312
- const void *zSql, /* SQL statement, UTF-16 encoded */
4313
- int nByte, /* Maximum length of zSql in bytes. */
4314
- unsigned int prepFlags, /* Zero or more SQLITE_PREPARE_ flags */
4315
- sqlite3_stmt **ppStmt, /* OUT: Statement handle */
4316
- const void **pzTail /* OUT: Pointer to unused portion of zSql */
4331
+ sqlite3 *db, /* Database handle */
4332
+ const void *zSql, /* SQL statement, UTF-16 encoded */
4333
+ int nByte, /* Maximum length of zSql in bytes. */
4334
+ unsigned int prepFlags, /* Zero or more SQLITE_PREPARE_ flags */
4335
+ sqlite3_stmt **ppStmt, /* OUT: Statement handle */
4336
+ const void **pzTail /* OUT: Pointer to unused portion of zSql */
4317
4337
  );
4318
4338
 
4319
4339
  /*
@@ -4478,7 +4498,7 @@ SQLITE_API int sqlite3_stmt_explain(sqlite3_stmt *pStmt, int eMode);
4478
4498
  ** for example, in diagnostic routines to search for prepared
4479
4499
  ** statements that are holding a transaction open.
4480
4500
  */
4481
- SQLITE_API int sqlite3_stmt_busy(sqlite3_stmt *);
4501
+ SQLITE_API int sqlite3_stmt_busy(sqlite3_stmt*);
4482
4502
 
4483
4503
  /*
4484
4504
  ** CAPI3REF: Dynamically Typed Value Object
@@ -4678,26 +4698,21 @@ typedef struct sqlite3_context sqlite3_context;
4678
4698
  ** See also: [sqlite3_bind_parameter_count()],
4679
4699
  ** [sqlite3_bind_parameter_name()], and [sqlite3_bind_parameter_index()].
4680
4700
  */
4681
- SQLITE_API int sqlite3_bind_blob(sqlite3_stmt *, int, const void *, int n,
4682
- void (*)(void *));
4683
- SQLITE_API int sqlite3_bind_blob64(sqlite3_stmt *, int, const void *,
4684
- sqlite3_uint64, void (*)(void *));
4685
- SQLITE_API int sqlite3_bind_double(sqlite3_stmt *, int, double);
4686
- SQLITE_API int sqlite3_bind_int(sqlite3_stmt *, int, int);
4687
- SQLITE_API int sqlite3_bind_int64(sqlite3_stmt *, int, sqlite3_int64);
4688
- SQLITE_API int sqlite3_bind_null(sqlite3_stmt *, int);
4689
- SQLITE_API int sqlite3_bind_text(sqlite3_stmt *, int, const char *, int,
4690
- void (*)(void *));
4691
- SQLITE_API int sqlite3_bind_text16(sqlite3_stmt *, int, const void *, int,
4692
- void (*)(void *));
4693
- SQLITE_API int sqlite3_bind_text64(sqlite3_stmt *, int, const char *,
4694
- sqlite3_uint64, void (*)(void *),
4695
- unsigned char encoding);
4696
- SQLITE_API int sqlite3_bind_value(sqlite3_stmt *, int, const sqlite3_value *);
4697
- SQLITE_API int sqlite3_bind_pointer(sqlite3_stmt *, int, void *, const char *,
4698
- void (*)(void *));
4699
- SQLITE_API int sqlite3_bind_zeroblob(sqlite3_stmt *, int, int n);
4700
- SQLITE_API int sqlite3_bind_zeroblob64(sqlite3_stmt *, int, sqlite3_uint64);
4701
+ SQLITE_API int sqlite3_bind_blob(sqlite3_stmt*, int, const void*, int n, void(*)(void*));
4702
+ SQLITE_API int sqlite3_bind_blob64(sqlite3_stmt*, int, const void*, sqlite3_uint64,
4703
+ void(*)(void*));
4704
+ SQLITE_API int sqlite3_bind_double(sqlite3_stmt*, int, double);
4705
+ SQLITE_API int sqlite3_bind_int(sqlite3_stmt*, int, int);
4706
+ SQLITE_API int sqlite3_bind_int64(sqlite3_stmt*, int, sqlite3_int64);
4707
+ SQLITE_API int sqlite3_bind_null(sqlite3_stmt*, int);
4708
+ SQLITE_API int sqlite3_bind_text(sqlite3_stmt*,int,const char*,int,void(*)(void*));
4709
+ SQLITE_API int sqlite3_bind_text16(sqlite3_stmt*, int, const void*, int, void(*)(void*));
4710
+ SQLITE_API int sqlite3_bind_text64(sqlite3_stmt*, int, const char*, sqlite3_uint64,
4711
+ void(*)(void*), unsigned char encoding);
4712
+ SQLITE_API int sqlite3_bind_value(sqlite3_stmt*, int, const sqlite3_value*);
4713
+ SQLITE_API int sqlite3_bind_pointer(sqlite3_stmt*, int, void*, const char*,void(*)(void*));
4714
+ SQLITE_API int sqlite3_bind_zeroblob(sqlite3_stmt*, int, int n);
4715
+ SQLITE_API int sqlite3_bind_zeroblob64(sqlite3_stmt*, int, sqlite3_uint64);
4701
4716
 
4702
4717
  /*
4703
4718
  ** CAPI3REF: Number Of SQL Parameters
@@ -4718,7 +4733,7 @@ SQLITE_API int sqlite3_bind_zeroblob64(sqlite3_stmt *, int, sqlite3_uint64);
4718
4733
  ** [sqlite3_bind_parameter_name()], and
4719
4734
  ** [sqlite3_bind_parameter_index()].
4720
4735
  */
4721
- SQLITE_API int sqlite3_bind_parameter_count(sqlite3_stmt *);
4736
+ SQLITE_API int sqlite3_bind_parameter_count(sqlite3_stmt*);
4722
4737
 
4723
4738
  /*
4724
4739
  ** CAPI3REF: Name Of A Host Parameter
@@ -4746,7 +4761,7 @@ SQLITE_API int sqlite3_bind_parameter_count(sqlite3_stmt *);
4746
4761
  ** [sqlite3_bind_parameter_count()], and
4747
4762
  ** [sqlite3_bind_parameter_index()].
4748
4763
  */
4749
- SQLITE_API const char *sqlite3_bind_parameter_name(sqlite3_stmt *, int);
4764
+ SQLITE_API const char *sqlite3_bind_parameter_name(sqlite3_stmt*, int);
4750
4765
 
4751
4766
  /*
4752
4767
  ** CAPI3REF: Index Of A Parameter With A Given Name
@@ -4764,7 +4779,7 @@ SQLITE_API const char *sqlite3_bind_parameter_name(sqlite3_stmt *, int);
4764
4779
  ** [sqlite3_bind_parameter_count()], and
4765
4780
  ** [sqlite3_bind_parameter_name()].
4766
4781
  */
4767
- SQLITE_API int sqlite3_bind_parameter_index(sqlite3_stmt *, const char *zName);
4782
+ SQLITE_API int sqlite3_bind_parameter_index(sqlite3_stmt*, const char *zName);
4768
4783
 
4769
4784
  /*
4770
4785
  ** CAPI3REF: Reset All Bindings On A Prepared Statement
@@ -4774,7 +4789,7 @@ SQLITE_API int sqlite3_bind_parameter_index(sqlite3_stmt *, const char *zName);
4774
4789
  ** the [sqlite3_bind_blob | bindings] on a [prepared statement].
4775
4790
  ** ^Use this routine to reset all host parameters to NULL.
4776
4791
  */
4777
- SQLITE_API int sqlite3_clear_bindings(sqlite3_stmt *);
4792
+ SQLITE_API int sqlite3_clear_bindings(sqlite3_stmt*);
4778
4793
 
4779
4794
  /*
4780
4795
  ** CAPI3REF: Number Of Columns In A Result Set
@@ -4819,8 +4834,8 @@ SQLITE_API int sqlite3_column_count(sqlite3_stmt *pStmt);
4819
4834
  ** then the name of the column is unspecified and may change from
4820
4835
  ** one release of SQLite to the next.
4821
4836
  */
4822
- SQLITE_API const char *sqlite3_column_name(sqlite3_stmt *, int N);
4823
- SQLITE_API const void *sqlite3_column_name16(sqlite3_stmt *, int N);
4837
+ SQLITE_API const char *sqlite3_column_name(sqlite3_stmt*, int N);
4838
+ SQLITE_API const void *sqlite3_column_name16(sqlite3_stmt*, int N);
4824
4839
 
4825
4840
  /*
4826
4841
  ** CAPI3REF: Source Of Data In A Query Result
@@ -4864,12 +4879,12 @@ SQLITE_API const void *sqlite3_column_name16(sqlite3_stmt *, int N);
4864
4879
  ** for the same [prepared statement] and result column
4865
4880
  ** at the same time then the results are undefined.
4866
4881
  */
4867
- SQLITE_API const char *sqlite3_column_database_name(sqlite3_stmt *, int);
4868
- SQLITE_API const void *sqlite3_column_database_name16(sqlite3_stmt *, int);
4869
- SQLITE_API const char *sqlite3_column_table_name(sqlite3_stmt *, int);
4870
- SQLITE_API const void *sqlite3_column_table_name16(sqlite3_stmt *, int);
4871
- SQLITE_API const char *sqlite3_column_origin_name(sqlite3_stmt *, int);
4872
- SQLITE_API const void *sqlite3_column_origin_name16(sqlite3_stmt *, int);
4882
+ SQLITE_API const char *sqlite3_column_database_name(sqlite3_stmt*,int);
4883
+ SQLITE_API const void *sqlite3_column_database_name16(sqlite3_stmt*,int);
4884
+ SQLITE_API const char *sqlite3_column_table_name(sqlite3_stmt*,int);
4885
+ SQLITE_API const void *sqlite3_column_table_name16(sqlite3_stmt*,int);
4886
+ SQLITE_API const char *sqlite3_column_origin_name(sqlite3_stmt*,int);
4887
+ SQLITE_API const void *sqlite3_column_origin_name16(sqlite3_stmt*,int);
4873
4888
 
4874
4889
  /*
4875
4890
  ** CAPI3REF: Declared Datatype Of A Query Result
@@ -4901,8 +4916,8 @@ SQLITE_API const void *sqlite3_column_origin_name16(sqlite3_stmt *, int);
4901
4916
  ** is associated with individual values, not with the containers
4902
4917
  ** used to hold those values.
4903
4918
  */
4904
- SQLITE_API const char *sqlite3_column_decltype(sqlite3_stmt *, int);
4905
- SQLITE_API const void *sqlite3_column_decltype16(sqlite3_stmt *, int);
4919
+ SQLITE_API const char *sqlite3_column_decltype(sqlite3_stmt*,int);
4920
+ SQLITE_API const void *sqlite3_column_decltype16(sqlite3_stmt*,int);
4906
4921
 
4907
4922
  /*
4908
4923
  ** CAPI3REF: Evaluate An SQL Statement
@@ -4986,7 +5001,7 @@ SQLITE_API const void *sqlite3_column_decltype16(sqlite3_stmt *, int);
4986
5001
  ** then the more specific [error codes] are returned directly
4987
5002
  ** by sqlite3_step(). The use of the "vX" interfaces is recommended.
4988
5003
  */
4989
- SQLITE_API int sqlite3_step(sqlite3_stmt *);
5004
+ SQLITE_API int sqlite3_step(sqlite3_stmt*);
4990
5005
 
4991
5006
  /*
4992
5007
  ** CAPI3REF: Number of columns in a result set
@@ -5030,16 +5045,16 @@ SQLITE_API int sqlite3_data_count(sqlite3_stmt *pStmt);
5030
5045
  ** SQLite version 2 and SQLite version 3 should use SQLITE3_TEXT, not
5031
5046
  ** SQLITE_TEXT.
5032
5047
  */
5033
- #define SQLITE_INTEGER 1
5034
- #define SQLITE_FLOAT 2
5035
- #define SQLITE_BLOB 4
5036
- #define SQLITE_NULL 5
5048
+ #define SQLITE_INTEGER 1
5049
+ #define SQLITE_FLOAT 2
5050
+ #define SQLITE_BLOB 4
5051
+ #define SQLITE_NULL 5
5037
5052
  #ifdef SQLITE_TEXT
5038
- #undef SQLITE_TEXT
5053
+ # undef SQLITE_TEXT
5039
5054
  #else
5040
- #define SQLITE_TEXT 3
5055
+ # define SQLITE_TEXT 3
5041
5056
  #endif
5042
- #define SQLITE3_TEXT 3
5057
+ #define SQLITE3_TEXT 3
5043
5058
 
5044
5059
  /*
5045
5060
  ** CAPI3REF: Result Values From A Query
@@ -5254,16 +5269,16 @@ SQLITE_API int sqlite3_data_count(sqlite3_stmt *pStmt);
5254
5269
  ** return value is obtained and before any
5255
5270
  ** other SQLite interface is called on the same [database connection].
5256
5271
  */
5257
- SQLITE_API const void *sqlite3_column_blob(sqlite3_stmt *, int iCol);
5258
- SQLITE_API double sqlite3_column_double(sqlite3_stmt *, int iCol);
5259
- SQLITE_API int sqlite3_column_int(sqlite3_stmt *, int iCol);
5260
- SQLITE_API sqlite3_int64 sqlite3_column_int64(sqlite3_stmt *, int iCol);
5261
- SQLITE_API const unsigned char *sqlite3_column_text(sqlite3_stmt *, int iCol);
5262
- SQLITE_API const void *sqlite3_column_text16(sqlite3_stmt *, int iCol);
5263
- SQLITE_API sqlite3_value *sqlite3_column_value(sqlite3_stmt *, int iCol);
5264
- SQLITE_API int sqlite3_column_bytes(sqlite3_stmt *, int iCol);
5265
- SQLITE_API int sqlite3_column_bytes16(sqlite3_stmt *, int iCol);
5266
- SQLITE_API int sqlite3_column_type(sqlite3_stmt *, int iCol);
5272
+ SQLITE_API const void *sqlite3_column_blob(sqlite3_stmt*, int iCol);
5273
+ SQLITE_API double sqlite3_column_double(sqlite3_stmt*, int iCol);
5274
+ SQLITE_API int sqlite3_column_int(sqlite3_stmt*, int iCol);
5275
+ SQLITE_API sqlite3_int64 sqlite3_column_int64(sqlite3_stmt*, int iCol);
5276
+ SQLITE_API const unsigned char *sqlite3_column_text(sqlite3_stmt*, int iCol);
5277
+ SQLITE_API const void *sqlite3_column_text16(sqlite3_stmt*, int iCol);
5278
+ SQLITE_API sqlite3_value *sqlite3_column_value(sqlite3_stmt*, int iCol);
5279
+ SQLITE_API int sqlite3_column_bytes(sqlite3_stmt*, int iCol);
5280
+ SQLITE_API int sqlite3_column_bytes16(sqlite3_stmt*, int iCol);
5281
+ SQLITE_API int sqlite3_column_type(sqlite3_stmt*, int iCol);
5267
5282
 
5268
5283
  /*
5269
5284
  ** CAPI3REF: Destroy A Prepared Statement Object
@@ -5332,6 +5347,7 @@ SQLITE_API int sqlite3_finalize(sqlite3_stmt *pStmt);
5332
5347
  */
5333
5348
  SQLITE_API int sqlite3_reset(sqlite3_stmt *pStmt);
5334
5349
 
5350
+
5335
5351
  /*
5336
5352
  ** CAPI3REF: Create Or Redefine SQL Functions
5337
5353
  ** KEYWORDS: {function creation routines}
@@ -5455,28 +5471,49 @@ SQLITE_API int sqlite3_reset(sqlite3_stmt *pStmt);
5455
5471
  ** close the database connection nor finalize or reset the prepared
5456
5472
  ** statement in which the function is running.
5457
5473
  */
5458
- SQLITE_API int
5459
- sqlite3_create_function(sqlite3 *db, const char *zFunctionName, int nArg,
5460
- int eTextRep, void *pApp,
5461
- void (*xFunc)(sqlite3_context *, int, sqlite3_value **),
5462
- void (*xStep)(sqlite3_context *, int, sqlite3_value **),
5463
- void (*xFinal)(sqlite3_context *));
5474
+ SQLITE_API int sqlite3_create_function(
5475
+ sqlite3 *db,
5476
+ const char *zFunctionName,
5477
+ int nArg,
5478
+ int eTextRep,
5479
+ void *pApp,
5480
+ void (*xFunc)(sqlite3_context*,int,sqlite3_value**),
5481
+ void (*xStep)(sqlite3_context*,int,sqlite3_value**),
5482
+ void (*xFinal)(sqlite3_context*)
5483
+ );
5464
5484
  SQLITE_API int sqlite3_create_function16(
5465
- sqlite3 *db, const void *zFunctionName, int nArg, int eTextRep, void *pApp,
5466
- void (*xFunc)(sqlite3_context *, int, sqlite3_value **),
5467
- void (*xStep)(sqlite3_context *, int, sqlite3_value **),
5468
- void (*xFinal)(sqlite3_context *));
5485
+ sqlite3 *db,
5486
+ const void *zFunctionName,
5487
+ int nArg,
5488
+ int eTextRep,
5489
+ void *pApp,
5490
+ void (*xFunc)(sqlite3_context*,int,sqlite3_value**),
5491
+ void (*xStep)(sqlite3_context*,int,sqlite3_value**),
5492
+ void (*xFinal)(sqlite3_context*)
5493
+ );
5469
5494
  SQLITE_API int sqlite3_create_function_v2(
5470
- sqlite3 *db, const char *zFunctionName, int nArg, int eTextRep, void *pApp,
5471
- void (*xFunc)(sqlite3_context *, int, sqlite3_value **),
5472
- void (*xStep)(sqlite3_context *, int, sqlite3_value **),
5473
- void (*xFinal)(sqlite3_context *), void (*xDestroy)(void *));
5495
+ sqlite3 *db,
5496
+ const char *zFunctionName,
5497
+ int nArg,
5498
+ int eTextRep,
5499
+ void *pApp,
5500
+ void (*xFunc)(sqlite3_context*,int,sqlite3_value**),
5501
+ void (*xStep)(sqlite3_context*,int,sqlite3_value**),
5502
+ void (*xFinal)(sqlite3_context*),
5503
+ void(*xDestroy)(void*)
5504
+ );
5474
5505
  SQLITE_API int sqlite3_create_window_function(
5475
- sqlite3 *db, const char *zFunctionName, int nArg, int eTextRep, void *pApp,
5476
- void (*xStep)(sqlite3_context *, int, sqlite3_value **),
5477
- void (*xFinal)(sqlite3_context *), void (*xValue)(sqlite3_context *),
5478
- void (*xInverse)(sqlite3_context *, int, sqlite3_value **),
5479
- void (*xDestroy)(void *));
5506
+ sqlite3 *db,
5507
+ const char *zFunctionName,
5508
+ int nArg,
5509
+ int eTextRep,
5510
+ void *pApp,
5511
+ void (*xStep)(sqlite3_context*,int,sqlite3_value**),
5512
+ void (*xFinal)(sqlite3_context*),
5513
+ void (*xValue)(sqlite3_context*),
5514
+ void (*xInverse)(sqlite3_context*,int,sqlite3_value**),
5515
+ void(*xDestroy)(void*)
5516
+ );
5480
5517
 
5481
5518
  /*
5482
5519
  ** CAPI3REF: Text Encodings
@@ -5484,12 +5521,12 @@ SQLITE_API int sqlite3_create_window_function(
5484
5521
  ** These constant define integer codes that represent the various
5485
5522
  ** text encodings supported by SQLite.
5486
5523
  */
5487
- #define SQLITE_UTF8 1 /* IMP: R-37514-35566 */
5488
- #define SQLITE_UTF16LE 2 /* IMP: R-03371-37637 */
5489
- #define SQLITE_UTF16BE 3 /* IMP: R-51971-34154 */
5490
- #define SQLITE_UTF16 4 /* Use native byte order */
5491
- #define SQLITE_ANY 5 /* Deprecated */
5492
- #define SQLITE_UTF16_ALIGNED 8 /* sqlite3_create_collation only */
5524
+ #define SQLITE_UTF8 1 /* IMP: R-37514-35566 */
5525
+ #define SQLITE_UTF16LE 2 /* IMP: R-03371-37637 */
5526
+ #define SQLITE_UTF16BE 3 /* IMP: R-51971-34154 */
5527
+ #define SQLITE_UTF16 4 /* Use native byte order */
5528
+ #define SQLITE_ANY 5 /* Deprecated */
5529
+ #define SQLITE_UTF16_ALIGNED 8 /* sqlite3_create_collation only */
5493
5530
 
5494
5531
  /*
5495
5532
  ** CAPI3REF: Function Flags
@@ -5581,11 +5618,11 @@ SQLITE_API int sqlite3_create_window_function(
5581
5618
  ** </dd>
5582
5619
  ** </dl>
5583
5620
  */
5584
- #define SQLITE_DETERMINISTIC 0x000000800
5585
- #define SQLITE_DIRECTONLY 0x000080000
5586
- #define SQLITE_SUBTYPE 0x000100000
5587
- #define SQLITE_INNOCUOUS 0x000200000
5588
- #define SQLITE_RESULT_SUBTYPE 0x001000000
5621
+ #define SQLITE_DETERMINISTIC 0x000000800
5622
+ #define SQLITE_DIRECTONLY 0x000080000
5623
+ #define SQLITE_SUBTYPE 0x000100000
5624
+ #define SQLITE_INNOCUOUS 0x000200000
5625
+ #define SQLITE_RESULT_SUBTYPE 0x001000000
5589
5626
 
5590
5627
  /*
5591
5628
  ** CAPI3REF: Deprecated Functions
@@ -5598,15 +5635,13 @@ SQLITE_API int sqlite3_create_window_function(
5598
5635
  ** these functions, we will not explain what they do.
5599
5636
  */
5600
5637
  #ifndef SQLITE_OMIT_DEPRECATED
5601
- SQLITE_API SQLITE_DEPRECATED int sqlite3_aggregate_count(sqlite3_context *);
5602
- SQLITE_API SQLITE_DEPRECATED int sqlite3_expired(sqlite3_stmt *);
5603
- SQLITE_API SQLITE_DEPRECATED int sqlite3_transfer_bindings(sqlite3_stmt *,
5604
- sqlite3_stmt *);
5638
+ SQLITE_API SQLITE_DEPRECATED int sqlite3_aggregate_count(sqlite3_context*);
5639
+ SQLITE_API SQLITE_DEPRECATED int sqlite3_expired(sqlite3_stmt*);
5640
+ SQLITE_API SQLITE_DEPRECATED int sqlite3_transfer_bindings(sqlite3_stmt*, sqlite3_stmt*);
5605
5641
  SQLITE_API SQLITE_DEPRECATED int sqlite3_global_recover(void);
5606
5642
  SQLITE_API SQLITE_DEPRECATED void sqlite3_thread_cleanup(void);
5607
- SQLITE_API SQLITE_DEPRECATED int
5608
- sqlite3_memory_alarm(void (*)(void *, sqlite3_int64, int), void *,
5609
- sqlite3_int64);
5643
+ SQLITE_API SQLITE_DEPRECATED int sqlite3_memory_alarm(void(*)(void*,sqlite3_int64,int),
5644
+ void*,sqlite3_int64);
5610
5645
  #endif
5611
5646
 
5612
5647
  /*
@@ -5737,21 +5772,21 @@ sqlite3_memory_alarm(void (*)(void *, sqlite3_int64, int), void *,
5737
5772
  ** return value is obtained and before any
5738
5773
  ** other SQLite interface is called on the same [database connection].
5739
5774
  */
5740
- SQLITE_API const void *sqlite3_value_blob(sqlite3_value *);
5741
- SQLITE_API double sqlite3_value_double(sqlite3_value *);
5742
- SQLITE_API int sqlite3_value_int(sqlite3_value *);
5743
- SQLITE_API sqlite3_int64 sqlite3_value_int64(sqlite3_value *);
5744
- SQLITE_API void *sqlite3_value_pointer(sqlite3_value *, const char *);
5745
- SQLITE_API const unsigned char *sqlite3_value_text(sqlite3_value *);
5746
- SQLITE_API const void *sqlite3_value_text16(sqlite3_value *);
5747
- SQLITE_API const void *sqlite3_value_text16le(sqlite3_value *);
5748
- SQLITE_API const void *sqlite3_value_text16be(sqlite3_value *);
5749
- SQLITE_API int sqlite3_value_bytes(sqlite3_value *);
5750
- SQLITE_API int sqlite3_value_bytes16(sqlite3_value *);
5751
- SQLITE_API int sqlite3_value_type(sqlite3_value *);
5752
- SQLITE_API int sqlite3_value_numeric_type(sqlite3_value *);
5753
- SQLITE_API int sqlite3_value_nochange(sqlite3_value *);
5754
- SQLITE_API int sqlite3_value_frombind(sqlite3_value *);
5775
+ SQLITE_API const void *sqlite3_value_blob(sqlite3_value*);
5776
+ SQLITE_API double sqlite3_value_double(sqlite3_value*);
5777
+ SQLITE_API int sqlite3_value_int(sqlite3_value*);
5778
+ SQLITE_API sqlite3_int64 sqlite3_value_int64(sqlite3_value*);
5779
+ SQLITE_API void *sqlite3_value_pointer(sqlite3_value*, const char*);
5780
+ SQLITE_API const unsigned char *sqlite3_value_text(sqlite3_value*);
5781
+ SQLITE_API const void *sqlite3_value_text16(sqlite3_value*);
5782
+ SQLITE_API const void *sqlite3_value_text16le(sqlite3_value*);
5783
+ SQLITE_API const void *sqlite3_value_text16be(sqlite3_value*);
5784
+ SQLITE_API int sqlite3_value_bytes(sqlite3_value*);
5785
+ SQLITE_API int sqlite3_value_bytes16(sqlite3_value*);
5786
+ SQLITE_API int sqlite3_value_type(sqlite3_value*);
5787
+ SQLITE_API int sqlite3_value_numeric_type(sqlite3_value*);
5788
+ SQLITE_API int sqlite3_value_nochange(sqlite3_value*);
5789
+ SQLITE_API int sqlite3_value_frombind(sqlite3_value*);
5755
5790
 
5756
5791
  /*
5757
5792
  ** CAPI3REF: Report the internal text encoding state of an sqlite3_value object
@@ -5762,8 +5797,7 @@ SQLITE_API int sqlite3_value_frombind(sqlite3_value *);
5762
5797
  ** of the value X, assuming that X has type TEXT.)^ If sqlite3_value_type(X)
5763
5798
  ** returns something other than SQLITE_TEXT, then the return value from
5764
5799
  ** sqlite3_value_encoding(X) is meaningless. ^Calls to
5765
- ** [sqlite3_value_text(X)], [sqlite3_value_text16(X)],
5766
- *[sqlite3_value_text16be(X)],
5800
+ ** [sqlite3_value_text(X)], [sqlite3_value_text16(X)], [sqlite3_value_text16be(X)],
5767
5801
  ** [sqlite3_value_text16le(X)], [sqlite3_value_bytes(X)], or
5768
5802
  ** [sqlite3_value_bytes16(X)] might change the encoding of the value X and
5769
5803
  ** thus change the return from subsequent calls to sqlite3_value_encoding(X).
@@ -5774,7 +5808,7 @@ SQLITE_API int sqlite3_value_frombind(sqlite3_value *);
5774
5808
  ** not need to know what the internal state of an sqlite3_value object is and
5775
5809
  ** hence should not need to use this interface.
5776
5810
  */
5777
- SQLITE_API int sqlite3_value_encoding(sqlite3_value *);
5811
+ SQLITE_API int sqlite3_value_encoding(sqlite3_value*);
5778
5812
 
5779
5813
  /*
5780
5814
  ** CAPI3REF: Finding The Subtype Of SQL Values
@@ -5792,7 +5826,7 @@ SQLITE_API int sqlite3_value_encoding(sqlite3_value *);
5792
5826
  ** If the [SQLITE_SUBTYPE] property is omitted, then sqlite3_value_subtype()
5793
5827
  ** might return zero instead of the upstream subtype in some corner cases.
5794
5828
  */
5795
- SQLITE_API unsigned int sqlite3_value_subtype(sqlite3_value *);
5829
+ SQLITE_API unsigned int sqlite3_value_subtype(sqlite3_value*);
5796
5830
 
5797
5831
  /*
5798
5832
  ** CAPI3REF: Copy And Free SQL Values
@@ -5809,8 +5843,8 @@ SQLITE_API unsigned int sqlite3_value_subtype(sqlite3_value *);
5809
5843
  ** previously obtained from [sqlite3_value_dup()]. ^If V is a NULL pointer
5810
5844
  ** then sqlite3_value_free(V) is a harmless no-op.
5811
5845
  */
5812
- SQLITE_API sqlite3_value *sqlite3_value_dup(const sqlite3_value *);
5813
- SQLITE_API void sqlite3_value_free(sqlite3_value *);
5846
+ SQLITE_API sqlite3_value *sqlite3_value_dup(const sqlite3_value*);
5847
+ SQLITE_API void sqlite3_value_free(sqlite3_value*);
5814
5848
 
5815
5849
  /*
5816
5850
  ** CAPI3REF: Obtain Aggregate Function Context
@@ -5855,7 +5889,7 @@ SQLITE_API void sqlite3_value_free(sqlite3_value *);
5855
5889
  ** This routine must be called from the same thread in which
5856
5890
  ** the aggregate SQL function is running.
5857
5891
  */
5858
- SQLITE_API void *sqlite3_aggregate_context(sqlite3_context *, int nBytes);
5892
+ SQLITE_API void *sqlite3_aggregate_context(sqlite3_context*, int nBytes);
5859
5893
 
5860
5894
  /*
5861
5895
  ** CAPI3REF: User Data For Functions
@@ -5870,7 +5904,7 @@ SQLITE_API void *sqlite3_aggregate_context(sqlite3_context *, int nBytes);
5870
5904
  ** This routine must be called from the same thread in which
5871
5905
  ** the application-defined function is running.
5872
5906
  */
5873
- SQLITE_API void *sqlite3_user_data(sqlite3_context *);
5907
+ SQLITE_API void *sqlite3_user_data(sqlite3_context*);
5874
5908
 
5875
5909
  /*
5876
5910
  ** CAPI3REF: Database Connection For Functions
@@ -5882,7 +5916,7 @@ SQLITE_API void *sqlite3_user_data(sqlite3_context *);
5882
5916
  ** and [sqlite3_create_function16()] routines that originally
5883
5917
  ** registered the application defined function.
5884
5918
  */
5885
- SQLITE_API sqlite3 *sqlite3_context_db_handle(sqlite3_context *);
5919
+ SQLITE_API sqlite3 *sqlite3_context_db_handle(sqlite3_context*);
5886
5920
 
5887
5921
  /*
5888
5922
  ** CAPI3REF: Function Auxiliary Data
@@ -5894,14 +5928,12 @@ SQLITE_API sqlite3 *sqlite3_context_db_handle(sqlite3_context *);
5894
5928
  ** query execution, under some circumstances the associated auxiliary data
5895
5929
  ** might be preserved. An example of where this might be useful is in a
5896
5930
  ** regular-expression matching function. The compiled version of the regular
5897
- ** expression can be stored as auxiliary data associated with the pattern
5898
- *string.
5931
+ ** expression can be stored as auxiliary data associated with the pattern string.
5899
5932
  ** Then as long as the pattern string remains the same,
5900
5933
  ** the compiled regular expression can be reused on multiple
5901
5934
  ** invocations of the same function.
5902
5935
  **
5903
- ** ^The sqlite3_get_auxdata(C,N) interface returns a pointer to the auxiliary
5904
- *data
5936
+ ** ^The sqlite3_get_auxdata(C,N) interface returns a pointer to the auxiliary data
5905
5937
  ** associated by the sqlite3_set_auxdata(C,N,P,X) function with the Nth argument
5906
5938
  ** value to the application-defined function. ^N is zero for the left-most
5907
5939
  ** function argument. ^If there is no auxiliary data
@@ -5953,9 +5985,8 @@ SQLITE_API sqlite3 *sqlite3_context_db_handle(sqlite3_context *);
5953
5985
  **
5954
5986
  ** See also: [sqlite3_get_clientdata()] and [sqlite3_set_clientdata()].
5955
5987
  */
5956
- SQLITE_API void *sqlite3_get_auxdata(sqlite3_context *, int N);
5957
- SQLITE_API void sqlite3_set_auxdata(sqlite3_context *, int N, void *,
5958
- void (*)(void *));
5988
+ SQLITE_API void *sqlite3_get_auxdata(sqlite3_context*, int N);
5989
+ SQLITE_API void sqlite3_set_auxdata(sqlite3_context*, int N, void*, void (*)(void*));
5959
5990
 
5960
5991
  /*
5961
5992
  ** CAPI3REF: Database Connection Client Data
@@ -6010,9 +6041,8 @@ SQLITE_API void sqlite3_set_auxdata(sqlite3_context *, int N, void *,
6010
6041
  **
6011
6042
  ** See also: [sqlite3_set_auxdata()] and [sqlite3_get_auxdata()].
6012
6043
  */
6013
- SQLITE_API void *sqlite3_get_clientdata(sqlite3 *, const char *);
6014
- SQLITE_API int sqlite3_set_clientdata(sqlite3 *, const char *, void *,
6015
- void (*)(void *));
6044
+ SQLITE_API void *sqlite3_get_clientdata(sqlite3*,const char*);
6045
+ SQLITE_API int sqlite3_set_clientdata(sqlite3*, const char*, void*, void(*)(void*));
6016
6046
 
6017
6047
  /*
6018
6048
  ** CAPI3REF: Constants Defining Special Destructor Behavior
@@ -6028,9 +6058,9 @@ SQLITE_API int sqlite3_set_clientdata(sqlite3 *, const char *, void *,
6028
6058
  ** The typedef is necessary to work around problems in certain
6029
6059
  ** C++ compilers.
6030
6060
  */
6031
- typedef void (*sqlite3_destructor_type)(void *);
6032
- #define SQLITE_STATIC ((sqlite3_destructor_type)0)
6033
- #define SQLITE_TRANSIENT ((sqlite3_destructor_type)-1)
6061
+ typedef void (*sqlite3_destructor_type)(void*);
6062
+ #define SQLITE_STATIC ((sqlite3_destructor_type)0)
6063
+ #define SQLITE_TRANSIENT ((sqlite3_destructor_type)-1)
6034
6064
 
6035
6065
  /*
6036
6066
  ** CAPI3REF: Setting The Result Of An SQL Function
@@ -6179,35 +6209,29 @@ typedef void (*sqlite3_destructor_type)(void *);
6179
6209
  ** than the one containing the application-defined function that received
6180
6210
  ** the [sqlite3_context] pointer, the results are undefined.
6181
6211
  */
6182
- SQLITE_API void sqlite3_result_blob(sqlite3_context *, const void *, int,
6183
- void (*)(void *));
6184
- SQLITE_API void sqlite3_result_blob64(sqlite3_context *, const void *,
6185
- sqlite3_uint64, void (*)(void *));
6186
- SQLITE_API void sqlite3_result_double(sqlite3_context *, double);
6187
- SQLITE_API void sqlite3_result_error(sqlite3_context *, const char *, int);
6188
- SQLITE_API void sqlite3_result_error16(sqlite3_context *, const void *, int);
6189
- SQLITE_API void sqlite3_result_error_toobig(sqlite3_context *);
6190
- SQLITE_API void sqlite3_result_error_nomem(sqlite3_context *);
6191
- SQLITE_API void sqlite3_result_error_code(sqlite3_context *, int);
6192
- SQLITE_API void sqlite3_result_int(sqlite3_context *, int);
6193
- SQLITE_API void sqlite3_result_int64(sqlite3_context *, sqlite3_int64);
6194
- SQLITE_API void sqlite3_result_null(sqlite3_context *);
6195
- SQLITE_API void sqlite3_result_text(sqlite3_context *, const char *, int,
6196
- void (*)(void *));
6197
- SQLITE_API void sqlite3_result_text64(sqlite3_context *, const char *,
6198
- sqlite3_uint64, void (*)(void *),
6199
- unsigned char encoding);
6200
- SQLITE_API void sqlite3_result_text16(sqlite3_context *, const void *, int,
6201
- void (*)(void *));
6202
- SQLITE_API void sqlite3_result_text16le(sqlite3_context *, const void *, int,
6203
- void (*)(void *));
6204
- SQLITE_API void sqlite3_result_text16be(sqlite3_context *, const void *, int,
6205
- void (*)(void *));
6206
- SQLITE_API void sqlite3_result_value(sqlite3_context *, sqlite3_value *);
6207
- SQLITE_API void sqlite3_result_pointer(sqlite3_context *, void *, const char *,
6208
- void (*)(void *));
6209
- SQLITE_API void sqlite3_result_zeroblob(sqlite3_context *, int n);
6210
- SQLITE_API int sqlite3_result_zeroblob64(sqlite3_context *, sqlite3_uint64 n);
6212
+ SQLITE_API void sqlite3_result_blob(sqlite3_context*, const void*, int, void(*)(void*));
6213
+ SQLITE_API void sqlite3_result_blob64(sqlite3_context*,const void*,
6214
+ sqlite3_uint64,void(*)(void*));
6215
+ SQLITE_API void sqlite3_result_double(sqlite3_context*, double);
6216
+ SQLITE_API void sqlite3_result_error(sqlite3_context*, const char*, int);
6217
+ SQLITE_API void sqlite3_result_error16(sqlite3_context*, const void*, int);
6218
+ SQLITE_API void sqlite3_result_error_toobig(sqlite3_context*);
6219
+ SQLITE_API void sqlite3_result_error_nomem(sqlite3_context*);
6220
+ SQLITE_API void sqlite3_result_error_code(sqlite3_context*, int);
6221
+ SQLITE_API void sqlite3_result_int(sqlite3_context*, int);
6222
+ SQLITE_API void sqlite3_result_int64(sqlite3_context*, sqlite3_int64);
6223
+ SQLITE_API void sqlite3_result_null(sqlite3_context*);
6224
+ SQLITE_API void sqlite3_result_text(sqlite3_context*, const char*, int, void(*)(void*));
6225
+ SQLITE_API void sqlite3_result_text64(sqlite3_context*, const char*,sqlite3_uint64,
6226
+ void(*)(void*), unsigned char encoding);
6227
+ SQLITE_API void sqlite3_result_text16(sqlite3_context*, const void*, int, void(*)(void*));
6228
+ SQLITE_API void sqlite3_result_text16le(sqlite3_context*, const void*, int,void(*)(void*));
6229
+ SQLITE_API void sqlite3_result_text16be(sqlite3_context*, const void*, int,void(*)(void*));
6230
+ SQLITE_API void sqlite3_result_value(sqlite3_context*, sqlite3_value*);
6231
+ SQLITE_API void sqlite3_result_pointer(sqlite3_context*, void*,const char*,void(*)(void*));
6232
+ SQLITE_API void sqlite3_result_zeroblob(sqlite3_context*, int n);
6233
+ SQLITE_API int sqlite3_result_zeroblob64(sqlite3_context*, sqlite3_uint64 n);
6234
+
6211
6235
 
6212
6236
  /*
6213
6237
  ** CAPI3REF: Setting The Subtype Of An SQL Function
@@ -6235,7 +6259,7 @@ SQLITE_API int sqlite3_result_zeroblob64(sqlite3_context *, sqlite3_uint64 n);
6235
6259
  ** an error. Future versions of SQLite might enable -DSQLITE_STRICT_SUBTYPE=1
6236
6260
  ** by default.
6237
6261
  */
6238
- SQLITE_API void sqlite3_result_subtype(sqlite3_context *, unsigned int);
6262
+ SQLITE_API void sqlite3_result_subtype(sqlite3_context*,unsigned int);
6239
6263
 
6240
6264
  /*
6241
6265
  ** CAPI3REF: Define New Collating Sequences
@@ -6319,15 +6343,27 @@ SQLITE_API void sqlite3_result_subtype(sqlite3_context *, unsigned int);
6319
6343
  ** See also: [sqlite3_collation_needed()] and [sqlite3_collation_needed16()].
6320
6344
  */
6321
6345
  SQLITE_API int sqlite3_create_collation(
6322
- sqlite3 *, const char *zName, int eTextRep, void *pArg,
6323
- int (*xCompare)(void *, int, const void *, int, const void *));
6346
+ sqlite3*,
6347
+ const char *zName,
6348
+ int eTextRep,
6349
+ void *pArg,
6350
+ int(*xCompare)(void*,int,const void*,int,const void*)
6351
+ );
6324
6352
  SQLITE_API int sqlite3_create_collation_v2(
6325
- sqlite3 *, const char *zName, int eTextRep, void *pArg,
6326
- int (*xCompare)(void *, int, const void *, int, const void *),
6327
- void (*xDestroy)(void *));
6353
+ sqlite3*,
6354
+ const char *zName,
6355
+ int eTextRep,
6356
+ void *pArg,
6357
+ int(*xCompare)(void*,int,const void*,int,const void*),
6358
+ void(*xDestroy)(void*)
6359
+ );
6328
6360
  SQLITE_API int sqlite3_create_collation16(
6329
- sqlite3 *, const void *zName, int eTextRep, void *pArg,
6330
- int (*xCompare)(void *, int, const void *, int, const void *));
6361
+ sqlite3*,
6362
+ const void *zName,
6363
+ int eTextRep,
6364
+ void *pArg,
6365
+ int(*xCompare)(void*,int,const void*,int,const void*)
6366
+ );
6331
6367
 
6332
6368
  /*
6333
6369
  ** CAPI3REF: Collation Needed Callbacks
@@ -6356,20 +6392,24 @@ SQLITE_API int sqlite3_create_collation16(
6356
6392
  ** [sqlite3_create_collation()], [sqlite3_create_collation16()], or
6357
6393
  ** [sqlite3_create_collation_v2()].
6358
6394
  */
6359
- SQLITE_API int sqlite3_collation_needed(sqlite3 *, void *,
6360
- void (*)(void *, sqlite3 *,
6361
- int eTextRep, const char *));
6362
- SQLITE_API int sqlite3_collation_needed16(sqlite3 *, void *,
6363
- void (*)(void *, sqlite3 *,
6364
- int eTextRep, const void *));
6395
+ SQLITE_API int sqlite3_collation_needed(
6396
+ sqlite3*,
6397
+ void*,
6398
+ void(*)(void*,sqlite3*,int eTextRep,const char*)
6399
+ );
6400
+ SQLITE_API int sqlite3_collation_needed16(
6401
+ sqlite3*,
6402
+ void*,
6403
+ void(*)(void*,sqlite3*,int eTextRep,const void*)
6404
+ );
6365
6405
 
6366
6406
  #ifdef SQLITE_ENABLE_CEROD
6367
6407
  /*
6368
6408
  ** Specify the activation key for a CEROD database. Unless
6369
6409
  ** activated, none of the CEROD routines will work.
6370
6410
  */
6371
- SQLITE_API void
6372
- sqlite3_activate_cerod(const char *zPassPhrase /* Activation phrase */
6411
+ SQLITE_API void sqlite3_activate_cerod(
6412
+ const char *zPassPhrase /* Activation phrase */
6373
6413
  );
6374
6414
  #endif
6375
6415
 
@@ -6514,13 +6554,11 @@ SQLITE_API SQLITE_EXTERN char *sqlite3_data_directory;
6514
6554
  ** UTF-8 or UTF-16, respectively.
6515
6555
  */
6516
6556
  SQLITE_API int sqlite3_win32_set_directory(
6517
- unsigned long type, /* Identifier for directory being set or reset */
6518
- void *zValue /* New value for directory being set or reset */
6557
+ unsigned long type, /* Identifier for directory being set or reset */
6558
+ void *zValue /* New value for directory being set or reset */
6519
6559
  );
6520
- SQLITE_API int sqlite3_win32_set_directory8(unsigned long type,
6521
- const char *zValue);
6522
- SQLITE_API int sqlite3_win32_set_directory16(unsigned long type,
6523
- const void *zValue);
6560
+ SQLITE_API int sqlite3_win32_set_directory8(unsigned long type, const char *zValue);
6561
+ SQLITE_API int sqlite3_win32_set_directory16(unsigned long type, const void *zValue);
6524
6562
 
6525
6563
  /*
6526
6564
  ** CAPI3REF: Win32 Directory Types
@@ -6528,8 +6566,8 @@ SQLITE_API int sqlite3_win32_set_directory16(unsigned long type,
6528
6566
  ** These macros are only available on Windows. They define the allowed values
6529
6567
  ** for the type argument to the [sqlite3_win32_set_directory] interface.
6530
6568
  */
6531
- #define SQLITE_WIN32_DATA_DIRECTORY_TYPE 1
6532
- #define SQLITE_WIN32_TEMP_DIRECTORY_TYPE 2
6569
+ #define SQLITE_WIN32_DATA_DIRECTORY_TYPE 1
6570
+ #define SQLITE_WIN32_TEMP_DIRECTORY_TYPE 2
6533
6571
 
6534
6572
  /*
6535
6573
  ** CAPI3REF: Test For Auto-Commit Mode
@@ -6553,7 +6591,7 @@ SQLITE_API int sqlite3_win32_set_directory16(unsigned long type,
6553
6591
  ** connection while this routine is running, then the return value
6554
6592
  ** is undefined.
6555
6593
  */
6556
- SQLITE_API int sqlite3_get_autocommit(sqlite3 *);
6594
+ SQLITE_API int sqlite3_get_autocommit(sqlite3*);
6557
6595
 
6558
6596
  /*
6559
6597
  ** CAPI3REF: Find The Database Handle Of A Prepared Statement
@@ -6566,7 +6604,7 @@ SQLITE_API int sqlite3_get_autocommit(sqlite3 *);
6566
6604
  ** to the [sqlite3_prepare_v2()] call (or its variants) that was used to
6567
6605
  ** create the statement in the first place.
6568
6606
  */
6569
- SQLITE_API sqlite3 *sqlite3_db_handle(sqlite3_stmt *);
6607
+ SQLITE_API sqlite3 *sqlite3_db_handle(sqlite3_stmt*);
6570
6608
 
6571
6609
  /*
6572
6610
  ** CAPI3REF: Return The Schema Name For A Database Connection
@@ -6620,8 +6658,7 @@ SQLITE_API const char *sqlite3_db_name(sqlite3 *db, int N);
6620
6658
  ** <li> [sqlite3_filename_wal()]
6621
6659
  ** </ul>
6622
6660
  */
6623
- SQLITE_API sqlite3_filename sqlite3_db_filename(sqlite3 *db,
6624
- const char *zDbName);
6661
+ SQLITE_API sqlite3_filename sqlite3_db_filename(sqlite3 *db, const char *zDbName);
6625
6662
 
6626
6663
  /*
6627
6664
  ** CAPI3REF: Determine if a database is read-only
@@ -6649,7 +6686,7 @@ SQLITE_API int sqlite3_db_readonly(sqlite3 *db, const char *zDbName);
6649
6686
  ** ^If the S argument to sqlite3_txn_state(D,S) is not the name of
6650
6687
  ** a valid schema, then -1 is returned.
6651
6688
  */
6652
- SQLITE_API int sqlite3_txn_state(sqlite3 *, const char *zSchema);
6689
+ SQLITE_API int sqlite3_txn_state(sqlite3*,const char *zSchema);
6653
6690
 
6654
6691
  /*
6655
6692
  ** CAPI3REF: Allowed return values from sqlite3_txn_state()
@@ -6680,8 +6717,8 @@ SQLITE_API int sqlite3_txn_state(sqlite3 *, const char *zSchema);
6680
6717
  ** but has not yet committed. The transaction state will change to
6681
6718
  ** to SQLITE_TXN_NONE at the next [ROLLBACK] or [COMMIT].</dd>
6682
6719
  */
6683
- #define SQLITE_TXN_NONE 0
6684
- #define SQLITE_TXN_READ 1
6720
+ #define SQLITE_TXN_NONE 0
6721
+ #define SQLITE_TXN_READ 1
6685
6722
  #define SQLITE_TXN_WRITE 2
6686
6723
 
6687
6724
  /*
@@ -6747,8 +6784,8 @@ SQLITE_API sqlite3_stmt *sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt);
6747
6784
  **
6748
6785
  ** See also the [sqlite3_update_hook()] interface.
6749
6786
  */
6750
- SQLITE_API void *sqlite3_commit_hook(sqlite3 *, int (*)(void *), void *);
6751
- SQLITE_API void *sqlite3_rollback_hook(sqlite3 *, void (*)(void *), void *);
6787
+ SQLITE_API void *sqlite3_commit_hook(sqlite3*, int(*)(void*), void*);
6788
+ SQLITE_API void *sqlite3_rollback_hook(sqlite3*, void(*)(void *), void*);
6752
6789
 
6753
6790
  /*
6754
6791
  ** CAPI3REF: Autovacuum Compaction Amount Callback
@@ -6808,11 +6845,13 @@ SQLITE_API void *sqlite3_rollback_hook(sqlite3 *, void (*)(void *), void *);
6808
6845
  ** &nbsp; }
6809
6846
  ** </pre></blockquote>
6810
6847
  */
6811
- SQLITE_API int
6812
- sqlite3_autovacuum_pages(sqlite3 *db,
6813
- unsigned int (*)(void *, const char *, unsigned int,
6814
- unsigned int, unsigned int),
6815
- void *, void (*)(void *));
6848
+ SQLITE_API int sqlite3_autovacuum_pages(
6849
+ sqlite3 *db,
6850
+ unsigned int(*)(void*,const char*,unsigned int,unsigned int,unsigned int),
6851
+ void*,
6852
+ void(*)(void*)
6853
+ );
6854
+
6816
6855
 
6817
6856
  /*
6818
6857
  ** CAPI3REF: Data Change Notification Callbacks
@@ -6848,6 +6887,12 @@ sqlite3_autovacuum_pages(sqlite3 *db,
6848
6887
  ** The exceptions defined in this paragraph might change in a future
6849
6888
  ** release of SQLite.
6850
6889
  **
6890
+ ** Whether the update hook is invoked before or after the
6891
+ ** corresponding change is currently unspecified and may differ
6892
+ ** depending on the type of change. Do not rely on the order of the
6893
+ ** hook call with regards to the final result of the operation which
6894
+ ** triggers the hook.
6895
+ **
6851
6896
  ** The update hook implementation must not do anything that will modify
6852
6897
  ** the database connection that invoked the update hook. Any actions
6853
6898
  ** to modify the database connection must be deferred until after the
@@ -6863,10 +6908,11 @@ sqlite3_autovacuum_pages(sqlite3 *db,
6863
6908
  ** See also the [sqlite3_commit_hook()], [sqlite3_rollback_hook()],
6864
6909
  ** and [sqlite3_preupdate_hook()] interfaces.
6865
6910
  */
6866
- SQLITE_API void *sqlite3_update_hook(sqlite3 *,
6867
- void (*)(void *, int, char const *,
6868
- char const *, sqlite3_int64),
6869
- void *);
6911
+ SQLITE_API void *sqlite3_update_hook(
6912
+ sqlite3*,
6913
+ void(*)(void *,int ,char const *,char const *,sqlite3_int64),
6914
+ void*
6915
+ );
6870
6916
 
6871
6917
  /*
6872
6918
  ** CAPI3REF: Enable Or Disable Shared Pager Cache
@@ -6942,7 +6988,7 @@ SQLITE_API int sqlite3_release_memory(int);
6942
6988
  **
6943
6989
  ** See also: [sqlite3_release_memory()]
6944
6990
  */
6945
- SQLITE_API int sqlite3_db_release_memory(sqlite3 *);
6991
+ SQLITE_API int sqlite3_db_release_memory(sqlite3*);
6946
6992
 
6947
6993
  /*
6948
6994
  ** CAPI3REF: Impose A Limit On Heap Size
@@ -7022,6 +7068,7 @@ SQLITE_API sqlite3_int64 sqlite3_hard_heap_limit64(sqlite3_int64 N);
7022
7068
  */
7023
7069
  SQLITE_API SQLITE_DEPRECATED void sqlite3_soft_heap_limit(int N);
7024
7070
 
7071
+
7025
7072
  /*
7026
7073
  ** CAPI3REF: Extract Metadata About A Column Of A Table
7027
7074
  ** METHOD: sqlite3
@@ -7092,15 +7139,15 @@ SQLITE_API SQLITE_DEPRECATED void sqlite3_soft_heap_limit(int N);
7092
7139
  ** any errors are encountered while loading the schema.
7093
7140
  */
7094
7141
  SQLITE_API int sqlite3_table_column_metadata(
7095
- sqlite3 *db, /* Connection handle */
7096
- const char *zDbName, /* Database name or NULL */
7097
- const char *zTableName, /* Table name */
7098
- const char *zColumnName, /* Column name */
7099
- char const **pzDataType, /* OUTPUT: Declared data type */
7100
- char const **pzCollSeq, /* OUTPUT: Collation sequence name */
7101
- int *pNotNull, /* OUTPUT: True if NOT NULL constraint exists */
7102
- int *pPrimaryKey, /* OUTPUT: True if column part of PK */
7103
- int *pAutoinc /* OUTPUT: True if column is auto-increment */
7142
+ sqlite3 *db, /* Connection handle */
7143
+ const char *zDbName, /* Database name or NULL */
7144
+ const char *zTableName, /* Table name */
7145
+ const char *zColumnName, /* Column name */
7146
+ char const **pzDataType, /* OUTPUT: Declared data type */
7147
+ char const **pzCollSeq, /* OUTPUT: Collation sequence name */
7148
+ int *pNotNull, /* OUTPUT: True if NOT NULL constraint exists */
7149
+ int *pPrimaryKey, /* OUTPUT: True if column part of PK */
7150
+ int *pAutoinc /* OUTPUT: True if column is auto-increment */
7104
7151
  );
7105
7152
 
7106
7153
  /*
@@ -7148,10 +7195,10 @@ SQLITE_API int sqlite3_table_column_metadata(
7148
7195
  ** See also the [load_extension() SQL function].
7149
7196
  */
7150
7197
  SQLITE_API int sqlite3_load_extension(
7151
- sqlite3 *db, /* Load the extension into this database connection */
7152
- const char *zFile, /* Name of the shared library containing extension */
7153
- const char *zProc, /* Entry point. Derived from zFile if 0 */
7154
- char **pzErrMsg /* Put error message here if not 0 */
7198
+ sqlite3 *db, /* Load the extension into this database connection */
7199
+ const char *zFile, /* Name of the shared library containing extension */
7200
+ const char *zProc, /* Entry point. Derived from zFile if 0 */
7201
+ char **pzErrMsg /* Put error message here if not 0 */
7155
7202
  );
7156
7203
 
7157
7204
  /*
@@ -7217,7 +7264,7 @@ SQLITE_API int sqlite3_enable_load_extension(sqlite3 *db, int onoff);
7217
7264
  ** See also: [sqlite3_reset_auto_extension()]
7218
7265
  ** and [sqlite3_cancel_auto_extension()]
7219
7266
  */
7220
- SQLITE_API int sqlite3_auto_extension(void (*xEntryPoint)(void));
7267
+ SQLITE_API int sqlite3_auto_extension(void(*xEntryPoint)(void));
7221
7268
 
7222
7269
  /*
7223
7270
  ** CAPI3REF: Cancel Automatic Extension Loading
@@ -7229,7 +7276,7 @@ SQLITE_API int sqlite3_auto_extension(void (*xEntryPoint)(void));
7229
7276
  ** unregistered and it returns 0 if X was not on the list of initialization
7230
7277
  ** routines.
7231
7278
  */
7232
- SQLITE_API int sqlite3_cancel_auto_extension(void (*xEntryPoint)(void));
7279
+ SQLITE_API int sqlite3_cancel_auto_extension(void(*xEntryPoint)(void));
7233
7280
 
7234
7281
  /*
7235
7282
  ** CAPI3REF: Reset Automatic Extension Loading
@@ -7265,29 +7312,30 @@ typedef struct sqlite3_module sqlite3_module;
7265
7312
  */
7266
7313
  struct sqlite3_module {
7267
7314
  int iVersion;
7268
- int (*xCreate)(sqlite3 *, void *pAux, int argc, const char *const *argv,
7269
- sqlite3_vtab **ppVTab, char **);
7270
- int (*xConnect)(sqlite3 *, void *pAux, int argc, const char *const *argv,
7271
- sqlite3_vtab **ppVTab, char **);
7272
- int (*xBestIndex)(sqlite3_vtab *pVTab, sqlite3_index_info *);
7315
+ int (*xCreate)(sqlite3*, void *pAux,
7316
+ int argc, const char *const*argv,
7317
+ sqlite3_vtab **ppVTab, char**);
7318
+ int (*xConnect)(sqlite3*, void *pAux,
7319
+ int argc, const char *const*argv,
7320
+ sqlite3_vtab **ppVTab, char**);
7321
+ int (*xBestIndex)(sqlite3_vtab *pVTab, sqlite3_index_info*);
7273
7322
  int (*xDisconnect)(sqlite3_vtab *pVTab);
7274
7323
  int (*xDestroy)(sqlite3_vtab *pVTab);
7275
7324
  int (*xOpen)(sqlite3_vtab *pVTab, sqlite3_vtab_cursor **ppCursor);
7276
- int (*xClose)(sqlite3_vtab_cursor *);
7277
- int (*xFilter)(sqlite3_vtab_cursor *, int idxNum, const char *idxStr,
7278
- int argc, sqlite3_value **argv);
7279
- int (*xNext)(sqlite3_vtab_cursor *);
7280
- int (*xEof)(sqlite3_vtab_cursor *);
7281
- int (*xColumn)(sqlite3_vtab_cursor *, sqlite3_context *, int);
7282
- int (*xRowid)(sqlite3_vtab_cursor *, sqlite3_int64 *pRowid);
7325
+ int (*xClose)(sqlite3_vtab_cursor*);
7326
+ int (*xFilter)(sqlite3_vtab_cursor*, int idxNum, const char *idxStr,
7327
+ int argc, sqlite3_value **argv);
7328
+ int (*xNext)(sqlite3_vtab_cursor*);
7329
+ int (*xEof)(sqlite3_vtab_cursor*);
7330
+ int (*xColumn)(sqlite3_vtab_cursor*, sqlite3_context*, int);
7331
+ int (*xRowid)(sqlite3_vtab_cursor*, sqlite3_int64 *pRowid);
7283
7332
  int (*xUpdate)(sqlite3_vtab *, int, sqlite3_value **, sqlite3_int64 *);
7284
7333
  int (*xBegin)(sqlite3_vtab *pVTab);
7285
7334
  int (*xSync)(sqlite3_vtab *pVTab);
7286
7335
  int (*xCommit)(sqlite3_vtab *pVTab);
7287
7336
  int (*xRollback)(sqlite3_vtab *pVTab);
7288
7337
  int (*xFindFunction)(sqlite3_vtab *pVtab, int nArg, const char *zName,
7289
- void (**pxFunc)(sqlite3_context *, int,
7290
- sqlite3_value **),
7338
+ void (**pxFunc)(sqlite3_context*,int,sqlite3_value**),
7291
7339
  void **ppArg);
7292
7340
  int (*xRename)(sqlite3_vtab *pVtab, const char *zNew);
7293
7341
  /* The methods above are in version 1 of the sqlite_module object. Those
@@ -7297,7 +7345,7 @@ struct sqlite3_module {
7297
7345
  int (*xRollbackTo)(sqlite3_vtab *pVTab, int);
7298
7346
  /* The methods above are in versions 1 and 2 of the sqlite_module object.
7299
7347
  ** Those below are for version 3 and greater. */
7300
- int (*xShadowName)(const char *);
7348
+ int (*xShadowName)(const char*);
7301
7349
  /* The methods above are in versions 1 through 3 of the sqlite_module object.
7302
7350
  ** Those below are for version 4 and greater. */
7303
7351
  int (*xIntegrity)(sqlite3_vtab *pVTab, const char *zSchema,
@@ -7408,34 +7456,34 @@ struct sqlite3_module {
7408
7456
  */
7409
7457
  struct sqlite3_index_info {
7410
7458
  /* Inputs */
7411
- int nConstraint; /* Number of entries in aConstraint */
7459
+ int nConstraint; /* Number of entries in aConstraint */
7412
7460
  struct sqlite3_index_constraint {
7413
- int iColumn; /* Column constrained. -1 for ROWID */
7414
- unsigned char op; /* Constraint operator */
7415
- unsigned char usable; /* True if this constraint is usable */
7416
- int iTermOffset; /* Used internally - xBestIndex should ignore */
7417
- } * aConstraint; /* Table of WHERE clause constraints */
7418
- int nOrderBy; /* Number of terms in the ORDER BY clause */
7461
+ int iColumn; /* Column constrained. -1 for ROWID */
7462
+ unsigned char op; /* Constraint operator */
7463
+ unsigned char usable; /* True if this constraint is usable */
7464
+ int iTermOffset; /* Used internally - xBestIndex should ignore */
7465
+ } *aConstraint; /* Table of WHERE clause constraints */
7466
+ int nOrderBy; /* Number of terms in the ORDER BY clause */
7419
7467
  struct sqlite3_index_orderby {
7420
- int iColumn; /* Column number */
7421
- unsigned char desc; /* True for DESC. False for ASC. */
7422
- } * aOrderBy; /* The ORDER BY clause */
7468
+ int iColumn; /* Column number */
7469
+ unsigned char desc; /* True for DESC. False for ASC. */
7470
+ } *aOrderBy; /* The ORDER BY clause */
7423
7471
  /* Outputs */
7424
7472
  struct sqlite3_index_constraint_usage {
7425
- int argvIndex; /* if >0, constraint is part of argv to xFilter */
7426
- unsigned char omit; /* Do not code a test for this constraint */
7427
- } * aConstraintUsage;
7428
- int idxNum; /* Number used to identify the index */
7429
- char *idxStr; /* String, possibly obtained from sqlite3_malloc */
7430
- int needToFreeIdxStr; /* Free idxStr using sqlite3_free() if true */
7431
- int orderByConsumed; /* True if output is already ordered */
7432
- double estimatedCost; /* Estimated cost of using this index */
7473
+ int argvIndex; /* if >0, constraint is part of argv to xFilter */
7474
+ unsigned char omit; /* Do not code a test for this constraint */
7475
+ } *aConstraintUsage;
7476
+ int idxNum; /* Number used to identify the index */
7477
+ char *idxStr; /* String, possibly obtained from sqlite3_malloc */
7478
+ int needToFreeIdxStr; /* Free idxStr using sqlite3_free() if true */
7479
+ int orderByConsumed; /* True if output is already ordered */
7480
+ double estimatedCost; /* Estimated cost of using this index */
7433
7481
  /* Fields below are only available in SQLite 3.8.2 and later */
7434
- sqlite3_int64 estimatedRows; /* Estimated number of rows returned */
7482
+ sqlite3_int64 estimatedRows; /* Estimated number of rows returned */
7435
7483
  /* Fields below are only available in SQLite 3.9.0 and later */
7436
- int idxFlags; /* Mask of SQLITE_INDEX_SCAN_* flags */
7484
+ int idxFlags; /* Mask of SQLITE_INDEX_SCAN_* flags */
7437
7485
  /* Fields below are only available in SQLite 3.10.0 and later */
7438
- sqlite3_uint64 colUsed; /* Input: Mask of columns used by statement */
7486
+ sqlite3_uint64 colUsed; /* Input: Mask of columns used by statement */
7439
7487
  };
7440
7488
 
7441
7489
  /*
@@ -7445,7 +7493,7 @@ struct sqlite3_index_info {
7445
7493
  ** [sqlite3_index_info].idxFlags field to some combination of
7446
7494
  ** these bits.
7447
7495
  */
7448
- #define SQLITE_INDEX_SCAN_UNIQUE 1 /* Scan visits at most 1 row */
7496
+ #define SQLITE_INDEX_SCAN_UNIQUE 1 /* Scan visits at most 1 row */
7449
7497
 
7450
7498
  /*
7451
7499
  ** CAPI3REF: Virtual Table Constraint Operator Codes
@@ -7485,23 +7533,23 @@ struct sqlite3_index_info {
7485
7533
  ** because the constraints are numeric) and so the sqlite3_vtab_collation()
7486
7534
  ** interface is not commonly needed.
7487
7535
  */
7488
- #define SQLITE_INDEX_CONSTRAINT_EQ 2
7489
- #define SQLITE_INDEX_CONSTRAINT_GT 4
7490
- #define SQLITE_INDEX_CONSTRAINT_LE 8
7491
- #define SQLITE_INDEX_CONSTRAINT_LT 16
7492
- #define SQLITE_INDEX_CONSTRAINT_GE 32
7493
- #define SQLITE_INDEX_CONSTRAINT_MATCH 64
7494
- #define SQLITE_INDEX_CONSTRAINT_LIKE 65
7495
- #define SQLITE_INDEX_CONSTRAINT_GLOB 66
7496
- #define SQLITE_INDEX_CONSTRAINT_REGEXP 67
7497
- #define SQLITE_INDEX_CONSTRAINT_NE 68
7498
- #define SQLITE_INDEX_CONSTRAINT_ISNOT 69
7499
- #define SQLITE_INDEX_CONSTRAINT_ISNOTNULL 70
7500
- #define SQLITE_INDEX_CONSTRAINT_ISNULL 71
7501
- #define SQLITE_INDEX_CONSTRAINT_IS 72
7502
- #define SQLITE_INDEX_CONSTRAINT_LIMIT 73
7503
- #define SQLITE_INDEX_CONSTRAINT_OFFSET 74
7504
- #define SQLITE_INDEX_CONSTRAINT_FUNCTION 150
7536
+ #define SQLITE_INDEX_CONSTRAINT_EQ 2
7537
+ #define SQLITE_INDEX_CONSTRAINT_GT 4
7538
+ #define SQLITE_INDEX_CONSTRAINT_LE 8
7539
+ #define SQLITE_INDEX_CONSTRAINT_LT 16
7540
+ #define SQLITE_INDEX_CONSTRAINT_GE 32
7541
+ #define SQLITE_INDEX_CONSTRAINT_MATCH 64
7542
+ #define SQLITE_INDEX_CONSTRAINT_LIKE 65
7543
+ #define SQLITE_INDEX_CONSTRAINT_GLOB 66
7544
+ #define SQLITE_INDEX_CONSTRAINT_REGEXP 67
7545
+ #define SQLITE_INDEX_CONSTRAINT_NE 68
7546
+ #define SQLITE_INDEX_CONSTRAINT_ISNOT 69
7547
+ #define SQLITE_INDEX_CONSTRAINT_ISNOTNULL 70
7548
+ #define SQLITE_INDEX_CONSTRAINT_ISNULL 71
7549
+ #define SQLITE_INDEX_CONSTRAINT_IS 72
7550
+ #define SQLITE_INDEX_CONSTRAINT_LIMIT 73
7551
+ #define SQLITE_INDEX_CONSTRAINT_OFFSET 74
7552
+ #define SQLITE_INDEX_CONSTRAINT_FUNCTION 150
7505
7553
 
7506
7554
  /*
7507
7555
  ** CAPI3REF: Register A Virtual Table Implementation
@@ -7536,17 +7584,17 @@ struct sqlite3_index_info {
7536
7584
  ** See also: [sqlite3_drop_modules()]
7537
7585
  */
7538
7586
  SQLITE_API int sqlite3_create_module(
7539
- sqlite3 *db, /* SQLite connection to register module with */
7540
- const char *zName, /* Name of the module */
7541
- const sqlite3_module *p, /* Methods for the module */
7542
- void *pClientData /* Client data for xCreate/xConnect */
7587
+ sqlite3 *db, /* SQLite connection to register module with */
7588
+ const char *zName, /* Name of the module */
7589
+ const sqlite3_module *p, /* Methods for the module */
7590
+ void *pClientData /* Client data for xCreate/xConnect */
7543
7591
  );
7544
7592
  SQLITE_API int sqlite3_create_module_v2(
7545
- sqlite3 *db, /* SQLite connection to register module with */
7546
- const char *zName, /* Name of the module */
7547
- const sqlite3_module *p, /* Methods for the module */
7548
- void *pClientData, /* Client data for xCreate/xConnect */
7549
- void (*xDestroy)(void *) /* Module destructor function */
7593
+ sqlite3 *db, /* SQLite connection to register module with */
7594
+ const char *zName, /* Name of the module */
7595
+ const sqlite3_module *p, /* Methods for the module */
7596
+ void *pClientData, /* Client data for xCreate/xConnect */
7597
+ void(*xDestroy)(void*) /* Module destructor function */
7550
7598
  );
7551
7599
 
7552
7600
  /*
@@ -7562,8 +7610,8 @@ SQLITE_API int sqlite3_create_module_v2(
7562
7610
  ** See also: [sqlite3_create_module()]
7563
7611
  */
7564
7612
  SQLITE_API int sqlite3_drop_modules(
7565
- sqlite3 *db, /* Remove modules from this connection */
7566
- const char **azKeep /* Except, do not remove the ones named here */
7613
+ sqlite3 *db, /* Remove modules from this connection */
7614
+ const char **azKeep /* Except, do not remove the ones named here */
7567
7615
  );
7568
7616
 
7569
7617
  /*
@@ -7585,9 +7633,9 @@ SQLITE_API int sqlite3_drop_modules(
7585
7633
  ** freed by sqlite3_free() and the zErrMsg field will be zeroed.
7586
7634
  */
7587
7635
  struct sqlite3_vtab {
7588
- const sqlite3_module *pModule; /* The module for this virtual table */
7589
- int nRef; /* Number of open cursors */
7590
- char *zErrMsg; /* Error message from sqlite3_mprintf() */
7636
+ const sqlite3_module *pModule; /* The module for this virtual table */
7637
+ int nRef; /* Number of open cursors */
7638
+ char *zErrMsg; /* Error message from sqlite3_mprintf() */
7591
7639
  /* Virtual table implementations will typically add additional fields */
7592
7640
  };
7593
7641
 
@@ -7609,7 +7657,7 @@ struct sqlite3_vtab {
7609
7657
  ** are common to all implementations.
7610
7658
  */
7611
7659
  struct sqlite3_vtab_cursor {
7612
- sqlite3_vtab *pVtab; /* Virtual table of this cursor */
7660
+ sqlite3_vtab *pVtab; /* Virtual table of this cursor */
7613
7661
  /* Virtual table implementations will typically add additional fields */
7614
7662
  };
7615
7663
 
@@ -7621,7 +7669,7 @@ struct sqlite3_vtab_cursor {
7621
7669
  ** to declare the format (the names and datatypes of the columns) of
7622
7670
  ** the virtual tables they implement.
7623
7671
  */
7624
- SQLITE_API int sqlite3_declare_vtab(sqlite3 *, const char *zSQL);
7672
+ SQLITE_API int sqlite3_declare_vtab(sqlite3*, const char *zSQL);
7625
7673
 
7626
7674
  /*
7627
7675
  ** CAPI3REF: Overload A Function For A Virtual Table
@@ -7640,8 +7688,7 @@ SQLITE_API int sqlite3_declare_vtab(sqlite3 *, const char *zSQL);
7640
7688
  ** purpose is to be a placeholder function that can be overloaded
7641
7689
  ** by a [virtual table].
7642
7690
  */
7643
- SQLITE_API int sqlite3_overload_function(sqlite3 *, const char *zFuncName,
7644
- int nArg);
7691
+ SQLITE_API int sqlite3_overload_function(sqlite3*, const char *zFuncName, int nArg);
7645
7692
 
7646
7693
  /*
7647
7694
  ** CAPI3REF: A Handle To An Open BLOB
@@ -7740,9 +7787,15 @@ typedef struct sqlite3_blob sqlite3_blob;
7740
7787
  ** [sqlite3_blob_reopen()], [sqlite3_blob_read()],
7741
7788
  ** [sqlite3_blob_bytes()], [sqlite3_blob_write()].
7742
7789
  */
7743
- SQLITE_API int sqlite3_blob_open(sqlite3 *, const char *zDb, const char *zTable,
7744
- const char *zColumn, sqlite3_int64 iRow,
7745
- int flags, sqlite3_blob **ppBlob);
7790
+ SQLITE_API int sqlite3_blob_open(
7791
+ sqlite3*,
7792
+ const char *zDb,
7793
+ const char *zTable,
7794
+ const char *zColumn,
7795
+ sqlite3_int64 iRow,
7796
+ int flags,
7797
+ sqlite3_blob **ppBlob
7798
+ );
7746
7799
 
7747
7800
  /*
7748
7801
  ** CAPI3REF: Move a BLOB Handle to a New Row
@@ -7877,8 +7930,7 @@ SQLITE_API int sqlite3_blob_read(sqlite3_blob *, void *Z, int N, int iOffset);
7877
7930
  **
7878
7931
  ** See also: [sqlite3_blob_read()].
7879
7932
  */
7880
- SQLITE_API int sqlite3_blob_write(sqlite3_blob *, const void *z, int n,
7881
- int iOffset);
7933
+ SQLITE_API int sqlite3_blob_write(sqlite3_blob *, const void *z, int n, int iOffset);
7882
7934
 
7883
7935
  /*
7884
7936
  ** CAPI3REF: Virtual File System Objects
@@ -7910,8 +7962,8 @@ SQLITE_API int sqlite3_blob_write(sqlite3_blob *, const void *z, int n,
7910
7962
  ** the default. The choice for the new VFS is arbitrary.)^
7911
7963
  */
7912
7964
  SQLITE_API sqlite3_vfs *sqlite3_vfs_find(const char *zVfsName);
7913
- SQLITE_API int sqlite3_vfs_register(sqlite3_vfs *, int makeDflt);
7914
- SQLITE_API int sqlite3_vfs_unregister(sqlite3_vfs *);
7965
+ SQLITE_API int sqlite3_vfs_register(sqlite3_vfs*, int makeDflt);
7966
+ SQLITE_API int sqlite3_vfs_unregister(sqlite3_vfs*);
7915
7967
 
7916
7968
  /*
7917
7969
  ** CAPI3REF: Mutexes
@@ -8030,10 +8082,10 @@ SQLITE_API int sqlite3_vfs_unregister(sqlite3_vfs *);
8030
8082
  ** See also: [sqlite3_mutex_held()] and [sqlite3_mutex_notheld()].
8031
8083
  */
8032
8084
  SQLITE_API sqlite3_mutex *sqlite3_mutex_alloc(int);
8033
- SQLITE_API void sqlite3_mutex_free(sqlite3_mutex *);
8034
- SQLITE_API void sqlite3_mutex_enter(sqlite3_mutex *);
8035
- SQLITE_API int sqlite3_mutex_try(sqlite3_mutex *);
8036
- SQLITE_API void sqlite3_mutex_leave(sqlite3_mutex *);
8085
+ SQLITE_API void sqlite3_mutex_free(sqlite3_mutex*);
8086
+ SQLITE_API void sqlite3_mutex_enter(sqlite3_mutex*);
8087
+ SQLITE_API int sqlite3_mutex_try(sqlite3_mutex*);
8088
+ SQLITE_API void sqlite3_mutex_leave(sqlite3_mutex*);
8037
8089
 
8038
8090
  /*
8039
8091
  ** CAPI3REF: Mutex Methods Object
@@ -8143,8 +8195,8 @@ struct sqlite3_mutex_methods {
8143
8195
  ** interface should also return 1 when given a NULL pointer.
8144
8196
  */
8145
8197
  #ifndef NDEBUG
8146
- SQLITE_API int sqlite3_mutex_held(sqlite3_mutex *);
8147
- SQLITE_API int sqlite3_mutex_notheld(sqlite3_mutex *);
8198
+ SQLITE_API int sqlite3_mutex_held(sqlite3_mutex*);
8199
+ SQLITE_API int sqlite3_mutex_notheld(sqlite3_mutex*);
8148
8200
  #endif
8149
8201
 
8150
8202
  /*
@@ -8157,25 +8209,26 @@ SQLITE_API int sqlite3_mutex_notheld(sqlite3_mutex *);
8157
8209
  ** next. Applications that override the built-in mutex logic must be
8158
8210
  ** prepared to accommodate additional static mutexes.
8159
8211
  */
8160
- #define SQLITE_MUTEX_FAST 0
8161
- #define SQLITE_MUTEX_RECURSIVE 1
8162
- #define SQLITE_MUTEX_STATIC_MAIN 2
8163
- #define SQLITE_MUTEX_STATIC_MEM 3 /* sqlite3_malloc() */
8164
- #define SQLITE_MUTEX_STATIC_MEM2 4 /* NOT USED */
8165
- #define SQLITE_MUTEX_STATIC_OPEN 4 /* sqlite3BtreeOpen() */
8166
- #define SQLITE_MUTEX_STATIC_PRNG 5 /* sqlite3_randomness() */
8167
- #define SQLITE_MUTEX_STATIC_LRU 6 /* lru page list */
8168
- #define SQLITE_MUTEX_STATIC_LRU2 7 /* NOT USED */
8169
- #define SQLITE_MUTEX_STATIC_PMEM 7 /* sqlite3PageMalloc() */
8170
- #define SQLITE_MUTEX_STATIC_APP1 8 /* For use by application */
8171
- #define SQLITE_MUTEX_STATIC_APP2 9 /* For use by application */
8172
- #define SQLITE_MUTEX_STATIC_APP3 10 /* For use by application */
8173
- #define SQLITE_MUTEX_STATIC_VFS1 11 /* For use by built-in VFS */
8174
- #define SQLITE_MUTEX_STATIC_VFS2 12 /* For use by extension VFS */
8175
- #define SQLITE_MUTEX_STATIC_VFS3 13 /* For use by application VFS */
8212
+ #define SQLITE_MUTEX_FAST 0
8213
+ #define SQLITE_MUTEX_RECURSIVE 1
8214
+ #define SQLITE_MUTEX_STATIC_MAIN 2
8215
+ #define SQLITE_MUTEX_STATIC_MEM 3 /* sqlite3_malloc() */
8216
+ #define SQLITE_MUTEX_STATIC_MEM2 4 /* NOT USED */
8217
+ #define SQLITE_MUTEX_STATIC_OPEN 4 /* sqlite3BtreeOpen() */
8218
+ #define SQLITE_MUTEX_STATIC_PRNG 5 /* sqlite3_randomness() */
8219
+ #define SQLITE_MUTEX_STATIC_LRU 6 /* lru page list */
8220
+ #define SQLITE_MUTEX_STATIC_LRU2 7 /* NOT USED */
8221
+ #define SQLITE_MUTEX_STATIC_PMEM 7 /* sqlite3PageMalloc() */
8222
+ #define SQLITE_MUTEX_STATIC_APP1 8 /* For use by application */
8223
+ #define SQLITE_MUTEX_STATIC_APP2 9 /* For use by application */
8224
+ #define SQLITE_MUTEX_STATIC_APP3 10 /* For use by application */
8225
+ #define SQLITE_MUTEX_STATIC_VFS1 11 /* For use by built-in VFS */
8226
+ #define SQLITE_MUTEX_STATIC_VFS2 12 /* For use by extension VFS */
8227
+ #define SQLITE_MUTEX_STATIC_VFS3 13 /* For use by application VFS */
8176
8228
 
8177
8229
  /* Legacy compatibility: */
8178
- #define SQLITE_MUTEX_STATIC_MASTER 2
8230
+ #define SQLITE_MUTEX_STATIC_MASTER 2
8231
+
8179
8232
 
8180
8233
  /*
8181
8234
  ** CAPI3REF: Retrieve the mutex for a database connection
@@ -8187,7 +8240,7 @@ SQLITE_API int sqlite3_mutex_notheld(sqlite3_mutex *);
8187
8240
  ** ^If the [threading mode] is Single-thread or Multi-thread then this
8188
8241
  ** routine returns a NULL pointer.
8189
8242
  */
8190
- SQLITE_API sqlite3_mutex *sqlite3_db_mutex(sqlite3 *);
8243
+ SQLITE_API sqlite3_mutex *sqlite3_db_mutex(sqlite3*);
8191
8244
 
8192
8245
  /*
8193
8246
  ** CAPI3REF: Low-Level Control Of Database Files
@@ -8230,8 +8283,7 @@ SQLITE_API sqlite3_mutex *sqlite3_db_mutex(sqlite3 *);
8230
8283
  **
8231
8284
  ** See also: [file control opcodes]
8232
8285
  */
8233
- SQLITE_API int sqlite3_file_control(sqlite3 *, const char *zDbName, int op,
8234
- void *);
8286
+ SQLITE_API int sqlite3_file_control(sqlite3*, const char *zDbName, int op, void*);
8235
8287
 
8236
8288
  /*
8237
8289
  ** CAPI3REF: Testing Interface
@@ -8263,42 +8315,42 @@ SQLITE_API int sqlite3_test_control(int op, ...);
8263
8315
  ** Applications should not use any of these parameters or the
8264
8316
  ** [sqlite3_test_control()] interface.
8265
8317
  */
8266
- #define SQLITE_TESTCTRL_FIRST 5
8267
- #define SQLITE_TESTCTRL_PRNG_SAVE 5
8268
- #define SQLITE_TESTCTRL_PRNG_RESTORE 6
8269
- #define SQLITE_TESTCTRL_PRNG_RESET 7 /* NOT USED */
8270
- #define SQLITE_TESTCTRL_FK_NO_ACTION 7
8271
- #define SQLITE_TESTCTRL_BITVEC_TEST 8
8272
- #define SQLITE_TESTCTRL_FAULT_INSTALL 9
8273
- #define SQLITE_TESTCTRL_BENIGN_MALLOC_HOOKS 10
8274
- #define SQLITE_TESTCTRL_PENDING_BYTE 11
8275
- #define SQLITE_TESTCTRL_ASSERT 12
8276
- #define SQLITE_TESTCTRL_ALWAYS 13
8277
- #define SQLITE_TESTCTRL_RESERVE 14 /* NOT USED */
8278
- #define SQLITE_TESTCTRL_JSON_SELFCHECK 14
8279
- #define SQLITE_TESTCTRL_OPTIMIZATIONS 15
8280
- #define SQLITE_TESTCTRL_ISKEYWORD 16 /* NOT USED */
8281
- #define SQLITE_TESTCTRL_SCRATCHMALLOC 17 /* NOT USED */
8282
- #define SQLITE_TESTCTRL_INTERNAL_FUNCTIONS 17
8283
- #define SQLITE_TESTCTRL_LOCALTIME_FAULT 18
8284
- #define SQLITE_TESTCTRL_EXPLAIN_STMT 19 /* NOT USED */
8285
- #define SQLITE_TESTCTRL_ONCE_RESET_THRESHOLD 19
8286
- #define SQLITE_TESTCTRL_NEVER_CORRUPT 20
8287
- #define SQLITE_TESTCTRL_VDBE_COVERAGE 21
8288
- #define SQLITE_TESTCTRL_BYTEORDER 22
8289
- #define SQLITE_TESTCTRL_ISINIT 23
8290
- #define SQLITE_TESTCTRL_SORTER_MMAP 24
8291
- #define SQLITE_TESTCTRL_IMPOSTER 25
8292
- #define SQLITE_TESTCTRL_PARSER_COVERAGE 26
8293
- #define SQLITE_TESTCTRL_RESULT_INTREAL 27
8294
- #define SQLITE_TESTCTRL_PRNG_SEED 28
8295
- #define SQLITE_TESTCTRL_EXTRA_SCHEMA_CHECKS 29
8296
- #define SQLITE_TESTCTRL_SEEK_COUNT 30
8297
- #define SQLITE_TESTCTRL_TRACEFLAGS 31
8298
- #define SQLITE_TESTCTRL_TUNE 32
8299
- #define SQLITE_TESTCTRL_LOGEST 33
8300
- #define SQLITE_TESTCTRL_USELONGDOUBLE 34
8301
- #define SQLITE_TESTCTRL_LAST 34 /* Largest TESTCTRL */
8318
+ #define SQLITE_TESTCTRL_FIRST 5
8319
+ #define SQLITE_TESTCTRL_PRNG_SAVE 5
8320
+ #define SQLITE_TESTCTRL_PRNG_RESTORE 6
8321
+ #define SQLITE_TESTCTRL_PRNG_RESET 7 /* NOT USED */
8322
+ #define SQLITE_TESTCTRL_FK_NO_ACTION 7
8323
+ #define SQLITE_TESTCTRL_BITVEC_TEST 8
8324
+ #define SQLITE_TESTCTRL_FAULT_INSTALL 9
8325
+ #define SQLITE_TESTCTRL_BENIGN_MALLOC_HOOKS 10
8326
+ #define SQLITE_TESTCTRL_PENDING_BYTE 11
8327
+ #define SQLITE_TESTCTRL_ASSERT 12
8328
+ #define SQLITE_TESTCTRL_ALWAYS 13
8329
+ #define SQLITE_TESTCTRL_RESERVE 14 /* NOT USED */
8330
+ #define SQLITE_TESTCTRL_JSON_SELFCHECK 14
8331
+ #define SQLITE_TESTCTRL_OPTIMIZATIONS 15
8332
+ #define SQLITE_TESTCTRL_ISKEYWORD 16 /* NOT USED */
8333
+ #define SQLITE_TESTCTRL_SCRATCHMALLOC 17 /* NOT USED */
8334
+ #define SQLITE_TESTCTRL_INTERNAL_FUNCTIONS 17
8335
+ #define SQLITE_TESTCTRL_LOCALTIME_FAULT 18
8336
+ #define SQLITE_TESTCTRL_EXPLAIN_STMT 19 /* NOT USED */
8337
+ #define SQLITE_TESTCTRL_ONCE_RESET_THRESHOLD 19
8338
+ #define SQLITE_TESTCTRL_NEVER_CORRUPT 20
8339
+ #define SQLITE_TESTCTRL_VDBE_COVERAGE 21
8340
+ #define SQLITE_TESTCTRL_BYTEORDER 22
8341
+ #define SQLITE_TESTCTRL_ISINIT 23
8342
+ #define SQLITE_TESTCTRL_SORTER_MMAP 24
8343
+ #define SQLITE_TESTCTRL_IMPOSTER 25
8344
+ #define SQLITE_TESTCTRL_PARSER_COVERAGE 26
8345
+ #define SQLITE_TESTCTRL_RESULT_INTREAL 27
8346
+ #define SQLITE_TESTCTRL_PRNG_SEED 28
8347
+ #define SQLITE_TESTCTRL_EXTRA_SCHEMA_CHECKS 29
8348
+ #define SQLITE_TESTCTRL_SEEK_COUNT 30
8349
+ #define SQLITE_TESTCTRL_TRACEFLAGS 31
8350
+ #define SQLITE_TESTCTRL_TUNE 32
8351
+ #define SQLITE_TESTCTRL_LOGEST 33
8352
+ #define SQLITE_TESTCTRL_USELONGDOUBLE 34
8353
+ #define SQLITE_TESTCTRL_LAST 34 /* Largest TESTCTRL */
8302
8354
 
8303
8355
  /*
8304
8356
  ** CAPI3REF: SQL Keyword Checking
@@ -8311,7 +8363,7 @@ SQLITE_API int sqlite3_test_control(int op, ...);
8311
8363
  ** The sqlite3_keyword_count() interface returns the number of distinct
8312
8364
  ** keywords understood by SQLite.
8313
8365
  **
8314
- ** The sqlite3_keyword_name(N,Z,L) interface finds the N-th keyword and
8366
+ ** The sqlite3_keyword_name(N,Z,L) interface finds the 0-based N-th keyword and
8315
8367
  ** makes *Z point to that keyword expressed as UTF8 and writes the number
8316
8368
  ** of bytes in the keyword into *L. The string that *Z points to is not
8317
8369
  ** zero-terminated. The sqlite3_keyword_name(N,Z,L) routine returns
@@ -8348,8 +8400,8 @@ SQLITE_API int sqlite3_test_control(int op, ...);
8348
8400
  ** new keywords may be added to future releases of SQLite.
8349
8401
  */
8350
8402
  SQLITE_API int sqlite3_keyword_count(void);
8351
- SQLITE_API int sqlite3_keyword_name(int, const char **, int *);
8352
- SQLITE_API int sqlite3_keyword_check(const char *, int);
8403
+ SQLITE_API int sqlite3_keyword_name(int,const char**,int*);
8404
+ SQLITE_API int sqlite3_keyword_check(const char*,int);
8353
8405
 
8354
8406
  /*
8355
8407
  ** CAPI3REF: Dynamic String Object
@@ -8394,7 +8446,7 @@ typedef struct sqlite3_str sqlite3_str;
8394
8446
  ** the value set for [sqlite3_limit](D,[SQLITE_LIMIT_LENGTH]) instead
8395
8447
  ** of [SQLITE_MAX_LENGTH].
8396
8448
  */
8397
- SQLITE_API sqlite3_str *sqlite3_str_new(sqlite3 *);
8449
+ SQLITE_API sqlite3_str *sqlite3_str_new(sqlite3*);
8398
8450
 
8399
8451
  /*
8400
8452
  ** CAPI3REF: Finalize A Dynamic String
@@ -8409,7 +8461,7 @@ SQLITE_API sqlite3_str *sqlite3_str_new(sqlite3 *);
8409
8461
  ** [sqlite3_str_finish(X)] interface will also return a NULL pointer if the
8410
8462
  ** string in [sqlite3_str] object X is zero bytes long.
8411
8463
  */
8412
- SQLITE_API char *sqlite3_str_finish(sqlite3_str *);
8464
+ SQLITE_API char *sqlite3_str_finish(sqlite3_str*);
8413
8465
 
8414
8466
  /*
8415
8467
  ** CAPI3REF: Add Content To A Dynamic String
@@ -8443,13 +8495,12 @@ SQLITE_API char *sqlite3_str_finish(sqlite3_str *);
8443
8495
  ** is recorded in the [sqlite3_str] object and can be recovered by a
8444
8496
  ** subsequent call to [sqlite3_str_errcode(X)].
8445
8497
  */
8446
- SQLITE_API void sqlite3_str_appendf(sqlite3_str *, const char *zFormat, ...);
8447
- SQLITE_API void sqlite3_str_vappendf(sqlite3_str *, const char *zFormat,
8448
- va_list);
8449
- SQLITE_API void sqlite3_str_append(sqlite3_str *, const char *zIn, int N);
8450
- SQLITE_API void sqlite3_str_appendall(sqlite3_str *, const char *zIn);
8451
- SQLITE_API void sqlite3_str_appendchar(sqlite3_str *, int N, char C);
8452
- SQLITE_API void sqlite3_str_reset(sqlite3_str *);
8498
+ SQLITE_API void sqlite3_str_appendf(sqlite3_str*, const char *zFormat, ...);
8499
+ SQLITE_API void sqlite3_str_vappendf(sqlite3_str*, const char *zFormat, va_list);
8500
+ SQLITE_API void sqlite3_str_append(sqlite3_str*, const char *zIn, int N);
8501
+ SQLITE_API void sqlite3_str_appendall(sqlite3_str*, const char *zIn);
8502
+ SQLITE_API void sqlite3_str_appendchar(sqlite3_str*, int N, char C);
8503
+ SQLITE_API void sqlite3_str_reset(sqlite3_str*);
8453
8504
 
8454
8505
  /*
8455
8506
  ** CAPI3REF: Status Of A Dynamic String
@@ -8480,9 +8531,9 @@ SQLITE_API void sqlite3_str_reset(sqlite3_str *);
8480
8531
  ** outside the range of 0 to [sqlite3_str_length(X)] and do not read or
8481
8532
  ** write any byte after any subsequent sqlite3_str method call.
8482
8533
  */
8483
- SQLITE_API int sqlite3_str_errcode(sqlite3_str *);
8484
- SQLITE_API int sqlite3_str_length(sqlite3_str *);
8485
- SQLITE_API char *sqlite3_str_value(sqlite3_str *);
8534
+ SQLITE_API int sqlite3_str_errcode(sqlite3_str*);
8535
+ SQLITE_API int sqlite3_str_length(sqlite3_str*);
8536
+ SQLITE_API char *sqlite3_str_value(sqlite3_str*);
8486
8537
 
8487
8538
  /*
8488
8539
  ** CAPI3REF: SQLite Runtime Status
@@ -8510,10 +8561,14 @@ SQLITE_API char *sqlite3_str_value(sqlite3_str *);
8510
8561
  **
8511
8562
  ** See also: [sqlite3_db_status()]
8512
8563
  */
8513
- SQLITE_API int sqlite3_status(int op, int *pCurrent, int *pHighwater,
8514
- int resetFlag);
8515
- SQLITE_API int sqlite3_status64(int op, sqlite3_int64 *pCurrent,
8516
- sqlite3_int64 *pHighwater, int resetFlag);
8564
+ SQLITE_API int sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag);
8565
+ SQLITE_API int sqlite3_status64(
8566
+ int op,
8567
+ sqlite3_int64 *pCurrent,
8568
+ sqlite3_int64 *pHighwater,
8569
+ int resetFlag
8570
+ );
8571
+
8517
8572
 
8518
8573
  /*
8519
8574
  ** CAPI3REF: Status Parameters
@@ -8582,16 +8637,16 @@ SQLITE_API int sqlite3_status64(int op, sqlite3_int64 *pCurrent,
8582
8637
  **
8583
8638
  ** New status parameters may be added from time to time.
8584
8639
  */
8585
- #define SQLITE_STATUS_MEMORY_USED 0
8586
- #define SQLITE_STATUS_PAGECACHE_USED 1
8587
- #define SQLITE_STATUS_PAGECACHE_OVERFLOW 2
8588
- #define SQLITE_STATUS_SCRATCH_USED 3 /* NOT USED */
8589
- #define SQLITE_STATUS_SCRATCH_OVERFLOW 4 /* NOT USED */
8590
- #define SQLITE_STATUS_MALLOC_SIZE 5
8591
- #define SQLITE_STATUS_PARSER_STACK 6
8592
- #define SQLITE_STATUS_PAGECACHE_SIZE 7
8593
- #define SQLITE_STATUS_SCRATCH_SIZE 8 /* NOT USED */
8594
- #define SQLITE_STATUS_MALLOC_COUNT 9
8640
+ #define SQLITE_STATUS_MEMORY_USED 0
8641
+ #define SQLITE_STATUS_PAGECACHE_USED 1
8642
+ #define SQLITE_STATUS_PAGECACHE_OVERFLOW 2
8643
+ #define SQLITE_STATUS_SCRATCH_USED 3 /* NOT USED */
8644
+ #define SQLITE_STATUS_SCRATCH_OVERFLOW 4 /* NOT USED */
8645
+ #define SQLITE_STATUS_MALLOC_SIZE 5
8646
+ #define SQLITE_STATUS_PARSER_STACK 6
8647
+ #define SQLITE_STATUS_PAGECACHE_SIZE 7
8648
+ #define SQLITE_STATUS_SCRATCH_SIZE 8 /* NOT USED */
8649
+ #define SQLITE_STATUS_MALLOC_COUNT 9
8595
8650
 
8596
8651
  /*
8597
8652
  ** CAPI3REF: Database Connection Status
@@ -8616,8 +8671,7 @@ SQLITE_API int sqlite3_status64(int op, sqlite3_int64 *pCurrent,
8616
8671
  **
8617
8672
  ** See also: [sqlite3_status()] and [sqlite3_stmt_status()].
8618
8673
  */
8619
- SQLITE_API int sqlite3_db_status(sqlite3 *, int op, int *pCur, int *pHiwtr,
8620
- int resetFlg);
8674
+ SQLITE_API int sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int resetFlg);
8621
8675
 
8622
8676
  /*
8623
8677
  ** CAPI3REF: Status Parameters for database connections
@@ -8730,20 +8784,21 @@ SQLITE_API int sqlite3_db_status(sqlite3 *, int op, int *pCur, int *pHiwtr,
8730
8784
  ** </dd>
8731
8785
  ** </dl>
8732
8786
  */
8733
- #define SQLITE_DBSTATUS_LOOKASIDE_USED 0
8734
- #define SQLITE_DBSTATUS_CACHE_USED 1
8735
- #define SQLITE_DBSTATUS_SCHEMA_USED 2
8736
- #define SQLITE_DBSTATUS_STMT_USED 3
8737
- #define SQLITE_DBSTATUS_LOOKASIDE_HIT 4
8738
- #define SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE 5
8739
- #define SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL 6
8740
- #define SQLITE_DBSTATUS_CACHE_HIT 7
8741
- #define SQLITE_DBSTATUS_CACHE_MISS 8
8742
- #define SQLITE_DBSTATUS_CACHE_WRITE 9
8743
- #define SQLITE_DBSTATUS_DEFERRED_FKS 10
8744
- #define SQLITE_DBSTATUS_CACHE_USED_SHARED 11
8745
- #define SQLITE_DBSTATUS_CACHE_SPILL 12
8746
- #define SQLITE_DBSTATUS_MAX 12 /* Largest defined DBSTATUS */
8787
+ #define SQLITE_DBSTATUS_LOOKASIDE_USED 0
8788
+ #define SQLITE_DBSTATUS_CACHE_USED 1
8789
+ #define SQLITE_DBSTATUS_SCHEMA_USED 2
8790
+ #define SQLITE_DBSTATUS_STMT_USED 3
8791
+ #define SQLITE_DBSTATUS_LOOKASIDE_HIT 4
8792
+ #define SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE 5
8793
+ #define SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL 6
8794
+ #define SQLITE_DBSTATUS_CACHE_HIT 7
8795
+ #define SQLITE_DBSTATUS_CACHE_MISS 8
8796
+ #define SQLITE_DBSTATUS_CACHE_WRITE 9
8797
+ #define SQLITE_DBSTATUS_DEFERRED_FKS 10
8798
+ #define SQLITE_DBSTATUS_CACHE_USED_SHARED 11
8799
+ #define SQLITE_DBSTATUS_CACHE_SPILL 12
8800
+ #define SQLITE_DBSTATUS_MAX 12 /* Largest defined DBSTATUS */
8801
+
8747
8802
 
8748
8803
  /*
8749
8804
  ** CAPI3REF: Prepared Statement Status
@@ -8769,7 +8824,7 @@ SQLITE_API int sqlite3_db_status(sqlite3 *, int op, int *pCur, int *pHiwtr,
8769
8824
  **
8770
8825
  ** See also: [sqlite3_status()] and [sqlite3_db_status()].
8771
8826
  */
8772
- SQLITE_API int sqlite3_stmt_status(sqlite3_stmt *, int op, int resetFlg);
8827
+ SQLITE_API int sqlite3_stmt_status(sqlite3_stmt*, int op,int resetFlg);
8773
8828
 
8774
8829
  /*
8775
8830
  ** CAPI3REF: Status Parameters for prepared statements
@@ -8836,15 +8891,15 @@ SQLITE_API int sqlite3_stmt_status(sqlite3_stmt *, int op, int resetFlg);
8836
8891
  ** </dd>
8837
8892
  ** </dl>
8838
8893
  */
8839
- #define SQLITE_STMTSTATUS_FULLSCAN_STEP 1
8840
- #define SQLITE_STMTSTATUS_SORT 2
8841
- #define SQLITE_STMTSTATUS_AUTOINDEX 3
8842
- #define SQLITE_STMTSTATUS_VM_STEP 4
8843
- #define SQLITE_STMTSTATUS_REPREPARE 5
8844
- #define SQLITE_STMTSTATUS_RUN 6
8845
- #define SQLITE_STMTSTATUS_FILTER_MISS 7
8846
- #define SQLITE_STMTSTATUS_FILTER_HIT 8
8847
- #define SQLITE_STMTSTATUS_MEMUSED 99
8894
+ #define SQLITE_STMTSTATUS_FULLSCAN_STEP 1
8895
+ #define SQLITE_STMTSTATUS_SORT 2
8896
+ #define SQLITE_STMTSTATUS_AUTOINDEX 3
8897
+ #define SQLITE_STMTSTATUS_VM_STEP 4
8898
+ #define SQLITE_STMTSTATUS_REPREPARE 5
8899
+ #define SQLITE_STMTSTATUS_RUN 6
8900
+ #define SQLITE_STMTSTATUS_FILTER_MISS 7
8901
+ #define SQLITE_STMTSTATUS_FILTER_HIT 8
8902
+ #define SQLITE_STMTSTATUS_MEMUSED 99
8848
8903
 
8849
8904
  /*
8850
8905
  ** CAPI3REF: Custom Page Cache Object
@@ -8871,8 +8926,8 @@ typedef struct sqlite3_pcache sqlite3_pcache;
8871
8926
  */
8872
8927
  typedef struct sqlite3_pcache_page sqlite3_pcache_page;
8873
8928
  struct sqlite3_pcache_page {
8874
- void *pBuf; /* The content of the page */
8875
- void *pExtra; /* Extra information associated with the page */
8929
+ void *pBuf; /* The content of the page */
8930
+ void *pExtra; /* Extra information associated with the page */
8876
8931
  };
8877
8932
 
8878
8933
  /*
@@ -9038,19 +9093,18 @@ typedef struct sqlite3_pcache_methods2 sqlite3_pcache_methods2;
9038
9093
  struct sqlite3_pcache_methods2 {
9039
9094
  int iVersion;
9040
9095
  void *pArg;
9041
- int (*xInit)(void *);
9042
- void (*xShutdown)(void *);
9096
+ int (*xInit)(void*);
9097
+ void (*xShutdown)(void*);
9043
9098
  sqlite3_pcache *(*xCreate)(int szPage, int szExtra, int bPurgeable);
9044
- void (*xCachesize)(sqlite3_pcache *, int nCachesize);
9045
- int (*xPagecount)(sqlite3_pcache *);
9046
- sqlite3_pcache_page *(*xFetch)(sqlite3_pcache *, unsigned key,
9047
- int createFlag);
9048
- void (*xUnpin)(sqlite3_pcache *, sqlite3_pcache_page *, int discard);
9049
- void (*xRekey)(sqlite3_pcache *, sqlite3_pcache_page *, unsigned oldKey,
9050
- unsigned newKey);
9051
- void (*xTruncate)(sqlite3_pcache *, unsigned iLimit);
9052
- void (*xDestroy)(sqlite3_pcache *);
9053
- void (*xShrink)(sqlite3_pcache *);
9099
+ void (*xCachesize)(sqlite3_pcache*, int nCachesize);
9100
+ int (*xPagecount)(sqlite3_pcache*);
9101
+ sqlite3_pcache_page *(*xFetch)(sqlite3_pcache*, unsigned key, int createFlag);
9102
+ void (*xUnpin)(sqlite3_pcache*, sqlite3_pcache_page*, int discard);
9103
+ void (*xRekey)(sqlite3_pcache*, sqlite3_pcache_page*,
9104
+ unsigned oldKey, unsigned newKey);
9105
+ void (*xTruncate)(sqlite3_pcache*, unsigned iLimit);
9106
+ void (*xDestroy)(sqlite3_pcache*);
9107
+ void (*xShrink)(sqlite3_pcache*);
9054
9108
  };
9055
9109
 
9056
9110
  /*
@@ -9061,18 +9115,19 @@ struct sqlite3_pcache_methods2 {
9061
9115
  typedef struct sqlite3_pcache_methods sqlite3_pcache_methods;
9062
9116
  struct sqlite3_pcache_methods {
9063
9117
  void *pArg;
9064
- int (*xInit)(void *);
9065
- void (*xShutdown)(void *);
9118
+ int (*xInit)(void*);
9119
+ void (*xShutdown)(void*);
9066
9120
  sqlite3_pcache *(*xCreate)(int szPage, int bPurgeable);
9067
- void (*xCachesize)(sqlite3_pcache *, int nCachesize);
9068
- int (*xPagecount)(sqlite3_pcache *);
9069
- void *(*xFetch)(sqlite3_pcache *, unsigned key, int createFlag);
9070
- void (*xUnpin)(sqlite3_pcache *, void *, int discard);
9071
- void (*xRekey)(sqlite3_pcache *, void *, unsigned oldKey, unsigned newKey);
9072
- void (*xTruncate)(sqlite3_pcache *, unsigned iLimit);
9073
- void (*xDestroy)(sqlite3_pcache *);
9121
+ void (*xCachesize)(sqlite3_pcache*, int nCachesize);
9122
+ int (*xPagecount)(sqlite3_pcache*);
9123
+ void *(*xFetch)(sqlite3_pcache*, unsigned key, int createFlag);
9124
+ void (*xUnpin)(sqlite3_pcache*, void*, int discard);
9125
+ void (*xRekey)(sqlite3_pcache*, void*, unsigned oldKey, unsigned newKey);
9126
+ void (*xTruncate)(sqlite3_pcache*, unsigned iLimit);
9127
+ void (*xDestroy)(sqlite3_pcache*);
9074
9128
  };
9075
9129
 
9130
+
9076
9131
  /*
9077
9132
  ** CAPI3REF: Online Backup Object
9078
9133
  **
@@ -9271,11 +9326,11 @@ typedef struct sqlite3_backup sqlite3_backup;
9271
9326
  ** same time as another thread is invoking sqlite3_backup_step() it is
9272
9327
  ** possible that they return invalid values.
9273
9328
  */
9274
- SQLITE_API sqlite3_backup *
9275
- sqlite3_backup_init(sqlite3 *pDest, /* Destination database handle */
9276
- const char *zDestName, /* Destination database name */
9277
- sqlite3 *pSource, /* Source database handle */
9278
- const char *zSourceName /* Source database name */
9329
+ SQLITE_API sqlite3_backup *sqlite3_backup_init(
9330
+ sqlite3 *pDest, /* Destination database handle */
9331
+ const char *zDestName, /* Destination database name */
9332
+ sqlite3 *pSource, /* Source database handle */
9333
+ const char *zSourceName /* Source database name */
9279
9334
  );
9280
9335
  SQLITE_API int sqlite3_backup_step(sqlite3_backup *p, int nPage);
9281
9336
  SQLITE_API int sqlite3_backup_finish(sqlite3_backup *p);
@@ -9398,11 +9453,12 @@ SQLITE_API int sqlite3_backup_pagecount(sqlite3_backup *p);
9398
9453
  ** SQLITE_LOCKED.)^
9399
9454
  */
9400
9455
  SQLITE_API int sqlite3_unlock_notify(
9401
- sqlite3 *pBlocked, /* Waiting connection */
9402
- void (*xNotify)(void **apArg, int nArg), /* Callback function to invoke */
9403
- void *pNotifyArg /* Argument to pass to xNotify */
9456
+ sqlite3 *pBlocked, /* Waiting connection */
9457
+ void (*xNotify)(void **apArg, int nArg), /* Callback function to invoke */
9458
+ void *pNotifyArg /* Argument to pass to xNotify */
9404
9459
  );
9405
9460
 
9461
+
9406
9462
  /*
9407
9463
  ** CAPI3REF: String Comparison
9408
9464
  **
@@ -9452,8 +9508,7 @@ SQLITE_API int sqlite3_strglob(const char *zGlob, const char *zStr);
9452
9508
  **
9453
9509
  ** See also: [sqlite3_strglob()].
9454
9510
  */
9455
- SQLITE_API int sqlite3_strlike(const char *zGlob, const char *zStr,
9456
- unsigned int cEsc);
9511
+ SQLITE_API int sqlite3_strlike(const char *zGlob, const char *zStr, unsigned int cEsc);
9457
9512
 
9458
9513
  /*
9459
9514
  ** CAPI3REF: Error Logging Interface
@@ -9513,9 +9568,11 @@ SQLITE_API void sqlite3_log(int iErrCode, const char *zFormat, ...);
9513
9568
  ** [wal_autocheckpoint pragma] both invoke [sqlite3_wal_hook()] and will
9514
9569
  ** overwrite any prior [sqlite3_wal_hook()] settings.
9515
9570
  */
9516
- SQLITE_API void *sqlite3_wal_hook(sqlite3 *,
9517
- int (*)(void *, sqlite3 *, const char *, int),
9518
- void *);
9571
+ SQLITE_API void *sqlite3_wal_hook(
9572
+ sqlite3*,
9573
+ int(*)(void *,sqlite3*,const char*,int),
9574
+ void*
9575
+ );
9519
9576
 
9520
9577
  /*
9521
9578
  ** CAPI3REF: Configure an auto-checkpoint
@@ -9663,11 +9720,11 @@ SQLITE_API int sqlite3_wal_checkpoint(sqlite3 *db, const char *zDb);
9663
9720
  ** from SQL.
9664
9721
  */
9665
9722
  SQLITE_API int sqlite3_wal_checkpoint_v2(
9666
- sqlite3 *db, /* Database handle */
9667
- const char *zDb, /* Name of attached database (or NULL) */
9668
- int eMode, /* SQLITE_CHECKPOINT_* value */
9669
- int *pnLog, /* OUT: Size of WAL log in frames */
9670
- int *pnCkpt /* OUT: Total number of frames checkpointed */
9723
+ sqlite3 *db, /* Database handle */
9724
+ const char *zDb, /* Name of attached database (or NULL) */
9725
+ int eMode, /* SQLITE_CHECKPOINT_* value */
9726
+ int *pnLog, /* OUT: Size of WAL log in frames */
9727
+ int *pnCkpt /* OUT: Total number of frames checkpointed */
9671
9728
  );
9672
9729
 
9673
9730
  /*
@@ -9679,10 +9736,10 @@ SQLITE_API int sqlite3_wal_checkpoint_v2(
9679
9736
  ** See the [sqlite3_wal_checkpoint_v2()] documentation for details on the
9680
9737
  ** meaning of each of these checkpoint modes.
9681
9738
  */
9682
- #define SQLITE_CHECKPOINT_PASSIVE 0 /* Do as much as possible w/o blocking */
9683
- #define SQLITE_CHECKPOINT_FULL 1 /* Wait for writers, then checkpoint */
9684
- #define SQLITE_CHECKPOINT_RESTART 2 /* Like FULL but wait for readers */
9685
- #define SQLITE_CHECKPOINT_TRUNCATE 3 /* Like RESTART but also truncate WAL */
9739
+ #define SQLITE_CHECKPOINT_PASSIVE 0 /* Do as much as possible w/o blocking */
9740
+ #define SQLITE_CHECKPOINT_FULL 1 /* Wait for writers, then checkpoint */
9741
+ #define SQLITE_CHECKPOINT_RESTART 2 /* Like FULL but wait for readers */
9742
+ #define SQLITE_CHECKPOINT_TRUNCATE 3 /* Like RESTART but also truncate WAL */
9686
9743
 
9687
9744
  /*
9688
9745
  ** CAPI3REF: Virtual Table Interface Configuration
@@ -9702,7 +9759,7 @@ SQLITE_API int sqlite3_wal_checkpoint_v2(
9702
9759
  ** of parameters after C depend on which [virtual table configuration option]
9703
9760
  ** is used.
9704
9761
  */
9705
- SQLITE_API int sqlite3_vtab_config(sqlite3 *, int op, ...);
9762
+ SQLITE_API int sqlite3_vtab_config(sqlite3*, int op, ...);
9706
9763
 
9707
9764
  /*
9708
9765
  ** CAPI3REF: Virtual Table Configuration Options
@@ -9776,9 +9833,9 @@ SQLITE_API int sqlite3_vtab_config(sqlite3 *, int op, ...);
9776
9833
  ** </dl>
9777
9834
  */
9778
9835
  #define SQLITE_VTAB_CONSTRAINT_SUPPORT 1
9779
- #define SQLITE_VTAB_INNOCUOUS 2
9780
- #define SQLITE_VTAB_DIRECTONLY 3
9781
- #define SQLITE_VTAB_USES_ALL_SCHEMAS 4
9836
+ #define SQLITE_VTAB_INNOCUOUS 2
9837
+ #define SQLITE_VTAB_DIRECTONLY 3
9838
+ #define SQLITE_VTAB_USES_ALL_SCHEMAS 4
9782
9839
 
9783
9840
  /*
9784
9841
  ** CAPI3REF: Determine The Virtual Table Conflict Policy
@@ -9816,7 +9873,7 @@ SQLITE_API int sqlite3_vtab_on_conflict(sqlite3 *);
9816
9873
  ** current implementation, the sqlite3_vtab_nochange() interface does always
9817
9874
  ** returns false for the enhanced [UPDATE FROM] statement.
9818
9875
  */
9819
- SQLITE_API int sqlite3_vtab_nochange(sqlite3_context *);
9876
+ SQLITE_API int sqlite3_vtab_nochange(sqlite3_context*);
9820
9877
 
9821
9878
  /*
9822
9879
  ** CAPI3REF: Determine The Collation For a Virtual Table Constraint
@@ -9851,7 +9908,7 @@ SQLITE_API int sqlite3_vtab_nochange(sqlite3_context *);
9851
9908
  ** <li><p> Otherwise, "BINARY" is returned.
9852
9909
  ** </ol>
9853
9910
  */
9854
- SQLITE_API const char *sqlite3_vtab_collation(sqlite3_index_info *, int);
9911
+ SQLITE_API const char *sqlite3_vtab_collation(sqlite3_index_info*,int);
9855
9912
 
9856
9913
  /*
9857
9914
  ** CAPI3REF: Determine if a virtual table query is DISTINCT
@@ -9885,24 +9942,45 @@ SQLITE_API const char *sqlite3_vtab_collation(sqlite3_index_info *, int);
9885
9942
  ** <li value="2"><p>
9886
9943
  ** ^(If the sqlite3_vtab_distinct() interface returns 2, that means
9887
9944
  ** that the query planner does not need the rows returned in any particular
9888
- ** order, as long as rows with the same values in all "aOrderBy" columns
9889
- ** are adjacent.)^ ^(Furthermore, only a single row for each particular
9890
- ** combination of values in the columns identified by the "aOrderBy" field
9891
- ** needs to be returned.)^ ^It is always ok for two or more rows with the same
9892
- ** values in all "aOrderBy" columns to be returned, as long as all such rows
9893
- ** are adjacent. ^The virtual table may, if it chooses, omit extra rows
9894
- ** that have the same value for all columns identified by "aOrderBy".
9895
- ** ^However omitting the extra rows is optional.
9945
+ ** order, as long as rows with the same values in all columns identified
9946
+ ** by "aOrderBy" are adjacent.)^ ^(Furthermore, when two or more rows
9947
+ ** contain the same values for all columns identified by "colUsed", all but
9948
+ ** one such row may optionally be omitted from the result.)^
9949
+ ** The virtual table is not required to omit rows that are duplicates
9950
+ ** over the "colUsed" columns, but if the virtual table can do that without
9951
+ ** too much extra effort, it could potentially help the query to run faster.
9896
9952
  ** This mode is used for a DISTINCT query.
9897
9953
  ** <li value="3"><p>
9898
- ** ^(If the sqlite3_vtab_distinct() interface returns 3, that means
9899
- ** that the query planner needs only distinct rows but it does need the
9900
- ** rows to be sorted.)^ ^The virtual table implementation is free to omit
9901
- ** rows that are identical in all aOrderBy columns, if it wants to, but
9902
- ** it is not required to omit any rows. This mode is used for queries
9954
+ ** ^(If the sqlite3_vtab_distinct() interface returns 3, that means the
9955
+ ** virtual table must return rows in the order defined by "aOrderBy" as
9956
+ ** if the sqlite3_vtab_distinct() interface had returned 0. However if
9957
+ ** two or more rows in the result have the same values for all columns
9958
+ ** identified by "colUsed", then all but one such row may optionally be
9959
+ ** omitted.)^ Like when the return value is 2, the virtual table
9960
+ ** is not required to omit rows that are duplicates over the "colUsed"
9961
+ ** columns, but if the virtual table can do that without
9962
+ ** too much extra effort, it could potentially help the query to run faster.
9963
+ ** This mode is used for queries
9903
9964
  ** that have both DISTINCT and ORDER BY clauses.
9904
9965
  ** </ol>
9905
9966
  **
9967
+ ** <p>The following table summarizes the conditions under which the
9968
+ ** virtual table is allowed to set the "orderByConsumed" flag based on
9969
+ ** the value returned by sqlite3_vtab_distinct(). This table is a
9970
+ ** restatement of the previous four paragraphs:
9971
+ **
9972
+ ** <table border=1 cellspacing=0 cellpadding=10 width="90%">
9973
+ ** <tr>
9974
+ ** <td valign="top">sqlite3_vtab_distinct() return value
9975
+ ** <td valign="top">Rows are returned in aOrderBy order
9976
+ ** <td valign="top">Rows with the same value in all aOrderBy columns are adjacent
9977
+ ** <td valign="top">Duplicates over all colUsed columns may be omitted
9978
+ ** <tr><td>0<td>yes<td>yes<td>no
9979
+ ** <tr><td>1<td>no<td>yes<td>no
9980
+ ** <tr><td>2<td>no<td>yes<td>yes
9981
+ ** <tr><td>3<td>yes<td>yes<td>yes
9982
+ ** </table>
9983
+ **
9906
9984
  ** ^For the purposes of comparing virtual table output values to see if the
9907
9985
  ** values are same value for sorting purposes, two NULL values are considered
9908
9986
  ** to be the same. In other words, the comparison operator is "IS"
@@ -9924,7 +10002,7 @@ SQLITE_API const char *sqlite3_vtab_collation(sqlite3_index_info *, int);
9924
10002
  ** valid to do so, on the other hand, might cause SQLite to return incorrect
9925
10003
  ** results.
9926
10004
  */
9927
- SQLITE_API int sqlite3_vtab_distinct(sqlite3_index_info *);
10005
+ SQLITE_API int sqlite3_vtab_distinct(sqlite3_index_info*);
9928
10006
 
9929
10007
  /*
9930
10008
  ** CAPI3REF: Identify and handle IN constraints in xBestIndex
@@ -9997,7 +10075,7 @@ SQLITE_API int sqlite3_vtab_distinct(sqlite3_index_info *);
9997
10075
  ** [sqlite3_vtab_in_next()] to find all values on the right-hand side
9998
10076
  ** of the IN constraint.
9999
10077
  */
10000
- SQLITE_API int sqlite3_vtab_in(sqlite3_index_info *, int iCons, int bHandle);
10078
+ SQLITE_API int sqlite3_vtab_in(sqlite3_index_info*, int iCons, int bHandle);
10001
10079
 
10002
10080
  /*
10003
10081
  ** CAPI3REF: Find all elements on the right-hand side of an IN constraint.
@@ -10044,8 +10122,7 @@ SQLITE_API int sqlite3_vtab_in(sqlite3_index_info *, int iCons, int bHandle);
10044
10122
  ** implementation needs to retain the *ppOut values for longer, it must make
10045
10123
  ** copies. The *ppOut values are [protected sqlite3_value|protected].
10046
10124
  */
10047
- SQLITE_API int sqlite3_vtab_in_first(sqlite3_value *pVal,
10048
- sqlite3_value **ppOut);
10125
+ SQLITE_API int sqlite3_vtab_in_first(sqlite3_value *pVal, sqlite3_value **ppOut);
10049
10126
  SQLITE_API int sqlite3_vtab_in_next(sqlite3_value *pVal, sqlite3_value **ppOut);
10050
10127
 
10051
10128
  /*
@@ -10088,8 +10165,7 @@ SQLITE_API int sqlite3_vtab_in_next(sqlite3_value *pVal, sqlite3_value **ppOut);
10088
10165
  ** The "_rhs_" in the name of this routine is an abbreviation for
10089
10166
  ** "Right-Hand Side".
10090
10167
  */
10091
- SQLITE_API int sqlite3_vtab_rhs_value(sqlite3_index_info *, int,
10092
- sqlite3_value **ppVal);
10168
+ SQLITE_API int sqlite3_vtab_rhs_value(sqlite3_index_info*, int, sqlite3_value **ppVal);
10093
10169
 
10094
10170
  /*
10095
10171
  ** CAPI3REF: Conflict resolution modes
@@ -10105,9 +10181,9 @@ SQLITE_API int sqlite3_vtab_rhs_value(sqlite3_index_info *, int,
10105
10181
  */
10106
10182
  #define SQLITE_ROLLBACK 1
10107
10183
  /* #define SQLITE_IGNORE 2 // Also used by sqlite3_authorizer() callback */
10108
- #define SQLITE_FAIL 3
10184
+ #define SQLITE_FAIL 3
10109
10185
  /* #define SQLITE_ABORT 4 // Also an error code */
10110
- #define SQLITE_REPLACE 5
10186
+ #define SQLITE_REPLACE 5
10111
10187
 
10112
10188
  /*
10113
10189
  ** CAPI3REF: Prepared Statement Scan Status Opcodes
@@ -10172,14 +10248,14 @@ SQLITE_API int sqlite3_vtab_rhs_value(sqlite3_index_info *, int,
10172
10248
  ** set to -1.
10173
10249
  ** </dl>
10174
10250
  */
10175
- #define SQLITE_SCANSTAT_NLOOP 0
10176
- #define SQLITE_SCANSTAT_NVISIT 1
10177
- #define SQLITE_SCANSTAT_EST 2
10178
- #define SQLITE_SCANSTAT_NAME 3
10179
- #define SQLITE_SCANSTAT_EXPLAIN 4
10251
+ #define SQLITE_SCANSTAT_NLOOP 0
10252
+ #define SQLITE_SCANSTAT_NVISIT 1
10253
+ #define SQLITE_SCANSTAT_EST 2
10254
+ #define SQLITE_SCANSTAT_NAME 3
10255
+ #define SQLITE_SCANSTAT_EXPLAIN 4
10180
10256
  #define SQLITE_SCANSTAT_SELECTID 5
10181
10257
  #define SQLITE_SCANSTAT_PARENTID 6
10182
- #define SQLITE_SCANSTAT_NCYCLE 7
10258
+ #define SQLITE_SCANSTAT_NCYCLE 7
10183
10259
 
10184
10260
  /*
10185
10261
  ** CAPI3REF: Prepared Statement Scan Status
@@ -10219,17 +10295,17 @@ SQLITE_API int sqlite3_vtab_rhs_value(sqlite3_index_info *, int,
10219
10295
  ** See also: [sqlite3_stmt_scanstatus_reset()]
10220
10296
  */
10221
10297
  SQLITE_API int sqlite3_stmt_scanstatus(
10222
- sqlite3_stmt *pStmt, /* Prepared statement for which info desired */
10223
- int idx, /* Index of loop to report on */
10224
- int iScanStatusOp, /* Information desired. SQLITE_SCANSTAT_* */
10225
- void *pOut /* Result written here */
10298
+ sqlite3_stmt *pStmt, /* Prepared statement for which info desired */
10299
+ int idx, /* Index of loop to report on */
10300
+ int iScanStatusOp, /* Information desired. SQLITE_SCANSTAT_* */
10301
+ void *pOut /* Result written here */
10226
10302
  );
10227
10303
  SQLITE_API int sqlite3_stmt_scanstatus_v2(
10228
- sqlite3_stmt *pStmt, /* Prepared statement for which info desired */
10229
- int idx, /* Index of loop to report on */
10230
- int iScanStatusOp, /* Information desired. SQLITE_SCANSTAT_* */
10231
- int flags, /* Mask of flags defined below */
10232
- void *pOut /* Result written here */
10304
+ sqlite3_stmt *pStmt, /* Prepared statement for which info desired */
10305
+ int idx, /* Index of loop to report on */
10306
+ int iScanStatusOp, /* Information desired. SQLITE_SCANSTAT_* */
10307
+ int flags, /* Mask of flags defined below */
10308
+ void *pOut /* Result written here */
10233
10309
  );
10234
10310
 
10235
10311
  /*
@@ -10247,7 +10323,7 @@ SQLITE_API int sqlite3_stmt_scanstatus_v2(
10247
10323
  ** This API is only available if the library is built with pre-processor
10248
10324
  ** symbol [SQLITE_ENABLE_STMT_SCANSTATUS] defined.
10249
10325
  */
10250
- SQLITE_API void sqlite3_stmt_scanstatus_reset(sqlite3_stmt *);
10326
+ SQLITE_API void sqlite3_stmt_scanstatus_reset(sqlite3_stmt*);
10251
10327
 
10252
10328
  /*
10253
10329
  ** CAPI3REF: Flush caches to disk mid-transaction
@@ -10280,7 +10356,7 @@ SQLITE_API void sqlite3_stmt_scanstatus_reset(sqlite3_stmt *);
10280
10356
  ** ^This function does not set the database handle error code or message
10281
10357
  ** returned by the [sqlite3_errcode()] and [sqlite3_errmsg()] functions.
10282
10358
  */
10283
- SQLITE_API int sqlite3_db_cacheflush(sqlite3 *);
10359
+ SQLITE_API int sqlite3_db_cacheflush(sqlite3*);
10284
10360
 
10285
10361
  /*
10286
10362
  ** CAPI3REF: The pre-update hook.
@@ -10380,17 +10456,18 @@ SQLITE_API int sqlite3_db_cacheflush(sqlite3 *);
10380
10456
  */
10381
10457
  #if defined(SQLITE_ENABLE_PREUPDATE_HOOK)
10382
10458
  SQLITE_API void *sqlite3_preupdate_hook(
10383
- sqlite3 *db,
10384
- void (*xPreUpdate)(
10385
- void *pCtx, /* Copy of third arg to preupdate_hook() */
10386
- sqlite3 *db, /* Database handle */
10387
- int op, /* SQLITE_UPDATE, DELETE or INSERT */
10388
- char const *zDb, /* Database name */
10389
- char const *zName, /* Table name */
10390
- sqlite3_int64 iKey1, /* Rowid of row about to be deleted/updated */
10391
- sqlite3_int64 iKey2 /* New rowid value (for a rowid UPDATE) */
10392
- ),
10393
- void *);
10459
+ sqlite3 *db,
10460
+ void(*xPreUpdate)(
10461
+ void *pCtx, /* Copy of third arg to preupdate_hook() */
10462
+ sqlite3 *db, /* Database handle */
10463
+ int op, /* SQLITE_UPDATE, DELETE or INSERT */
10464
+ char const *zDb, /* Database name */
10465
+ char const *zName, /* Table name */
10466
+ sqlite3_int64 iKey1, /* Rowid of row about to be deleted/updated */
10467
+ sqlite3_int64 iKey2 /* New rowid value (for a rowid UPDATE) */
10468
+ ),
10469
+ void*
10470
+ );
10394
10471
  SQLITE_API int sqlite3_preupdate_old(sqlite3 *, int, sqlite3_value **);
10395
10472
  SQLITE_API int sqlite3_preupdate_count(sqlite3 *);
10396
10473
  SQLITE_API int sqlite3_preupdate_depth(sqlite3 *);
@@ -10409,7 +10486,7 @@ SQLITE_API int sqlite3_preupdate_blobwrite(sqlite3 *);
10409
10486
  ** called to get back the underlying "errno" that caused the problem, such
10410
10487
  ** as ENOSPC, EAUTH, EISDIR, and so forth.
10411
10488
  */
10412
- SQLITE_API int sqlite3_system_errno(sqlite3 *);
10489
+ SQLITE_API int sqlite3_system_errno(sqlite3*);
10413
10490
 
10414
10491
  /*
10415
10492
  ** CAPI3REF: Database Snapshot
@@ -10478,9 +10555,11 @@ typedef struct sqlite3_snapshot {
10478
10555
  ** The [sqlite3_snapshot_get()] interface is only available when the
10479
10556
  ** [SQLITE_ENABLE_SNAPSHOT] compile-time option is used.
10480
10557
  */
10481
- SQLITE_API SQLITE_EXPERIMENTAL int
10482
- sqlite3_snapshot_get(sqlite3 *db, const char *zSchema,
10483
- sqlite3_snapshot **ppSnapshot);
10558
+ SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_get(
10559
+ sqlite3 *db,
10560
+ const char *zSchema,
10561
+ sqlite3_snapshot **ppSnapshot
10562
+ );
10484
10563
 
10485
10564
  /*
10486
10565
  ** CAPI3REF: Start a read transaction on an historical snapshot
@@ -10525,9 +10604,11 @@ sqlite3_snapshot_get(sqlite3 *db, const char *zSchema,
10525
10604
  ** The [sqlite3_snapshot_open()] interface is only available when the
10526
10605
  ** [SQLITE_ENABLE_SNAPSHOT] compile-time option is used.
10527
10606
  */
10528
- SQLITE_API SQLITE_EXPERIMENTAL int
10529
- sqlite3_snapshot_open(sqlite3 *db, const char *zSchema,
10530
- sqlite3_snapshot *pSnapshot);
10607
+ SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_open(
10608
+ sqlite3 *db,
10609
+ const char *zSchema,
10610
+ sqlite3_snapshot *pSnapshot
10611
+ );
10531
10612
 
10532
10613
  /*
10533
10614
  ** CAPI3REF: Destroy a snapshot
@@ -10540,7 +10621,7 @@ sqlite3_snapshot_open(sqlite3 *db, const char *zSchema,
10540
10621
  ** The [sqlite3_snapshot_free()] interface is only available when the
10541
10622
  ** [SQLITE_ENABLE_SNAPSHOT] compile-time option is used.
10542
10623
  */
10543
- SQLITE_API SQLITE_EXPERIMENTAL void sqlite3_snapshot_free(sqlite3_snapshot *);
10624
+ SQLITE_API SQLITE_EXPERIMENTAL void sqlite3_snapshot_free(sqlite3_snapshot*);
10544
10625
 
10545
10626
  /*
10546
10627
  ** CAPI3REF: Compare the ages of two snapshot handles.
@@ -10567,8 +10648,10 @@ SQLITE_API SQLITE_EXPERIMENTAL void sqlite3_snapshot_free(sqlite3_snapshot *);
10567
10648
  ** This interface is only available if SQLite is compiled with the
10568
10649
  ** [SQLITE_ENABLE_SNAPSHOT] option.
10569
10650
  */
10570
- SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_cmp(sqlite3_snapshot *p1,
10571
- sqlite3_snapshot *p2);
10651
+ SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_cmp(
10652
+ sqlite3_snapshot *p1,
10653
+ sqlite3_snapshot *p2
10654
+ );
10572
10655
 
10573
10656
  /*
10574
10657
  ** CAPI3REF: Recover snapshots from a wal file
@@ -10593,8 +10676,7 @@ SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_cmp(sqlite3_snapshot *p1,
10593
10676
  ** This interface is only available if SQLite is compiled with the
10594
10677
  ** [SQLITE_ENABLE_SNAPSHOT] option.
10595
10678
  */
10596
- SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_recover(sqlite3 *db,
10597
- const char *zDb);
10679
+ SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_recover(sqlite3 *db, const char *zDb);
10598
10680
 
10599
10681
  /*
10600
10682
  ** CAPI3REF: Serialize a database
@@ -10640,10 +10722,10 @@ SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_recover(sqlite3 *db,
10640
10722
  ** [SQLITE_OMIT_DESERIALIZE] option.
10641
10723
  */
10642
10724
  SQLITE_API unsigned char *sqlite3_serialize(
10643
- sqlite3 *db, /* The database connection */
10644
- const char *zSchema, /* Which DB to serialize. ex: "main", "temp", ... */
10645
- sqlite3_int64 *piSize, /* Write size of the DB here, if not NULL */
10646
- unsigned int mFlags /* Zero or more SQLITE_SERIALIZE_* flags */
10725
+ sqlite3 *db, /* The database connection */
10726
+ const char *zSchema, /* Which DB to serialize. ex: "main", "temp", ... */
10727
+ sqlite3_int64 *piSize, /* Write size of the DB here, if not NULL */
10728
+ unsigned int mFlags /* Zero or more SQLITE_SERIALIZE_* flags */
10647
10729
  );
10648
10730
 
10649
10731
  /*
@@ -10660,7 +10742,7 @@ SQLITE_API unsigned char *sqlite3_serialize(
10660
10742
  ** using a contiguous in-memory database if it has been initialized by a
10661
10743
  ** prior call to [sqlite3_deserialize()].
10662
10744
  */
10663
- #define SQLITE_SERIALIZE_NOCOPY 0x001 /* Do no memory allocations */
10745
+ #define SQLITE_SERIALIZE_NOCOPY 0x001 /* Do no memory allocations */
10664
10746
 
10665
10747
  /*
10666
10748
  ** CAPI3REF: Deserialize a database
@@ -10706,12 +10788,12 @@ SQLITE_API unsigned char *sqlite3_serialize(
10706
10788
  ** [SQLITE_OMIT_DESERIALIZE] option.
10707
10789
  */
10708
10790
  SQLITE_API int sqlite3_deserialize(
10709
- sqlite3 *db, /* The database connection */
10710
- const char *zSchema, /* Which DB to reopen with the deserialization */
10711
- unsigned char *pData, /* The serialized database content */
10712
- sqlite3_int64 szDb, /* Number bytes in the deserialization */
10713
- sqlite3_int64 szBuf, /* Total size of buffer pData[] */
10714
- unsigned mFlags /* Zero or more SQLITE_DESERIALIZE_* flags */
10791
+ sqlite3 *db, /* The database connection */
10792
+ const char *zSchema, /* Which DB to reopen with the deserialization */
10793
+ unsigned char *pData, /* The serialized database content */
10794
+ sqlite3_int64 szDb, /* Number bytes in the deserialization */
10795
+ sqlite3_int64 szBuf, /* Total size of buffer pData[] */
10796
+ unsigned mFlags /* Zero or more SQLITE_DESERIALIZE_* flags */
10715
10797
  );
10716
10798
 
10717
10799
  /*
@@ -10736,32 +10818,32 @@ SQLITE_API int sqlite3_deserialize(
10736
10818
  ** should be treated as read-only.
10737
10819
  */
10738
10820
  #define SQLITE_DESERIALIZE_FREEONCLOSE 1 /* Call sqlite3_free() on close */
10739
- #define SQLITE_DESERIALIZE_RESIZEABLE 2 /* Resize using sqlite3_realloc64() */
10740
- #define SQLITE_DESERIALIZE_READONLY 4 /* Database is read-only */
10821
+ #define SQLITE_DESERIALIZE_RESIZEABLE 2 /* Resize using sqlite3_realloc64() */
10822
+ #define SQLITE_DESERIALIZE_READONLY 4 /* Database is read-only */
10741
10823
 
10742
10824
  /*
10743
10825
  ** Undo the hack that converts floating point types to integer for
10744
10826
  ** builds on processors without floating point support.
10745
10827
  */
10746
10828
  #ifdef SQLITE_OMIT_FLOATING_POINT
10747
- #undef double
10829
+ # undef double
10748
10830
  #endif
10749
10831
 
10750
10832
  #if defined(__wasi__)
10751
- #undef SQLITE_WASI
10752
- #define SQLITE_WASI 1
10753
- #undef SQLITE_OMIT_WAL
10754
- #define SQLITE_OMIT_WAL 1 /* because it requires shared memory APIs */
10755
- #ifndef SQLITE_OMIT_LOAD_EXTENSION
10756
- #define SQLITE_OMIT_LOAD_EXTENSION
10757
- #endif
10758
- #ifndef SQLITE_THREADSAFE
10759
- #define SQLITE_THREADSAFE 0
10760
- #endif
10833
+ # undef SQLITE_WASI
10834
+ # define SQLITE_WASI 1
10835
+ # undef SQLITE_OMIT_WAL
10836
+ # define SQLITE_OMIT_WAL 1/* because it requires shared memory APIs */
10837
+ # ifndef SQLITE_OMIT_LOAD_EXTENSION
10838
+ # define SQLITE_OMIT_LOAD_EXTENSION
10839
+ # endif
10840
+ # ifndef SQLITE_THREADSAFE
10841
+ # define SQLITE_THREADSAFE 0
10842
+ # endif
10761
10843
  #endif
10762
10844
 
10763
10845
  #ifdef __cplusplus
10764
- } /* End of the 'extern "C"' block */
10846
+ } /* End of the 'extern "C"' block */
10765
10847
  #endif
10766
10848
  #endif /* SQLITE3_H */
10767
10849
 
@@ -10782,6 +10864,7 @@ SQLITE_API int sqlite3_deserialize(
10782
10864
  #ifndef _SQLITE3RTREE_H_
10783
10865
  #define _SQLITE3RTREE_H_
10784
10866
 
10867
+
10785
10868
  #ifdef __cplusplus
10786
10869
  extern "C" {
10787
10870
  #endif
@@ -10793,9 +10876,9 @@ typedef struct sqlite3_rtree_query_info sqlite3_rtree_query_info;
10793
10876
  ** SQLITE_RTREE_INT_ONLY compile-time option.
10794
10877
  */
10795
10878
  #ifdef SQLITE_RTREE_INT_ONLY
10796
- typedef sqlite3_int64 sqlite3_rtree_dbl;
10879
+ typedef sqlite3_int64 sqlite3_rtree_dbl;
10797
10880
  #else
10798
- typedef double sqlite3_rtree_dbl;
10881
+ typedef double sqlite3_rtree_dbl;
10799
10882
  #endif
10800
10883
 
10801
10884
  /*
@@ -10805,20 +10888,23 @@ typedef double sqlite3_rtree_dbl;
10805
10888
  ** SELECT ... FROM <rtree> WHERE <rtree col> MATCH $zGeom(... params ...)
10806
10889
  */
10807
10890
  SQLITE_API int sqlite3_rtree_geometry_callback(
10808
- sqlite3 *db, const char *zGeom,
10809
- int (*xGeom)(sqlite3_rtree_geometry *, int, sqlite3_rtree_dbl *, int *),
10810
- void *pContext);
10891
+ sqlite3 *db,
10892
+ const char *zGeom,
10893
+ int (*xGeom)(sqlite3_rtree_geometry*, int, sqlite3_rtree_dbl*,int*),
10894
+ void *pContext
10895
+ );
10896
+
10811
10897
 
10812
10898
  /*
10813
10899
  ** A pointer to a structure of the following type is passed as the first
10814
10900
  ** argument to callbacks registered using rtree_geometry_callback().
10815
10901
  */
10816
10902
  struct sqlite3_rtree_geometry {
10817
- void *pContext; /* Copy of pContext passed to s_r_g_c() */
10818
- int nParam; /* Size of array aParam[] */
10819
- sqlite3_rtree_dbl *aParam; /* Parameters passed to SQL geom function */
10820
- void *pUser; /* Callback implementation user data */
10821
- void (*xDelUser)(void *); /* Called by SQLite to clean up pUser */
10903
+ void *pContext; /* Copy of pContext passed to s_r_g_c() */
10904
+ int nParam; /* Size of array aParam[] */
10905
+ sqlite3_rtree_dbl *aParam; /* Parameters passed to SQL geom function */
10906
+ void *pUser; /* Callback implementation user data */
10907
+ void (*xDelUser)(void *); /* Called by SQLite to clean up pUser */
10822
10908
  };
10823
10909
 
10824
10910
  /*
@@ -10827,10 +10913,14 @@ struct sqlite3_rtree_geometry {
10827
10913
  **
10828
10914
  ** SELECT ... FROM <rtree> WHERE <rtree col> MATCH $zQueryFunc(... params ...)
10829
10915
  */
10830
- SQLITE_API int
10831
- sqlite3_rtree_query_callback(sqlite3 *db, const char *zQueryFunc,
10832
- int (*xQueryFunc)(sqlite3_rtree_query_info *),
10833
- void *pContext, void (*xDestructor)(void *));
10916
+ SQLITE_API int sqlite3_rtree_query_callback(
10917
+ sqlite3 *db,
10918
+ const char *zQueryFunc,
10919
+ int (*xQueryFunc)(sqlite3_rtree_query_info*),
10920
+ void *pContext,
10921
+ void (*xDestructor)(void*)
10922
+ );
10923
+
10834
10924
 
10835
10925
  /*
10836
10926
  ** A pointer to a structure of the following type is passed as the
@@ -10842,37 +10932,38 @@ sqlite3_rtree_query_callback(sqlite3 *db, const char *zQueryFunc,
10842
10932
  ** sqlite3_rtree_geometry.
10843
10933
  */
10844
10934
  struct sqlite3_rtree_query_info {
10845
- void *pContext; /* pContext from when function registered */
10846
- int nParam; /* Number of function parameters */
10847
- sqlite3_rtree_dbl *aParam; /* value of function parameters */
10848
- void *pUser; /* callback can use this, if desired */
10849
- void (*xDelUser)(void *); /* function to free pUser */
10850
- sqlite3_rtree_dbl *aCoord; /* Coordinates of node or entry to check */
10851
- unsigned int *anQueue; /* Number of pending entries in the queue */
10852
- int nCoord; /* Number of coordinates */
10853
- int iLevel; /* Level of current node or entry */
10854
- int mxLevel; /* The largest iLevel value in the tree */
10855
- sqlite3_int64 iRowid; /* Rowid for current entry */
10856
- sqlite3_rtree_dbl rParentScore; /* Score of parent node */
10857
- int eParentWithin; /* Visibility of parent node */
10858
- int eWithin; /* OUT: Visibility */
10859
- sqlite3_rtree_dbl rScore; /* OUT: Write the score here */
10935
+ void *pContext; /* pContext from when function registered */
10936
+ int nParam; /* Number of function parameters */
10937
+ sqlite3_rtree_dbl *aParam; /* value of function parameters */
10938
+ void *pUser; /* callback can use this, if desired */
10939
+ void (*xDelUser)(void*); /* function to free pUser */
10940
+ sqlite3_rtree_dbl *aCoord; /* Coordinates of node or entry to check */
10941
+ unsigned int *anQueue; /* Number of pending entries in the queue */
10942
+ int nCoord; /* Number of coordinates */
10943
+ int iLevel; /* Level of current node or entry */
10944
+ int mxLevel; /* The largest iLevel value in the tree */
10945
+ sqlite3_int64 iRowid; /* Rowid for current entry */
10946
+ sqlite3_rtree_dbl rParentScore; /* Score of parent node */
10947
+ int eParentWithin; /* Visibility of parent node */
10948
+ int eWithin; /* OUT: Visibility */
10949
+ sqlite3_rtree_dbl rScore; /* OUT: Write the score here */
10860
10950
  /* The following fields are only available in 3.8.11 and later */
10861
- sqlite3_value **apSqlParam; /* Original SQL values of parameters */
10951
+ sqlite3_value **apSqlParam; /* Original SQL values of parameters */
10862
10952
  };
10863
10953
 
10864
10954
  /*
10865
10955
  ** Allowed values for sqlite3_rtree_query.eWithin and .eParentWithin.
10866
10956
  */
10867
- #define NOT_WITHIN 0 /* Object completely outside of query region */
10868
- #define PARTLY_WITHIN 1 /* Object partially overlaps query region */
10869
- #define FULLY_WITHIN 2 /* Object fully contained within query region */
10957
+ #define NOT_WITHIN 0 /* Object completely outside of query region */
10958
+ #define PARTLY_WITHIN 1 /* Object partially overlaps query region */
10959
+ #define FULLY_WITHIN 2 /* Object fully contained within query region */
10960
+
10870
10961
 
10871
10962
  #ifdef __cplusplus
10872
- } /* end of the 'extern "C"' block */
10963
+ } /* end of the 'extern "C"' block */
10873
10964
  #endif
10874
10965
 
10875
- #endif /* ifndef _SQLITE3RTREE_H_ */
10966
+ #endif /* ifndef _SQLITE3RTREE_H_ */
10876
10967
 
10877
10968
  /******** End of sqlite3rtree.h *********/
10878
10969
  /******** Begin file sqlite3session.h *********/
@@ -10887,6 +10978,7 @@ struct sqlite3_rtree_query_info {
10887
10978
  extern "C" {
10888
10979
  #endif
10889
10980
 
10981
+
10890
10982
  /*
10891
10983
  ** CAPI3REF: Session Object Handle
10892
10984
  **
@@ -10934,10 +11026,10 @@ typedef struct sqlite3_changeset_iter sqlite3_changeset_iter;
10934
11026
  ** attached database. It is not an error if database zDb is not attached
10935
11027
  ** to the database when the session object is created.
10936
11028
  */
10937
- SQLITE_API int
10938
- sqlite3session_create(sqlite3 *db, /* Database handle */
10939
- const char *zDb, /* Name of db (e.g. "main") */
10940
- sqlite3_session **ppSession /* OUT: New session object */
11029
+ SQLITE_API int sqlite3session_create(
11030
+ sqlite3 *db, /* Database handle */
11031
+ const char *zDb, /* Name of db (e.g. "main") */
11032
+ sqlite3_session **ppSession /* OUT: New session object */
10941
11033
  );
10942
11034
 
10943
11035
  /*
@@ -10964,8 +11056,7 @@ SQLITE_API void sqlite3session_delete(sqlite3_session *pSession);
10964
11056
  ** [SQLITE_SESSION_OBJCONFIG_SIZE] and [SQLITE_SESSION_OBJCONFIG_ROWID].
10965
11057
  **
10966
11058
  */
10967
- SQLITE_API int sqlite3session_object_config(sqlite3_session *, int op,
10968
- void *pArg);
11059
+ SQLITE_API int sqlite3session_object_config(sqlite3_session*, int op, void *pArg);
10969
11060
 
10970
11061
  /*
10971
11062
  ** CAPI3REF: Options for sqlite3session_object_config
@@ -10999,7 +11090,7 @@ SQLITE_API int sqlite3session_object_config(sqlite3_session *, int op,
10999
11090
  ** It is an error (SQLITE_MISUSE) to attempt to modify this setting after
11000
11091
  ** the first table has been attached to the session object.
11001
11092
  */
11002
- #define SQLITE_SESSION_OBJCONFIG_SIZE 1
11093
+ #define SQLITE_SESSION_OBJCONFIG_SIZE 1
11003
11094
  #define SQLITE_SESSION_OBJCONFIG_ROWID 2
11004
11095
 
11005
11096
  /*
@@ -11050,8 +11141,7 @@ SQLITE_API int sqlite3session_enable(sqlite3_session *pSession, int bEnable);
11050
11141
  ** The return value indicates the final state of the indirect flag: 0 if
11051
11142
  ** it is clear, or 1 if it is set.
11052
11143
  */
11053
- SQLITE_API int sqlite3session_indirect(sqlite3_session *pSession,
11054
- int bIndirect);
11144
+ SQLITE_API int sqlite3session_indirect(sqlite3_session *pSession, int bIndirect);
11055
11145
 
11056
11146
  /*
11057
11147
  ** CAPI3REF: Attach A Table To A Session Object
@@ -11111,9 +11201,9 @@ SQLITE_API int sqlite3session_indirect(sqlite3_session *pSession,
11111
11201
  ** sqlite3changeset_apply() function silently ignore any modifications to the
11112
11202
  ** sqlite_stat1 table that are part of a changeset or patchset.
11113
11203
  */
11114
- SQLITE_API int
11115
- sqlite3session_attach(sqlite3_session *pSession, /* Session object */
11116
- const char *zTab /* Table name */
11204
+ SQLITE_API int sqlite3session_attach(
11205
+ sqlite3_session *pSession, /* Session object */
11206
+ const char *zTab /* Table name */
11117
11207
  );
11118
11208
 
11119
11209
  /*
@@ -11127,11 +11217,12 @@ sqlite3session_attach(sqlite3_session *pSession, /* Session object */
11127
11217
  ** attached, xFilter will not be called again.
11128
11218
  */
11129
11219
  SQLITE_API void sqlite3session_table_filter(
11130
- sqlite3_session *pSession, /* Session object */
11131
- int (*xFilter)(void *pCtx, /* Copy of third arg to _filter_table() */
11132
- const char *zTab /* Table name */
11133
- ),
11134
- void *pCtx /* First argument passed to xFilter */
11220
+ sqlite3_session *pSession, /* Session object */
11221
+ int(*xFilter)(
11222
+ void *pCtx, /* Copy of third arg to _filter_table() */
11223
+ const char *zTab /* Table name */
11224
+ ),
11225
+ void *pCtx /* First argument passed to xFilter */
11135
11226
  );
11136
11227
 
11137
11228
  /*
@@ -11240,9 +11331,9 @@ SQLITE_API void sqlite3session_table_filter(
11240
11331
  ** resulting changeset will contain an UPDATE change that updates both fields.
11241
11332
  */
11242
11333
  SQLITE_API int sqlite3session_changeset(
11243
- sqlite3_session *pSession, /* Session object */
11244
- int *pnChangeset, /* OUT: Size of buffer at *ppChangeset */
11245
- void **ppChangeset /* OUT: Buffer containing changeset */
11334
+ sqlite3_session *pSession, /* Session object */
11335
+ int *pnChangeset, /* OUT: Size of buffer at *ppChangeset */
11336
+ void **ppChangeset /* OUT: Buffer containing changeset */
11246
11337
  );
11247
11338
 
11248
11339
  /*
@@ -11259,8 +11350,7 @@ SQLITE_API int sqlite3session_changeset(
11259
11350
  ** called. The final changeset size might be equal to or smaller than the
11260
11351
  ** size in bytes returned by this function.
11261
11352
  */
11262
- SQLITE_API sqlite3_int64
11263
- sqlite3session_changeset_size(sqlite3_session *pSession);
11353
+ SQLITE_API sqlite3_int64 sqlite3session_changeset_size(sqlite3_session *pSession);
11264
11354
 
11265
11355
  /*
11266
11356
  ** CAPI3REF: Load The Difference Between Tables Into A Session
@@ -11319,9 +11409,13 @@ sqlite3session_changeset_size(sqlite3_session *pSession);
11319
11409
  ** message. It is the responsibility of the caller to free this buffer using
11320
11410
  ** sqlite3_free().
11321
11411
  */
11322
- SQLITE_API int sqlite3session_diff(sqlite3_session *pSession,
11323
- const char *zFromDb, const char *zTbl,
11324
- char **pzErrMsg);
11412
+ SQLITE_API int sqlite3session_diff(
11413
+ sqlite3_session *pSession,
11414
+ const char *zFromDb,
11415
+ const char *zTbl,
11416
+ char **pzErrMsg
11417
+ );
11418
+
11325
11419
 
11326
11420
  /*
11327
11421
  ** CAPI3REF: Generate A Patchset From A Session Object
@@ -11353,9 +11447,9 @@ SQLITE_API int sqlite3session_diff(sqlite3_session *pSession,
11353
11447
  ** they were attached to the session object).
11354
11448
  */
11355
11449
  SQLITE_API int sqlite3session_patchset(
11356
- sqlite3_session *pSession, /* Session object */
11357
- int *pnPatchset, /* OUT: Size of buffer at *ppPatchset */
11358
- void **ppPatchset /* OUT: Buffer containing patchset */
11450
+ sqlite3_session *pSession, /* Session object */
11451
+ int *pnPatchset, /* OUT: Size of buffer at *ppPatchset */
11452
+ void **ppPatchset /* OUT: Buffer containing patchset */
11359
11453
  );
11360
11454
 
11361
11455
  /*
@@ -11425,15 +11519,15 @@ SQLITE_API sqlite3_int64 sqlite3session_memory_used(sqlite3_session *pSession);
11425
11519
  ** and therefore subject to change.
11426
11520
  */
11427
11521
  SQLITE_API int sqlite3changeset_start(
11428
- sqlite3_changeset_iter **pp, /* OUT: New changeset iterator handle */
11429
- int nChangeset, /* Size of changeset blob in bytes */
11430
- void *pChangeset /* Pointer to blob containing changeset */
11522
+ sqlite3_changeset_iter **pp, /* OUT: New changeset iterator handle */
11523
+ int nChangeset, /* Size of changeset blob in bytes */
11524
+ void *pChangeset /* Pointer to blob containing changeset */
11431
11525
  );
11432
11526
  SQLITE_API int sqlite3changeset_start_v2(
11433
- sqlite3_changeset_iter **pp, /* OUT: New changeset iterator handle */
11434
- int nChangeset, /* Size of changeset blob in bytes */
11435
- void *pChangeset, /* Pointer to blob containing changeset */
11436
- int flags /* SESSION_CHANGESETSTART_* flags */
11527
+ sqlite3_changeset_iter **pp, /* OUT: New changeset iterator handle */
11528
+ int nChangeset, /* Size of changeset blob in bytes */
11529
+ void *pChangeset, /* Pointer to blob containing changeset */
11530
+ int flags /* SESSION_CHANGESETSTART_* flags */
11437
11531
  );
11438
11532
 
11439
11533
  /*
@@ -11447,7 +11541,8 @@ SQLITE_API int sqlite3changeset_start_v2(
11447
11541
  ** inverting a changeset using sqlite3changeset_invert() before applying it.
11448
11542
  ** It is an error to specify this flag with a patchset.
11449
11543
  */
11450
- #define SQLITE_CHANGESETSTART_INVERT 0x0002
11544
+ #define SQLITE_CHANGESETSTART_INVERT 0x0002
11545
+
11451
11546
 
11452
11547
  /*
11453
11548
  ** CAPI3REF: Advance A Changeset Iterator
@@ -11490,8 +11585,7 @@ SQLITE_API int sqlite3changeset_next(sqlite3_changeset_iter *pIter);
11490
11585
  ** *pOp is set to one of [SQLITE_INSERT], [SQLITE_DELETE] or [SQLITE_UPDATE],
11491
11586
  ** depending on the type of change that the iterator currently points to;
11492
11587
  **
11493
- ** *pnCol is set to the number of columns in the table affected by the change;
11494
- *and
11588
+ ** *pnCol is set to the number of columns in the table affected by the change; and
11495
11589
  **
11496
11590
  ** *pzTab is set to point to a nul-terminated utf-8 encoded string containing
11497
11591
  ** the name of the table affected by the current change. The buffer remains
@@ -11507,12 +11601,12 @@ SQLITE_API int sqlite3changeset_next(sqlite3_changeset_iter *pIter);
11507
11601
  ** SQLite error code is returned. The values of the output variables may not
11508
11602
  ** be trusted in this case.
11509
11603
  */
11510
- SQLITE_API int
11511
- sqlite3changeset_op(sqlite3_changeset_iter *pIter, /* Iterator object */
11512
- const char **pzTab, /* OUT: Pointer to table name */
11513
- int *pnCol, /* OUT: Number of columns in table */
11514
- int *pOp, /* OUT: SQLITE_INSERT, DELETE or UPDATE */
11515
- int *pbIndirect /* OUT: True for an 'indirect' change */
11604
+ SQLITE_API int sqlite3changeset_op(
11605
+ sqlite3_changeset_iter *pIter, /* Iterator object */
11606
+ const char **pzTab, /* OUT: Pointer to table name */
11607
+ int *pnCol, /* OUT: Number of columns in table */
11608
+ int *pOp, /* OUT: SQLITE_INSERT, DELETE or UPDATE */
11609
+ int *pbIndirect /* OUT: True for an 'indirect' change */
11516
11610
  );
11517
11611
 
11518
11612
  /*
@@ -11542,9 +11636,9 @@ sqlite3changeset_op(sqlite3_changeset_iter *pIter, /* Iterator object */
11542
11636
  ** above.
11543
11637
  */
11544
11638
  SQLITE_API int sqlite3changeset_pk(
11545
- sqlite3_changeset_iter *pIter, /* Iterator object */
11546
- unsigned char **pabPK, /* OUT: Array of boolean - true for PK cols */
11547
- int *pnCol /* OUT: Number of entries in output array */
11639
+ sqlite3_changeset_iter *pIter, /* Iterator object */
11640
+ unsigned char **pabPK, /* OUT: Array of boolean - true for PK cols */
11641
+ int *pnCol /* OUT: Number of entries in output array */
11548
11642
  );
11549
11643
 
11550
11644
  /*
@@ -11573,9 +11667,9 @@ SQLITE_API int sqlite3changeset_pk(
11573
11667
  ** is returned and *ppValue is set to NULL.
11574
11668
  */
11575
11669
  SQLITE_API int sqlite3changeset_old(
11576
- sqlite3_changeset_iter *pIter, /* Changeset iterator */
11577
- int iVal, /* Column number */
11578
- sqlite3_value **ppValue /* OUT: Old value (or NULL pointer) */
11670
+ sqlite3_changeset_iter *pIter, /* Changeset iterator */
11671
+ int iVal, /* Column number */
11672
+ sqlite3_value **ppValue /* OUT: Old value (or NULL pointer) */
11579
11673
  );
11580
11674
 
11581
11675
  /*
@@ -11607,9 +11701,9 @@ SQLITE_API int sqlite3changeset_old(
11607
11701
  ** is returned and *ppValue is set to NULL.
11608
11702
  */
11609
11703
  SQLITE_API int sqlite3changeset_new(
11610
- sqlite3_changeset_iter *pIter, /* Changeset iterator */
11611
- int iVal, /* Column number */
11612
- sqlite3_value **ppValue /* OUT: New value (or NULL pointer) */
11704
+ sqlite3_changeset_iter *pIter, /* Changeset iterator */
11705
+ int iVal, /* Column number */
11706
+ sqlite3_value **ppValue /* OUT: New value (or NULL pointer) */
11613
11707
  );
11614
11708
 
11615
11709
  /*
@@ -11635,9 +11729,9 @@ SQLITE_API int sqlite3changeset_new(
11635
11729
  ** is returned and *ppValue is set to NULL.
11636
11730
  */
11637
11731
  SQLITE_API int sqlite3changeset_conflict(
11638
- sqlite3_changeset_iter *pIter, /* Changeset iterator */
11639
- int iVal, /* Column number */
11640
- sqlite3_value **ppValue /* OUT: Value from conflicting row */
11732
+ sqlite3_changeset_iter *pIter, /* Changeset iterator */
11733
+ int iVal, /* Column number */
11734
+ sqlite3_value **ppValue /* OUT: Value from conflicting row */
11641
11735
  );
11642
11736
 
11643
11737
  /*
@@ -11652,10 +11746,11 @@ SQLITE_API int sqlite3changeset_conflict(
11652
11746
  ** In all other cases this function returns SQLITE_MISUSE.
11653
11747
  */
11654
11748
  SQLITE_API int sqlite3changeset_fk_conflicts(
11655
- sqlite3_changeset_iter *pIter, /* Changeset iterator */
11656
- int *pnOut /* OUT: Number of FK violations */
11749
+ sqlite3_changeset_iter *pIter, /* Changeset iterator */
11750
+ int *pnOut /* OUT: Number of FK violations */
11657
11751
  );
11658
11752
 
11753
+
11659
11754
  /*
11660
11755
  ** CAPI3REF: Finalize A Changeset Iterator
11661
11756
  ** METHOD: sqlite3_changeset_iter
@@ -11716,10 +11811,9 @@ SQLITE_API int sqlite3changeset_finalize(sqlite3_changeset_iter *pIter);
11716
11811
  ** WARNING/TODO: This function currently assumes that the input is a valid
11717
11812
  ** changeset. If it is not, the results are undefined.
11718
11813
  */
11719
- SQLITE_API int sqlite3changeset_invert(int nIn,
11720
- const void *pIn, /* Input changeset */
11721
- int *pnOut,
11722
- void **ppOut /* OUT: Inverse of input */
11814
+ SQLITE_API int sqlite3changeset_invert(
11815
+ int nIn, const void *pIn, /* Input changeset */
11816
+ int *pnOut, void **ppOut /* OUT: Inverse of input */
11723
11817
  );
11724
11818
 
11725
11819
  /*
@@ -11749,23 +11843,27 @@ SQLITE_API int sqlite3changeset_invert(int nIn,
11749
11843
  ** Refer to the sqlite3_changegroup documentation below for details.
11750
11844
  */
11751
11845
  SQLITE_API int sqlite3changeset_concat(
11752
- int nA, /* Number of bytes in buffer pA */
11753
- void *pA, /* Pointer to buffer containing changeset A */
11754
- int nB, /* Number of bytes in buffer pB */
11755
- void *pB, /* Pointer to buffer containing changeset B */
11756
- int *pnOut, /* OUT: Number of bytes in output changeset */
11757
- void **ppOut /* OUT: Buffer containing output changeset */
11846
+ int nA, /* Number of bytes in buffer pA */
11847
+ void *pA, /* Pointer to buffer containing changeset A */
11848
+ int nB, /* Number of bytes in buffer pB */
11849
+ void *pB, /* Pointer to buffer containing changeset B */
11850
+ int *pnOut, /* OUT: Number of bytes in output changeset */
11851
+ void **ppOut /* OUT: Buffer containing output changeset */
11758
11852
  );
11759
11853
 
11854
+
11760
11855
  /*
11761
11856
  ** CAPI3REF: Upgrade the Schema of a Changeset/Patchset
11762
11857
  */
11763
- SQLITE_API int sqlite3changeset_upgrade(sqlite3 *db, const char *zDb, int nIn,
11764
- const void *pIn, /* Input changeset */
11765
- int *pnOut,
11766
- void **ppOut /* OUT: Inverse of input */
11858
+ SQLITE_API int sqlite3changeset_upgrade(
11859
+ sqlite3 *db,
11860
+ const char *zDb,
11861
+ int nIn, const void *pIn, /* Input changeset */
11862
+ int *pnOut, void **ppOut /* OUT: Inverse of input */
11767
11863
  );
11768
11864
 
11865
+
11866
+
11769
11867
  /*
11770
11868
  ** CAPI3REF: Changegroup Handle
11771
11869
  **
@@ -11842,8 +11940,7 @@ SQLITE_API int sqlite3changegroup_new(sqlite3_changegroup **pp);
11842
11940
  ** changesets that have different numbers of columns for a single table
11843
11941
  ** within a changegroup, provided that they are otherwise compatible.
11844
11942
  */
11845
- SQLITE_API int sqlite3changegroup_schema(sqlite3_changegroup *, sqlite3 *,
11846
- const char *zDb);
11943
+ SQLITE_API int sqlite3changegroup_schema(sqlite3_changegroup*, sqlite3*, const char *zDb);
11847
11944
 
11848
11945
  /*
11849
11946
  ** CAPI3REF: Add A Changeset To A Changegroup
@@ -11926,8 +12023,31 @@ SQLITE_API int sqlite3changegroup_schema(sqlite3_changegroup *, sqlite3 *,
11926
12023
  ** In all cases, if an error occurs the state of the final contents of the
11927
12024
  ** changegroup is undefined. If no error occurs, SQLITE_OK is returned.
11928
12025
  */
11929
- SQLITE_API int sqlite3changegroup_add(sqlite3_changegroup *, int nData,
11930
- void *pData);
12026
+ SQLITE_API int sqlite3changegroup_add(sqlite3_changegroup*, int nData, void *pData);
12027
+
12028
+ /*
12029
+ ** CAPI3REF: Add A Single Change To A Changegroup
12030
+ ** METHOD: sqlite3_changegroup
12031
+ **
12032
+ ** This function adds the single change currently indicated by the iterator
12033
+ ** passed as the second argument to the changegroup object. The rules for
12034
+ ** adding the change are just as described for [sqlite3changegroup_add()].
12035
+ **
12036
+ ** If the change is successfully added to the changegroup, SQLITE_OK is
12037
+ ** returned. Otherwise, an SQLite error code is returned.
12038
+ **
12039
+ ** The iterator must point to a valid entry when this function is called.
12040
+ ** If it does not, SQLITE_ERROR is returned and no change is added to the
12041
+ ** changegroup. Additionally, the iterator must not have been opened with
12042
+ ** the SQLITE_CHANGESETAPPLY_INVERT flag. In this case SQLITE_ERROR is also
12043
+ ** returned.
12044
+ */
12045
+ SQLITE_API int sqlite3changegroup_add_change(
12046
+ sqlite3_changegroup*,
12047
+ sqlite3_changeset_iter*
12048
+ );
12049
+
12050
+
11931
12051
 
11932
12052
  /*
11933
12053
  ** CAPI3REF: Obtain A Composite Changeset From A Changegroup
@@ -11954,17 +12074,17 @@ SQLITE_API int sqlite3changegroup_add(sqlite3_changegroup *, int nData,
11954
12074
  ** responsibility of the caller to eventually free the buffer using a
11955
12075
  ** call to sqlite3_free().
11956
12076
  */
11957
- SQLITE_API int
11958
- sqlite3changegroup_output(sqlite3_changegroup *,
11959
- int *pnData, /* OUT: Size of output buffer in bytes */
11960
- void **ppData /* OUT: Pointer to output buffer */
12077
+ SQLITE_API int sqlite3changegroup_output(
12078
+ sqlite3_changegroup*,
12079
+ int *pnData, /* OUT: Size of output buffer in bytes */
12080
+ void **ppData /* OUT: Pointer to output buffer */
11961
12081
  );
11962
12082
 
11963
12083
  /*
11964
12084
  ** CAPI3REF: Delete A Changegroup Object
11965
12085
  ** DESTRUCTOR: sqlite3_changegroup
11966
12086
  */
11967
- SQLITE_API void sqlite3changegroup_delete(sqlite3_changegroup *);
12087
+ SQLITE_API void sqlite3changegroup_delete(sqlite3_changegroup*);
11968
12088
 
11969
12089
  /*
11970
12090
  ** CAPI3REF: Apply A Changeset To A Database
@@ -12125,34 +12245,36 @@ SQLITE_API void sqlite3changegroup_delete(sqlite3_changegroup *);
12125
12245
  ** and therefore subject to change.
12126
12246
  */
12127
12247
  SQLITE_API int sqlite3changeset_apply(
12128
- sqlite3 *db, /* Apply change to "main" db of this handle */
12129
- int nChangeset, /* Size of changeset in bytes */
12130
- void *pChangeset, /* Changeset blob */
12131
- int (*xFilter)(void *pCtx, /* Copy of sixth arg to _apply() */
12132
- const char *zTab /* Table name */
12133
- ),
12134
- int (*xConflict)(
12135
- void *pCtx, /* Copy of sixth arg to _apply() */
12136
- int eConflict, /* DATA, MISSING, CONFLICT, CONSTRAINT */
12137
- sqlite3_changeset_iter *p /* Handle describing change and conflict */
12138
- ),
12139
- void *pCtx /* First argument passed to xConflict */
12248
+ sqlite3 *db, /* Apply change to "main" db of this handle */
12249
+ int nChangeset, /* Size of changeset in bytes */
12250
+ void *pChangeset, /* Changeset blob */
12251
+ int(*xFilter)(
12252
+ void *pCtx, /* Copy of sixth arg to _apply() */
12253
+ const char *zTab /* Table name */
12254
+ ),
12255
+ int(*xConflict)(
12256
+ void *pCtx, /* Copy of sixth arg to _apply() */
12257
+ int eConflict, /* DATA, MISSING, CONFLICT, CONSTRAINT */
12258
+ sqlite3_changeset_iter *p /* Handle describing change and conflict */
12259
+ ),
12260
+ void *pCtx /* First argument passed to xConflict */
12140
12261
  );
12141
12262
  SQLITE_API int sqlite3changeset_apply_v2(
12142
- sqlite3 *db, /* Apply change to "main" db of this handle */
12143
- int nChangeset, /* Size of changeset in bytes */
12144
- void *pChangeset, /* Changeset blob */
12145
- int (*xFilter)(void *pCtx, /* Copy of sixth arg to _apply() */
12146
- const char *zTab /* Table name */
12147
- ),
12148
- int (*xConflict)(
12149
- void *pCtx, /* Copy of sixth arg to _apply() */
12150
- int eConflict, /* DATA, MISSING, CONFLICT, CONSTRAINT */
12151
- sqlite3_changeset_iter *p /* Handle describing change and conflict */
12152
- ),
12153
- void *pCtx, /* First argument passed to xConflict */
12154
- void **ppRebase, int *pnRebase, /* OUT: Rebase data */
12155
- int flags /* SESSION_CHANGESETAPPLY_* flags */
12263
+ sqlite3 *db, /* Apply change to "main" db of this handle */
12264
+ int nChangeset, /* Size of changeset in bytes */
12265
+ void *pChangeset, /* Changeset blob */
12266
+ int(*xFilter)(
12267
+ void *pCtx, /* Copy of sixth arg to _apply() */
12268
+ const char *zTab /* Table name */
12269
+ ),
12270
+ int(*xConflict)(
12271
+ void *pCtx, /* Copy of sixth arg to _apply() */
12272
+ int eConflict, /* DATA, MISSING, CONFLICT, CONSTRAINT */
12273
+ sqlite3_changeset_iter *p /* Handle describing change and conflict */
12274
+ ),
12275
+ void *pCtx, /* First argument passed to xConflict */
12276
+ void **ppRebase, int *pnRebase, /* OUT: Rebase data */
12277
+ int flags /* SESSION_CHANGESETAPPLY_* flags */
12156
12278
  );
12157
12279
 
12158
12280
  /*
@@ -12195,10 +12317,10 @@ SQLITE_API int sqlite3changeset_apply_v2(
12195
12317
  ** DELETE NO ACTION", even if they are actually CASCADE, RESTRICT, SET NULL
12196
12318
  ** or SET DEFAULT.
12197
12319
  */
12198
- #define SQLITE_CHANGESETAPPLY_NOSAVEPOINT 0x0001
12199
- #define SQLITE_CHANGESETAPPLY_INVERT 0x0002
12200
- #define SQLITE_CHANGESETAPPLY_IGNORENOOP 0x0004
12201
- #define SQLITE_CHANGESETAPPLY_FKNOACTION 0x0008
12320
+ #define SQLITE_CHANGESETAPPLY_NOSAVEPOINT 0x0001
12321
+ #define SQLITE_CHANGESETAPPLY_INVERT 0x0002
12322
+ #define SQLITE_CHANGESETAPPLY_IGNORENOOP 0x0004
12323
+ #define SQLITE_CHANGESETAPPLY_FKNOACTION 0x0008
12202
12324
 
12203
12325
  /*
12204
12326
  ** CAPI3REF: Constants Passed To The Conflict Handler
@@ -12255,10 +12377,10 @@ SQLITE_API int sqlite3changeset_apply_v2(
12255
12377
  **
12256
12378
  ** </dl>
12257
12379
  */
12258
- #define SQLITE_CHANGESET_DATA 1
12259
- #define SQLITE_CHANGESET_NOTFOUND 2
12260
- #define SQLITE_CHANGESET_CONFLICT 3
12261
- #define SQLITE_CHANGESET_CONSTRAINT 4
12380
+ #define SQLITE_CHANGESET_DATA 1
12381
+ #define SQLITE_CHANGESET_NOTFOUND 2
12382
+ #define SQLITE_CHANGESET_CONFLICT 3
12383
+ #define SQLITE_CHANGESET_CONSTRAINT 4
12262
12384
  #define SQLITE_CHANGESET_FOREIGN_KEY 5
12263
12385
 
12264
12386
  /*
@@ -12292,9 +12414,9 @@ SQLITE_API int sqlite3changeset_apply_v2(
12292
12414
  ** and the call to sqlite3changeset_apply() returns SQLITE_ABORT.
12293
12415
  ** </dl>
12294
12416
  */
12295
- #define SQLITE_CHANGESET_OMIT 0
12296
- #define SQLITE_CHANGESET_REPLACE 1
12297
- #define SQLITE_CHANGESET_ABORT 2
12417
+ #define SQLITE_CHANGESET_OMIT 0
12418
+ #define SQLITE_CHANGESET_REPLACE 1
12419
+ #define SQLITE_CHANGESET_ABORT 2
12298
12420
 
12299
12421
  /*
12300
12422
  ** CAPI3REF: Rebasing changesets
@@ -12416,8 +12538,10 @@ SQLITE_API int sqlite3rebaser_create(sqlite3_rebaser **ppNew);
12416
12538
  ** bytes), which must have been obtained from a previous call to
12417
12539
  ** sqlite3changeset_apply_v2().
12418
12540
  */
12419
- SQLITE_API int sqlite3rebaser_configure(sqlite3_rebaser *, int nRebase,
12420
- const void *pRebase);
12541
+ SQLITE_API int sqlite3rebaser_configure(
12542
+ sqlite3_rebaser*,
12543
+ int nRebase, const void *pRebase
12544
+ );
12421
12545
 
12422
12546
  /*
12423
12547
  ** CAPI3REF: Rebase a changeset
@@ -12433,8 +12557,11 @@ SQLITE_API int sqlite3rebaser_configure(sqlite3_rebaser *, int nRebase,
12433
12557
  ** sqlite3_free(). Otherwise, if an error occurs, (*ppOut) and (*pnOut)
12434
12558
  ** are set to zero and an SQLite error code returned.
12435
12559
  */
12436
- SQLITE_API int sqlite3rebaser_rebase(sqlite3_rebaser *, int nIn,
12437
- const void *pIn, int *pnOut, void **ppOut);
12560
+ SQLITE_API int sqlite3rebaser_rebase(
12561
+ sqlite3_rebaser*,
12562
+ int nIn, const void *pIn,
12563
+ int *pnOut, void **ppOut
12564
+ );
12438
12565
 
12439
12566
  /*
12440
12567
  ** CAPI3REF: Delete a changeset rebaser object.
@@ -12537,64 +12664,87 @@ SQLITE_API void sqlite3rebaser_delete(sqlite3_rebaser *p);
12537
12664
  ** no guarantees are made as to the size of the chunks of data returned.
12538
12665
  */
12539
12666
  SQLITE_API int sqlite3changeset_apply_strm(
12540
- sqlite3 *db, /* Apply change to "main" db of this handle */
12541
- int (*xInput)(void *pIn, void *pData, int *pnData), /* Input function */
12542
- void *pIn, /* First arg for xInput */
12543
- int (*xFilter)(void *pCtx, /* Copy of sixth arg to _apply() */
12544
- const char *zTab /* Table name */
12545
- ),
12546
- int (*xConflict)(
12547
- void *pCtx, /* Copy of sixth arg to _apply() */
12548
- int eConflict, /* DATA, MISSING, CONFLICT, CONSTRAINT */
12549
- sqlite3_changeset_iter *p /* Handle describing change and conflict */
12550
- ),
12551
- void *pCtx /* First argument passed to xConflict */
12667
+ sqlite3 *db, /* Apply change to "main" db of this handle */
12668
+ int (*xInput)(void *pIn, void *pData, int *pnData), /* Input function */
12669
+ void *pIn, /* First arg for xInput */
12670
+ int(*xFilter)(
12671
+ void *pCtx, /* Copy of sixth arg to _apply() */
12672
+ const char *zTab /* Table name */
12673
+ ),
12674
+ int(*xConflict)(
12675
+ void *pCtx, /* Copy of sixth arg to _apply() */
12676
+ int eConflict, /* DATA, MISSING, CONFLICT, CONSTRAINT */
12677
+ sqlite3_changeset_iter *p /* Handle describing change and conflict */
12678
+ ),
12679
+ void *pCtx /* First argument passed to xConflict */
12552
12680
  );
12553
12681
  SQLITE_API int sqlite3changeset_apply_v2_strm(
12554
- sqlite3 *db, /* Apply change to "main" db of this handle */
12555
- int (*xInput)(void *pIn, void *pData, int *pnData), /* Input function */
12556
- void *pIn, /* First arg for xInput */
12557
- int (*xFilter)(void *pCtx, /* Copy of sixth arg to _apply() */
12558
- const char *zTab /* Table name */
12559
- ),
12560
- int (*xConflict)(
12561
- void *pCtx, /* Copy of sixth arg to _apply() */
12562
- int eConflict, /* DATA, MISSING, CONFLICT, CONSTRAINT */
12563
- sqlite3_changeset_iter *p /* Handle describing change and conflict */
12564
- ),
12565
- void *pCtx, /* First argument passed to xConflict */
12566
- void **ppRebase, int *pnRebase, int flags);
12682
+ sqlite3 *db, /* Apply change to "main" db of this handle */
12683
+ int (*xInput)(void *pIn, void *pData, int *pnData), /* Input function */
12684
+ void *pIn, /* First arg for xInput */
12685
+ int(*xFilter)(
12686
+ void *pCtx, /* Copy of sixth arg to _apply() */
12687
+ const char *zTab /* Table name */
12688
+ ),
12689
+ int(*xConflict)(
12690
+ void *pCtx, /* Copy of sixth arg to _apply() */
12691
+ int eConflict, /* DATA, MISSING, CONFLICT, CONSTRAINT */
12692
+ sqlite3_changeset_iter *p /* Handle describing change and conflict */
12693
+ ),
12694
+ void *pCtx, /* First argument passed to xConflict */
12695
+ void **ppRebase, int *pnRebase,
12696
+ int flags
12697
+ );
12567
12698
  SQLITE_API int sqlite3changeset_concat_strm(
12568
- int (*xInputA)(void *pIn, void *pData, int *pnData), void *pInA,
12569
- int (*xInputB)(void *pIn, void *pData, int *pnData), void *pInB,
12570
- int (*xOutput)(void *pOut, const void *pData, int nData), void *pOut);
12699
+ int (*xInputA)(void *pIn, void *pData, int *pnData),
12700
+ void *pInA,
12701
+ int (*xInputB)(void *pIn, void *pData, int *pnData),
12702
+ void *pInB,
12703
+ int (*xOutput)(void *pOut, const void *pData, int nData),
12704
+ void *pOut
12705
+ );
12571
12706
  SQLITE_API int sqlite3changeset_invert_strm(
12572
- int (*xInput)(void *pIn, void *pData, int *pnData), void *pIn,
12573
- int (*xOutput)(void *pOut, const void *pData, int nData), void *pOut);
12574
- SQLITE_API int sqlite3changeset_start_strm(sqlite3_changeset_iter **pp,
12575
- int (*xInput)(void *pIn, void *pData,
12576
- int *pnData),
12577
- void *pIn);
12707
+ int (*xInput)(void *pIn, void *pData, int *pnData),
12708
+ void *pIn,
12709
+ int (*xOutput)(void *pOut, const void *pData, int nData),
12710
+ void *pOut
12711
+ );
12712
+ SQLITE_API int sqlite3changeset_start_strm(
12713
+ sqlite3_changeset_iter **pp,
12714
+ int (*xInput)(void *pIn, void *pData, int *pnData),
12715
+ void *pIn
12716
+ );
12578
12717
  SQLITE_API int sqlite3changeset_start_v2_strm(
12579
- sqlite3_changeset_iter **pp,
12580
- int (*xInput)(void *pIn, void *pData, int *pnData), void *pIn, int flags);
12718
+ sqlite3_changeset_iter **pp,
12719
+ int (*xInput)(void *pIn, void *pData, int *pnData),
12720
+ void *pIn,
12721
+ int flags
12722
+ );
12581
12723
  SQLITE_API int sqlite3session_changeset_strm(
12582
- sqlite3_session *pSession,
12583
- int (*xOutput)(void *pOut, const void *pData, int nData), void *pOut);
12724
+ sqlite3_session *pSession,
12725
+ int (*xOutput)(void *pOut, const void *pData, int nData),
12726
+ void *pOut
12727
+ );
12584
12728
  SQLITE_API int sqlite3session_patchset_strm(
12585
- sqlite3_session *pSession,
12586
- int (*xOutput)(void *pOut, const void *pData, int nData), void *pOut);
12587
- SQLITE_API int sqlite3changegroup_add_strm(sqlite3_changegroup *,
12588
- int (*xInput)(void *pIn, void *pData,
12589
- int *pnData),
12590
- void *pIn);
12591
- SQLITE_API int sqlite3changegroup_output_strm(
12592
- sqlite3_changegroup *,
12593
- int (*xOutput)(void *pOut, const void *pData, int nData), void *pOut);
12729
+ sqlite3_session *pSession,
12730
+ int (*xOutput)(void *pOut, const void *pData, int nData),
12731
+ void *pOut
12732
+ );
12733
+ SQLITE_API int sqlite3changegroup_add_strm(sqlite3_changegroup*,
12734
+ int (*xInput)(void *pIn, void *pData, int *pnData),
12735
+ void *pIn
12736
+ );
12737
+ SQLITE_API int sqlite3changegroup_output_strm(sqlite3_changegroup*,
12738
+ int (*xOutput)(void *pOut, const void *pData, int nData),
12739
+ void *pOut
12740
+ );
12594
12741
  SQLITE_API int sqlite3rebaser_rebase_strm(
12595
- sqlite3_rebaser *pRebaser,
12596
- int (*xInput)(void *pIn, void *pData, int *pnData), void *pIn,
12597
- int (*xOutput)(void *pOut, const void *pData, int nData), void *pOut);
12742
+ sqlite3_rebaser *pRebaser,
12743
+ int (*xInput)(void *pIn, void *pData, int *pnData),
12744
+ void *pIn,
12745
+ int (*xOutput)(void *pOut, const void *pData, int nData),
12746
+ void *pOut
12747
+ );
12598
12748
 
12599
12749
  /*
12600
12750
  ** CAPI3REF: Configure global parameters
@@ -12643,7 +12793,7 @@ SQLITE_API int sqlite3session_config(int op, void *pArg);
12643
12793
  }
12644
12794
  #endif
12645
12795
 
12646
- #endif /* !defined(__SQLITESESSION_H_) && defined(SQLITE_ENABLE_SESSION) */
12796
+ #endif /* !defined(__SQLITESESSION_H_) && defined(SQLITE_ENABLE_SESSION) */
12647
12797
 
12648
12798
  /******** End of sqlite3session.h *********/
12649
12799
  /******** Begin file fts5.h *********/
@@ -12666,9 +12816,11 @@ SQLITE_API int sqlite3session_config(int op, void *pArg);
12666
12816
  ** * custom auxiliary functions.
12667
12817
  */
12668
12818
 
12819
+
12669
12820
  #ifndef _FTS5_H
12670
12821
  #define _FTS5_H
12671
12822
 
12823
+
12672
12824
  #ifdef __cplusplus
12673
12825
  extern "C" {
12674
12826
  #endif
@@ -12685,11 +12837,11 @@ typedef struct Fts5Context Fts5Context;
12685
12837
  typedef struct Fts5PhraseIter Fts5PhraseIter;
12686
12838
 
12687
12839
  typedef void (*fts5_extension_function)(
12688
- const Fts5ExtensionApi *pApi, /* API offered by current FTS version */
12689
- Fts5Context *pFts, /* First arg to pass to pApi functions */
12690
- sqlite3_context *pCtx, /* Context for returning result/error */
12691
- int nVal, /* Number of values in apVal[] array */
12692
- sqlite3_value **apVal /* Array of trailing arguments */
12840
+ const Fts5ExtensionApi *pApi, /* API offered by current FTS version */
12841
+ Fts5Context *pFts, /* First arg to pass to pApi functions */
12842
+ sqlite3_context *pCtx, /* Context for returning result/error */
12843
+ int nVal, /* Number of values in apVal[] array */
12844
+ sqlite3_value **apVal /* Array of trailing arguments */
12693
12845
  );
12694
12846
 
12695
12847
  struct Fts5PhraseIter {
@@ -12701,8 +12853,8 @@ struct Fts5PhraseIter {
12701
12853
  ** EXTENSION API FUNCTIONS
12702
12854
  **
12703
12855
  ** xUserData(pFts):
12704
- ** Return a copy of the context pointer the extension function was
12705
- ** registered with.
12856
+ ** Return a copy of the pUserData pointer passed to the xCreateFunction()
12857
+ ** API when the extension function was registered.
12706
12858
  **
12707
12859
  ** xColumnTotalSize(pFts, iCol, pnToken):
12708
12860
  ** If parameter iCol is less than zero, set output variable *pnToken
@@ -12952,48 +13104,48 @@ struct Fts5PhraseIter {
12952
13104
  ** "detail=none" or "detail=column" option.
12953
13105
  */
12954
13106
  struct Fts5ExtensionApi {
12955
- int iVersion; /* Currently always set to 3 */
13107
+ int iVersion; /* Currently always set to 3 */
12956
13108
 
12957
- void *(*xUserData)(Fts5Context *);
13109
+ void *(*xUserData)(Fts5Context*);
12958
13110
 
12959
- int (*xColumnCount)(Fts5Context *);
12960
- int (*xRowCount)(Fts5Context *, sqlite3_int64 *pnRow);
12961
- int (*xColumnTotalSize)(Fts5Context *, int iCol, sqlite3_int64 *pnToken);
13111
+ int (*xColumnCount)(Fts5Context*);
13112
+ int (*xRowCount)(Fts5Context*, sqlite3_int64 *pnRow);
13113
+ int (*xColumnTotalSize)(Fts5Context*, int iCol, sqlite3_int64 *pnToken);
12962
13114
 
12963
- int (*xTokenize)(Fts5Context *, const char *pText,
12964
- int nText, /* Text to tokenize */
12965
- void *pCtx, /* Context passed to xToken() */
12966
- int (*xToken)(void *, int, const char *, int, int,
12967
- int) /* Callback */
13115
+ int (*xTokenize)(Fts5Context*,
13116
+ const char *pText, int nText, /* Text to tokenize */
13117
+ void *pCtx, /* Context passed to xToken() */
13118
+ int (*xToken)(void*, int, const char*, int, int, int) /* Callback */
12968
13119
  );
12969
13120
 
12970
- int (*xPhraseCount)(Fts5Context *);
12971
- int (*xPhraseSize)(Fts5Context *, int iPhrase);
13121
+ int (*xPhraseCount)(Fts5Context*);
13122
+ int (*xPhraseSize)(Fts5Context*, int iPhrase);
12972
13123
 
12973
- int (*xInstCount)(Fts5Context *, int *pnInst);
12974
- int (*xInst)(Fts5Context *, int iIdx, int *piPhrase, int *piCol, int *piOff);
13124
+ int (*xInstCount)(Fts5Context*, int *pnInst);
13125
+ int (*xInst)(Fts5Context*, int iIdx, int *piPhrase, int *piCol, int *piOff);
12975
13126
 
12976
- sqlite3_int64 (*xRowid)(Fts5Context *);
12977
- int (*xColumnText)(Fts5Context *, int iCol, const char **pz, int *pn);
12978
- int (*xColumnSize)(Fts5Context *, int iCol, int *pnToken);
13127
+ sqlite3_int64 (*xRowid)(Fts5Context*);
13128
+ int (*xColumnText)(Fts5Context*, int iCol, const char **pz, int *pn);
13129
+ int (*xColumnSize)(Fts5Context*, int iCol, int *pnToken);
12979
13130
 
12980
- int (*xQueryPhrase)(Fts5Context *, int iPhrase, void *pUserData,
12981
- int (*)(const Fts5ExtensionApi *, Fts5Context *, void *));
12982
- int (*xSetAuxdata)(Fts5Context *, void *pAux, void (*xDelete)(void *));
12983
- void *(*xGetAuxdata)(Fts5Context *, int bClear);
13131
+ int (*xQueryPhrase)(Fts5Context*, int iPhrase, void *pUserData,
13132
+ int(*)(const Fts5ExtensionApi*,Fts5Context*,void*)
13133
+ );
13134
+ int (*xSetAuxdata)(Fts5Context*, void *pAux, void(*xDelete)(void*));
13135
+ void *(*xGetAuxdata)(Fts5Context*, int bClear);
12984
13136
 
12985
- int (*xPhraseFirst)(Fts5Context *, int iPhrase, Fts5PhraseIter *, int *,
12986
- int *);
12987
- void (*xPhraseNext)(Fts5Context *, Fts5PhraseIter *, int *piCol, int *piOff);
13137
+ int (*xPhraseFirst)(Fts5Context*, int iPhrase, Fts5PhraseIter*, int*, int*);
13138
+ void (*xPhraseNext)(Fts5Context*, Fts5PhraseIter*, int *piCol, int *piOff);
12988
13139
 
12989
- int (*xPhraseFirstColumn)(Fts5Context *, int iPhrase, Fts5PhraseIter *,
12990
- int *);
12991
- void (*xPhraseNextColumn)(Fts5Context *, Fts5PhraseIter *, int *piCol);
13140
+ int (*xPhraseFirstColumn)(Fts5Context*, int iPhrase, Fts5PhraseIter*, int*);
13141
+ void (*xPhraseNextColumn)(Fts5Context*, Fts5PhraseIter*, int *piCol);
12992
13142
 
12993
13143
  /* Below this point are iVersion>=3 only */
12994
- int (*xQueryToken)(Fts5Context *, int iPhrase, int iToken,
12995
- const char **ppToken, int *pnToken);
12996
- int (*xInstToken)(Fts5Context *, int iIdx, int iToken, const char **, int *);
13144
+ int (*xQueryToken)(Fts5Context*,
13145
+ int iPhrase, int iToken,
13146
+ const char **ppToken, int *pnToken
13147
+ );
13148
+ int (*xInstToken)(Fts5Context*, int iIdx, int iToken, const char**, int*);
12997
13149
  };
12998
13150
 
12999
13151
  /*
@@ -13195,30 +13347,32 @@ struct Fts5ExtensionApi {
13195
13347
  typedef struct Fts5Tokenizer Fts5Tokenizer;
13196
13348
  typedef struct fts5_tokenizer fts5_tokenizer;
13197
13349
  struct fts5_tokenizer {
13198
- int (*xCreate)(void *, const char **azArg, int nArg, Fts5Tokenizer **ppOut);
13199
- void (*xDelete)(Fts5Tokenizer *);
13200
- int (*xTokenize)(
13201
- Fts5Tokenizer *, void *pCtx,
13202
- int flags, /* Mask of FTS5_TOKENIZE_* flags */
13350
+ int (*xCreate)(void*, const char **azArg, int nArg, Fts5Tokenizer **ppOut);
13351
+ void (*xDelete)(Fts5Tokenizer*);
13352
+ int (*xTokenize)(Fts5Tokenizer*,
13353
+ void *pCtx,
13354
+ int flags, /* Mask of FTS5_TOKENIZE_* flags */
13203
13355
  const char *pText, int nText,
13204
- int (*xToken)(void *pCtx, /* Copy of 2nd argument to xTokenize() */
13205
- int tflags, /* Mask of FTS5_TOKEN_* flags */
13206
- const char *pToken, /* Pointer to buffer containing token */
13207
- int nToken, /* Size of token in bytes */
13208
- int iStart, /* Byte offset of token within input text */
13209
- int iEnd /* Byte offset of end of token within input text */
13210
- ));
13356
+ int (*xToken)(
13357
+ void *pCtx, /* Copy of 2nd argument to xTokenize() */
13358
+ int tflags, /* Mask of FTS5_TOKEN_* flags */
13359
+ const char *pToken, /* Pointer to buffer containing token */
13360
+ int nToken, /* Size of token in bytes */
13361
+ int iStart, /* Byte offset of token within input text */
13362
+ int iEnd /* Byte offset of end of token within input text */
13363
+ )
13364
+ );
13211
13365
  };
13212
13366
 
13213
13367
  /* Flags that may be passed as the third argument to xTokenize() */
13214
- #define FTS5_TOKENIZE_QUERY 0x0001
13215
- #define FTS5_TOKENIZE_PREFIX 0x0002
13216
- #define FTS5_TOKENIZE_DOCUMENT 0x0004
13217
- #define FTS5_TOKENIZE_AUX 0x0008
13368
+ #define FTS5_TOKENIZE_QUERY 0x0001
13369
+ #define FTS5_TOKENIZE_PREFIX 0x0002
13370
+ #define FTS5_TOKENIZE_DOCUMENT 0x0004
13371
+ #define FTS5_TOKENIZE_AUX 0x0008
13218
13372
 
13219
13373
  /* Flags that may be passed by the tokenizer implementation back to FTS5
13220
13374
  ** as the third argument to the supplied xToken callback. */
13221
- #define FTS5_TOKEN_COLOCATED 0x0001 /* Same position as prev. token */
13375
+ #define FTS5_TOKEN_COLOCATED 0x0001 /* Same position as prev. token */
13222
13376
 
13223
13377
  /*
13224
13378
  ** END OF CUSTOM TOKENIZERS
@@ -13229,20 +13383,33 @@ struct fts5_tokenizer {
13229
13383
  */
13230
13384
  typedef struct fts5_api fts5_api;
13231
13385
  struct fts5_api {
13232
- int iVersion; /* Currently always set to 2 */
13386
+ int iVersion; /* Currently always set to 2 */
13233
13387
 
13234
13388
  /* Create a new tokenizer */
13235
- int (*xCreateTokenizer)(fts5_api *pApi, const char *zName, void *pUserData,
13236
- fts5_tokenizer *pTokenizer, void (*xDestroy)(void *));
13389
+ int (*xCreateTokenizer)(
13390
+ fts5_api *pApi,
13391
+ const char *zName,
13392
+ void *pUserData,
13393
+ fts5_tokenizer *pTokenizer,
13394
+ void (*xDestroy)(void*)
13395
+ );
13237
13396
 
13238
13397
  /* Find an existing tokenizer */
13239
- int (*xFindTokenizer)(fts5_api *pApi, const char *zName, void **ppUserData,
13240
- fts5_tokenizer *pTokenizer);
13398
+ int (*xFindTokenizer)(
13399
+ fts5_api *pApi,
13400
+ const char *zName,
13401
+ void **ppUserData,
13402
+ fts5_tokenizer *pTokenizer
13403
+ );
13241
13404
 
13242
13405
  /* Create a new auxiliary function */
13243
- int (*xCreateFunction)(fts5_api *pApi, const char *zName, void *pUserData,
13244
- fts5_extension_function xFunction,
13245
- void (*xDestroy)(void *));
13406
+ int (*xCreateFunction)(
13407
+ fts5_api *pApi,
13408
+ const char *zName,
13409
+ void *pUserData,
13410
+ fts5_extension_function xFunction,
13411
+ void (*xDestroy)(void*)
13412
+ );
13246
13413
  };
13247
13414
 
13248
13415
  /*
@@ -13250,7 +13417,7 @@ struct fts5_api {
13250
13417
  *************************************************************************/
13251
13418
 
13252
13419
  #ifdef __cplusplus
13253
- } /* end of the 'extern "C"' block */
13420
+ } /* end of the 'extern "C"' block */
13254
13421
  #endif
13255
13422
 
13256
13423
  #endif /* _FTS5_H */