cordova-sqlite-evmax-build-free 0.0.1 → 0.0.4
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/CHANGES.md +13 -1
- package/README.md +1 -1
- package/package.json +4 -4
- package/plugin.xml +1 -1
- package/spec/www/spec/sqlite-version-test.js +1 -1
- package/src/deps/android/sqlc-evplus-ndk-driver.jar +0 -0
- package/src/deps/common/sqlite3.c +10950 -7712
- package/src/deps/common/sqlite3.h +261 -33
|
@@ -43,7 +43,30 @@ extern "C" {
|
|
|
43
43
|
|
|
44
44
|
|
|
45
45
|
/*
|
|
46
|
-
**
|
|
46
|
+
** Facilitate override of interface linkage and calling conventions.
|
|
47
|
+
** Be aware that these macros may not be used within this particular
|
|
48
|
+
** translation of the amalgamation and its associated header file.
|
|
49
|
+
**
|
|
50
|
+
** The SQLITE_EXTERN and SQLITE_API macros are used to instruct the
|
|
51
|
+
** compiler that the target identifier should have external linkage.
|
|
52
|
+
**
|
|
53
|
+
** The SQLITE_CDECL macro is used to set the calling convention for
|
|
54
|
+
** public functions that accept a variable number of arguments.
|
|
55
|
+
**
|
|
56
|
+
** The SQLITE_APICALL macro is used to set the calling convention for
|
|
57
|
+
** public functions that accept a fixed number of arguments.
|
|
58
|
+
**
|
|
59
|
+
** The SQLITE_STDCALL macro is no longer used and is now deprecated.
|
|
60
|
+
**
|
|
61
|
+
** The SQLITE_CALLBACK macro is used to set the calling convention for
|
|
62
|
+
** function pointers.
|
|
63
|
+
**
|
|
64
|
+
** The SQLITE_SYSAPI macro is used to set the calling convention for
|
|
65
|
+
** functions provided by the operating system.
|
|
66
|
+
**
|
|
67
|
+
** Currently, the SQLITE_CDECL, SQLITE_APICALL, SQLITE_CALLBACK, and
|
|
68
|
+
** SQLITE_SYSAPI macros are used only when building for environments
|
|
69
|
+
** that require non-default calling conventions.
|
|
47
70
|
*/
|
|
48
71
|
#ifndef SQLITE_EXTERN
|
|
49
72
|
# define SQLITE_EXTERN extern
|
|
@@ -123,9 +146,9 @@ extern "C" {
|
|
|
123
146
|
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
|
|
124
147
|
** [sqlite_version()] and [sqlite_source_id()].
|
|
125
148
|
*/
|
|
126
|
-
#define SQLITE_VERSION "3.
|
|
127
|
-
#define SQLITE_VERSION_NUMBER
|
|
128
|
-
#define SQLITE_SOURCE_ID "
|
|
149
|
+
#define SQLITE_VERSION "3.37.2"
|
|
150
|
+
#define SQLITE_VERSION_NUMBER 3037002
|
|
151
|
+
#define SQLITE_SOURCE_ID "2022-01-06 13:25:41 872ba256cbf61d9290b571c0e6d82a20c224ca3ad82971edc46b29818d5d17a0"
|
|
129
152
|
|
|
130
153
|
/*
|
|
131
154
|
** CAPI3REF: Run-Time Library Version Numbers
|
|
@@ -537,6 +560,7 @@ SQLITE_API int sqlite3_exec(
|
|
|
537
560
|
#define SQLITE_CONSTRAINT_VTAB (SQLITE_CONSTRAINT | (9<<8))
|
|
538
561
|
#define SQLITE_CONSTRAINT_ROWID (SQLITE_CONSTRAINT |(10<<8))
|
|
539
562
|
#define SQLITE_CONSTRAINT_PINNED (SQLITE_CONSTRAINT |(11<<8))
|
|
563
|
+
#define SQLITE_CONSTRAINT_DATATYPE (SQLITE_CONSTRAINT |(12<<8))
|
|
540
564
|
#define SQLITE_NOTICE_RECOVER_WAL (SQLITE_NOTICE | (1<<8))
|
|
541
565
|
#define SQLITE_NOTICE_RECOVER_ROLLBACK (SQLITE_NOTICE | (2<<8))
|
|
542
566
|
#define SQLITE_WARNING_AUTOINDEX (SQLITE_WARNING | (1<<8))
|
|
@@ -550,6 +574,19 @@ SQLITE_API int sqlite3_exec(
|
|
|
550
574
|
** These bit values are intended for use in the
|
|
551
575
|
** 3rd parameter to the [sqlite3_open_v2()] interface and
|
|
552
576
|
** in the 4th parameter to the [sqlite3_vfs.xOpen] method.
|
|
577
|
+
**
|
|
578
|
+
** Only those flags marked as "Ok for sqlite3_open_v2()" may be
|
|
579
|
+
** used as the third argument to the [sqlite3_open_v2()] interface.
|
|
580
|
+
** The other flags have historically been ignored by sqlite3_open_v2(),
|
|
581
|
+
** though future versions of SQLite might change so that an error is
|
|
582
|
+
** raised if any of the disallowed bits are passed into sqlite3_open_v2().
|
|
583
|
+
** Applications should not depend on the historical behavior.
|
|
584
|
+
**
|
|
585
|
+
** Note in particular that passing the SQLITE_OPEN_EXCLUSIVE flag into
|
|
586
|
+
** [sqlite3_open_v2()] does *not* cause the underlying database file
|
|
587
|
+
** to be opened using O_EXCL. Passing SQLITE_OPEN_EXCLUSIVE into
|
|
588
|
+
** [sqlite3_open_v2()] has historically be a no-op and might become an
|
|
589
|
+
** error in future versions of SQLite.
|
|
553
590
|
*/
|
|
554
591
|
#define SQLITE_OPEN_READONLY 0x00000001 /* Ok for sqlite3_open_v2() */
|
|
555
592
|
#define SQLITE_OPEN_READWRITE 0x00000002 /* Ok for sqlite3_open_v2() */
|
|
@@ -572,6 +609,7 @@ SQLITE_API int sqlite3_exec(
|
|
|
572
609
|
#define SQLITE_OPEN_PRIVATECACHE 0x00040000 /* Ok for sqlite3_open_v2() */
|
|
573
610
|
#define SQLITE_OPEN_WAL 0x00080000 /* VFS only */
|
|
574
611
|
#define SQLITE_OPEN_NOFOLLOW 0x01000000 /* Ok for sqlite3_open_v2() */
|
|
612
|
+
#define SQLITE_OPEN_EXRESCODE 0x02000000 /* Extended result codes */
|
|
575
613
|
|
|
576
614
|
/* Reserved: 0x00F00000 */
|
|
577
615
|
/* Legacy compatibility: */
|
|
@@ -1128,6 +1166,23 @@ struct sqlite3_io_methods {
|
|
|
1128
1166
|
** file to the database file, but before the *-shm file is updated to
|
|
1129
1167
|
** record the fact that the pages have been checkpointed.
|
|
1130
1168
|
** </ul>
|
|
1169
|
+
**
|
|
1170
|
+
** <li>[[SQLITE_FCNTL_EXTERNAL_READER]]
|
|
1171
|
+
** The EXPERIMENTAL [SQLITE_FCNTL_EXTERNAL_READER] opcode is used to detect
|
|
1172
|
+
** whether or not there is a database client in another process with a wal-mode
|
|
1173
|
+
** transaction open on the database or not. It is only available on unix.The
|
|
1174
|
+
** (void*) argument passed with this file-control should be a pointer to a
|
|
1175
|
+
** value of type (int). The integer value is set to 1 if the database is a wal
|
|
1176
|
+
** mode database and there exists at least one client in another process that
|
|
1177
|
+
** currently has an SQL transaction open on the database. It is set to 0 if
|
|
1178
|
+
** the database is not a wal-mode db, or if there is no such connection in any
|
|
1179
|
+
** other process. This opcode cannot be used to detect transactions opened
|
|
1180
|
+
** by clients within the current process, only within other processes.
|
|
1181
|
+
** </ul>
|
|
1182
|
+
**
|
|
1183
|
+
** <li>[[SQLITE_FCNTL_CKSM_FILE]]
|
|
1184
|
+
** Used by the cksmvfs VFS module only.
|
|
1185
|
+
** </ul>
|
|
1131
1186
|
*/
|
|
1132
1187
|
#define SQLITE_FCNTL_LOCKSTATE 1
|
|
1133
1188
|
#define SQLITE_FCNTL_GET_LOCKPROXYFILE 2
|
|
@@ -1167,6 +1222,8 @@ struct sqlite3_io_methods {
|
|
|
1167
1222
|
#define SQLITE_FCNTL_CKPT_DONE 37
|
|
1168
1223
|
#define SQLITE_FCNTL_RESERVE_BYTES 38
|
|
1169
1224
|
#define SQLITE_FCNTL_CKPT_START 39
|
|
1225
|
+
#define SQLITE_FCNTL_EXTERNAL_READER 40
|
|
1226
|
+
#define SQLITE_FCNTL_CKSM_FILE 41
|
|
1170
1227
|
|
|
1171
1228
|
/* deprecated names */
|
|
1172
1229
|
#define SQLITE_GET_LOCKPROXYFILE SQLITE_FCNTL_GET_LOCKPROXYFILE
|
|
@@ -2445,11 +2502,14 @@ SQLITE_API void sqlite3_set_last_insert_rowid(sqlite3*,sqlite3_int64);
|
|
|
2445
2502
|
** CAPI3REF: Count The Number Of Rows Modified
|
|
2446
2503
|
** METHOD: sqlite3
|
|
2447
2504
|
**
|
|
2448
|
-
** ^
|
|
2505
|
+
** ^These functions return the number of rows modified, inserted or
|
|
2449
2506
|
** deleted by the most recently completed INSERT, UPDATE or DELETE
|
|
2450
2507
|
** statement on the database connection specified by the only parameter.
|
|
2451
|
-
**
|
|
2452
|
-
**
|
|
2508
|
+
** The two functions are identical except for the type of the return value
|
|
2509
|
+
** and that if the number of rows modified by the most recent INSERT, UPDATE
|
|
2510
|
+
** or DELETE is greater than the maximum value supported by type "int", then
|
|
2511
|
+
** the return value of sqlite3_changes() is undefined. ^Executing any other
|
|
2512
|
+
** type of SQL statement does not modify the value returned by these functions.
|
|
2453
2513
|
**
|
|
2454
2514
|
** ^Only changes made directly by the INSERT, UPDATE or DELETE statement are
|
|
2455
2515
|
** considered - auxiliary changes caused by [CREATE TRIGGER | triggers],
|
|
@@ -2498,16 +2558,21 @@ SQLITE_API void sqlite3_set_last_insert_rowid(sqlite3*,sqlite3_int64);
|
|
|
2498
2558
|
** </ul>
|
|
2499
2559
|
*/
|
|
2500
2560
|
SQLITE_API int sqlite3_changes(sqlite3*);
|
|
2561
|
+
SQLITE_API sqlite3_int64 sqlite3_changes64(sqlite3*);
|
|
2501
2562
|
|
|
2502
2563
|
/*
|
|
2503
2564
|
** CAPI3REF: Total Number Of Rows Modified
|
|
2504
2565
|
** METHOD: sqlite3
|
|
2505
2566
|
**
|
|
2506
|
-
** ^
|
|
2567
|
+
** ^These functions return the total number of rows inserted, modified or
|
|
2507
2568
|
** deleted by all [INSERT], [UPDATE] or [DELETE] statements completed
|
|
2508
2569
|
** since the database connection was opened, including those executed as
|
|
2509
|
-
** part of trigger programs.
|
|
2510
|
-
**
|
|
2570
|
+
** part of trigger programs. The two functions are identical except for the
|
|
2571
|
+
** type of the return value and that if the number of rows modified by the
|
|
2572
|
+
** connection exceeds the maximum value supported by type "int", then
|
|
2573
|
+
** the return value of sqlite3_total_changes() is undefined. ^Executing
|
|
2574
|
+
** any other type of SQL statement does not affect the value returned by
|
|
2575
|
+
** sqlite3_total_changes().
|
|
2511
2576
|
**
|
|
2512
2577
|
** ^Changes made as part of [foreign key actions] are included in the
|
|
2513
2578
|
** count, but those made as part of REPLACE constraint resolution are
|
|
@@ -2535,6 +2600,7 @@ SQLITE_API int sqlite3_changes(sqlite3*);
|
|
|
2535
2600
|
** </ul>
|
|
2536
2601
|
*/
|
|
2537
2602
|
SQLITE_API int sqlite3_total_changes(sqlite3*);
|
|
2603
|
+
SQLITE_API sqlite3_int64 sqlite3_total_changes64(sqlite3*);
|
|
2538
2604
|
|
|
2539
2605
|
/*
|
|
2540
2606
|
** CAPI3REF: Interrupt A Long-Running Query
|
|
@@ -3364,6 +3430,14 @@ SQLITE_API void sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*);
|
|
|
3364
3430
|
** the default shared cache setting provided by
|
|
3365
3431
|
** [sqlite3_enable_shared_cache()].)^
|
|
3366
3432
|
**
|
|
3433
|
+
** [[OPEN_EXRESCODE]] ^(<dt>[SQLITE_OPEN_EXRESCODE]</dt>
|
|
3434
|
+
** <dd>The database connection comes up in "extended result code mode".
|
|
3435
|
+
** In other words, the database behaves has if
|
|
3436
|
+
** [sqlite3_extended_result_codes(db,1)] where called on the database
|
|
3437
|
+
** connection as soon as the connection is created. In addition to setting
|
|
3438
|
+
** the extended result code mode, this flag also causes [sqlite3_open_v2()]
|
|
3439
|
+
** to return an extended result code.</dd>
|
|
3440
|
+
**
|
|
3367
3441
|
** [[OPEN_NOFOLLOW]] ^(<dt>[SQLITE_OPEN_NOFOLLOW]</dt>
|
|
3368
3442
|
** <dd>The database filename is not allowed to be a symbolic link</dd>
|
|
3369
3443
|
** </dl>)^
|
|
@@ -3371,7 +3445,15 @@ SQLITE_API void sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*);
|
|
|
3371
3445
|
** If the 3rd parameter to sqlite3_open_v2() is not one of the
|
|
3372
3446
|
** required combinations shown above optionally combined with other
|
|
3373
3447
|
** [SQLITE_OPEN_READONLY | SQLITE_OPEN_* bits]
|
|
3374
|
-
** then the behavior is undefined.
|
|
3448
|
+
** then the behavior is undefined. Historic versions of SQLite
|
|
3449
|
+
** have silently ignored surplus bits in the flags parameter to
|
|
3450
|
+
** sqlite3_open_v2(), however that behavior might not be carried through
|
|
3451
|
+
** into future versions of SQLite and so applications should not rely
|
|
3452
|
+
** upon it. Note in particular that the SQLITE_OPEN_EXCLUSIVE flag is a no-op
|
|
3453
|
+
** for sqlite3_open_v2(). The SQLITE_OPEN_EXCLUSIVE does *not* cause
|
|
3454
|
+
** the open to fail if the database already exists. The SQLITE_OPEN_EXCLUSIVE
|
|
3455
|
+
** flag is intended for use by the [sqlite3_vfs|VFS interface] only, and not
|
|
3456
|
+
** by sqlite3_open_v2().
|
|
3375
3457
|
**
|
|
3376
3458
|
** ^The fourth parameter to sqlite3_open_v2() is the name of the
|
|
3377
3459
|
** [sqlite3_vfs] object that defines the operating system interface that
|
|
@@ -4139,12 +4221,17 @@ SQLITE_API int sqlite3_prepare16_v3(
|
|
|
4139
4221
|
** are managed by SQLite and are automatically freed when the prepared
|
|
4140
4222
|
** statement is finalized.
|
|
4141
4223
|
** ^The string returned by sqlite3_expanded_sql(P), on the other hand,
|
|
4142
|
-
** is obtained from [sqlite3_malloc()] and must be
|
|
4224
|
+
** is obtained from [sqlite3_malloc()] and must be freed by the application
|
|
4143
4225
|
** by passing it to [sqlite3_free()].
|
|
4226
|
+
**
|
|
4227
|
+
** ^The sqlite3_normalized_sql() interface is only available if
|
|
4228
|
+
** the [SQLITE_ENABLE_NORMALIZE] compile-time option is defined.
|
|
4144
4229
|
*/
|
|
4145
4230
|
SQLITE_API const char *sqlite3_sql(sqlite3_stmt *pStmt);
|
|
4146
4231
|
SQLITE_API char *sqlite3_expanded_sql(sqlite3_stmt *pStmt);
|
|
4232
|
+
#ifdef SQLITE_ENABLE_NORMALIZE
|
|
4147
4233
|
SQLITE_API const char *sqlite3_normalized_sql(sqlite3_stmt *pStmt);
|
|
4234
|
+
#endif
|
|
4148
4235
|
|
|
4149
4236
|
/*
|
|
4150
4237
|
** CAPI3REF: Determine If An SQL Statement Writes The Database
|
|
@@ -4179,6 +4266,15 @@ SQLITE_API const char *sqlite3_normalized_sql(sqlite3_stmt *pStmt);
|
|
|
4179
4266
|
** [BEGIN] merely sets internal flags, but the [BEGIN|BEGIN IMMEDIATE] and
|
|
4180
4267
|
** [BEGIN|BEGIN EXCLUSIVE] commands do touch the database and so
|
|
4181
4268
|
** sqlite3_stmt_readonly() returns false for those commands.
|
|
4269
|
+
**
|
|
4270
|
+
** ^This routine returns false if there is any possibility that the
|
|
4271
|
+
** statement might change the database file. ^A false return does
|
|
4272
|
+
** not guarantee that the statement will change the database file.
|
|
4273
|
+
** ^For example, an UPDATE statement might have a WHERE clause that
|
|
4274
|
+
** makes it a no-op, but the sqlite3_stmt_readonly() result would still
|
|
4275
|
+
** be false. ^Similarly, a CREATE TABLE IF NOT EXISTS statement is a
|
|
4276
|
+
** read-only no-op if the table already exists, but
|
|
4277
|
+
** sqlite3_stmt_readonly() still returns false for such a statement.
|
|
4182
4278
|
*/
|
|
4183
4279
|
SQLITE_API int sqlite3_stmt_readonly(sqlite3_stmt *pStmt);
|
|
4184
4280
|
|
|
@@ -4348,18 +4444,22 @@ typedef struct sqlite3_context sqlite3_context;
|
|
|
4348
4444
|
** contain embedded NULs. The result of expressions involving strings
|
|
4349
4445
|
** with embedded NULs is undefined.
|
|
4350
4446
|
**
|
|
4351
|
-
** ^The fifth argument to the BLOB and string binding interfaces
|
|
4352
|
-
**
|
|
4353
|
-
**
|
|
4354
|
-
** to dispose of the BLOB or string
|
|
4355
|
-
**
|
|
4356
|
-
**
|
|
4357
|
-
**
|
|
4358
|
-
**
|
|
4359
|
-
**
|
|
4360
|
-
**
|
|
4361
|
-
**
|
|
4362
|
-
**
|
|
4447
|
+
** ^The fifth argument to the BLOB and string binding interfaces controls
|
|
4448
|
+
** or indicates the lifetime of the object referenced by the third parameter.
|
|
4449
|
+
** These three options exist:
|
|
4450
|
+
** ^ (1) A destructor to dispose of the BLOB or string after SQLite has finished
|
|
4451
|
+
** with it may be passed. ^It is called to dispose of the BLOB or string even
|
|
4452
|
+
** if the call to the bind API fails, except the destructor is not called if
|
|
4453
|
+
** the third parameter is a NULL pointer or the fourth parameter is negative.
|
|
4454
|
+
** ^ (2) The special constant, [SQLITE_STATIC], may be passsed to indicate that
|
|
4455
|
+
** the application remains responsible for disposing of the object. ^In this
|
|
4456
|
+
** case, the object and the provided pointer to it must remain valid until
|
|
4457
|
+
** either the prepared statement is finalized or the same SQL parameter is
|
|
4458
|
+
** bound to something else, whichever occurs sooner.
|
|
4459
|
+
** ^ (3) The constant, [SQLITE_TRANSIENT], may be passed to indicate that the
|
|
4460
|
+
** object is to be copied prior to the return from sqlite3_bind_*(). ^The
|
|
4461
|
+
** object and pointer to it must remain valid until then. ^SQLite will then
|
|
4462
|
+
** manage the lifetime of its private copy.
|
|
4363
4463
|
**
|
|
4364
4464
|
** ^The sixth argument to sqlite3_bind_text64() must be one of
|
|
4365
4465
|
** [SQLITE_UTF8], [SQLITE_UTF16], [SQLITE_UTF16BE], or [SQLITE_UTF16LE]
|
|
@@ -5101,7 +5201,6 @@ SQLITE_API int sqlite3_reset(sqlite3_stmt *pStmt);
|
|
|
5101
5201
|
** within VIEWs, TRIGGERs, CHECK constraints, generated column expressions,
|
|
5102
5202
|
** index expressions, or the WHERE clause of partial indexes.
|
|
5103
5203
|
**
|
|
5104
|
-
** <span style="background-color:#ffff90;">
|
|
5105
5204
|
** For best security, the [SQLITE_DIRECTONLY] flag is recommended for
|
|
5106
5205
|
** all application-defined SQL functions that do not need to be
|
|
5107
5206
|
** used inside of triggers, view, CHECK constraints, or other elements of
|
|
@@ -5111,7 +5210,6 @@ SQLITE_API int sqlite3_reset(sqlite3_stmt *pStmt);
|
|
|
5111
5210
|
** a database file to include invocations of the function with parameters
|
|
5112
5211
|
** chosen by the attacker, which the application will then execute when
|
|
5113
5212
|
** the database file is opened and read.
|
|
5114
|
-
** </span>
|
|
5115
5213
|
**
|
|
5116
5214
|
** ^(The fifth parameter is an arbitrary pointer. The implementation of the
|
|
5117
5215
|
** function can gain access to this pointer using [sqlite3_user_data()].)^
|
|
@@ -6317,6 +6415,72 @@ SQLITE_API sqlite3_stmt *sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt);
|
|
|
6317
6415
|
SQLITE_API void *sqlite3_commit_hook(sqlite3*, int(*)(void*), void*);
|
|
6318
6416
|
SQLITE_API void *sqlite3_rollback_hook(sqlite3*, void(*)(void *), void*);
|
|
6319
6417
|
|
|
6418
|
+
/*
|
|
6419
|
+
** CAPI3REF: Autovacuum Compaction Amount Callback
|
|
6420
|
+
** METHOD: sqlite3
|
|
6421
|
+
**
|
|
6422
|
+
** ^The sqlite3_autovacuum_pages(D,C,P,X) interface registers a callback
|
|
6423
|
+
** function C that is invoked prior to each autovacuum of the database
|
|
6424
|
+
** file. ^The callback is passed a copy of the generic data pointer (P),
|
|
6425
|
+
** the schema-name of the attached database that is being autovacuumed,
|
|
6426
|
+
** the the size of the database file in pages, the number of free pages,
|
|
6427
|
+
** and the number of bytes per page, respectively. The callback should
|
|
6428
|
+
** return the number of free pages that should be removed by the
|
|
6429
|
+
** autovacuum. ^If the callback returns zero, then no autovacuum happens.
|
|
6430
|
+
** ^If the value returned is greater than or equal to the number of
|
|
6431
|
+
** free pages, then a complete autovacuum happens.
|
|
6432
|
+
**
|
|
6433
|
+
** <p>^If there are multiple ATTACH-ed database files that are being
|
|
6434
|
+
** modified as part of a transaction commit, then the autovacuum pages
|
|
6435
|
+
** callback is invoked separately for each file.
|
|
6436
|
+
**
|
|
6437
|
+
** <p><b>The callback is not reentrant.</b> The callback function should
|
|
6438
|
+
** not attempt to invoke any other SQLite interface. If it does, bad
|
|
6439
|
+
** things may happen, including segmentation faults and corrupt database
|
|
6440
|
+
** files. The callback function should be a simple function that
|
|
6441
|
+
** does some arithmetic on its input parameters and returns a result.
|
|
6442
|
+
**
|
|
6443
|
+
** ^The X parameter to sqlite3_autovacuum_pages(D,C,P,X) is an optional
|
|
6444
|
+
** destructor for the P parameter. ^If X is not NULL, then X(P) is
|
|
6445
|
+
** invoked whenever the database connection closes or when the callback
|
|
6446
|
+
** is overwritten by another invocation of sqlite3_autovacuum_pages().
|
|
6447
|
+
**
|
|
6448
|
+
** <p>^There is only one autovacuum pages callback per database connection.
|
|
6449
|
+
** ^Each call to the sqlite3_autovacuum_pages() interface overrides all
|
|
6450
|
+
** previous invocations for that database connection. ^If the callback
|
|
6451
|
+
** argument (C) to sqlite3_autovacuum_pages(D,C,P,X) is a NULL pointer,
|
|
6452
|
+
** then the autovacuum steps callback is cancelled. The return value
|
|
6453
|
+
** from sqlite3_autovacuum_pages() is normally SQLITE_OK, but might
|
|
6454
|
+
** be some other error code if something goes wrong. The current
|
|
6455
|
+
** implementation will only return SQLITE_OK or SQLITE_MISUSE, but other
|
|
6456
|
+
** return codes might be added in future releases.
|
|
6457
|
+
**
|
|
6458
|
+
** <p>If no autovacuum pages callback is specified (the usual case) or
|
|
6459
|
+
** a NULL pointer is provided for the callback,
|
|
6460
|
+
** then the default behavior is to vacuum all free pages. So, in other
|
|
6461
|
+
** words, the default behavior is the same as if the callback function
|
|
6462
|
+
** were something like this:
|
|
6463
|
+
**
|
|
6464
|
+
** <blockquote><pre>
|
|
6465
|
+
** unsigned int demonstration_autovac_pages_callback(
|
|
6466
|
+
** void *pClientData,
|
|
6467
|
+
** const char *zSchema,
|
|
6468
|
+
** unsigned int nDbPage,
|
|
6469
|
+
** unsigned int nFreePage,
|
|
6470
|
+
** unsigned int nBytePerPage
|
|
6471
|
+
** ){
|
|
6472
|
+
** return nFreePage;
|
|
6473
|
+
** }
|
|
6474
|
+
** </pre></blockquote>
|
|
6475
|
+
*/
|
|
6476
|
+
SQLITE_API int sqlite3_autovacuum_pages(
|
|
6477
|
+
sqlite3 *db,
|
|
6478
|
+
unsigned int(*)(void*,const char*,unsigned int,unsigned int,unsigned int),
|
|
6479
|
+
void*,
|
|
6480
|
+
void(*)(void*)
|
|
6481
|
+
);
|
|
6482
|
+
|
|
6483
|
+
|
|
6320
6484
|
/*
|
|
6321
6485
|
** CAPI3REF: Data Change Notification Callbacks
|
|
6322
6486
|
** METHOD: sqlite3
|
|
@@ -7779,7 +7943,8 @@ SQLITE_API int sqlite3_test_control(int op, ...);
|
|
|
7779
7943
|
#define SQLITE_TESTCTRL_EXTRA_SCHEMA_CHECKS 29
|
|
7780
7944
|
#define SQLITE_TESTCTRL_SEEK_COUNT 30
|
|
7781
7945
|
#define SQLITE_TESTCTRL_TRACEFLAGS 31
|
|
7782
|
-
#define
|
|
7946
|
+
#define SQLITE_TESTCTRL_TUNE 32
|
|
7947
|
+
#define SQLITE_TESTCTRL_LAST 32 /* Largest TESTCTRL */
|
|
7783
7948
|
|
|
7784
7949
|
/*
|
|
7785
7950
|
** CAPI3REF: SQL Keyword Checking
|
|
@@ -8979,8 +9144,9 @@ SQLITE_API void sqlite3_log(int iErrCode, const char *zFormat, ...);
|
|
|
8979
9144
|
**
|
|
8980
9145
|
** A single database handle may have at most a single write-ahead log callback
|
|
8981
9146
|
** registered at one time. ^Calling [sqlite3_wal_hook()] replaces any
|
|
8982
|
-
** previously registered write-ahead log callback. ^
|
|
8983
|
-
**
|
|
9147
|
+
** previously registered write-ahead log callback. ^The return value is
|
|
9148
|
+
** a copy of the third parameter from the previous call, if any, or 0.
|
|
9149
|
+
** ^Note that the [sqlite3_wal_autocheckpoint()] interface and the
|
|
8984
9150
|
** [wal_autocheckpoint pragma] both invoke [sqlite3_wal_hook()] and will
|
|
8985
9151
|
** overwrite any prior [sqlite3_wal_hook()] settings.
|
|
8986
9152
|
*/
|
|
@@ -9531,6 +9697,15 @@ SQLITE_API int sqlite3_db_cacheflush(sqlite3*);
|
|
|
9531
9697
|
** triggers; or 2 for changes resulting from triggers called by top-level
|
|
9532
9698
|
** triggers; and so forth.
|
|
9533
9699
|
**
|
|
9700
|
+
** When the [sqlite3_blob_write()] API is used to update a blob column,
|
|
9701
|
+
** the pre-update hook is invoked with SQLITE_DELETE. This is because the
|
|
9702
|
+
** in this case the new values are not available. In this case, when a
|
|
9703
|
+
** callback made with op==SQLITE_DELETE is actuall a write using the
|
|
9704
|
+
** sqlite3_blob_write() API, the [sqlite3_preupdate_blobwrite()] returns
|
|
9705
|
+
** the index of the column being written. In other cases, where the
|
|
9706
|
+
** pre-update hook is being invoked for some other reason, including a
|
|
9707
|
+
** regular DELETE, sqlite3_preupdate_blobwrite() returns -1.
|
|
9708
|
+
**
|
|
9534
9709
|
** See also: [sqlite3_update_hook()]
|
|
9535
9710
|
*/
|
|
9536
9711
|
#if defined(SQLITE_ENABLE_PREUPDATE_HOOK)
|
|
@@ -9551,6 +9726,7 @@ SQLITE_API int sqlite3_preupdate_old(sqlite3 *, int, sqlite3_value **);
|
|
|
9551
9726
|
SQLITE_API int sqlite3_preupdate_count(sqlite3 *);
|
|
9552
9727
|
SQLITE_API int sqlite3_preupdate_depth(sqlite3 *);
|
|
9553
9728
|
SQLITE_API int sqlite3_preupdate_new(sqlite3 *, int, sqlite3_value **);
|
|
9729
|
+
SQLITE_API int sqlite3_preupdate_blobwrite(sqlite3 *);
|
|
9554
9730
|
#endif
|
|
9555
9731
|
|
|
9556
9732
|
/*
|
|
@@ -9789,8 +9965,8 @@ SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_recover(sqlite3 *db, const c
|
|
|
9789
9965
|
** SQLITE_SERIALIZE_NOCOPY bit is omitted from argument F if a memory
|
|
9790
9966
|
** allocation error occurs.
|
|
9791
9967
|
**
|
|
9792
|
-
** This interface is
|
|
9793
|
-
** [
|
|
9968
|
+
** This interface is omitted if SQLite is compiled with the
|
|
9969
|
+
** [SQLITE_OMIT_DESERIALIZE] option.
|
|
9794
9970
|
*/
|
|
9795
9971
|
SQLITE_API unsigned char *sqlite3_serialize(
|
|
9796
9972
|
sqlite3 *db, /* The database connection */
|
|
@@ -9837,12 +10013,16 @@ SQLITE_API unsigned char *sqlite3_serialize(
|
|
|
9837
10013
|
** database is currently in a read transaction or is involved in a backup
|
|
9838
10014
|
** operation.
|
|
9839
10015
|
**
|
|
10016
|
+
** It is not possible to deserialized into the TEMP database. If the
|
|
10017
|
+
** S argument to sqlite3_deserialize(D,S,P,N,M,F) is "temp" then the
|
|
10018
|
+
** function returns SQLITE_ERROR.
|
|
10019
|
+
**
|
|
9840
10020
|
** If sqlite3_deserialize(D,S,P,N,M,F) fails for any reason and if the
|
|
9841
10021
|
** SQLITE_DESERIALIZE_FREEONCLOSE bit is set in argument F, then
|
|
9842
10022
|
** [sqlite3_free()] is invoked on argument P prior to returning.
|
|
9843
10023
|
**
|
|
9844
|
-
** This interface is
|
|
9845
|
-
** [
|
|
10024
|
+
** This interface is omitted if SQLite is compiled with the
|
|
10025
|
+
** [SQLITE_OMIT_DESERIALIZE] option.
|
|
9846
10026
|
*/
|
|
9847
10027
|
SQLITE_API int sqlite3_deserialize(
|
|
9848
10028
|
sqlite3 *db, /* The database connection */
|
|
@@ -10091,6 +10271,38 @@ SQLITE_API int sqlite3session_create(
|
|
|
10091
10271
|
*/
|
|
10092
10272
|
SQLITE_API void sqlite3session_delete(sqlite3_session *pSession);
|
|
10093
10273
|
|
|
10274
|
+
/*
|
|
10275
|
+
** CAPIREF: Conigure a Session Object
|
|
10276
|
+
** METHOD: sqlite3_session
|
|
10277
|
+
**
|
|
10278
|
+
** This method is used to configure a session object after it has been
|
|
10279
|
+
** created. At present the only valid value for the second parameter is
|
|
10280
|
+
** [SQLITE_SESSION_OBJCONFIG_SIZE].
|
|
10281
|
+
**
|
|
10282
|
+
** Arguments for sqlite3session_object_config()
|
|
10283
|
+
**
|
|
10284
|
+
** The following values may passed as the the 4th parameter to
|
|
10285
|
+
** sqlite3session_object_config().
|
|
10286
|
+
**
|
|
10287
|
+
** <dt>SQLITE_SESSION_OBJCONFIG_SIZE <dd>
|
|
10288
|
+
** This option is used to set, clear or query the flag that enables
|
|
10289
|
+
** the [sqlite3session_changeset_size()] API. Because it imposes some
|
|
10290
|
+
** computational overhead, this API is disabled by default. Argument
|
|
10291
|
+
** pArg must point to a value of type (int). If the value is initially
|
|
10292
|
+
** 0, then the sqlite3session_changeset_size() API is disabled. If it
|
|
10293
|
+
** is greater than 0, then the same API is enabled. Or, if the initial
|
|
10294
|
+
** value is less than zero, no change is made. In all cases the (int)
|
|
10295
|
+
** variable is set to 1 if the sqlite3session_changeset_size() API is
|
|
10296
|
+
** enabled following the current call, or 0 otherwise.
|
|
10297
|
+
**
|
|
10298
|
+
** It is an error (SQLITE_MISUSE) to attempt to modify this setting after
|
|
10299
|
+
** the first table has been attached to the session object.
|
|
10300
|
+
*/
|
|
10301
|
+
SQLITE_API int sqlite3session_object_config(sqlite3_session*, int op, void *pArg);
|
|
10302
|
+
|
|
10303
|
+
/*
|
|
10304
|
+
*/
|
|
10305
|
+
#define SQLITE_SESSION_OBJCONFIG_SIZE 1
|
|
10094
10306
|
|
|
10095
10307
|
/*
|
|
10096
10308
|
** CAPI3REF: Enable Or Disable A Session Object
|
|
@@ -10335,6 +10547,22 @@ SQLITE_API int sqlite3session_changeset(
|
|
|
10335
10547
|
void **ppChangeset /* OUT: Buffer containing changeset */
|
|
10336
10548
|
);
|
|
10337
10549
|
|
|
10550
|
+
/*
|
|
10551
|
+
** CAPI3REF: Return An Upper-limit For The Size Of The Changeset
|
|
10552
|
+
** METHOD: sqlite3_session
|
|
10553
|
+
**
|
|
10554
|
+
** By default, this function always returns 0. For it to return
|
|
10555
|
+
** a useful result, the sqlite3_session object must have been configured
|
|
10556
|
+
** to enable this API using sqlite3session_object_config() with the
|
|
10557
|
+
** SQLITE_SESSION_OBJCONFIG_SIZE verb.
|
|
10558
|
+
**
|
|
10559
|
+
** When enabled, this function returns an upper limit, in bytes, for the size
|
|
10560
|
+
** of the changeset that might be produced if sqlite3session_changeset() were
|
|
10561
|
+
** called. The final changeset size might be equal to or smaller than the
|
|
10562
|
+
** size in bytes returned by this function.
|
|
10563
|
+
*/
|
|
10564
|
+
SQLITE_API sqlite3_int64 sqlite3session_changeset_size(sqlite3_session *pSession);
|
|
10565
|
+
|
|
10338
10566
|
/*
|
|
10339
10567
|
** CAPI3REF: Load The Difference Between Tables Into A Session
|
|
10340
10568
|
** METHOD: sqlite3_session
|