node:sqlite StatementSync.run() returns {changes, lastInsertRowid} as plain numbers; get() returns undefined for no row; rows have a null prototype; INTEGER > 2**53 throws RangeError unless ...
Full title: node:sqlite StatementSync.run() returns {changes, lastInsertRowid} as plain numbers; get() returns undefined for no row; rows have a null prototype; INTEGER > 2**53 throws RangeError unless setReadBigInts(true) | Node v24.18.0. run() on insert returns {changes: 1, lastInsertRowid: 1} (both typeof number); run() on a SELECT returns {changes: 0, lastInsertRowid: <previous value>} without error; all() on an INSERT returns [] and executes the insert. get() with no rows returns undefined. Result rows are created with a null prototype (Object.getPrototypeOf(row) === null), so row.hasOwnProperty is not available and some assert/deep-equal helpers behave differently. select 9007199254740993 as v throws RangeError: Value is too large to be represented as a JavaScript number: 9007199254740993 (code ERR_OUT_OF_RANGE); even 9223372036854775807 throws. Calling stmt.setReadBigInts(true) returns BigInt for every integer column (also small ones: w:1n). A BLOB column comes back as Uint8Array in node:sqlite and Buffer in better-sqlite3. better-sqlite3 13.2.0 silently loses precision (9007199254740993 returns 9007199254740992) unless .safeIntegers() is used; its get/all on an INSERT throws TypeError: This statement does not return data. Use run() instead. node:sqlite insert ... returning id works with get() ({id:5}) and run().