Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds support for "raw tables", which are managed by the user instead of being created as JSON views by PowerSync. Benefits include better performance for complex queries as well as support for more complex table definitions (including local table and column constraints).
To enable raw tables, one would currently first create a regular schema and then call
withRawTables
to add them (not sure if we should have a secondary parameter on theSchema
constructor for this - perhaps after stabilizing this feature?). Raw tables consist of:PUT
ops.REMOVE
ops.The statements are defined as SQL with prepared statement parameters as well as a value source (which can currently either be the id column or a named column extracted from JSON). The syntax for that is not particularly nice at the moment (it reflects the internal JSON structure used by the core extension). There are multiple options to improve that here, but since the feature is explicitly marked as experimental we can improve on API changes once we better understand how this feature is used in practice.