fix(ext/node): sqlite bind support bigint values (#27890)

This commit is contained in:
Divy Srivastava 2025-01-31 18:31:05 +05:30 committed by GitHub
parent b8a878cfc2
commit 1cbaee9f52
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 23 additions and 0 deletions

View file

@ -52,6 +52,15 @@ Deno.test(
},
);
Deno.test("[node/sqlite] StatementSync bind bigints", () => {
const db = new DatabaseSync(":memory:");
db.exec("CREATE TABLE data(key INTEGER PRIMARY KEY);");
const stmt = db.prepare("INSERT INTO data (key) VALUES (?)");
assertEquals(stmt.run(100n), { lastInsertRowid: 100, changes: 1 });
db.close();
});
Deno.test("[node/sqlite] StatementSync read bigints are supported", () => {
const db = new DatabaseSync(":memory:");
db.exec("CREATE TABLE data(key INTEGER PRIMARY KEY);");