8000 Use serde to read tables and indexes from schema by simolus3 · Pull Request #81 · powersync-ja/powersync-sqlite-core · GitHub
[go: up one dir, main page]

Skip to content

Use serde to read tables and indexes from schema #81

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 1 commit into from
Jun 2, 2025

Conversation

simolus3
Copy link
Contributor

When the SDK passes a JSON-serialized schema to the core extension, that schema is mostly traversed using JSON functions in SQL. IMO, some of these are rather tricky to understand and enforce more complexity (e.g. with the streaming iterators to json_object_fragment) than necessary.

This refactors some of the queries to parse the schema using serde instead, which in some cases allows traversing it much easier. All the existing golden schema test pass, so this doesn't change behavior. Some of the queries which only need a subset of information from the schema are left unchanged for now.

@simolus3 simolus3 requested a review from rkistner May 30, 2025 12:08
@simolus3 simolus3 merged commit d0d6aa2 into main Jun 2, 2025
21 checks passed
@simolus3 simolus3 mentioned this pull request Jun 11, 2025
10 tasks
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
0