Skip to content

Commit ed76e35

Browse files
authored
Add SQL tag function and dialect property to SQLiteDatabaseClient (#268)
1 parent fdd8226 commit ed76e35

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/sqlite.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,13 @@ export class SQLiteDatabaseClient {
3939
element("tbody", rows.map(r => element("tr", columns.map(c => element("td", [text(r[c])])))))
4040
]);
4141
}
42+
async sql(strings, ...args) {
43+
return this.query(strings.join("?"), args);
44+
}
4245
}
46+
Object.defineProperty(SQLiteDatabaseClient.prototype, "dialect", {
47+
value: "sqlite"
48+
});
4349

4450
function load(source) {
4551
return typeof source === "string" ? fetch(source).then(load)

0 commit comments

Comments
 (0)