-
-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes #3 - Issues related to Blob/Binary data type #4
Conversation
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. Thanks for integrating Codecov - We've got you covered ☂️ |
'type' => 'blob', | ||
'value' => base64_encode($value), | ||
'type' => 'blob', | ||
'base64' => base64_encode(base64_encode($value)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Passing the binary/blob data with a single base64 encoding produces an intermittent error. I've reported this issue to the Turso development team. As a quick fix to avoid the error, we will send the binary/blob data by encoding it in base64 format twice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's kinda wild
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, this is only a quick fix. I will update the approach as soon as the Turso dev team fixes the issue. There's also a workaround to store binary data as a base64-encoded string in the database using Laravel's custom attribute casting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anyway.. Do you have any suggestions about this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it works, it works. Interested to hear what Turso have to say .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They're currently investigating the issue. You can find the issue report I've submitted on Turso's Discord server in the help
channel.
Changes In Code
Update the way of passing and retrieving the binary/blob data type, referring to the official documentation:
https://github.com/tursodatabase/libsql/blob/main/docs/HRANA_3_SPEC.md#values
Issue ticket number / Business Case
[Bug]: Blob data storage not working
Checklist before requesting a review