diff --git a/.changeset/nine-worms-love.md b/.changeset/nine-worms-love.md new file mode 100644 index 0000000..0c79039 --- /dev/null +++ b/.changeset/nine-worms-love.md @@ -0,0 +1,5 @@ +--- +"@powersync/sql-js": patch +--- + +Added support for binding values that are ArrayBuffers. This is needed downstream for the Rust sync implementation. diff --git a/patches/powersync-update-002.patch b/patches/powersync-update-002.patch new file mode 100644 index 0000000..e321dc3 --- /dev/null +++ b/patches/powersync-update-002.patch @@ -0,0 +1,16 @@ +diff --git a/src/api.js b/src/api.js +index c7f102b..2d2d106 100644 +--- a/src/api.js ++++ b/src/api.js +@@ -613,6 +613,11 @@ Module["onRuntimeInitialized"] = function onRuntimeInitialized() { + if (val === null) { + return this.bindNull(pos); + } ++ ++ // Add ArrayBuffer support ++ if (val instanceof ArrayBuffer) { ++ return this.bindBlob(new Uint8Array(val), pos); ++ } + if (val.length != null) { + return this.bindBlob(val, pos); + }