Skip to content

Conversation

@simolus3
Copy link
Contributor

This builds on top of the new raw table options introduced in #163.

This makes the put and delete statements set on raw tables optional. If they're omitted, the sync_local step of each sync will attempt to infer them by looking at the actual columns of the table:

  1. The id column will be set to the affected row id.
  2. Other columns will be bound to extracted JSON values of the same name.
    • Columns marked as local-only are ignored.

Inferred statements are cached until pragma schema_version returns a new value.

For now, this does not support a dedicated _rest column that would be inferred by default. Users interested in that would have to use explicit statements instead.

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.

1 participant