Skip to content

Commit 402e18b

Browse files
authored
Update SQLite to version 3.51.0 (#85)
SQLite 3.51 was released on 4 Nov.
1 parent f80fc16 commit 402e18b

17 files changed

Lines changed: 4941 additions & 2804 deletions

Package.swift

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ let platformConfiguration: [CSetting] = [
7070
let features: [CSetting] = [
7171
// https://sqlite.org/bytecodevtab.html
7272
.define("SQLITE_ENABLE_BYTECODE_VTAB", .when(traits: ["ENABLE_BYTECODE_VTAB"])),
73+
// https://sqlite.org/carray.html
74+
.define("SQLITE_ENABLE_CARRAY", .when(traits: ["ENABLE_CARRAY"])),
7375
// https://sqlite.org/c3ref/column_database_name.html
7476
.define("SQLITE_ENABLE_COLUMN_METADATA", .when(traits: ["ENABLE_COLUMN_METADATA"])),
7577
// https://sqlite.org/dbpage.html
@@ -87,6 +89,8 @@ let features: [CSetting] = [
8789
.define("SQLITE_ENABLE_MATH_FUNCTIONS", .when(traits: ["ENABLE_MATH_FUNCTIONS"])),
8890
// https://sqlite.org/c3ref/expanded_sql.html
8991
.define("SQLITE_ENABLE_NORMALIZE", .when(traits: ["ENABLE_NORMALIZE"])),
92+
// https://sqlite.org/percentile.html
93+
.define("SQLITE_ENABLE_PERCENTILE", .when(traits: ["ENABLE_PERCENTILE"])),
9094
// https://sqlite.org/c3ref/preupdate_blobwrite.html
9195
.define("SQLITE_ENABLE_PREUPDATE_HOOK", .when(traits: ["ENABLE_PREUPDATE_HOOK"])),
9296
// https://sqlite.org/rtree.html
@@ -190,6 +194,10 @@ let package = Package(
190194
name: "ENABLE_BYTECODE_VTAB",
191195
description: "Enables bytecode and tables_used table-valued functions"
192196
),
197+
.trait(
198+
name: "ENABLE_CARRAY",
199+
description: "Enables the carray extension"
200+
),
193201
.trait(
194202
name: "ENABLE_COLUMN_METADATA",
195203
description: "Enables column and table metadata functions"
@@ -222,6 +230,10 @@ let package = Package(
222230
name: "ENABLE_NORMALIZE",
223231
description: "Enables the sqlite3_normalized_sql function"
224232
),
233+
.trait(
234+
name: "ENABLE_PERCENTILE",
235+
description: "Enables the percentile extension"
236+
),
225237
.trait(
226238
name: "ENABLE_PREUPDATE_HOOK",
227239
description: "Enables the pre-update hook"
@@ -264,8 +276,10 @@ let package = Package(
264276
"USE_ALLOCA",
265277
"OMIT_AUTOINIT",
266278
"STRICT_SUBTYPE_1",
279+
"ENABLE_CARRAY",
267280
"ENABLE_FTS5",
268281
"ENABLE_MATH_FUNCTIONS",
282+
"ENABLE_PERCENTILE",
269283
"ENABLE_RTREE",
270284
"ENABLE_SNAPSHOT",
271285
"ENABLE_STMTVTAB",

Package@swift-5.3.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,17 @@ let platformConfiguration: [CSetting] = [
6161
let features: [CSetting] = [
6262
// https://sqlite.org/c3ref/column_database_name.html
6363
// .define("SQLITE_ENABLE_COLUMN_METADATA"),
64+
// https://sqlite.org/carray.html
65+
.define("SQLITE_ENABLE_CARRAY"),
6466
// https://sqlite.org/fts5.html
6567
.define("SQLITE_ENABLE_FTS5"),
6668
// https://sqlite.org/geopoly.html
6769
// .define("SQLITE_ENABLE_GEOPOLY"),
6870
// .define("SQLITE_ENABLE_ICU"),
6971
// https://sqlite.org/lang_mathfunc.html
7072
.define("SQLITE_ENABLE_MATH_FUNCTIONS"),
73+
// https://sqlite.org/percentile.html
74+
.define("SQLITE_ENABLE_PERCENTILE"),
7175
// --> For pre-update hook support uncomment the following define
7276
// https://sqlite.org/c3ref/preupdate_blobwrite.html
7377
// .define("SQLITE_ENABLE_PREUPDATE_HOOK"),

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77

88
The package contains the [SQLite amalgamation](https://sqlite.org/amalgamation.html) built using the [recommended compile-time options](https://sqlite.org/compile.html#recommended_compile_time_options).
99

10-
The default build configuration includes the [FTS5 extension](https://sqlite.org/fts5.html), built-in [SQL math functions](https://sqlite.org/lang_mathfunc.html), the [R\*Tree index extension](https://sqlite.org/rtree.html), [database snapshots](https://sqlite.org/c3ref/snapshot.html), [sqlite_stmt table](https://www.sqlite.org/stmt.html), and the [sqlite_stat4 table](https://sqlite.org/fileformat2.html#stat4tab).
10+
The default build configuration includes the [carray extension](https://sqlite.org/carray.html), [FTS5 extension](https://sqlite.org/fts5.html), built-in [SQL math functions](https://sqlite.org/lang_mathfunc.html), [percentile extension](https://www.sqlite.org/src/file/ext/misc/percentile.c), [R\*Tree index extension](https://sqlite.org/rtree.html), [database snapshots](https://sqlite.org/c3ref/snapshot.html), [sqlite_stmt table](https://www.sqlite.org/stmt.html), and [sqlite_stat4 table](https://sqlite.org/fileformat2.html#stat4tab).
1111

12-
Additionally, the [carray](https://sqlite.org/carray.html), [decimal](https://sqlite.org/floatingpoint.html#the_decimal_c_extension), [ieee754](https://sqlite.org/floatingpoint.html#the_ieee754_c_extension), [percentile](https://www.sqlite.org/src/file/ext/misc/percentile.c), [series](https://www.sqlite.org/src/file/ext/misc/series.c), [sha3](https://www.sqlite.org/src/file/ext/misc/shathree.c), and [uuid](https://www.sqlite.org/src/file/ext/misc/uuid.c) extensions are statically linked.
12+
Additionally, the [decimal](https://sqlite.org/floatingpoint.html#the_decimal_c_extension), [ieee754](https://sqlite.org/floatingpoint.html#the_ieee754_c_extension), [series](https://www.sqlite.org/src/file/ext/misc/series.c), [sha3](https://www.sqlite.org/src/file/ext/misc/shathree.c), and [uuid](https://www.sqlite.org/src/file/ext/misc/uuid.c) extensions are statically linked.
1313

1414
The package also includes [shims](Sources/CSQLite/include/csqlite_shims.h) for various C functions not easily accessible from Swift.
1515

@@ -63,6 +63,7 @@ The following traits enable commonly-used SQLite features:
6363
| Package Trait | Default | SQLite Feature |
6464
| --- | :---: | --- |
6565
| ENABLE_BYTECODE_VTAB | | [SQLITE_ENABLE_BYTECODE_VTAB](https://sqlite.org/bytecodevtab.html) |
66+
| ENABLE_CARRAY | Y | [SQLITE_ENABLE_CARRAY](https://sqlite.org/carray.html) |
6667
| ENABLE_COLUMN_METADATA | | [SQLITE_ENABLE_COLUMN_METADATA](https://sqlite.org/c3ref/column_database_name.html) |
6768
| ENABLE_DBPAGE_VTAB | | [SQLITE_ENABLE_DBPAGE_VTAB](https://sqlite.org/dbpage.html) |
6869
| ENABLE_DBSTAT_VTAB | | [SQLITE_ENABLE_DBSTAT_VTAB](https://sqlite.org/dbstat.html) |
@@ -71,6 +72,7 @@ The following traits enable commonly-used SQLite features:
7172
| ENABLE_GEOPOLY | | [SQLITE_ENABLE_GEOPOLY](https://sqlite.org/geopoly.html) |
7273
| ENABLE_MATH_FUNCTIONS | Y | [SQLITE_ENABLE_MATH_FUNCTIONS](https://sqlite.org/lang_mathfunc.html) |
7374
| ENABLE_NORMALIZE | | [SQLITE_ENABLE_NORMALIZE](https://sqlite.org/c3ref/expanded_sql.html) |
75+
| ENABLE_PERCENTILE | Y | [SQLITE_ENABLE_PERCENTILE](https://sqlite.org/percentile.html) |
7476
| ENABLE_PREUPDATE_HOOK | | [SQLITE_ENABLE_PREUPDATE_HOOK](https://sqlite.org/c3ref/preupdate_blobwrite.html) |
7577
| ENABLE_RTREE | Y | [SQLITE_ENABLE_RTREE](https://sqlite.org/rtree.html) |
7678
| ENABLE_SESSION | | [SQLITE_ENABLE_SESSION](https://sqlite.org/sessionintro.html) |

0 commit comments

Comments
 (0)