-
-
Notifications
You must be signed in to change notification settings - Fork 31
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
Handle JSON better #107
Handle JSON better #107
Conversation
…th SQLite 3.45.0 and above, due to the new JSONB support changing the interpretation of JSON data in BLOB form (and is what should've been happening all along regardless).
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #107 +/- ##
==========================================
+ Coverage 83.33% 83.56% +0.22%
==========================================
Files 7 7
Lines 222 219 -3
==========================================
- Hits 185 183 -2
+ Misses 37 36 -1
|
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.
Honestly surprised there wasn't more needed from turning on Sendable checking!
@@ -82,7 +82,7 @@ internal struct _SQLiteDatabaseVersion: SQLDatabaseReportedVersion { | |||
} | |||
|
|||
private struct _SQLiteSQLDatabase: SQLDatabase { | |||
let database: SQLiteDatabase | |||
let database: any SQLiteDatabase |
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.
FYI they're dropping the ExistentialAny upcoming feature. I personally liked it. Not sure what exactly are their plans.
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.
Citation or it didn't happen 😜 What an absurd thing to do...
@0xTim Well, it's not a fair test, at the moment - once SQLKit gets its |
These changes are now available in 4.4.2
This fixes an issue that arose with the release of SQLite 3.45.0, which includes support for a new "JSONB" internal representation. As a side effect, textual JSON data presented to SQLite as a BLOB is incorrectly treated as JSONB by the database, resulting in inexplicable errors when attempts are made to read the JSON back out again. Since we should always have been sending JSON to the database as TEXT in the first place, this is considered a general bugfix rather than purely a compatibility update.
Unblocks vapor/sqlite-nio#62.