mirror of
https://github.com/nodejs/node.git
synced 2026-11-09 15:11:11 -05:00
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:
1 parent
ca4121b95a
commit
bc672fcfdd
3 files changed
+15
-9
No files matched your search
+1
-1
@@ -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()) {
|
||||
|
||||
Reference in new issue
Block a user