prettier
This commit is contained in:
@@ -2,10 +2,13 @@ import { Database } from "@db/sqlite";
|
||||
import type { Note } from "./note.ts";
|
||||
|
||||
export const db = new Database(Deno.env.get("SQLITE_PATH") ?? "notes.db");
|
||||
|
||||
try {
|
||||
db.exec("PRAGMA busy_timeout=10000");
|
||||
db.exec("PRAGMA journal_mode=WAL");
|
||||
const [row] = db.prepare("PRAGMA journal_mode").all<{ journal_mode: string }>();
|
||||
const [row] = db.prepare("PRAGMA journal_mode").all<
|
||||
{ journal_mode: string }
|
||||
>();
|
||||
console.log(`[db] journal_mode=${row.journal_mode}, busy_timeout=10000`);
|
||||
} catch (e) {
|
||||
console.error("[db] failed to set PRAGMAs:", e);
|
||||
|
||||
Reference in New Issue
Block a user