Skip to content

Conversation

rkistner
Copy link
Contributor

@rkistner rkistner commented Sep 27, 2024

This allows some additional variations of the IN operator previously not supported:

-- parameter queries
SELECT WHERE request.jwt() ->> 'role' IN '["admin", "superuser"]'
SELECT WHERE 'read:users' IN (request.jwt() ->> 'permissions')
SELECT WHERE 'test' IN '["test"]'

-- data queries
SELECT * FROM assets WHERE assets.condition IN '["good","great"]'
SELECT * FROM assets WHERE 'green' IN assets.categories

This is in addition to the variations already supported before:

-- parameter queries
SELECT id FROM projects WHERE id IN request.jwt() -> 'projects'

-- data queries
SELECT * FROM assets WHERE assets.condition IN '["good","great"]'

@changeset-bot
Copy link

changeset-bot bot commented Sep 27, 2024

🦋 Changeset detected

Latest commit: 0e16938

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

This PR includes changesets to release 4 packages
Name Type
@powersync/service-sync-rules Minor
@powersync/service-core Patch
@powersync/service-image Patch
test-client 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

@rkistner rkistner merged commit 27efd52 into main Sep 30, 2024
8 checks passed
@rkistner rkistner deleted the in-operator-composition branch September 30, 2024 11:52
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