Skip to content

Commit 5eb8300

Browse files
authored
Tagged rows and support for move outs in Electric DB collection (#942)
Builds on top of Electric's ts-client support for tagging rows and move out events: electric-sql/electric#3497 This PR extends tanstack DB such that it handles tagged rows and move out events. A tagged row is removed from the Electric collection when its tag set becomes empty. Note that rows only have tags when the shape they belong to has one or more subqueries.
1 parent 8ed7725 commit 5eb8300

File tree

8 files changed

+2485
-17
lines changed

8 files changed

+2485
-17
lines changed

.changeset/witty-animals-agree.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@tanstack/electric-db-collection': patch
3+
---
4+
5+
Support tagged rows and move out events in Electric collection.

packages/db-collection-e2e/docker/docker-compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ services:
2929
environment:
3030
DATABASE_URL: postgresql://postgres:password@postgres:5432/e2e_test?sslmode=disable
3131
ELECTRIC_INSECURE: true
32+
ELECTRIC_FEATURE_FLAGS: 'allow_subqueries,tagged_subqueries'
3233
ports:
3334
- '3000:3000'
3435
depends_on:

packages/db-collection-e2e/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,4 @@ export { createCollationTestSuite } from './suites/collation.suite'
2626
export { createMutationsTestSuite } from './suites/mutations.suite'
2727
export { createLiveUpdatesTestSuite } from './suites/live-updates.suite'
2828
export { createProgressiveTestSuite } from './suites/progressive.suite'
29+
export { createMovesTestSuite } from './suites/moves.suite'

0 commit comments

Comments
 (0)