API reference › @evolu/common › Sqlite
SQLite database abstraction and query execution.
Functions
| Function | Description |
|---|---|
| booleanToSqliteBoolean | Converts a JavaScript boolean to a SqliteBoolean. |
| createPreparedStatementsCache | Creates a PreparedStatements cache backed by the given factory and dispose function. |
| createSqlite | Creates a Sqlite instance backed by a platform-specific driver. |
| getSqliteSchema | Get the current SQLite schema by reading SQLite metadata. |
| getSqliteSnapshot | Captures a full SqliteSnapshot for testing and diagnostics. |
| sql | Creates a safe SQL query using a tagged template literal. |
| sqliteBooleanToBoolean | Converts a SqliteBoolean to a JavaScript boolean. |
| sqliteQueryStringToSqliteQuery | Converts a SqliteQueryString back into a SqliteQuery. |
| sqliteQueryToSqliteQueryString | Converts a SqliteQuery into a stable SqliteQueryString. |
| testSetupSqlite | Creates a test setup with a in-memory Sqlite. |
Interfaces
| Interface | Description |
|---|---|
| CreateSqliteDriverDep | - |
| PreparedStatements | Cache for compiled prepared statements. |
| RawSql | An unescaped SQL fragment inserted verbatim into a query. |
| SqlIdentifier | A double-quoted SQL identifier for safe column or table name interpolation. |
| Sqlite | Platform-agnostic SQLite wrapping a SqliteDriver. |
| SqliteDep | - |
| SqliteDriver | SQLite driver interface. |
| SqliteExecResult | Result of executing a SQLite query. |
| SqliteIndex | Index metadata stored in sqlite_master for a Sqlite database. |
| SqliteQuery | Represents a SQL query to be executed on a Sqlite database. |
| SqliteQueryOptions | Options for configuring SqliteQuery execution behavior. |
| SqliteSchema | Full schema metadata for a Sqlite database. |
| SqliteSnapshot | Returns SqliteSchema and full SqliteRow table contents for inspection and testing. |
| SqliteTransaction | - |
Type Aliases
| Type Alias | Description |
|---|---|
| CreateSqliteDriver | Creates a SqliteDriver. |
| SafeSql | A sanitized SQL string for SqliteQuery. |
| SqliteBoolean | SQLite represents boolean values using 0 (false) and 1 (true) instead of a dedicated boolean type. |
| SqliteDriverOptions | Options for creating a CreateSqliteDriver. |
| SqliteQueryString | Serialized SqliteQuery used as a stable string key. |
| SqliteRow | A row returned from a Sqlite query, mapping column names to SqliteValue. |
| SqliteValue | A value that can be stored in Sqlite. |
| SqlTemplateParam | A parameter accepted by the sql tagged template. |
Variables
| Variable | Description |
|---|---|
| eqSqliteIndex | Eq instance for SqliteIndex. |
| eqSqliteValue | Equality comparison for SqliteValue. |
| SqliteBoolean | SQLite represents boolean values using 0 (false) and 1 (true) instead of a dedicated boolean type. |
| sqliteFalse | Represents the SqliteBoolean value for false. |
| SqliteIndex | Index metadata stored in sqlite_master for a Sqlite database. |
| SqliteSchema | Full schema metadata for a Sqlite database. |
| sqliteTrue | Represents the SqliteBoolean value for true. |
| SqliteValue | A value that can be stored in Sqlite. |