limbo/bindings/wasm/examples/example.js
Pekka Enberg b7ca2c9823 bindings/wasm: Add Database.prepare() and Statement.all()
This adds `Database.prepare()` and `Statement.all()` APIs to the Wasm
bindings so that you can actually get something useful out of the
library.
2024-11-13 12:22:35 +02:00

9 lines
No EOL
173 B
JavaScript

import { Database } from 'limbo-wasm';
const db = new Database('hello.db');
const stmt = db.prepare('SELECT * FROM users');
const users = stmt.all();
console.log(users);