// Stands in for https://esm.town/v/std/sqlite and std/sqlite/global.ts: // the account-wide database, shared by every val on this VM, at // ~/vals/.global/sqlite.db. import { createClient } from "npm:@libsql/client@0.18"; const dir = `${Deno.env.get("HOME")}/vals/.global`; await Deno.mkdir(dir, { recursive: true }); export const sqlite = createClient({ url: `file:${dir}/sqlite.db` }); await sqlite.execute("PRAGMA journal_mode = WAL"); await sqlite.execute("PRAGMA busy_timeout = 5000"); export default sqlite;