mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-15 20:17:22 +00:00
865 B
865 B
SQLocal adapter for bknd (experimental)
This packages adds an adapter to use a SQLocal database with bknd](https://github.com/bknd-io/bknd). It is based on sqlocal and the driver included for kysely.
Installation
Install the adapter with:
npm install @bknd/sqlocal
Usage
Create a connection:
import { SQLocalConnection } from "@bknd/sqlocal";
const connection = new SQLocalConnection({
databasePath: "db.sqlite"
});
Use the connection depending on which framework or runtime you are using. E.g., when using createApp, you can use the connection as follows:
import { createApp } from "bknd";
import { SQLocalConnection } from "@bknd/sqlocal";
const connection = new SQLocalConnection();
const app = createApp({ connection });