tursodatabase / libsql-client-go

Go client API for libSQL
MIT License
159 stars 23 forks source link

Value Base64 should be a pointer to allow empty blobs #114

Closed Sadzeih closed 3 months ago

Sadzeih commented 3 months ago

While trying to insert an empty slice in a blob, I kept getting the same error;

missing field `base64`

While reading the library code, I noticed that if Base64 was and empty string "", due to omitempty, it was not marshalled.

Which caused the issue.


The fix is to simply make Base64 into a pointer. That means for the blob type, the pointer will not be nil and will be marshalled.

haaawk commented 3 months ago

Thank you for your contribution @Sadzeih