Skip to content

Commit 7deca23

Browse files
authored
Merge pull request #55 from gilzoide/feature/sqlite-3.49.0
Update SQLite to 3.49.0
2 parents 3a23b9c + 1520b9e commit 7deca23

13 files changed

+2366
-1861
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Changelog
22
## [Unreleased](https://github.com/gilzoide/unity-sqlite-net/compare/1.2.1...HEAD)
3+
### Changed
4+
- Updated SQLite to 3.49.0
35

46

57
## [1.2.1](https://github.com/gilzoide/unity-sqlite-net/tree/1.2.1)
Binary file not shown.
624 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
-600 Bytes
Binary file not shown.
16.3 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

Plugins/sqlite-amalgamation/sqlite3.c

+2,239-1,831
Large diffs are not rendered by default.

Plugins/sqlite-amalgamation/sqlite3.h

+124-29
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,9 @@ extern "C" {
148148
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
149149
** [sqlite_version()] and [sqlite_source_id()].
150150
*/
151-
#define SQLITE_VERSION "3.48.0"
152-
#define SQLITE_VERSION_NUMBER 3048000
153-
#define SQLITE_SOURCE_ID "2025-01-14 11:05:00 d2fe6b05f38d9d7cd78c5d252e99ac59f1aea071d669830c1ffe4e8966e84010"
151+
#define SQLITE_VERSION "3.49.0"
152+
#define SQLITE_VERSION_NUMBER 3049000
153+
#define SQLITE_SOURCE_ID "2025-02-06 11:55:18 4a7dd425dc2a0e5082a9049c9b4a9d4f199a71583d014c24b4cfe276c5a77cde"
154154

155155
/*
156156
** CAPI3REF: Run-Time Library Version Numbers
@@ -2213,7 +2213,15 @@ struct sqlite3_mem_methods {
22132213
** CAPI3REF: Database Connection Configuration Options
22142214
**
22152215
** These constants are the available integer configuration options that
2216-
** can be passed as the second argument to the [sqlite3_db_config()] interface.
2216+
** can be passed as the second parameter to the [sqlite3_db_config()] interface.
2217+
**
2218+
** The [sqlite3_db_config()] interface is a var-args functions. It takes a
2219+
** variable number of parameters, though always at least two. The number of
2220+
** parameters passed into sqlite3_db_config() depends on which of these
2221+
** constants is given as the second parameter. This documentation page
2222+
** refers to parameters beyond the second as "arguments". Thus, when this
2223+
** page says "the N-th argument" it means "the N-th parameter past the
2224+
** configuration option" or "the (N+2)-th parameter to sqlite3_db_config()".
22172225
**
22182226
** New configuration options may be added in future releases of SQLite.
22192227
** Existing configuration options might be discontinued. Applications
@@ -2225,8 +2233,14 @@ struct sqlite3_mem_methods {
22252233
** <dl>
22262234
** [[SQLITE_DBCONFIG_LOOKASIDE]]
22272235
** <dt>SQLITE_DBCONFIG_LOOKASIDE</dt>
2228-
** <dd> ^This option takes three additional arguments that determine the
2229-
** [lookaside memory allocator] configuration for the [database connection].
2236+
** <dd> The SQLITE_DBCONFIG_LOOKASIDE option is used to adjust the
2237+
** configuration of the lookaside memory allocator within a database
2238+
** connection.
2239+
** The arguments to the SQLITE_DBCONFIG_LOOKASIDE option are <i>not</i>
2240+
** in the [DBCONFIG arguments|usual format].
2241+
** The SQLITE_DBCONFIG_LOOKASIDE option takes three arguments, not two,
2242+
** so that a call to [sqlite3_db_config()] that uses SQLITE_DBCONFIG_LOOKASIDE
2243+
** should have a total of five parameters.
22302244
** ^The first argument (the third parameter to [sqlite3_db_config()] is a
22312245
** pointer to a memory buffer to use for lookaside memory.
22322246
** ^The first argument after the SQLITE_DBCONFIG_LOOKASIDE verb
@@ -2249,7 +2263,8 @@ struct sqlite3_mem_methods {
22492263
** [[SQLITE_DBCONFIG_ENABLE_FKEY]]
22502264
** <dt>SQLITE_DBCONFIG_ENABLE_FKEY</dt>
22512265
** <dd> ^This option is used to enable or disable the enforcement of
2252-
** [foreign key constraints]. There should be two additional arguments.
2266+
** [foreign key constraints]. This is the same setting that is
2267+
** enabled or disabled by the [PRAGMA foreign_keys] statement.
22532268
** The first argument is an integer which is 0 to disable FK enforcement,
22542269
** positive to enable FK enforcement or negative to leave FK enforcement
22552270
** unchanged. The second parameter is a pointer to an integer into which
@@ -2271,13 +2286,13 @@ struct sqlite3_mem_methods {
22712286
** <p>Originally this option disabled all triggers. ^(However, since
22722287
** SQLite version 3.35.0, TEMP triggers are still allowed even if
22732288
** this option is off. So, in other words, this option now only disables
2274-
** triggers in the main database schema or in the schemas of ATTACH-ed
2289+
** triggers in the main database schema or in the schemas of [ATTACH]-ed
22752290
** databases.)^ </dd>
22762291
**
22772292
** [[SQLITE_DBCONFIG_ENABLE_VIEW]]
22782293
** <dt>SQLITE_DBCONFIG_ENABLE_VIEW</dt>
22792294
** <dd> ^This option is used to enable or disable [CREATE VIEW | views].
2280-
** There should be two additional arguments.
2295+
** There must be two additional arguments.
22812296
** The first argument is an integer which is 0 to disable views,
22822297
** positive to enable views or negative to leave the setting unchanged.
22832298
** The second parameter is a pointer to an integer into which
@@ -2296,7 +2311,7 @@ struct sqlite3_mem_methods {
22962311
** <dd> ^This option is used to enable or disable the
22972312
** [fts3_tokenizer()] function which is part of the
22982313
** [FTS3] full-text search engine extension.
2299-
** There should be two additional arguments.
2314+
** There must be two additional arguments.
23002315
** The first argument is an integer which is 0 to disable fts3_tokenizer() or
23012316
** positive to enable fts3_tokenizer() or negative to leave the setting
23022317
** unchanged.
@@ -2311,7 +2326,7 @@ struct sqlite3_mem_methods {
23112326
** interface independently of the [load_extension()] SQL function.
23122327
** The [sqlite3_enable_load_extension()] API enables or disables both the
23132328
** C-API [sqlite3_load_extension()] and the SQL function [load_extension()].
2314-
** There should be two additional arguments.
2329+
** There must be two additional arguments.
23152330
** When the first argument to this interface is 1, then only the C-API is
23162331
** enabled and the SQL function remains disabled. If the first argument to
23172332
** this interface is 0, then both the C-API and the SQL function are disabled.
@@ -2325,23 +2340,30 @@ struct sqlite3_mem_methods {
23252340
**
23262341
** [[SQLITE_DBCONFIG_MAINDBNAME]] <dt>SQLITE_DBCONFIG_MAINDBNAME</dt>
23272342
** <dd> ^This option is used to change the name of the "main" database
2328-
** schema. ^The sole argument is a pointer to a constant UTF8 string
2329-
** which will become the new schema name in place of "main". ^SQLite
2330-
** does not make a copy of the new main schema name string, so the application
2331-
** must ensure that the argument passed into this DBCONFIG option is unchanged
2332-
** until after the database connection closes.
2343+
** schema. This option does not follow the
2344+
** [DBCONFIG arguments|usual SQLITE_DBCONFIG argument format].
2345+
** This option takes exactly one additional argument so that the
2346+
** [sqlite3_db_config()] call has a total of three parameters. The
2347+
** extra argument must be a pointer to a constant UTF8 string which
2348+
** will become the new schema name in place of "main". ^SQLite does
2349+
** not make a copy of the new main schema name string, so the application
2350+
** must ensure that the argument passed into SQLITE_DBCONFIG MAINDBNAME
2351+
** is unchanged until after the database connection closes.
23332352
** </dd>
23342353
**
23352354
** [[SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE]]
23362355
** <dt>SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE</dt>
2337-
** <dd> Usually, when a database in wal mode is closed or detached from a
2338-
** database handle, SQLite checks if this will mean that there are now no
2339-
** connections at all to the database. If so, it performs a checkpoint
2340-
** operation before closing the connection. This option may be used to
2341-
** override this behavior. The first parameter passed to this operation
2342-
** is an integer - positive to disable checkpoints-on-close, or zero (the
2343-
** default) to enable them, and negative to leave the setting unchanged.
2344-
** The second parameter is a pointer to an integer
2356+
** <dd> Usually, when a database in [WAL mode] is closed or detached from a
2357+
** database handle, SQLite checks if if there are other connections to the
2358+
** same database, and if there are no other database connection (if the
2359+
** connection being closed is the last open connection to the database),
2360+
** then SQLite performs a [checkpoint] before closing the connection and
2361+
** deletes the WAL file. The SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE option can
2362+
** be used to override that behavior. The first argument passed to this
2363+
** operation (the third parameter to [sqlite3_db_config()]) is an integer
2364+
** which is positive to disable checkpoints-on-close, or zero (the default)
2365+
** to enable them, and negative to leave the setting unchanged.
2366+
** The second argument (the fourth parameter) is a pointer to an integer
23452367
** into which is written 0 or 1 to indicate whether checkpoints-on-close
23462368
** have been disabled - 0 if they are not disabled, 1 if they are.
23472369
** </dd>
@@ -2502,7 +2524,7 @@ struct sqlite3_mem_methods {
25022524
** statistics. For statistics to be collected, the flag must be set on
25032525
** the database handle both when the SQL statement is prepared and when it
25042526
** is stepped. The flag is set (collection of statistics is enabled)
2505-
** by default. This option takes two arguments: an integer and a pointer to
2527+
** by default. <p>This option takes two arguments: an integer and a pointer to
25062528
** an integer.. The first argument is 1, 0, or -1 to enable, disable, or
25072529
** leave unchanged the statement scanstatus option. If the second argument
25082530
** is not NULL, then the value of the statement scanstatus setting after
@@ -2516,7 +2538,7 @@ struct sqlite3_mem_methods {
25162538
** in which tables and indexes are scanned so that the scans start at the end
25172539
** and work toward the beginning rather than starting at the beginning and
25182540
** working toward the end. Setting SQLITE_DBCONFIG_REVERSE_SCANORDER is the
2519-
** same as setting [PRAGMA reverse_unordered_selects]. This option takes
2541+
** same as setting [PRAGMA reverse_unordered_selects]. <p>This option takes
25202542
** two arguments which are an integer and a pointer to an integer. The first
25212543
** argument is 1, 0, or -1 to enable, disable, or leave unchanged the
25222544
** reverse scan order flag, respectively. If the second argument is not NULL,
@@ -2525,7 +2547,76 @@ struct sqlite3_mem_methods {
25252547
** first argument.
25262548
** </dd>
25272549
**
2550+
** [[SQLITE_DBCONFIG_ENABLE_ATTACH_CREATE]]
2551+
** <dt>SQLITE_DBCONFIG_ENABLE_ATTACH_CREATE</dt>
2552+
** <dd>The SQLITE_DBCONFIG_ENABLE_ATTACH_CREATE option enables or disables
2553+
** the ability of the [ATTACH DATABASE] SQL command to create a new database
2554+
** file if the database filed named in the ATTACH command does not already
2555+
** exist. This ability of ATTACH to create a new database is enabled by
2556+
** default. Applications can disable or reenable the ability for ATTACH to
2557+
** create new database files using this DBCONFIG option.<p>
2558+
** This option takes two arguments which are an integer and a pointer
2559+
** to an integer. The first argument is 1, 0, or -1 to enable, disable, or
2560+
** leave unchanged the attach-create flag, respectively. If the second
2561+
** argument is not NULL, then 0 or 1 is written into the integer that the
2562+
** second argument points to depending on if the attach-create flag is set
2563+
** after processing the first argument.
2564+
** </dd>
2565+
**
2566+
** [[SQLITE_DBCONFIG_ENABLE_ATTACH_WRITE]]
2567+
** <dt>SQLITE_DBCONFIG_ENABLE_ATTACH_WRITE</dt>
2568+
** <dd>The SQLITE_DBCONFIG_ENABLE_ATTACH_WRITE option enables or disables the
2569+
** ability of the [ATTACH DATABASE] SQL command to open a database for writing.
2570+
** This capability is enabled by default. Applications can disable or
2571+
** reenable this capability using the current DBCONFIG option. If the
2572+
** the this capability is disabled, the [ATTACH] command will still work,
2573+
** but the database will be opened read-only. If this option is disabled,
2574+
** then the ability to create a new database using [ATTACH] is also disabled,
2575+
** regardless of the value of the [SQLITE_DBCONFIG_ENABLE_ATTACH_CREATE]
2576+
** option.<p>
2577+
** This option takes two arguments which are an integer and a pointer
2578+
** to an integer. The first argument is 1, 0, or -1 to enable, disable, or
2579+
** leave unchanged the ability to ATTACH another database for writing,
2580+
** respectively. If the second argument is not NULL, then 0 or 1 is written
2581+
** into the integer to which the second argument points, depending on whether
2582+
** the ability to ATTACH a read/write database is enabled or disabled
2583+
** after processing the first argument.
2584+
** </dd>
2585+
**
2586+
** [[SQLITE_DBCONFIG_ENABLE_COMMENTS]]
2587+
** <dt>SQLITE_DBCONFIG_ENABLE_COMMENTS</dt>
2588+
** <dd>The SQLITE_DBCONFIG_ENABLE_COMMENTS option enables or disables the
2589+
** ability to include comments in SQL text. Comments are enabled by default.
2590+
** An application can disable or reenable comments in SQL text using this
2591+
** DBCONFIG option.<p>
2592+
** This option takes two arguments which are an integer and a pointer
2593+
** to an integer. The first argument is 1, 0, or -1 to enable, disable, or
2594+
** leave unchanged the ability to use comments in SQL text,
2595+
** respectively. If the second argument is not NULL, then 0 or 1 is written
2596+
** into the integer that the second argument points to depending on if
2597+
** comments are allowed in SQL text after processing the first argument.
2598+
** </dd>
2599+
**
25282600
** </dl>
2601+
**
2602+
** [[DBCONFIG arguments]] <h3>Arguments To SQLITE_DBCONFIG Options</h3>
2603+
**
2604+
** <p>Most of the SQLITE_DBCONFIG options take two arguments, so that the
2605+
** overall call to [sqlite3_db_config()] has a total of four parameters.
2606+
** The first argument (the third parameter to sqlite3_db_config()) is a integer.
2607+
** The second argument is a pointer to an integer. If the first argument is 1,
2608+
** then the option becomes enabled. If the first integer argument is 0, then the
2609+
** option is disabled. If the first argument is -1, then the option setting
2610+
** is unchanged. The second argument, the pointer to an integer, may be NULL.
2611+
** If the second argument is not NULL, then a value of 0 or 1 is written into
2612+
** the integer to which the second argument points, depending on whether the
2613+
** setting is disabled or enabled after applying any changes specified by
2614+
** the first argument.
2615+
**
2616+
** <p>While most SQLITE_DBCONFIG options use the argument format
2617+
** described in the previous paragraph, the [SQLITE_DBCONFIG_MAINDBNAME]
2618+
** and [SQLITE_DBCONFIG_LOOKASIDE] options are different. See the
2619+
** documentation of those exceptional options for details.
25292620
*/
25302621
#define SQLITE_DBCONFIG_MAINDBNAME 1000 /* const char* */
25312622
#define SQLITE_DBCONFIG_LOOKASIDE 1001 /* void* int int */
@@ -2547,7 +2638,10 @@ struct sqlite3_mem_methods {
25472638
#define SQLITE_DBCONFIG_TRUSTED_SCHEMA 1017 /* int int* */
25482639
#define SQLITE_DBCONFIG_STMT_SCANSTATUS 1018 /* int int* */
25492640
#define SQLITE_DBCONFIG_REVERSE_SCANORDER 1019 /* int int* */
2550-
#define SQLITE_DBCONFIG_MAX 1019 /* Largest DBCONFIG */
2641+
#define SQLITE_DBCONFIG_ENABLE_ATTACH_CREATE 1020 /* int int* */
2642+
#define SQLITE_DBCONFIG_ENABLE_ATTACH_WRITE 1021 /* int int* */
2643+
#define SQLITE_DBCONFIG_ENABLE_COMMENTS 1022 /* int int* */
2644+
#define SQLITE_DBCONFIG_MAX 1022 /* Largest DBCONFIG */
25512645

25522646
/*
25532647
** CAPI3REF: Enable Or Disable Extended Result Codes
@@ -10750,8 +10844,9 @@ SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_recover(sqlite3 *db, const c
1075010844
/*
1075110845
** CAPI3REF: Serialize a database
1075210846
**
10753-
** The sqlite3_serialize(D,S,P,F) interface returns a pointer to memory
10754-
** that is a serialization of the S database on [database connection] D.
10847+
** The sqlite3_serialize(D,S,P,F) interface returns a pointer to
10848+
** memory that is a serialization of the S database on
10849+
** [database connection] D. If S is a NULL pointer, the main database is used.
1075510850
** If P is not a NULL pointer, then the size of the database in bytes
1075610851
** is written into *P.
1075710852
**

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ This package provides the excelent [SQLite-net](https://github.com/praeclarum/sq
99
+ Both synchronous and asynchronous APIs are available
1010
+ `SQLiteConnection.Serialize` extension method for serializing a database to `byte[]` (reference: [SQLite Serialization](https://www.sqlite.org/c3ref/serialize.html)).
1111
+ `SQLiteConnection.Deserialize` extension method for deserializing memory (`byte[]`, `NativeArray<byte>` or `ReadOnlySpan<byte>`) into an open database (reference: [SQLite Deserialization](https://www.sqlite.org/c3ref/deserialize.html)).
12-
- [SQLite 3.48.0](https://sqlite.org/releaselog/3_48_0.html)
12+
- [SQLite 3.49.0](https://sqlite.org/releaselog/3_49_0.html)
1313
+ Enabled modules: [R\*Tree](https://sqlite.org/rtree.html), [Geopoly](https://sqlite.org/geopoly.html), [FTS5](https://sqlite.org/fts5.html), [Built-In Math Functions](https://www.sqlite.org/lang_mathfunc.html)
1414
+ Supports Windows, Linux, macOS, WebGL, Android, iOS, tvOS and visionOS platforms
1515
+ Supports persisting data in WebGL builds by using a [custom VFS backed by Indexed DB](https://github.com/gilzoide/idbvfs).

0 commit comments

Comments
 (0)