redo of entire app

This commit is contained in:
bobbert committed 2025-03-11 16:22:47 +00:00
1 parent 7dee4879a7
commit 093dd7ea9e
45 files changed
+686 -5659

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
const Database = require('better-sqlite3');
// Use an in-memory database for testing
const db = new Database(':memory:');
// Create a table
db.exec('CREATE TABLE test (id INTEGER PRIMARY KEY, name TEXT)');
// Insert data
const insert = db.prepare('INSERT INTO test (name) VALUES (?)');
insert.run('Alice');
insert.run('Bob');
// Query data
const rows = db.prepare('SELECT * FROM test').all();
console.log(rows); // Should output: [ { id: 1, name: 'Alice' }, { id: 2, name: 'Bob' } ]