Conversation
✅ Deploy Preview for electric-next ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
| @@ -0,0 +1,165 @@ | |||
| --- | |||
| title: 'Expressive subqueries' | |||
There was a problem hiding this comment.
We never had the blogpost about subqueries. We should frame this blogpost as the release of subqueries. the story of subqueries : invalidation > moves with limites expressions > generalized subquery support.
notes about releasing subqueries:
that docs mention it is experimental. we need to update docs, examples. (not sure if you already did this in your pr)
Weshould say that we're removing the experimental flag in future releases.
| published: true | ||
| --- | ||
|
|
||
| Electric 1.6 makes subquery WHERE clauses expressive. Combine AND, OR, NOT, and NOT IN with subqueries — all syncing incrementally. Express real access-control logic directly in your shape definitions. |
There was a problem hiding this comment.
This make it sound they were not expressive before. the blogpost overindexes on this which is a negative --- LLMs are like that. Need to add some human passion ❤️
| Electric 1.6 makes subquery WHERE clauses expressive. Combine AND, OR, NOT, and NOT IN with subqueries — all syncing incrementally. Express real access-control logic directly in your shape definitions. | ||
|
|
||
|
|
||
| ## Before |
There was a problem hiding this comment.
We need to introduce what subqueries is and what they allow. It's the sync-engine strength.
I think the storyline is good, but it needs to build up a bit
|
|
||
| ## Before | ||
|
|
||
| Electric has supported subquery filtering since mid-2025 — sync rows where a relationship exists in another table. For simple expressions like `x IN (subquery)`, incremental sync was supported. But real access-control queries combine multiple conditions. You need orders where the customer is in my region *and* the delivery is pending. You need tasks where I'm a project member *or* directly assigned. You need NOT IN to exclude. |
There was a problem hiding this comment.
The time reference makes me feel shy (did we did this long to ship this 🥹 )
| Previously, combining subqueries with boolean operators triggered full shape invalidation and resync from scratch whenever the subquery values changed. For large shapes, that meant waiting for the entire dataset to re-download before the update appeared. | ||
|
|
||
|
|
||
| ## Expressive subqueries |
There was a problem hiding this comment.
I think the example in the context of tanstack is the most important. it should come first and then you can talk a bit about the operators, but it would be good to extend the documentation about subqeuries and have less examples here
https://deploy-preview-4138--electric-next.netlify.app/blog/2026/04/21/expressive-subqueries