API reference / @evolu/common / Sqlite / Sqlite
Interface: Sqlite
Defined in: packages/common/src/Sqlite.ts:50
Cross-platform SQLite abstraction.
This API is sync only because SQLite is an embedded, single-threaded engine. All operations are blocking and in-process, so async APIs add needless complexity without any real benefit and are also slower. Check better-sqlite3 GitHub issues and docs for details.
Extends
Disposable
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
exec | readonly | <R>(query) => Result<SqliteExecResult<R>, SqliteError> | - | packages/common/src/Sqlite.ts:51 |
export | readonly | () => Result<Uint8Array<ArrayBufferLike>, SqliteError> | - | packages/common/src/Sqlite.ts:65 |
transaction | readonly | <T, E>(callback) => Result<T, | SqliteError | E> | Executes a transaction, running the provided callback within a begin/commit block. If the callback returns an error (E or SqliteError), the transaction is rolled back. If the rollback fails, a SqliteError is returned with both the original error and rollbackError. | packages/common/src/Sqlite.ts:61 |
Methods
[dispose]()
Defined in: node_modules/typescript/lib/lib.esnext.disposable.d.ts:36
Returns
void
Inherited from
Disposable.[dispose]
Defined in: node_modules/@types/node/compatibility/disposable.d.ts:9
Returns
void
Inherited from
Disposable.[dispose]