Conversation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace O(n) parent collection scans with a reverse index (correlationKey → Set<parentKey>) for attaching child Collections to parent rows. The index is populated during parent INSERTs and cleaned up on parent DELETEs. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
toArray() wraps an includes subquery so the parent row contains Array<T> instead of Collection<T>. When children change, the parent row is re-emitted with a fresh array snapshot. - Add ToArrayWrapper class and toArray() function - Add materializeAsArray flag to IncludesSubquery IR node - Detect ToArrayWrapper in builder, pass flag through compiler - Re-emit parent rows on child changes for toArray entries - Add SelectValue type support for ToArrayWrapper - Add tests for basic toArray, reactivity, ordering, and limits Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Sam Willis <samwillis@users.noreply.github.com>
|
Cursor Agent can help with this pull request. Just |
|
More templates
@tanstack/angular-db
@tanstack/db
@tanstack/db-ivm
@tanstack/electric-db-collection
@tanstack/offline-transactions
@tanstack/powersync-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: 0 B Total Size: 96.4 kB ℹ️ View Unchanged
|
|
Size Change: 0 B Total Size: 3.7 kB ℹ️ View Unchanged
|
Co-authored-by: Sam Willis <samwillis@users.noreply.github.com>
Co-authored-by: Sam Willis <samwillis@users.noreply.github.com>
Co-authored-by: Sam Willis <samwillis@users.noreply.github.com>
Co-authored-by: Sam Willis <samwillis@users.noreply.github.com>
939f886 to
a6bad2a
Compare
13a73c0 to
45d87e8
Compare
|
Closing as superseded by #1294 |
🎯 Changes
Adds a design exploration document (
docs/guides/recursive-includes-exploration.md) outlining potential approaches for implementing recursive subqueries (recursive includes). This document details the current subquery architecture, constraints, multiple design options, and a recommended phased plan to enable hierarchical tree traversal in queries.✅ Checklist
pnpm test.🚀 Release Impact