Skip to content

Add default query representations for dates and UUIDs #37

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

Merged
merged 11 commits into from
May 26, 2025

Conversation

stephencelis
Copy link
Member

SQLite does not have date or UUID types, and instead can represent dates and UUIDs in several different ways.

While this works for SQLite, other database systems do have dedicated date and UUID types, and so we should probably encode these types in StructuredQueries' decoding and binding layers, and then SQLite drivers (like SharingGRDB) will pick a sensible default, like ISO8601 strings for dates, and lowercased strings for UUIDs.

Draft PR for now as we figure out if this is the right direction, and there is plenty to do before merging (documentation, etc.).

SQLite does not have date or UUID types, and instead can represent dates
and UUIDs in several different ways.

While this works for SQLite, other database systems _do_ have dedicated
date and UUID types, and so we should probably encode these types in
StructuredQueries' decoding and binding layers, and then SQLite drivers
(like SharingGRDB) will pick a sensible default, like ISO8601 strings
for dates, and lowercased strings for UUIDs.

Draft PR for now as we figure out if this is the right direction, and
there is plenty to do before merging (documentation, etc.).
@stephencelis stephencelis requested a review from mbrandonw May 9, 2025 20:58
@stephencelis stephencelis marked this pull request as ready for review May 26, 2025 19:58
@stephencelis stephencelis merged commit 5144ec0 into main May 26, 2025
2 checks passed
@stephencelis stephencelis deleted the default-date-uuid-representations branch May 26, 2025 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants