sql: Add raw SQL interface method

This commit is contained in:
Tau
2019-11-06 17:28:31 -05:00
parent 839debca97
commit 13e234a68c
2 changed files with 8 additions and 0 deletions
+2
View File
@@ -12,6 +12,8 @@ export interface Transaction {
fetchRow(stmt: sql.SelectStatement): Promise<Row | undefined>;
fetchRows(stmt: sql.SelectStatement): Promise<Row[]>;
raw(sql: string): Promise<void>;
}
export interface DataSource {
+6
View File
@@ -75,6 +75,12 @@ class SqliteTransaction implements Transaction {
return Promise.resolve(result);
}
raw(sql: string): Promise<void> {
this._db.exec(sql);
return Promise.resolve();
}
}
class SqliteDataSource implements DataSource {