Skip to content

Commit

Permalink
Update SQLite to version 3.45.3 (#39)
Browse files Browse the repository at this point in the history
* Update SQLite to version 3.45.3

* Add csqlite_sqlite3_config_rowid_in_view()
  • Loading branch information
sbooth authored Apr 18, 2024
1 parent 2210af4 commit d230151
Show file tree
Hide file tree
Showing 4 changed files with 190 additions and 45 deletions.
5 changes: 5 additions & 0 deletions Sources/CSQLite/csqlite_shims.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,11 @@ int csqlite_sqlite3_config_memdb_maxsize(sqlite3_int64 x)
return sqlite3_config(SQLITE_CONFIG_MEMDB_MAXSIZE, x);
}

int csqlite_sqlite3_config_rowid_in_view(int *x)
{
return sqlite3_config(SQLITE_CONFIG_ROWID_IN_VIEW, x);
}

// MARK: - Database connection configuration

int csqlite_sqlite3_db_config_maindbname(sqlite3 *db, char *x)
Expand Down
2 changes: 2 additions & 0 deletions Sources/CSQLite/include/csqlite_shims.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ int csqlite_sqlite3_config_small_malloc(int x);
int csqlite_sqlite3_config_sorterref_size(int nByte);
/// Equivalent to `sqlite3_config(SQLITE_CONFIG_MEMDB_MAXSIZE, x)`
int csqlite_sqlite3_config_memdb_maxsize(sqlite3_int64 x);
/// Equivalent to `sqlite3_config(SQLITE_CONFIG_ROWID_IN_VIEW, x)`
int csqlite_sqlite3_config_rowid_in_view(int *x);

// MARK: - Database connection configuration
// See https://sqlite.org/c3ref/db_config.html
Expand Down
23 changes: 20 additions & 3 deletions Sources/CSQLite/include/sqlite3.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,9 @@ extern "C" {
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
** [sqlite_version()] and [sqlite_source_id()].
*/
#define SQLITE_VERSION "3.45.2"
#define SQLITE_VERSION_NUMBER 3045002
#define SQLITE_SOURCE_ID "2024-03-12 11:06:23 d8cd6d49b46a395b13955387d05e9e1a2a47e54fb99f3c9b59835bbefad6af77"
#define SQLITE_VERSION "3.45.3"
#define SQLITE_VERSION_NUMBER 3045003
#define SQLITE_SOURCE_ID "2024-04-15 13:34:05 8653b758870e6ef0c98d46b3ace27849054af85da891eb121e9aaa537f1e8355"

/*
** CAPI3REF: Run-Time Library Version Numbers
Expand Down Expand Up @@ -2143,6 +2143,22 @@ struct sqlite3_mem_methods {
** configuration setting is never used, then the default maximum is determined
** by the [SQLITE_MEMDB_DEFAULT_MAXSIZE] compile-time option. If that
** compile-time option is not set, then the default maximum is 1073741824.
**
** [[SQLITE_CONFIG_ROWID_IN_VIEW]]
** <dt>SQLITE_CONFIG_ROWID_IN_VIEW
** <dd>The SQLITE_CONFIG_ROWID_IN_VIEW option enables or disables the ability
** for VIEWs to have a ROWID. The capability can only be enabled if SQLite is
** compiled with -DSQLITE_ALLOW_ROWID_IN_VIEW, in which case the capability
** defaults to on. This configuration option queries the current setting or
** changes the setting to off or on. The argument is a pointer to an integer.
** If that integer initially holds a value of 1, then the ability for VIEWs to
** have ROWIDs is activated. If the integer initially holds zero, then the
** ability is deactivated. Any other initial value for the integer leaves the
** setting unchanged. After changes, if any, the integer is written with
** a 1 or 0, if the ability for VIEWs to have ROWIDs is on or off. If SQLite
** is compiled without -DSQLITE_ALLOW_ROWID_IN_VIEW (which is the usual and
** recommended case) then the integer is always filled with zero, regardless
** if its initial value.
** </dl>
*/
#define SQLITE_CONFIG_SINGLETHREAD 1 /* nil */
Expand Down Expand Up @@ -2174,6 +2190,7 @@ struct sqlite3_mem_methods {
#define SQLITE_CONFIG_SMALL_MALLOC 27 /* boolean */
#define SQLITE_CONFIG_SORTERREF_SIZE 28 /* int nByte */
#define SQLITE_CONFIG_MEMDB_MAXSIZE 29 /* sqlite3_int64 */
#define SQLITE_CONFIG_ROWID_IN_VIEW 30 /* int* */

/*
** CAPI3REF: Database Connection Configuration Options
Expand Down
Loading

0 comments on commit d230151

Please sign in to comment.