12 lines
372 B
TypeScript
12 lines
372 B
TypeScript
|
import { Kysely, ParseJSONResultsPlugin } from "kysely";
|
||
|
import { DB as Sqlite } from "sqlite";
|
||
|
import { DenoSqliteDialect } from "./deno-sqlite-dialect.ts";
|
||
|
import { Database } from "./type.ts";
|
||
|
|
||
|
export const db = new Kysely<Database>({
|
||
|
dialect: new DenoSqliteDialect({
|
||
|
database: new Sqlite("stock.db")
|
||
|
}),
|
||
|
plugins: [new ParseJSONResultsPlugin()]
|
||
|
});
|