sqlite local

This commit is contained in:
m
2026-09-09 23:12:15 +02:00
parent e1360c19a2
commit 7dd29239b7
21 changed files with 2284 additions and 101 deletions
+9
View File
@@ -0,0 +1,9 @@
import { getDatabase } from './client';
export async function newResourceId(): Promise<string> {
const db = await getDatabase();
const row = await db.getFirstAsync<{ id: string }>(
'SELECT lower(hex(randomblob(16))) AS id',
);
return row!.id;
}