diff options
| author | 2025-01-12 18:31:10 +0100 | |
|---|---|---|
| committer | 2025-02-13 18:40:57 +0100 | |
| commit | b1e1bc8ef8d8a039a45be998e9c15e086ae4c52d (patch) | |
| tree | e535f062fae139c4ed568f0788c4ce0b031971a7 /c/loadable-ext-sqlite3.h | |
| parent | fix tests for latest zig (diff) | |
| download | zig-sqlite-b1e1bc8ef8d8a039a45be998e9c15e086ae4c52d.tar.gz zig-sqlite-b1e1bc8ef8d8a039a45be998e9c15e086ae4c52d.tar.xz zig-sqlite-b1e1bc8ef8d8a039a45be998e9c15e086ae4c52d.zip | |
stop vendoring the sqlite C code, rework the build
* Use the zig package manager to fetch sqlite directly from upstream
* Integrate the preprocessing tool directly into the build script
This makes it simpler to upgrade the SQLite source code:
* use `zig fetch`
* run `zig build preprocess-headers`
Diffstat (limited to 'c/loadable-ext-sqlite3.h')
| -rw-r--r-- | c/loadable-ext-sqlite3.h | 54 |
1 files changed, 46 insertions, 8 deletions
diff --git a/c/loadable-ext-sqlite3.h b/c/loadable-ext-sqlite3.h index df6efef..497515e 100644 --- a/c/loadable-ext-sqlite3.h +++ b/c/loadable-ext-sqlite3.h | |||
| @@ -1,3 +1,4 @@ | |||
| 1 | /* sqlite3.h edited by the zig-sqlite build script */ | ||
| 1 | /* | 2 | /* |
| 2 | ** 2001-09-15 | 3 | ** 2001-09-15 |
| 3 | ** | 4 | ** |
| @@ -146,9 +147,9 @@ extern "C" { | |||
| 146 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], | 147 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 147 | ** [sqlite_version()] and [sqlite_source_id()]. | 148 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 148 | */ | 149 | */ |
| 149 | #define SQLITE_VERSION "3.47.2" | 150 | #define SQLITE_VERSION "3.48.0" |
| 150 | #define SQLITE_VERSION_NUMBER 3047002 | 151 | #define SQLITE_VERSION_NUMBER 3048000 |
| 151 | #define SQLITE_SOURCE_ID "2024-12-07 20:39:59 2aabe05e2e8cae4847a802ee2daddc1d7413d8fc560254d93ee3e72c14685b6c" | 152 | #define SQLITE_SOURCE_ID "2025-01-14 11:05:00 d2fe6b05f38d9d7cd78c5d252e99ac59f1aea071d669830c1ffe4e8966e84010" |
| 152 | 153 | ||
| 153 | /* | 154 | /* |
| 154 | ** CAPI3REF: Run-Time Library Version Numbers | 155 | ** CAPI3REF: Run-Time Library Version Numbers |
| @@ -1085,6 +1086,11 @@ struct sqlite3_io_methods { | |||
| 1085 | ** pointed to by the pArg argument. This capability is used during testing | 1086 | ** pointed to by the pArg argument. This capability is used during testing |
| 1086 | ** and only needs to be supported when SQLITE_TEST is defined. | 1087 | ** and only needs to be supported when SQLITE_TEST is defined. |
| 1087 | ** | 1088 | ** |
| 1089 | ** <li>[[SQLITE_FCNTL_NULL_IO]] | ||
| 1090 | ** The [SQLITE_FCNTL_NULL_IO] opcode sets the low-level file descriptor | ||
| 1091 | ** or file handle for the [sqlite3_file] object such that it will no longer | ||
| 1092 | ** read or write to the database file. | ||
| 1093 | ** | ||
| 1088 | ** <li>[[SQLITE_FCNTL_WAL_BLOCK]] | 1094 | ** <li>[[SQLITE_FCNTL_WAL_BLOCK]] |
| 1089 | ** The [SQLITE_FCNTL_WAL_BLOCK] is a signal to the VFS layer that it might | 1095 | ** The [SQLITE_FCNTL_WAL_BLOCK] is a signal to the VFS layer that it might |
| 1090 | ** be advantageous to block on the next WAL lock if the lock is not immediately | 1096 | ** be advantageous to block on the next WAL lock if the lock is not immediately |
| @@ -1238,6 +1244,7 @@ struct sqlite3_io_methods { | |||
| 1238 | #define SQLITE_FCNTL_EXTERNAL_READER 40 | 1244 | #define SQLITE_FCNTL_EXTERNAL_READER 40 |
| 1239 | #define SQLITE_FCNTL_CKSM_FILE 41 | 1245 | #define SQLITE_FCNTL_CKSM_FILE 41 |
| 1240 | #define SQLITE_FCNTL_RESET_CACHE 42 | 1246 | #define SQLITE_FCNTL_RESET_CACHE 42 |
| 1247 | #define SQLITE_FCNTL_NULL_IO 43 | ||
| 1241 | 1248 | ||
| 1242 | /* deprecated names */ | 1249 | /* deprecated names */ |
| 1243 | #define SQLITE_GET_LOCKPROXYFILE SQLITE_FCNTL_GET_LOCKPROXYFILE | 1250 | #define SQLITE_GET_LOCKPROXYFILE SQLITE_FCNTL_GET_LOCKPROXYFILE |
| @@ -2607,10 +2614,14 @@ struct sqlite3_mem_methods { | |||
| 2607 | ** deleted by the most recently completed INSERT, UPDATE or DELETE | 2614 | ** deleted by the most recently completed INSERT, UPDATE or DELETE |
| 2608 | ** statement on the database connection specified by the only parameter. | 2615 | ** statement on the database connection specified by the only parameter. |
| 2609 | ** The two functions are identical except for the type of the return value | 2616 | ** The two functions are identical except for the type of the return value |
| 2610 | ** and that if the number of rows modified by the most recent INSERT, UPDATE | 2617 | ** and that if the number of rows modified by the most recent INSERT, UPDATE, |
| 2611 | ** or DELETE is greater than the maximum value supported by type "int", then | 2618 | ** or DELETE is greater than the maximum value supported by type "int", then |
| 2612 | ** the return value of sqlite3_changes() is undefined. ^Executing any other | 2619 | ** the return value of sqlite3_changes() is undefined. ^Executing any other |
| 2613 | ** type of SQL statement does not modify the value returned by these functions. | 2620 | ** type of SQL statement does not modify the value returned by these functions. |
| 2621 | ** For the purposes of this interface, a CREATE TABLE AS SELECT statement | ||
| 2622 | ** does not count as an INSERT, UPDATE or DELETE statement and hence the rows | ||
| 2623 | ** added to the new table by the CREATE TABLE AS SELECT statement are not | ||
| 2624 | ** counted. | ||
| 2614 | ** | 2625 | ** |
| 2615 | ** ^Only changes made directly by the INSERT, UPDATE or DELETE statement are | 2626 | ** ^Only changes made directly by the INSERT, UPDATE or DELETE statement are |
| 2616 | ** considered - auxiliary changes caused by [CREATE TRIGGER | triggers], | 2627 | ** considered - auxiliary changes caused by [CREATE TRIGGER | triggers], |
| @@ -4085,11 +4096,22 @@ typedef struct sqlite3_stmt sqlite3_stmt; | |||
| 4085 | ** <dd>The SQLITE_PREPARE_NO_VTAB flag causes the SQL compiler | 4096 | ** <dd>The SQLITE_PREPARE_NO_VTAB flag causes the SQL compiler |
| 4086 | ** to return an error (error code SQLITE_ERROR) if the statement uses | 4097 | ** to return an error (error code SQLITE_ERROR) if the statement uses |
| 4087 | ** any virtual tables. | 4098 | ** any virtual tables. |
| 4099 | ** | ||
| 4100 | ** [[SQLITE_PREPARE_DONT_LOG]] <dt>SQLITE_PREPARE_DONT_LOG</dt> | ||
| 4101 | ** <dd>The SQLITE_PREPARE_DONT_LOG flag prevents SQL compiler | ||
| 4102 | ** errors from being sent to the error log defined by | ||
| 4103 | ** [SQLITE_CONFIG_LOG]. This can be used, for example, to do test | ||
| 4104 | ** compiles to see if some SQL syntax is well-formed, without generating | ||
| 4105 | ** messages on the global error log when it is not. If the test compile | ||
| 4106 | ** fails, the sqlite3_prepare_v3() call returns the same error indications | ||
| 4107 | ** with or without this flag; it just omits the call to [sqlite3_log()] that | ||
| 4108 | ** logs the error. | ||
| 4088 | ** </dl> | 4109 | ** </dl> |
| 4089 | */ | 4110 | */ |
| 4090 | #define SQLITE_PREPARE_PERSISTENT 0x01 | 4111 | #define SQLITE_PREPARE_PERSISTENT 0x01 |
| 4091 | #define SQLITE_PREPARE_NORMALIZE 0x02 | 4112 | #define SQLITE_PREPARE_NORMALIZE 0x02 |
| 4092 | #define SQLITE_PREPARE_NO_VTAB 0x04 | 4113 | #define SQLITE_PREPARE_NO_VTAB 0x04 |
| 4114 | #define SQLITE_PREPARE_DONT_LOG 0x10 | ||
| 4093 | 4115 | ||
| 4094 | /* | 4116 | /* |
| 4095 | ** CAPI3REF: Compiling An SQL Statement | 4117 | ** CAPI3REF: Compiling An SQL Statement |
| @@ -10321,7 +10343,7 @@ typedef struct sqlite3_snapshot { | |||
| 10321 | #ifdef __cplusplus | 10343 | #ifdef __cplusplus |
| 10322 | } /* End of the 'extern "C"' block */ | 10344 | } /* End of the 'extern "C"' block */ |
| 10323 | #endif | 10345 | #endif |
| 10324 | #endif /* SQLITE3_H */ | 10346 | /* #endif for SQLITE3_H will be added by mksqlite3.tcl */ |
| 10325 | 10347 | ||
| 10326 | /******** Begin file sqlite3rtree.h *********/ | 10348 | /******** Begin file sqlite3rtree.h *********/ |
| 10327 | /* | 10349 | /* |
| @@ -12318,14 +12340,29 @@ struct Fts5PhraseIter { | |||
| 12318 | ** value returned by xInstCount(), SQLITE_RANGE is returned. Otherwise, | 12340 | ** value returned by xInstCount(), SQLITE_RANGE is returned. Otherwise, |
| 12319 | ** output variable (*ppToken) is set to point to a buffer containing the | 12341 | ** output variable (*ppToken) is set to point to a buffer containing the |
| 12320 | ** matching document token, and (*pnToken) to the size of that buffer in | 12342 | ** matching document token, and (*pnToken) to the size of that buffer in |
| 12321 | ** bytes. This API is not available if the specified token matches a | 12343 | ** bytes. |
| 12322 | ** prefix query term. In that case both output variables are always set | ||
| 12323 | ** to 0. | ||
| 12324 | ** | 12344 | ** |
| 12325 | ** The output text is not a copy of the document text that was tokenized. | 12345 | ** The output text is not a copy of the document text that was tokenized. |
| 12326 | ** It is the output of the tokenizer module. For tokendata=1 tables, this | 12346 | ** It is the output of the tokenizer module. For tokendata=1 tables, this |
| 12327 | ** includes any embedded 0x00 and trailing data. | 12347 | ** includes any embedded 0x00 and trailing data. |
| 12328 | ** | 12348 | ** |
| 12349 | ** This API may be slow in some cases if the token identified by parameters | ||
| 12350 | ** iIdx and iToken matched a prefix token in the query. In most cases, the | ||
| 12351 | ** first call to this API for each prefix token in the query is forced | ||
| 12352 | ** to scan the portion of the full-text index that matches the prefix | ||
| 12353 | ** token to collect the extra data required by this API. If the prefix | ||
| 12354 | ** token matches a large number of token instances in the document set, | ||
| 12355 | ** this may be a performance problem. | ||
| 12356 | ** | ||
| 12357 | ** If the user knows in advance that a query may use this API for a | ||
| 12358 | ** prefix token, FTS5 may be configured to collect all required data as part | ||
| 12359 | ** of the initial querying of the full-text index, avoiding the second scan | ||
| 12360 | ** entirely. This also causes prefix queries that do not use this API to | ||
| 12361 | ** run more slowly and use more memory. FTS5 may be configured in this way | ||
| 12362 | ** either on a per-table basis using the [FTS5 insttoken | 'insttoken'] | ||
| 12363 | ** option, or on a per-query basis using the | ||
| 12364 | ** [fts5_insttoken | fts5_insttoken()] user function. | ||
| 12365 | ** | ||
| 12329 | ** This API can be quite slow if used with an FTS5 table created with the | 12366 | ** This API can be quite slow if used with an FTS5 table created with the |
| 12330 | ** "detail=none" or "detail=column" option. | 12367 | ** "detail=none" or "detail=column" option. |
| 12331 | ** | 12368 | ** |
| @@ -12759,3 +12796,4 @@ struct fts5_api { | |||
| 12759 | #endif /* _FTS5_H */ | 12796 | #endif /* _FTS5_H */ |
| 12760 | 12797 | ||
| 12761 | /******** End of fts5.h *********/ | 12798 | /******** End of fts5.h *********/ |
| 12799 | #endif /* SQLITE3_H */ | ||