@db/sqlite, scoped_performance aliases

This commit is contained in:
Alex Gleason
2024-05-01 16:40:58 -05:00
parent 08ed52a57b
commit 7de5cdc18d
3 changed files with 6 additions and 6 deletions

View File

@@ -1,18 +1,18 @@
/// <reference lib="webworker" />
import { ScopedPerformance } from 'https://deno.land/x/scoped_performance@v2.0.0/mod.ts';
import { Database as SQLite } from '@db/sqlite';
import { Stickynotes } from '@soapbox/stickynotes';
import * as Comlink from 'comlink';
import { CompiledQuery, QueryResult } from 'kysely';
import { ScopedPerformance } from 'scoped_performance';
import { DenoSqlite3 } from '@/deps.ts';
import '@/sentry.ts';
let db: DenoSqlite3 | undefined;
let db: SQLite | undefined;
const console = new Stickynotes('ditto:sqlite.worker');
export const SqliteWorker = {
open(path: string): void {
db = new DenoSqlite3(path);
db = new SQLite(path);
},
executeQuery<R>({ sql, parameters }: CompiledQuery): QueryResult<R> {
if (!db) throw new Error('Database not open');