Skip to content

Commit bac2d8f

Browse files
committed
update
1 parent 8da2252 commit bac2d8f

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

packages/dialects/sql.js/README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,25 @@
11
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

Comments
 (0)