Skip to content

Commit c574ed9

Browse files
author
Annie Zhang
authored
SQLiteDatabaseClient.queryTag (#287)
1 parent 057c169 commit c574ed9

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/sqlite.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,11 @@ 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);
42+
async sql() {
43+
return this.query(...this.queryTag.apply(this, arguments));
44+
}
45+
queryTag(strings, ...params) {
46+
return [strings.join("?"), params];
4447
}
4548
}
4649
Object.defineProperty(SQLiteDatabaseClient.prototype, "dialect", {

0 commit comments

Comments
 (0)