sqlite: allow returning ArrayBufferViews from user-defined functions

PR-URL: https://github.com/nodejs/node/pull/56790
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
René authored and RafaelGSS committed 2025-04-16 03:26:27 -03:00
1 parent ca4121b95a
commit bc672fcfdd
3 files changed
+15 -9

No files matched your search

+1 -1
View File
@@ -214,7 +214,7 @@ class UserDefinedFunction {
} else if (result->IsString()) {
Utf8Value val(isolate, result.As<String>());
sqlite3_result_text(ctx, *val, val.length(), SQLITE_TRANSIENT);
} else if (result->IsUint8Array()) {
} else if (result->IsArrayBufferView()) {
ArrayBufferViewContents<uint8_t> buf(result);
sqlite3_result_blob(ctx, buf.data(), buf.length(), SQLITE_TRANSIENT);
} else if (result->IsBigInt()) {