Skip to content

Schema options #578

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 6 commits into from
May 6, 2025
Merged

Schema options #578

merged 6 commits into from
May 6, 2025

Conversation

simolus3
Copy link
Contributor

This exposes the new table options introduced in version 0.3.13 of the core extension, namely:

  • include_old (either a boolean or an array of column names): Adds an old entry to the ps_crud.data JSON object that includes old values for updates.
  • include_old_only_when_changed: Skip unchanged values from updates.
  • include_metadata: Adds a _metadata column that can be written to for updates. It's reported through CrudEntry.metadata afterwards.
  • ignore_empty_update: Don't create ps_crud entries for UPDATE statements that didn't change any values.

Most of this feature is tested in the core extension, this adds a few simple tests ensuring we forward options correctly.

@simolus3 simolus3 requested a review from stevensJourney April 28, 2025 13:05
Copy link

changeset-bot bot commented Apr 28, 2025

🦋 Changeset detected

Latest commit: bfece60

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 7 packages
Name Type
@powersync/common Minor
@powersync/node Patch
@powersync/op-sqlite Patch
@powersync/react-native Patch
@powersync/tanstack-react-query Patch
@powersync/web Patch
@powersync/diagnostics-app Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@simolus3 simolus3 merged commit e6633be into main May 6, 2025
6 checks passed
@simolus3 simolus3 deleted the schema-options branch May 6, 2025 12:20
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