Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/kysely_postgrs_js_dialect/deps.ts>kysely.SqliteDialect

Kysely dialect for PostgreSQL using the Postgres.js client.
Latest
class kysely.SqliteDialect
implements Dialect
import { kysely } from "https://deno.land/x/kysely_postgrs_js_dialect@v0.27.4/deps.ts";
const { SqliteDialect } = kysely;

SQLite dialect that uses the better-sqlite3 library.

The constructor takes an instance of SqliteDialectConfig.

import Database from 'better-sqlite3'

new SqliteDialect({
  database: new Database('db.sqlite')
})

If you want the pool to only be created once it's first used, database can be a function:

import Database from 'better-sqlite3'

new SqliteDialect({
  database: async () => new Database('db.sqlite')
})

Constructors

new
SqliteDialect(config: SqliteDialectConfig)

Methods

createAdapter(): DialectAdapter

Creates an adapter for the dialect.

createDriver(): Driver

Creates a driver for the dialect.

createIntrospector(db: Kysely<any>): DatabaseIntrospector

Creates a database introspector that can be used to get database metadata such as the table names and column names of those tables.

db never has any plugins installed. It's created using Kysely.withoutPlugins.

createQueryCompiler(): QueryCompiler

Creates a query compiler for the dialect.