API reference@evolu/common › Sqlite

SQLite database abstraction and query execution.

Core

NameDescription
CreateSqliteDriverDepDependency wrapper for CreateSqliteDriver.
PreparedStatementsCache for compiled prepared statements.
SqlitePlatform-agnostic SQLite wrapping a SqliteDriver.
SqliteDepDependency wrapper for Sqlite.
SqliteDriverSQLite driver interface.
SqliteTransactionRuns a callback inside a SQLite transaction.
CreateSqliteDriverCreates a SqliteDriver.
SqliteDriverOptionsOptions for creating a CreateSqliteDriver.
createPreparedStatementsCacheCreates a PreparedStatements cache backed by the given factory and dispose function.
createSqliteCreates a Sqlite instance backed by a platform-specific driver.

Queries

NameDescription
RawSqlAn unescaped SQL fragment inserted verbatim into a query.
SqlIdentifierA double-quoted SQL identifier for safe column or table name interpolation.
SqliteExecResultResult of executing a SQLite query.
SqliteQueryRepresents a SQL query to be executed on a Sqlite database.
SqliteQueryOptionsOptions for configuring SqliteQuery execution behavior.
SafeSqlA sanitized SQL string for SqliteQuery.
SqliteQueryParametersParameters of a SqliteQuery.
SqliteQueryStringSerialized SqliteQuery used as a stable string key.
SqlTemplateParamA parameter accepted by the sql tagged template.
SqliteQueryParametersParameters of a SqliteQuery.
sqlCreates a safe SQL query using a tagged template literal.
sqliteQueryStringToSqliteQueryConverts a SqliteQueryString back into a SqliteQuery.
sqliteQueryToSqliteQueryStringConverts a SqliteQuery into a stable SqliteQueryString.

Values

NameDescription
SqliteBooleanSQLite represents boolean values using 0 (false) and 1 (true) instead of a dedicated boolean type.
SqliteRowA row returned from a Sqlite query, mapping column names to SqliteValueInput.
SqliteValueA value that can be stored in Sqlite.
SqliteValueInputA value used in sql template parameters and Sqlite query results.
eqSqliteValueEquality comparison for SqliteValueInput.
SqliteBooleanSQLite represents boolean values using 0 (false) and 1 (true) instead of a dedicated boolean type.
sqliteFalseRepresents the SqliteBoolean value for false.
sqliteTrueRepresents the SqliteBoolean value for true.
SqliteValueA value that can be stored in Sqlite.
booleanToSqliteBooleanConverts a JavaScript boolean to a SqliteBoolean.
sqliteBooleanToBooleanConverts a SqliteBoolean to a JavaScript boolean.

Schema

NameDescription
SqliteIndexIndex metadata stored in sqlite_master for a Sqlite database.
SqliteSchemaFull schema metadata for a Sqlite database.
SqliteSnapshotReturns SqliteSchema and full SqliteRow table contents for inspection and testing.
eqSqliteIndexEq instance for SqliteIndex.
SqliteIndexIndex metadata stored in sqlite_master for a Sqlite database.
SqliteSchemaFull schema metadata for a Sqlite database.
getSqliteSchemaGet the current SQLite schema by reading SQLite metadata.
getSqliteSnapshotCaptures a full SqliteSnapshot for testing and diagnostics.

Testing

FunctionDescription
testSetupSqliteCreates a test setup with a in-memory Sqlite.