object-curly-spacing

This commit is contained in:
Michael C
2021-09-22 18:52:35 -04:00
parent 5dcc90b31a
commit a028eaa41a
85 changed files with 406 additions and 405 deletions

View File

@@ -1,9 +1,9 @@
import {IDatabase, QueryType} from "./IDatabase";
import Sqlite3, {Database, Database as SQLiteDatabase} from "better-sqlite3";
import { IDatabase, QueryType } from "./IDatabase";
import Sqlite3, { Database, Database as SQLiteDatabase } from "better-sqlite3";
import fs from "fs";
import path from "path";
import {getHash} from "../utils/getHash";
import {Logger} from "../utils/logger";
import { getHash } from "../utils/getHash";
import { Logger } from "../utils/logger";
export class Sqlite implements IDatabase {
private db: SQLiteDatabase;
@@ -36,7 +36,7 @@ export class Sqlite implements IDatabase {
fs.mkdirSync(path.join(this.config.dbPath, "../"));
}
this.db = new Sqlite3(this.config.dbPath, {readonly: this.config.readOnly, fileMustExist: !this.config.createDbIfNotExists});
this.db = new Sqlite3(this.config.dbPath, { readonly: this.config.readOnly, fileMustExist: !this.config.createDbIfNotExists });
if (this.config.createDbIfNotExists && !this.config.readOnly && fs.existsSync(this.config.dbSchemaFileName)) {
this.db.exec(Sqlite.processUpgradeQuery(fs.readFileSync(this.config.dbSchemaFileName).toString()));