From 7e296a1adc929a933f5287285752d241dfd135e3 Mon Sep 17 00:00:00 2001 From: Jarred Sumner Date: Tue, 6 Jun 2023 23:52:23 -0700 Subject: [breaking][bun:sqlite] `.values()` returns `[]` instead of `null` for queries returning 0 results (#3219) Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> --- src/bun.js/bindings/sqlite/JSSQLStatement.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/bun.js/bindings/sqlite/JSSQLStatement.cpp') diff --git a/src/bun.js/bindings/sqlite/JSSQLStatement.cpp b/src/bun.js/bindings/sqlite/JSSQLStatement.cpp index a561057fe..a6855fd19 100644 --- a/src/bun.js/bindings/sqlite/JSSQLStatement.cpp +++ b/src/bun.js/bindings/sqlite/JSSQLStatement.cpp @@ -1417,6 +1417,9 @@ JSC_DEFINE_HOST_FUNCTION(jsSQLStatementExecuteStatementFunctionRows, (JSC::JSGlo result = resultArray; } + } else if (status == SQLITE_DONE && columnCount != 0) { + // breaking change in Bun v0.6.8 + result = JSC::constructEmptyArray(lexicalGlobalObject, nullptr, 0); } if (UNLIKELY(status != SQLITE_DONE && status != SQLITE_OK)) { -- cgit v1.2.3