Config for the SQLite dialect.

interface SqliteDialectConfig {
    database: SqliteDatabase | (() => Promise<SqliteDatabase>);
    onCreateConnection?: ((connection) => Promise<void>);
}

Properties

database: SqliteDatabase | (() => Promise<SqliteDatabase>)

An sqlite Database instance or a function that returns one.

If a function is provided, it's called once when the first query is executed.

https://github.com/JoshuaWise/better-sqlite3/blob/master/docs/api.md#new-databasepath-options

Type declaration

onCreateConnection?: ((connection) => Promise<void>)

Called once when the first query is executed.

This is a Kysely specific feature and does not come from the better-sqlite3 module.

Type declaration