Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ let platformConfiguration: [CSetting] = [
let features: [CSetting] = [
// https://sqlite.org/bytecodevtab.html
.define("SQLITE_ENABLE_BYTECODE_VTAB", .when(traits: ["ENABLE_BYTECODE_VTAB"])),
// https://sqlite.org/carray.html
.define("SQLITE_ENABLE_CARRAY", .when(traits: ["ENABLE_CARRAY"])),
// https://sqlite.org/c3ref/column_database_name.html
.define("SQLITE_ENABLE_COLUMN_METADATA", .when(traits: ["ENABLE_COLUMN_METADATA"])),
// https://sqlite.org/dbpage.html
Expand All @@ -87,6 +89,8 @@ let features: [CSetting] = [
.define("SQLITE_ENABLE_MATH_FUNCTIONS", .when(traits: ["ENABLE_MATH_FUNCTIONS"])),
// https://sqlite.org/c3ref/expanded_sql.html
.define("SQLITE_ENABLE_NORMALIZE", .when(traits: ["ENABLE_NORMALIZE"])),
// https://sqlite.org/percentile.html
.define("SQLITE_ENABLE_PERCENTILE", .when(traits: ["ENABLE_PERCENTILE"])),
// https://sqlite.org/c3ref/preupdate_blobwrite.html
.define("SQLITE_ENABLE_PREUPDATE_HOOK", .when(traits: ["ENABLE_PREUPDATE_HOOK"])),
// https://sqlite.org/rtree.html
Expand Down Expand Up @@ -190,6 +194,10 @@ let package = Package(
name: "ENABLE_BYTECODE_VTAB",
description: "Enables bytecode and tables_used table-valued functions"
),
.trait(
name: "ENABLE_CARRAY",
description: "Enables the carray extension"
),
.trait(
name: "ENABLE_COLUMN_METADATA",
description: "Enables column and table metadata functions"
Expand Down Expand Up @@ -222,6 +230,10 @@ let package = Package(
name: "ENABLE_NORMALIZE",
description: "Enables the sqlite3_normalized_sql function"
),
.trait(
name: "ENABLE_PERCENTILE",
description: "Enables the percentile extension"
),
.trait(
name: "ENABLE_PREUPDATE_HOOK",
description: "Enables the pre-update hook"
Expand Down Expand Up @@ -264,8 +276,10 @@ let package = Package(
"USE_ALLOCA",
"OMIT_AUTOINIT",
"STRICT_SUBTYPE_1",
"ENABLE_CARRAY",
"ENABLE_FTS5",
"ENABLE_MATH_FUNCTIONS",
"ENABLE_PERCENTILE",
"ENABLE_RTREE",
"ENABLE_SNAPSHOT",
"ENABLE_STMTVTAB",
Expand Down
4 changes: 4 additions & 0 deletions [email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,17 @@ let platformConfiguration: [CSetting] = [
let features: [CSetting] = [
// https://sqlite.org/c3ref/column_database_name.html
// .define("SQLITE_ENABLE_COLUMN_METADATA"),
// https://sqlite.org/carray.html
.define("SQLITE_ENABLE_CARRAY"),
// https://sqlite.org/fts5.html
.define("SQLITE_ENABLE_FTS5"),
// https://sqlite.org/geopoly.html
// .define("SQLITE_ENABLE_GEOPOLY"),
// .define("SQLITE_ENABLE_ICU"),
// https://sqlite.org/lang_mathfunc.html
.define("SQLITE_ENABLE_MATH_FUNCTIONS"),
// https://sqlite.org/percentile.html
.define("SQLITE_ENABLE_PERCENTILE"),
// --> For pre-update hook support uncomment the following define
// https://sqlite.org/c3ref/preupdate_blobwrite.html
// .define("SQLITE_ENABLE_PREUPDATE_HOOK"),
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@

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).

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).
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).

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.
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.

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

Expand Down Expand Up @@ -63,6 +63,7 @@ The following traits enable commonly-used SQLite features:
| Package Trait | Default | SQLite Feature |
| --- | :---: | --- |
| ENABLE_BYTECODE_VTAB | | [SQLITE_ENABLE_BYTECODE_VTAB](https://sqlite.org/bytecodevtab.html) |
| ENABLE_CARRAY | Y | [SQLITE_ENABLE_CARRAY](https://sqlite.org/carray.html) |
| ENABLE_COLUMN_METADATA | | [SQLITE_ENABLE_COLUMN_METADATA](https://sqlite.org/c3ref/column_database_name.html) |
| ENABLE_DBPAGE_VTAB | | [SQLITE_ENABLE_DBPAGE_VTAB](https://sqlite.org/dbpage.html) |
| ENABLE_DBSTAT_VTAB | | [SQLITE_ENABLE_DBSTAT_VTAB](https://sqlite.org/dbstat.html) |
Expand All @@ -71,6 +72,7 @@ The following traits enable commonly-used SQLite features:
| ENABLE_GEOPOLY | | [SQLITE_ENABLE_GEOPOLY](https://sqlite.org/geopoly.html) |
| ENABLE_MATH_FUNCTIONS | Y | [SQLITE_ENABLE_MATH_FUNCTIONS](https://sqlite.org/lang_mathfunc.html) |
| ENABLE_NORMALIZE | | [SQLITE_ENABLE_NORMALIZE](https://sqlite.org/c3ref/expanded_sql.html) |
| ENABLE_PERCENTILE | Y | [SQLITE_ENABLE_PERCENTILE](https://sqlite.org/percentile.html) |
| ENABLE_PREUPDATE_HOOK | | [SQLITE_ENABLE_PREUPDATE_HOOK](https://sqlite.org/c3ref/preupdate_blobwrite.html) |
| ENABLE_RTREE | Y | [SQLITE_ENABLE_RTREE](https://sqlite.org/rtree.html) |
| ENABLE_SESSION | | [SQLITE_ENABLE_SESSION](https://sqlite.org/sessionintro.html) |
Expand Down
Loading