We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8da2252 commit bac2d8fCopy full SHA for bac2d8f
packages/dialects/sql.js/README.md
@@ -1 +1,25 @@
1
Forked from https://github.com/betarixm/kysely-sql-js
2
+
3
+## Usage
4
5
+```ts
6
+import { type GeneratedAlways, Kysely } from 'kysely';
7
+import initSqlJs from 'sql.js';
8
9
+import { SqlJsDialect } from 'kysely-sql-js';
10
11
+interface Database {
12
+ person: {
13
+ id: GeneratedAlways<number>;
14
+ first_name: string | null;
15
+ last_name: string | null;
16
+ age: number;
17
+ };
18
+}
19
20
+const SqlJsStatic = await initSqlJs();
21
22
+export const db = new Kysely<Database>({
23
+ dialect: new SqlJsDialect({ sqlJs: new SqlJsStatic.Database() }),
24
+});
25
+```
0 commit comments