bind/js: Add support for raw() Statements

This commit is contained in:
Diego Reis 2025-05-30 15:44:34 -03:00
parent 1367b453e9
commit 0f685c5b9a
3 changed files with 142 additions and 17 deletions

View file

@ -66,6 +66,7 @@ test("Test bind()", async (t) => {
db.prepare("CREATE TABLE users (name TEXT, age INTEGER)").run();
db.prepare("INSERT INTO users (name, age) VALUES (?, ?)").run("Alice", 42);
let stmt = db.prepare("SELECT * FROM users WHERE name = ?").bind("Alice");
console.log(db.prepare("SELECT * FROM users").raw().get());
for (const row of stmt.iterate()) {
t.truthy(row.name);