8000 GitHub - sbooth/CSQLite: SQLite packaged for the Swift Package Manager
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

sbooth/CSQLite

Repository files navigation

CSQLite

SQLite packaged for the Swift Package Manager.

The package contains the SQLite amalgamation built using the recommended compile-time options.

The default build configuration includes the FTS5 extension, built-in SQL math functions, the R*Tree index extension, database snapshots, sqlite_stmt table, and the sqlite_stat4 table.

Additionally, the carray, decimal, ieee754, percentile, series, sha3, and uuid extensions are statically linked.

The package also includes shims for various C functions not easily accessible from Swift.

Customization

For Swift 6.1 and later the build configuration and features may be customized using package traits.

Recommended Compile-Time Options

The following traits are used to specify the build configuration and the defaults reflect the SQLite recommended compile-time options:

Package Trait Default SQLite Compile-Time Option
DQS_0 Y SQLITE_DQS=0
DQS_1 SQLITE_DQS=1
DQS_2 SQLITE_DQS=2
DQS_3 SQLITE_DQS=3
THREADSAFE_0 Y SQLITE_THREADSAFE=0
THREADSAFE_1 SQLITE_THREADSAFE=1
THREADSAFE_2 SQLITE_THREADSAFE=2
DEFAULT_MEMSTATUS_0 Y SQLITE_DEFAULT_MEMSTATUS=0
DEFAULT_WAL_SYNCHRONOUS_1 Y SQLITE_DEFAULT_WAL_SYNCHRONOUS=1
LIKE_DOESNT_MATCH_BLOBS Y SQLITE_LIKE_DOESNT_MATCH_BLOBS
MAX_EXPR_DEPTH_0 Y SQLITE_MAX_EXPR_DEPTH=0
OMIT_DECLTYPE Y SQLITE_OMIT_DECLTYPE
OMIT_DEPRECATED Y SQLITE_OMIT_DEPRECATED
OMIT_PROGRESS_CALLBACK Y SQLITE_OMIT_PROGRESS_CALLBACK
OMIT_SHARED_CACHE Y SQLITE_OMIT_SHARED_CACHE
USE_ALLOCA Y SQLITE_USE_ALLOCA
OMIT_AUTOINIT Y SQLITE_OMIT_AUTOINIT
STRICT_SUBTYPE_1 Y SQLITE_STRICT_SUBTYPE=1

Important

The DQS_ traits are mutually exclusive and only one should be specified.

The SQLite default is SQLITE_DQS=3 but the SQLite recommended value is SQLITE_DQS=0.

Important

The THREADSAFE_ traits are mutually exclusive and only one should be specified.

The SQLite default is SQLITE_THREADSAFE=1 but the SQLite recommended value is SQLITE_THREADSAFE=0.

Features

The following traits enable commonly-used SQLite features:

Package Trait Default SQLite Feature
ENABLE_BYTECODE_VTAB SQLITE_ENABLE_BYTECODE_VTAB
ENABLE_COLUMN_METADATA SQLITE_ENABLE_COLUMN_METADATA
ENABLE_DBPAGE_VTAB SQLITE_ENABLE_DBPAGE_VTAB
ENABLE_DBSTAT_VTAB SQLITE_ENABLE_DBSTAT_VTAB
ENABLE_FTS4 SQLITE_ENABLE_FTS4
ENABLE_FTS5 Y SQLITE_ENABLE_FTS5
ENABLE_GEOPOLY SQLITE_ENABLE_GEOPOLY
ENABLE_MATH_FUNCTIONS Y SQLITE_ENABLE_MATH_FUNCTIONS
ENABLE_NORMALIZE SQLITE_ENABLE_NORMALIZE
ENABLE_PREUPDATE_HOOK SQLITE_ENABLE_PREUPDATE_HOOK
ENABLE_RTREE Y SQLITE_ENABLE_RTREE
ENABLE_SESSION SQLITE_ENABLE_SESSION
ENABLE_SNAPSHOT Y SQLITE_ENABLE_SNAPSHOT
ENABLE_STMTVTAB Y SQLITE_ENABLE_STMTVTAB
ENABLE_STAT4 Y SQLITE_ENABLE_STAT4

Note

The ENABLE_SESSION trait also sets the ENABLE_PREUPDATE_HOOK trait.

License

SQLite is in the public domain.

About

SQLite packaged for the Swift Package Manager

Topics

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •  
0