If you try to bind an empty ByteArray it will crash because ByteArray.refTo(0) cannot find an element at index 0. The solution is to explicitly handle when the ByteArray is empty and to make an empty BLOB.
I looked around to see how other bindings handle it and rusqlite uses sqlite3_bind_zeroblob().
If any changes are needed to get this merged, I am happy to make them, but also feel free to make any changes yourselves!
If you try to bind an empty
ByteArray
it will crash becauseByteArray.refTo(0)
cannot find an element at index 0. The solution is to explicitly handle when theByteArray
is empty and to make an emptyBLOB
.I looked around to see how other bindings handle it and rusqlite uses
sqlite3_bind_zeroblob()
.If any changes are needed to get this merged, I am happy to make them, but also feel free to make any changes yourselves!