From f2d246f63a3e9b411f5d7fa49632e0027400a926 Mon Sep 17 00:00:00 2001 From: wagesj45 Date: Wed, 24 Sep 2025 06:24:09 -0500 Subject: [PATCH] Fix Statement.getAsObject cursor handling --- script.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/script.js b/script.js index 1cf3c3b..b17e466 100644 --- a/script.js +++ b/script.js @@ -654,10 +654,11 @@ getAsObject() { try { if (!this._columnNames) this._columnNames = this._stmt.getColumnNames(); + const values = this._stmt.get(); const row = Object.create(null); const count = this._columnNames.length; for (let i = 0; i < count; i += 1) { - row[this._columnNames[i]] = this._stmt.get(i); + row[this._columnNames[i]] = values ? values[i] : undefined; } return row; } catch (error) {