Uh oh!
There was an error while loading. Please reload this page.
sqlite: bind ArrayBuffer - #62061
Conversation
nodejs-github-bot
commented
Mar 1, 2026
Review requested:
|
Renegade334
left a comment
There was a problem hiding this comment.
I feel like this is probably reasonable, given that we already allow non-Uint8Array array buffer views. There are certain API surfaces that return raw ArrayBuffers (thinking webcrypto in particular), the required change is a one-liner, and there's already asymmetry in terms of the type conversion for BLOBs.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@## main #62061 +/- ##
==========================================
+ Coverage 89.74% 90.28% +0.53%
==========================================
Files 674 759 +85 Lines 204883 247637 +42754 Branches 39379 46677 +7298 ==========================================
+ Hits 183882 223583 +39701 - Misses 13279 15514 +2235 - Partials 7722 8540 +818
🚀 New features to boost your workflow:
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
5f75022 to
f2b7800CompareThis pull request has been marked as stale due to 90 days of inactivity. |
mike-git374
commented
Aug 4, 2026
Not stale, should be merged |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Renegade334
commented
Aug 5, 2026
@geeksilva97: if you're happy to ✅ the fixup commit, then I can land this manually once Jenkins is green. |
nodejs-github-bot
commented
Aug 5, 2026
yup, sounds good to me. first commit must be fixed though. |
Uh oh!
There was an error while loading. Please reload this page.
Renegade334
commented
Aug 5, 2026
Landed in 62acd48 |
Neither is an ArrayBufferView, so both fell through the named-parameter check in BindParameters() and were read as a parameter object. That bound an empty named-parameter set and left the real parameter unbound, so run(arrayBuffer) silently stored SQL NULL instead of the blob. Both now bind as BLOBs, matching nodejs/node#62061. SharedArrayBuffer cannot be cast to Napi::ArrayBuffer and node-addon-api gates IsSharedArrayBuffer() behind an experimental flag, so it is detected via Symbol.toStringTag -- realm-safe, unlike instanceof, which matters under Jest's per-file vm context and in worker threads.
Fixes: #61396