Adding the lab project

This commit is contained in:
2026-07-01 12:10:12 +02:00
commit 48ce52b52c
56 changed files with 22289 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
export async function queryOne(db, sql, params = []) {
const result = await db.query(sql, params);
return result.rows[0] ?? null;
}
export async function queryRequired(db, sql, params = []) {
const row = await queryOne(db, sql, params);
if (!row) {
throw new Error('Expected database row, received none');
}
return row;
}
//# sourceMappingURL=db.js.map