Synclets logoSynclets

createSqlite3Synclet

The createSqlite3Synclet function creates a Synclet with SQLite3-backed connectors.

createSqlite3Synclet<Depth>(options: Sqlite3SyncletOptions<Depth>): Promise<Synclet<Depth, Sqlite3DataConnector<Depth>, Sqlite3MetaConnector<Depth>>>
TypeDescription
optionsSqlite3SyncletOptions<Depth>

Configuration including depth, database instance, and optional table/column names.

returnsPromise<Synclet<Depth, Sqlite3DataConnector<Depth>, Sqlite3MetaConnector<Depth>>>

A Promise that resolves to the Synclet.

This is the recommended approach for creating a SQLite3 Synclet, providing a simplified API that creates both the DataConnector and MetaConnector internally. The function uses the same SQLite3 database instance for both connectors and allows customization of all table and column names.

When table/column options are not provided, the connectors use defaults: data table 'data' with columns 'address' and 'atom', and meta table 'meta' with columns 'address' and 'timestamp'. All table structures are created automatically on first use.

Since

v0.0.0