You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These primitive JS values like ArrayBuffer and Boolean with clear SQLite equivalents should not be throwing errors or silently failing, the driver should convert these as needed
These primitive JS values like ArrayBuffer and Boolean with clear SQLite equivalents should not be throwing errors or silently failing, the driver should convert these as needed
I don't get it. To which of the views should an ArrayBuffer be converted to?
SQLite BLOB is a series of bytes, ArrayBuffer is also a series of bytes, if you need an ArrayBufferView you can take new Uint8Array(arrayBuffer) which is similar to Buffer.from(arrayBuffer). The SQLite BLOB should end up with the same series of bytes
I cannot see how this would be helpful since, as you pointed, it's a matter of passing a view, which can be easily done as you pointed in the examples.
I had a library passing an ArrayBuffer which I was inserting into SQLite table, I figured directly handling the ArrayBuffer in the sqlite driver might be more efficient than creating a garbage collected Uint8Array. I ended up needing a subarray of that ArrayBuffer so currently I am doing the Uint8Array, so this issue is not directly affecting me currently. But if you are interested, I consider this Boolean binding issue even more important, the driver should definitely be able to accept Boolean values: #57862
This issue has been marked as stale due to 90 days of inactivity.
It will be automatically closed in 30 days if no further activity occurs. If this is still relevant, please leave a comment or update it to keep it open.
Activity
geeksilva97 commentedon Jan 16, 2026
I don't know if that's possible.
ArrayBuffer is the underlying sequence of bytes. To get the valuues (needed for binding) of that sequence we need to add a view on top of it.
mike-git374 commentedon Jan 16, 2026
These primitive JS values like ArrayBuffer and Boolean with clear SQLite equivalents should not be throwing errors or silently failing, the driver should convert these as needed
geeksilva97 commentedon Jan 16, 2026
I don't get it. To which of the views should an ArrayBuffer be converted to?
mike-git374 commentedon Jan 16, 2026
Uint8Array
geeksilva97 commentedon Jan 16, 2026
why that one?
mike-git374 commentedon Jan 16, 2026
SQLite BLOB is a series of bytes, ArrayBuffer is also a series of bytes, if you need an ArrayBufferView you can take
new Uint8Array(arrayBuffer)which is similar toBuffer.from(arrayBuffer). The SQLite BLOB should end up with the same series of bytesgeeksilva97 commentedon Jan 17, 2026
I cannot see how this would be helpful since, as you pointed, it's a matter of passing a view, which can be easily done as you pointed in the examples.
mike-git374 commentedon Jan 17, 2026
Why is it silently failing when it should at least throw an error? Why throw an error when the driver could handle the ArrayBuffer case?
geeksilva97 commentedon Jan 17, 2026
Throwing an error sounds reasonable to me. I'll work on this.
mike-git374 commentedon Jan 17, 2026
I had a library passing an ArrayBuffer which I was inserting into SQLite table, I figured directly handling the ArrayBuffer in the sqlite driver might be more efficient than creating a garbage collected Uint8Array. I ended up needing a subarray of that ArrayBuffer so currently I am doing the Uint8Array, so this issue is not directly affecting me currently. But if you are interested, I consider this Boolean binding issue even more important, the driver should definitely be able to accept Boolean values: #57862
mike-git374 commentedon Mar 1, 2026
SQLite WASM also binds ArrayBuffers to blobs:
github-actions commentedon Jul 20, 2026
This issue has been marked as stale due to 90 days of inactivity.
It will be automatically closed in 30 days if no further activity occurs. If this is still relevant, please leave a comment or update it to keep it open.
mike-git374 commentedon Aug 4, 2026
Not stale, needs to be fixed
sqlite: bind ArrayBuffer
sqlite: bind ArrayBuffer
sqlite: bind ArrayBuffer
sqlite: bind ArrayBuffer