-
Notifications
You must be signed in to change notification settings - Fork 104
Handle pushed down predicates in Electric collection #618
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
base: samwillis/predicate-utils
Are you sure you want to change the base?
Handle pushed down predicates in Electric collection #618
Conversation
🦋 Changeset detectedLatest commit: f7211d9 The changes in this PR will be included in the next version bump. This PR includes changesets to release 12 packages
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 |
aa2e623
to
2ae236f
Compare
d66c54e
to
71cef08
Compare
More templates
@tanstack/angular-db
@tanstack/db
@tanstack/db-ivm
@tanstack/electric-db-collection
@tanstack/query-db-collection
@tanstack/react-db
@tanstack/rxdb-db-collection
@tanstack/solid-db
@tanstack/svelte-db
@tanstack/trailbase-db-collection
@tanstack/vue-db
commit: |
Size Change: +5.36 kB (+6.41%) 🔍 Total Size: 89 kB
ℹ️ View Unchanged
|
Size Change: 0 B Total Size: 2.36 kB ℹ️ View Unchanged
|
91ea051
to
3493f6d
Compare
49f1f59
to
dd337d8
Compare
clause: IR.OrderByClause, | ||
params: Array<unknown> | ||
): string { | ||
// TODO: what to do with stringSort and locale? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This raises the question on if we have the wrong default in DB, should we default to lexical sort?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even if we default to lexical sort, what do we do if the user explicitly chooses a locale compare? Translating that into SQL is non-trivial.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Options:
- not push down orderBy when it's using not postgres compatible ordering
- try and convert to something postgres compatible where possible
- throw and error or warning that its using the wrong ordering
or some combination of above
packages/electric-db-collection/tests/electric-live-query.test.ts
Outdated
Show resolved
Hide resolved
packages/electric-db-collection/tests/electric-live-query.test.ts
Outdated
Show resolved
Hide resolved
packages/electric-db-collection/tests/electric-live-query.test.ts
Outdated
Show resolved
Hide resolved
e8e12e7
to
c568caf
Compare
bc6190d
to
8eab056
Compare
Co-authored-by: Kevin De Porre <[email protected]> Co-authored-by: Sam Willis <[email protected]>
d8ce062
to
baa4fa2
Compare
baa4fa2
to
f7211d9
Compare
a732165
to
6ee696c
Compare
stacked on #669
This PR is a follow up on #617 and modifies the Electric collection to handle predicates that are being pushed down to the Electric collection.