Skip to content

feat(db)!: make grouping, includes, and pooling opt-in - #2232

Open
KyleAMathews wants to merge 33 commits into
mainfrom
opt-in-operators
Open

KyleAMathews wants to merge 33 commits into
mainfrom
opt-in-operators

Conversation

@KyleAMathews

@KyleAMathews KyleAMathews commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

🎯 Changes

Every app bundled the code for grouping, includes, and live-query pooling, even when it used none of them. The query builder and the compiler imported that code statically. This change makes these three features opt-in. A feature's code arrives with the value that names it, so an app bundles only the features it imports. Joins stay in core and keep their API: .join(source, on, type) and the .leftJoin(), .innerJoin(), .rightJoin(), and .fullJoin() methods do not change.

Feature The value that carries the code Migration
Grouping count, sum, avg, min, max, groupKeys Queries with an aggregate do not change. A groupBy with no aggregate takes groupKeys(...)
Includes include, toArray, materialize issues: q.from(...) becomes issues: include(q.from(...))
Pooling pooledLiveQueries Pass pool: pooledLiveQueries in the hook's query config

How it works:

  • Aggregates and groupKeys() carry the grouping compiler. orderBy rewrites aggregates only when it finds one.
  • Include functions carry the materializer and the Collection-facade adapter (includes-runtime.ts). They live in include-functions.ts, apart from the expression functions that core modules import.
  • pooledLiveQueries carries the pooled view and its identity shortcut. Hooks take it as pool in their query config (LiveQueryHookConfig). Angular's { params, query } form takes it too. React Suspense and DbClient queries pass pool: false and never pool. A DbClient query drops pool from its identity, so a server preload and a client hook hash alike.
  • A query that uses an operator always holds the value that carries it. Compilation stays synchronous, and a missing operator throws a coded error:
    • GroupingOperatorRequiredError (247) for a groupBy with no aggregate and no groupKeys()
    • IncludeOperatorRequiredError (248) for a subquery in select() without an include function. A bare subquery in select, also in a nested object or a caseWhen branch, is also a type error.
    • Errors 249 and 250 for include() of something that is not a query builder. Main took 245 and 246 first, so this PR's unreleased codes moved up by one.

How a query with a custom key reaches public-key reduction:

  • A query with includes uses the include materializer, which reduces its root rows by public key.
  • A joined query with a custom key and no includes uses reducePublicKeys from public-key-reduction.ts. It does not bundle the include materializer or create a facade adapter. On main, this query went through the include materializer.
  • Other queries keep their compiled pipeline.
  • The existing test for duplicate public keys under a custom key and a join covers this path. A mutant that sends the query to the plain pipeline fails it.

An earlier version of this PR also made joins opt-in, with .join(leftJoin(source, on)). That saved about 3.6 kB in apps that never join. The maintainer reverted that part: joins are common, and models already know the existing API.

The architecture document records the include contract and how values carry operator code.

Size

pnpm size:compare (gzip bytes):

Scenario main this PR Change
app (query collection, filtered live query, React useLiveQuery) 102,142 93,853 −8,289 (−8.1%)
app-join 102,212 93,944 −8,268 (−8.1%)
app-group-by 102,034 97,608 −4,426 (−4.3%)
app-includes 102,215 96,673 −5,542 (−5.4%)
db package bundle, every export kept 103,207 104,144 +937 (+0.9%)

The baseline is main at 5649a07d4, which includes the Preact adapter (#2235).

The package-bundle figure is the cost of the indirection when an app uses every feature.

Evidence

This change moves behavior in areas that oracles own: query compilation, includes, pooling, and the adapter bindings. Each law below lists its evidence.

1. Pooling is opt-in per query

  • Law: a query shares a pooled source subscription only when its hook config passes pool: pooledLiveQueries. Every other query has its own subscription. A pooled query with a parameter follows the parameter. Authority: the maintainer's design decision for this release (pooling off by default, opt-in by import).
  • Reach: the two conformance scenarios are fixed histories, not generated ones. Each runs in all five framework drivers, and each driver runs the function, config, and parameterized forms. ORC-015 does not apply, because no generated property changed.
  • RED: every framework hook resolves its query through resolveLiveQueryValue. live-query-options.test.ts (keeps one source subscription per query without pool) resolves two equality-filtered queries there. On the merge-base 427a7c31e it fails with "expected 1 to be 2": the two queries share one subscription, because main pools by default. The conformance suite itself cannot run on main, because main has no pool option.
  • GREEN: that test passes on this branch. The conformance suite passes in all six adapters, Preact's included. React runs it on both identity paths.
  • Mutant:
    • pooling every query by default in resolveLiveQueryValue, rebuilt into dist/, which the adapters test against. pool-opt-in fails in all five drivers that existed before the merge.
    • a pooled identity that ignores literal values: pooled-param-change fails in React, and the older eq-filter-peers scenario does not catch it.
    • an Angular params form that drops pool: pooled-param-change fails.
    • a pooled view that does not register its source for the observer: db-client-preload-identity-oracle fails twice.
  • Limits: the scenarios use one source and eq filters on one field. The pooled live-query oracle owns the membership and order laws.

2. An app bundles an operator's code only when it imports the operator

  • Law: an app's production bundle contains an operator family's modules exactly when the app imports one of that family's values. The join compiler and public-key reduction are in every app. Authority: the maintainer's design decisions.
  • Reach: opt-in-operator-bundle.test.ts runs each of the 10 operator values alone and all 8 combinations of the three families, with rotating values (18 bundles). Each app also holds every value that the six framework adapters, Preact's included, import from @tanstack/db. A test fails when that list and the adapters' imports differ. These are fixed cases, not generated histories, so ORC-015 does not apply.
  • RED: on the merge-base 427a7c31e, I bundled an app with the core and adapter values and no operator. It contains group-by.ts (8,849 B minified), pooled-live-query.ts (7,778 B), bucket-facade-adapter.ts (5,900 B), and materialized-pipeline.ts (3,635 B). On this branch, before the observer fix, 13 of 18 cases failed because the observer kept pooled-live-query.ts in every adapter app.
  • GREEN: 19 of 19 pass, the list check included. The same app bundles none of those modules.
  • Mutant: a static use of a group-by.ts helper from the live-query Collection builder fails 8 of 18 cases. A static import of BucketFacadeAdapter into the builder fails the absence checks. The observer's old instanceof check fails 13 of 18.
  • Limits: the test bundles @tanstack/db with other packages external, so it does not cover db-ivm operators. It takes the adapters' imports, not their bundles. pnpm size:compare measures bytes.

3. A groupKeys() callback compiles in both TypeScript modes

  • Law: groupKeys() gets the query's context from .groupBy(). Inline, its callback is typed in strict mode and untyped without noImplicitAny, as other unannotated callbacks are. Group keys that pass their context as a type argument, groupKeys<ContextFromSource<…>>(…), are typed in both modes. Authority: the maintainer's decisions in this PR's review.
  • Reach: group-keys-typescript-modes.test.ts compiles a wrong field in three forms: inline, reusable with context, and reusable without context. It compiles each form in both modes and checks the stated result. A fixture with valid code must compile in both modes. These are fixed cases, not generated histories.
  • RED: groupKeys() is new, so the test cannot run on main. Without the groupKeys() fallback, the valid fixture fails without noImplicitAny ("'user' is possibly 'undefined'").
  • GREEN: 5 of 5 pass.
  • Mutant: an OperatorCallback that is always untyped fails the cases that must report the wrong field.
  • Limits: group keys built without an explicit context are untyped in both modes. TypeScript cannot infer a context there. The guide and the db-core skill show the explicit form.

4. Examples in the docs and skills typecheck

  • Law: each TypeScript example in docs/ and in the shipped skills parses and typechecks against the workspace source, unless its fence says nocheck. For a Svelte or Vue example, its <script lang="ts"> block must.
  • Reach: 757 examples in 249 files, 11 of them Svelte or Vue components. A baseline lists the 280 that failed when the check started. 61 of them do not parse. The baseline keys each example by its syntax tokens. The key ignores spacing, comments, trailing commas, and semicolons. It also ignores the parentheses around JSX and around a single arrow parameter. After a reflow of eight docs to 50 columns, every entry still matches. Each time the key changed, the old and new checkers reported the same failing examples. A fence closes with as many backticks as it opened with, so a ````ts example that holds a ``` block is read whole.
  • RED: the check has no earlier version on main. I wrote a scratch example for each defect, and the check fails each one. The defects are a bare subquery and a misspelled import. Others are code that does not parse, a missing default export, and a moved parenthesis. The Svelte skill's old bare-subquery example fails the check. A scratch example with the app names collection and counter passes, as it must.
  • GREEN: pnpm test:doc-snippets: 0 new failures. Its self-test runs first, on every check.
  • Mutant: the self-test (scripts/doc-snippet-syntax.mjs) fails when the typo check ignores case, and when the fingerprint keeps the parentheses around JSX. It pins f(a, -b) against f(a - b), which the earlier key confused. The CI lint job once failed because a subpath import resolved to an unbuilt dist/. With every dist/ hidden locally, the old script fails the same way.
  • Limits: names that an example uses without declaring them are typed any. The check reports errors in the TanStack API, not in the example's own code. The typo check compares only with names that the example imports from a TanStack package. A Svelte or Vue template is not checked. A value typed as a plain Collection cannot be passed to useLiveQuery in React, Preact, or Vue. Those examples are in the baseline as an older type gap.

5. A missing operator throws a coded error

  • Law: a grouped query whose select and HAVING hold no aggregate throws GroupingOperatorRequiredError (247) unless its keys are wrapped in groupKeys(). A bare query builder in a select value throws IncludeOperatorRequiredError (248) as a field, inside a nested object, or in a conditional branch. A wrapped include that is not a top-level select value throws, as before. When several errors apply, the query throws one of them. Authority: the maintainer's decisions in this PR that the operators are opt-in and that a missing operator throws.
  • Reach: the aggregate-select oracle (aggregate-select-oracle.property.test.ts) generates these dimensions over its select grammar. It declares six states with createOracleReach. They are a bare include at each of three positions, a toArray() include in a conditional branch, and bare group keys with and without an aggregate. Each campaign of 120 histories reaches each state 19 to 38 times.
  • RED: the operators are new, so the oracle cannot run on main. The first run of the extended model found that it had left out the existing top-level include rule. The model now cites that rule (db-core skill, "Includes rules").
  • GREEN: 7 of 7 pass, both campaigns included.
  • Mutant: skipping the grouping-operator check fails with a TypeError. Treating a bare builder as a Collection include, as main did, fails with the wrong error class.
  • Limits: the oracle generates only aggregate and grouped selects. For plain selects, includes.test.ts pins a bare builder as a field, nested, and in a conditional.

Other tests:

  • Codemods migrated the tests to include() and groupKeys(). The assertions did not change. When joins went back to core, a reverse codemod restored main's join call at each site, and 26 test files are identical to main again. The codemod dropped comments beside rewritten arguments in join.test-d.ts, which is now restored from main.
  • New tests cover the coded errors for the two removed shapes, groupKeys() grouping, and include() Collections. Others cover pooling off by default, pool: false, and the exported operator code for hand-built IR.
  • Type tests reject a bare subquery in select, also in a nested object.

Remaining limits:

  • No oracle compares a query's old and new spellings on one input. The query and includes oracles pass with migrated queries.
  • A hook without pool computes the full IR hash of its query on each render. Measured on a two-condition where query: building the query takes 1.1 µs, and building plus hashing takes 3.6 µs. The pooled identity adds almost nothing. For 1,000 mounted hooks, the hash adds about 2.5 ms for each render. Keeping the pooled identity in core would add 656 B gzip (1,693 B minified) to every app. Apps with many such hooks can pass pool.
  • Open counterexample, recorded in the coverage map: load-subset-replay-refinement-oracle fails with seed 1593300187, path 121:1:2:3:2:2. The history is a held load, truncateMarkers, and a failed settle. main at 65d9ada50 and the merge-base 427a7c31e fail with the same counterexample. A full suite run on the branch found it again with seed -1005431615, which also fails on the merge-base. The random campaign can fail CI intermittently until someone fixes the defect.
  • One run of the includes-oracle random campaign failed on this branch without a recorded seed. Thirteen dedicated runs and two full-suite runs passed later. The coverage map records it as open, with the witness it needs. This PR does not call it pre-existing.
  • In buildNestedSelect, include() checks the field name before the query. toArray() checks the query first. Both throw a coded error. Changing the order costs 8 bytes in every app, so this PR keeps it. The eight wrapper blocks remain, because the error-site oracle freezes one message and code for each site.
  • Open counterexample on main, recorded in the coverage map: ordered-work-oracle fails with seed 1023848973 on an unindexed anti-joined window after a signalling refetch. main at 5649a07d4 fails the same way.
  • resolveLiveQueryValue with pool: true throws a plain TypeError at once. TypeScript rejects that value, and a coded error would add bytes to every app for a contract violation that already fails.
  • Pre-existing type errors in query-db-collection and db-collection-e2e, and the link checker's 33 broken links, also occur on main. The React Native example cannot typecheck in a workspace without built packages.

✅ Checklist

  • I ran these suites after merging main at 5649a07d4, and all pass:
    • @tanstack/db: 13,830
    • @tanstack/react-db: 625
    • @tanstack/preact-db: 100
    • @tanstack/vue-db: 142
    • @tanstack/solid-db: 105
    • @tanstack/svelte-db: 179
    • @tanstack/angular-db: 80
    • @tanstack/query-db-collection: 1,460
    • @tanstack/db-sqlite-persistence-core: 1,697
  • pnpm lint:oracles and pnpm test:lint-rules pass.
  • tsc reports no new errors.
  • eslint reports no errors.
  • The mangle cache is current.
  • I regenerated the error docs and the API reference at this head. The release workflow also regenerates the reference after each publish.

🚀 Release Impact

  • This change affects published code, and I have generated a changeset.
  • This change is docs/CI/dev-only (no release).

This is a breaking change for the first 1.0 release candidate. The changeset lists the migration for each feature.

This pull request and its description were written by Isaac.

Test and others added 8 commits October 22, 2026 15:04
Joins take an operator value: .join(leftJoin(source, on)). The operator
carries the join compiler and the optimizer's join pushdown onto the IR
join clause, so apps without joins do not bundle them.

Co-authored-by: Isaac <no-reply@databricks.com>
…ll shape

Co-authored-by: Isaac <no-reply@databricks.com>
Aggregate values (count, sum, avg, min, max) carry the grouping compiler.
A groupBy with no aggregate takes groupKeys(...); without it, compilation
throws GroupingOperatorRequiredError. orderBy rewrites aggregates only when
it finds one.

Co-authored-by: Isaac <no-reply@databricks.com>
include(), toArray(), and materialize() carry the materializer and the
Collection-facade adapter. A bare subquery in select() throws
IncludeOperatorRequiredError; include(subquery) gives the Collection-valued
include. Join operators carry the materializer for custom-key reduction.

Co-authored-by: Isaac <no-reply@databricks.com>
Hooks pool a query only when its config passes pool: pooledLiveQueries.
The value carries the pooled view and its identity shortcut, so apps that
do not pool do not bundle them. React Suspense and DbClient queries pass
pool: false and never pool.

Co-authored-by: Isaac <no-reply@databricks.com>
Join calls use operator values, bare includes use include(), and the
conformance pooling scenario passes pooledLiveQueries through each driver's
config form. A pooled config with a query function builds it once.

Co-authored-by: Isaac <no-reply@databricks.com>
The live-queries guide, JSDoc examples, and generated reference use join
operators, include(), groupKeys(), and pooledLiveQueries. The join size
scenario uses leftJoin; size:compare reports n/a for a scenario that cannot
build against an older base.

Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
@changeset-bot

changeset-bot Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: a19d861

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

This PR includes changesets to release 30 packages
Name Type
@tanstack/db Minor
@tanstack/react-db Patch
@tanstack/preact-db Patch
@tanstack/svelte-db Patch
@tanstack/vue-db Patch
@tanstack/solid-db Patch
@tanstack/angular-db Patch
@tanstack/capacitor-db-sqlite-persistence-e2e-app Patch
@tanstack/db-sqlite-persistence-core Patch
@tanstack/electric-db-collection Patch
@tanstack/expo-db-sqlite-persistence-e2e-app Patch
@tanstack/offline-transactions Patch
@tanstack/powersync-db-collection Patch
@tanstack/query-db-collection Patch
@tanstack/rxdb-db-collection Patch
@tanstack/tauri-db-sqlite-persistence-e2e-app Patch
@tanstack/trailbase-db-collection Patch
todos Patch
offline-transactions-react-native Patch
shopping-list-react-native Patch
@tanstack/db-example-react-next-ssr-e2e Patch
@tanstack/db-example-paced-mutations-demo Patch
@tanstack/browser-db-sqlite-persistence Patch
@tanstack/capacitor-db-sqlite-persistence Patch
@tanstack/cloudflare-durable-objects-db-sqlite-persistence Patch
@tanstack/electron-db-sqlite-persistence Patch
@tanstack/expo-db-sqlite-persistence Patch
@tanstack/node-db-sqlite-persistence Patch
@tanstack/react-native-db-sqlite-persistence Patch
@tanstack/tauri-db-sqlite-persistence 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

@coderabbitai

coderabbitai Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Too many files!

This PR contains 372 files, which is 72 over the limit of 300.

To get a review, reduce the PR to 300 files or fewer by splitting it into smaller PRs or changing its base branch.

Usage-priced reviews support at most 300 files.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f67c56ec-9396-4738-a419-a41f19b342b0
Commits

Reviewing files that changed from the base of the PR and between 5649a07 and a19d861.

Files selected for processing: 372
  • .changeset/opt-in-operators.md
  • .github/workflows/pr.yml
  • docs/contributing/oracle-coverage.md
  • docs/errors.md
  • docs/framework/angular/reference/functions/injectLiveQuery.md
  • docs/framework/angular/reference/interfaces/InjectLiveQueryResult.md
  • docs/framework/angular/reference/interfaces/InjectLiveQueryResultWithCollection.md
  • docs/framework/angular/reference/interfaces/InjectLiveQueryResultWithSingleResultCollection.md
  • docs/framework/angular/reference/type-aliases/InjectConditionalLiveQueryResult.md
  • docs/framework/preact/reference/functions/useLiveQuery.md
  • docs/framework/preact/reference/interfaces/UseConditionalLiveQueryResult.md
  • docs/framework/preact/reference/interfaces/UseLiveQueryResult.md
  • docs/framework/preact/reference/type-aliases/ConditionalUseLiveQueryConfig.md
  • docs/framework/preact/reference/type-aliases/UseLiveQueryConfig.md
  • docs/framework/preact/reference/type-aliases/UseLiveQueryStatus.md
  • docs/framework/react/reference/functions/useLiveInfiniteQuery.md
  • docs/framework/react/reference/functions/useLiveQuery.md
  • docs/framework/react/reference/type-aliases/ConditionalUseLiveQueryConfig.md
  • docs/framework/react/reference/type-aliases/UseLiveInfiniteQueryConfig.md
  • docs/framework/react/reference/type-aliases/UseLiveInfiniteQueryReturn.md
  • docs/framework/react/reference/type-aliases/UseLiveInfiniteQueryReturnWithCollection.md
  • docs/framework/react/reference/type-aliases/UseLiveQueryConfig.md
  • docs/framework/react/reference/type-aliases/UseLiveQueryStatus.md
  • docs/framework/solid/reference/functions/useLiveQuery.md
  • docs/framework/svelte/reference/functions/useLiveQuery.md
  • docs/framework/svelte/reference/interfaces/UseLiveQueryReturn.md
  • docs/framework/svelte/reference/interfaces/UseLiveQueryReturnWithCollection.md
  • docs/framework/svelte/reference/type-aliases/ConditionalUseLiveQueryReturn.md
  • docs/framework/svelte/reference/type-aliases/UseLiveQueryConfig.md
  • docs/framework/vue/reference/functions/useLiveQuery.md
  • docs/guides/live-queries.md
  • docs/reference/@tanstack/namespaces/IR/classes/Aggregate.md
  • docs/reference/@tanstack/namespaces/IR/classes/CollectionRef.md
  • docs/reference/@tanstack/namespaces/IR/classes/ConditionalSelect.md
  • docs/reference/@tanstack/namespaces/IR/classes/DescriptorRef.md
  • docs/reference/@tanstack/namespaces/IR/classes/Func.md
  • docs/reference/@tanstack/namespaces/IR/classes/IncludesSubquery.md
  • docs/reference/@tanstack/namespaces/IR/classes/PropRef.md
  • docs/reference/@tanstack/namespaces/IR/classes/QueryRef.md
  • docs/reference/@tanstack/namespaces/IR/classes/UnionAll.md
  • docs/reference/@tanstack/namespaces/IR/classes/UnionFrom.md
  • docs/reference/@tanstack/namespaces/IR/classes/Value.md
  • docs/reference/@tanstack/namespaces/IR/functions/collectCollectionSources.md
  • docs/reference/@tanstack/namespaces/IR/functions/collectPropRefs.md
  • docs/reference/@tanstack/namespaces/IR/functions/collectSourceRefs.md
  • docs/reference/@tanstack/namespaces/IR/functions/createResidualWhere.md
  • docs/reference/@tanstack/namespaces/IR/functions/followRef.md
  • docs/reference/@tanstack/namespaces/IR/functions/getFromSources.md
  • docs/reference/@tanstack/namespaces/IR/functions/getHavingExpression.md
  • docs/reference/@tanstack/namespaces/IR/functions/getPropRefPropertyPath.md
  • docs/reference/@tanstack/namespaces/IR/functions/getPropRefSourceAlias.md
  • docs/reference/@tanstack/namespaces/IR/functions/getWhereExpression.md
  • docs/reference/@tanstack/namespaces/IR/functions/isBasicOrAggregateExpression.md
  • docs/reference/@tanstack/namespaces/IR/functions/isExpressionLike.md
  • docs/reference/@tanstack/namespaces/IR/functions/isResidualWhere.md
  • docs/reference/@tanstack/namespaces/IR/functions/requireCollectionSource.md
  • docs/reference/@tanstack/namespaces/IR/interfaces/JoinClause.md
  • docs/reference/@tanstack/namespaces/IR/interfaces/QueryIR.md
  • docs/reference/@tanstack/namespaces/IR/type-aliases/BasicExpression.md
  • docs/reference/@tanstack/namespaces/IR/type-aliases/CollectionSourceRef.md
  • docs/reference/@tanstack/namespaces/IR/type-aliases/ConditionalSelectBranch.md
  • docs/reference/@tanstack/namespaces/IR/type-aliases/From.md
  • docs/reference/@tanstack/namespaces/IR/type-aliases/GroupBy.md
  • docs/reference/@tanstack/namespaces/IR/type-aliases/Having.md
  • docs/reference/@tanstack/namespaces/IR/type-aliases/IncludesMaterialization.md
  • docs/reference/@tanstack/namespaces/IR/type-aliases/Join.md
  • docs/reference/@tanstack/namespaces/IR/type-aliases/Limit.md
  • docs/reference/@tanstack/namespaces/IR/type-aliases/Offset.md
  • docs/reference/@tanstack/namespaces/IR/type-aliases/OrderBy.md
  • docs/reference/@tanstack/namespaces/IR/type-aliases/OrderByClause.md
  • docs/reference/@tanstack/namespaces/IR/type-aliases/OrderByDirection.md
  • docs/reference/@tanstack/namespaces/IR/type-aliases/Select.md
  • docs/reference/@tanstack/namespaces/IR/type-aliases/SelectValueExpression.md
  • docs/reference/@tanstack/namespaces/IR/type-aliases/Where.md
  • docs/reference/@tanstack/namespaces/IR/variables/INCLUDES_SCALAR_FIELD.md
  • docs/reference/classes/AggregateFunctionNotInSelectError.md
  • docs/reference/classes/BaseQueryBuilder.md
  • docs/reference/classes/CannotCombineEmptyExpressionListError.md
  • docs/reference/classes/CollectionInputNotFoundError.md
  • docs/reference/classes/CollectionPreloadAbortedError.md
  • docs/reference/classes/DistinctRequiresSelectError.md
  • docs/reference/classes/DuplicateAliasInSubqueryError.md
  • docs/reference/classes/EmptyReferencePathError.md
  • docs/reference/classes/FnSelectWithGroupByError.md
  • docs/reference/classes/GroupByError.md
  • docs/reference/classes/GroupingOperatorRequiredError.md
  • docs/reference/classes/HavingRequiresGroupByError.md
  • docs/reference/classes/IncludeOperatorRequiredError.md
  • docs/reference/classes/InvalidJoinCondition.md
  • docs/reference/classes/InvalidJoinConditionLeftSourceError.md
  • docs/reference/classes/InvalidJoinConditionRightSourceError.md
  • docs/reference/classes/InvalidJoinConditionSameSourceError.md
  • docs/reference/classes/InvalidJoinConditionSourceMismatchError.md
  • docs/reference/classes/InvalidSourceTypeError.md
  • docs/reference/classes/InvalidStorageDataFormatError.md
  • docs/reference/classes/InvalidStorageObjectFormatError.md
  • docs/reference/classes/InvalidWhereExpressionError.md
  • docs/reference/classes/JoinCollectionNotFoundError.md
  • docs/reference/classes/JoinConditionMustBeEqualityError.md
  • docs/reference/classes/JoinError.md
  • docs/reference/classes/LimitOffsetRequireOrderByError.md
  • docs/reference/classes/LoadSubsetOperationAbortedError.md
  • docs/reference/classes/LocalStorageCollectionError.md
  • docs/reference/classes/MissingAliasInputsError.md
  • docs/reference/classes/NonAggregateExpressionNotInGroupByError.md
  • docs/reference/classes/QueryBuilderError.md
  • docs/reference/classes/QueryCompilationError.md
  • docs/reference/classes/QueryMustHaveFromClauseError.md
  • docs/reference/classes/QueryOptimizerError.md
  • docs/reference/classes/SerializationError.md
  • docs/reference/classes/SetWindowFindOneLimitError.md
  • docs/reference/classes/SetWindowReentrancyError.md
  • docs/reference/classes/SetWindowRequiresOrderByError.md
  • docs/reference/classes/SourceCollectionIdReuseError.md
  • docs/reference/classes/StorageError.md
  • docs/reference/classes/StorageKeyRequiredError.md
  • docs/reference/classes/SyncCleanupError.md
  • docs/reference/classes/SyncTransactionAbortedError.md
  • docs/reference/classes/UnhashableQueryIRError.md
  • docs/reference/classes/UnknownExpressionTypeError.md
  • docs/reference/classes/UnknownFunctionError.md
  • docs/reference/classes/UnknownHavingExpressionTypeError.md
  • docs/reference/classes/UnsafeAliasPathError.md
  • docs/reference/classes/UnsupportedAggregateFunctionError.md
  • docs/reference/classes/UnsupportedFnSelectResultError.md
  • docs/reference/classes/UnsupportedFromTypeError.md
  • docs/reference/classes/UnsupportedJoinSourceTypeError.md
  • docs/reference/classes/UnsupportedJoinTypeError.md
  • docs/reference/classes/UnsupportedRootScalarSelectError.md
  • docs/reference/functions/add.md
  • docs/reference/functions/and.md
  • docs/reference/functions/avg.md
  • docs/reference/functions/caseWhen.md
  • docs/reference/functions/claimLiveQuerySourceIds.md
  • docs/reference/functions/coalesce.md
  • docs/reference/functions/compileExpression.md
  • docs/reference/functions/compileQuery.md
  • docs/reference/functions/concat.md
  • docs/reference/functions/count.md
  • docs/reference/functions/createLiveQuerySourceIdClaims.md
  • docs/reference/functions/divide.md
  • docs/reference/functions/eq.md
  • docs/reference/functions/getLiveQueryHash.md
  • docs/reference/functions/getLiveQueryKey.md
  • docs/reference/functions/getPreparedLiveQueryIdentity.md
  • docs/reference/functions/getPreparedLiveQuerySources.md
  • docs/reference/functions/getSourceObjectToken.md
  • docs/reference/functions/groupKeys.md
  • docs/reference/functions/gt.md
  • docs/reference/functions/gte.md
  • docs/reference/functions/identifyLiveQuery.md
  • docs/reference/functions/ilike.md
  • docs/reference/functions/inArray.md
  • docs/reference/functions/include.md
  • docs/reference/functions/isNull.md
  • docs/reference/functions/isUndefined.md
  • docs/reference/functions/length.md
  • docs/reference/functions/like.md
  • docs/reference/functions/lower.md
  • docs/reference/functions/lt.md
  • docs/reference/functions/lte.md
  • docs/reference/functions/materialize.md
  • docs/reference/functions/max.md
  • docs/reference/functions/min.md
  • docs/reference/functions/multiply.md
  • docs/reference/functions/not.md
  • docs/reference/functions/or.md
  • docs/reference/functions/prepareLiveQueryValue.md
  • docs/reference/functions/rejectLiveQueryInput.md
  • docs/reference/functions/releaseDeferredOnReclaim.md
  • docs/reference/functions/resolveLiveQueryValue.md
  • docs/reference/functions/resumeDeferredLiveQueryCollections.md
  • docs/reference/functions/subtract.md
  • docs/reference/functions/sum.md
  • docs/reference/functions/toArray.md
  • docs/reference/functions/upper.md
  • docs/reference/index.md
  • docs/reference/interfaces/Context.md
  • docs/reference/interfaces/GroupKeys.md
  • docs/reference/interfaces/LiveQueryCollectionConfig.md
  • docs/reference/interfaces/LiveQueryIdentityScope.md
  • docs/reference/type-aliases/ApplyJoinOptionalityToMergedSchema.md
  • docs/reference/type-aliases/ContextFromSource.md
  • docs/reference/type-aliases/ContextFromUnionBranches.md
  • docs/reference/type-aliases/ContextFromUnionSource.md
  • docs/reference/type-aliases/ContextSchema.md
  • docs/reference/type-aliases/DeferredLiveQueryCollections.md
  • docs/reference/type-aliases/ExtractContext.md
  • docs/reference/type-aliases/FunctionalHavingRow.md
  • docs/reference/type-aliases/GetResult.md
  • docs/reference/type-aliases/GroupByCallback.md
  • docs/reference/type-aliases/Grouping.md
  • docs/reference/type-aliases/IncludesRuntime.md
  • docs/reference/type-aliases/InferCollectionType.md
  • docs/reference/type-aliases/InferResultType.md
  • docs/reference/type-aliases/InitialQueryBuilder.md
  • docs/reference/type-aliases/JoinOnCallback.md
  • docs/reference/type-aliases/LiveQueryCollectionUtils.md
  • docs/reference/type-aliases/LiveQueryHookConfig.md
  • docs/reference/type-aliases/LiveQueryKey.md
  • docs/reference/type-aliases/LiveQueryOptions.md
  • docs/reference/type-aliases/LiveQuerySourceIdClaims.md
  • docs/reference/type-aliases/MergeContextForJoinCallback.md
  • docs/reference/type-aliases/MergeContextWithJoinType.md
  • docs/reference/type-aliases/OperatorCallback.md
  • docs/reference/type-aliases/OperatorName.md
  • docs/reference/type-aliases/OrderByCallback.md
  • docs/reference/type-aliases/PooledLiveQueries.md
  • docs/reference/type-aliases/Prettify.md
  • docs/reference/type-aliases/QueryBuilder.md
  • docs/reference/type-aliases/QueryResult.md
  • docs/reference/type-aliases/Ref.md
  • docs/reference/type-aliases/RefsForContext.md
  • docs/reference/type-aliases/ResultTypeFromSelect.md
  • docs/reference/type-aliases/SchemaFromSource.md
  • docs/reference/type-aliases/SelectObject.md
  • docs/reference/type-aliases/SingleSource.md
  • docs/reference/type-aliases/Source.md
  • docs/reference/type-aliases/SourceClauseContext.md
  • docs/reference/type-aliases/WhereCallback.md
  • docs/reference/type-aliases/WithResult.md
  • docs/reference/variables/Query.md
  • docs/reference/variables/groupingCompiler.md
  • docs/reference/variables/includesRuntime.md
  • docs/reference/variables/operators.md
  • docs/reference/variables/pooledLiveQueries.md
  • examples/react-native/shopping-list/src/components/ListsScreen.tsx
  • examples/react/projects/README.md
  • package.json
  • packages/angular-db/skills/angular-db/SKILL.md
  • packages/angular-db/src/index.ts
  • packages/angular-db/tests/conformance.test.ts
  • packages/angular-db/tests/inject-live-query.test.ts
  • packages/db-collection-e2e/README.md
  • packages/db-collection-e2e/src/suites/joins-oracle.suite.ts
  • packages/db-sqlite-persistence-core/tests/persisted-readiness-oracle.test.ts
  • packages/db/mangle-cache.json
  • packages/db/skills/db-core/live-queries/SKILL.md
  • packages/db/src/errors.ts
  • packages/db/src/live-query-observer.ts
  • packages/db/src/live-query-options.ts
  • packages/db/src/query/builder/clone-query.ts
  • packages/db/src/query/builder/functions.ts
  • packages/db/src/query/builder/group-keys.ts
  • packages/db/src/query/builder/include-functions.ts
  • packages/db/src/query/builder/index.ts
  • packages/db/src/query/builder/types.ts
  • packages/db/src/query/compiler/find-aggregate.ts
  • packages/db/src/query/compiler/group-by.ts
  • packages/db/src/query/compiler/grouping.ts
  • packages/db/src/query/compiler/index.ts
  • packages/db/src/query/compiler/order-by.ts
  • packages/db/src/query/index.ts
  • packages/db/src/query/ir.ts
  • packages/db/src/query/live/ARCHITECTURE.md
  • packages/db/src/query/live/collection-config-builder.ts
  • packages/db/src/query/live/includes-runtime.ts
  • packages/db/src/query/live/materialized-pipeline.ts
  • packages/db/src/query/live/public-key-reduction.ts
  • packages/db/src/query/live/types.ts
  • packages/db/src/query/optimizer.ts
  • packages/db/src/query/pooled-live-query.ts
  • packages/db/src/query/pooled-source.ts
  • packages/db/tests/collection-auto-index.test.ts
  • packages/db/tests/collection-query-publication-boundaries.test.ts
  • packages/db/tests/collection-subscriber-duplicate-inserts.test.ts
  • packages/db/tests/conformance/contract.ts
  • packages/db/tests/conformance/suite.ts
  • packages/db/tests/db-client-preload-identity-oracle.test.ts
  • packages/db/tests/effect.test.ts
  • packages/db/tests/error-sample-arguments.ts
  • packages/db/tests/fixtures/error-codes.json
  • packages/db/tests/fixtures/error-messages.json
  • packages/db/tests/fixtures/error-site-messages.json
  • packages/db/tests/fixtures/loose-typescript-group-keys.ts
  • packages/db/tests/group-keys-typescript-modes.test.ts
  • packages/db/tests/initial-readiness-exposure.test.ts
  • packages/db/tests/live-query-options.test.ts
  • packages/db/tests/live-query-order-only-move.test.ts
  • packages/db/tests/opt-in-operator-bundle.test.ts
  • packages/db/tests/query/aggregate-select-oracle.property.test.ts
  • packages/db/tests/query/aggregate-value-contracts.test-d.ts
  • packages/db/tests/query/async-hold-outcomes.test.ts
  • packages/db/tests/query/bucket-facade-adapter.test.ts
  • packages/db/tests/query/builder/functions.test.ts
  • packages/db/tests/query/builder/ref-proxy.test.ts
  • packages/db/tests/query/case-when.test-d.ts
  • packages/db/tests/query/case-when.test.ts
  • packages/db/tests/query/clone-query.test.ts
  • packages/db/tests/query/cold-join-reconciliation-oracle.test.ts
  • packages/db/tests/query/collection-ref-compatibility.test.ts
  • packages/db/tests/query/compiler/group-by-pipeline.test.ts
  • packages/db/tests/query/compiler/group-by.test.ts
  • packages/db/tests/query/compiler/select.test.ts
  • packages/db/tests/query/functional-variants.test-d.ts
  • packages/db/tests/query/functional-variants.test.ts
  • packages/db/tests/query/group-by-work.test.ts
  • packages/db/tests/query/group-by.test.ts
  • packages/db/tests/query/hand-built-ir-operators.test.ts
  • packages/db/tests/query/identity-output-shape-oracle.test.ts
  • packages/db/tests/query/includes-collection-oracle.property.test.ts
  • packages/db/tests/query/includes-context-transport-oracle.test.ts
  • packages/db/tests/query/includes-cross-formulation-oracle.property.test.ts
  • packages/db/tests/query/includes-functional-input-boundary.test.ts
  • packages/db/tests/query/includes-functional-projection-oracle.test.ts
  • packages/db/tests/query/includes-lazy-loading.test.ts
  • packages/db/tests/query/includes-publication-oracle.test.ts
  • packages/db/tests/query/includes-query-shape-oracle.test.ts
  • packages/db/tests/query/includes-scope-identity-oracle.ts
  • packages/db/tests/query/includes-space-oracle-fixture.ts
  • packages/db/tests/query/includes-temporal-oracle.test.ts
  • packages/db/tests/query/includes-work-counter-oracle.test.ts
  • packages/db/tests/query/includes.test-d.ts
  • packages/db/tests/query/includes.test.ts
  • packages/db/tests/query/ir-stable-identity-oracle.test.ts
  • packages/db/tests/query/join-result-key-oracle.property.test.ts
  • packages/db/tests/query/live-query-collection.test.ts
  • packages/db/tests/query/load-subset-join-dedupe.test.ts
  • packages/db/tests/query/load-subset-replay-refinement-oracle.test.ts
  • packages/db/tests/query/load-subset-source-readiness-refinement-oracle.test.ts
  • packages/db/tests/query/load-subset-subquery.test.ts
  • packages/db/tests/query/optimizer-semantics-oracle.test.ts
  • packages/db/tests/query/optimizer.test.ts
  • packages/db/tests/query/optional-fields-runtime.test.ts
  • packages/db/tests/query/order-by.test.ts
  • packages/db/tests/query/ordered-lifecycle-oracle.property.test.ts
  • packages/db/tests/query/ordered-work-oracle.property.test.ts
  • packages/db/tests/query/pagination-oracle.property.test.ts
  • packages/db/tests/query/pooled-live-query-gc-oracle.test.ts
  • packages/db/tests/query/pooled-query-identity.test.ts
  • packages/db/tests/query/public-container-copy.test.ts
  • packages/db/tests/query/query-api-type-algebra.test.ts
  • packages/db/tests/query/query-once.test.ts
  • packages/db/tests/query/replay-failure-boundary.test.ts
  • packages/db/tests/query/scheduler.test.ts
  • packages/db/tests/query/select-spread.test.ts
  • packages/db/tests/query/subquery-user-value-oracle.test.ts
  • packages/db/tests/query/subset-error-matrix.test.ts
  • packages/db/tests/query/union-all.test-d.ts
  • packages/db/tests/query/union-all.test.ts
  • packages/db/tests/query/virtual-row-fields-oracle.test-d.ts
  • packages/db/tests/query/virtual-row-fields-oracle.test.ts
  • packages/preact-db/src/useLiveQuery.ts
  • packages/preact-db/tests/conformance.test.ts
  • packages/query-db-collection/tests/includes-work-counter-oracle.test.ts
  • packages/query-db-collection/tests/load-subset-lifecycle-oracle.test.ts
  • packages/query-db-collection/tests/query.test.ts
  • packages/query-db-collection/tests/refetch-ordered-prefix-oracle.test.ts
  • packages/react-db/skills/react-db/SKILL.md
  • packages/react-db/src/useLiveQuery.ts
  • packages/react-db/tests/conformance.test.tsx
  • packages/react-db/tests/descriptor-query-binding-oracle.test.tsx
  • packages/react-db/tests/source-id-reuse-oracle.test.tsx
  • packages/react-db/tests/useLiveQuery.test.tsx
  • packages/solid-db/skills/solid-db/SKILL.md
  • packages/solid-db/src/useLiveQuery.ts
  • packages/solid-db/tests/conformance.test.tsx
  • packages/solid-db/tests/useLiveQuery.test.tsx
  • packages/svelte-db/skills/svelte-db/SKILL.md
  • packages/svelte-db/src/useLiveQuery.svelte.ts
  • packages/svelte-db/tests/conformance.svelte.test.ts
  • packages/svelte-db/tests/useLiveQuery.svelte.test.ts
  • packages/vue-db/skills/vue-db/SKILL.md
  • packages/vue-db/src/useLiveQuery.ts
  • packages/vue-db/tests/conformance.test.ts
  • packages/vue-db/tests/useLiveQuery.test.ts
  • scripts/bench/incremental-update.ts
  • scripts/check-doc-snippets.mjs
  • scripts/doc-snippet-syntax.mjs
  • scripts/doc-snippets-baseline.json
  • scripts/size-compare.mjs
  • scripts/test-minified-db.mjs

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Size Change: +2.74 kB (+1.23%)

Total Size: 225 kB

📦 View Changed
Filename Size Change
packages/db/dist/esm/errors.js 6.87 kB +172 B (+2.57%)
packages/db/dist/esm/index.js 4.7 kB +157 B (+3.46%)
packages/db/dist/esm/live-query-observer.js 4.52 kB -1 B (-0.02%)
packages/db/dist/esm/live-query-options.js 1.78 kB +144 B (+8.79%) 🔍
packages/db/dist/esm/query/builder/clone-query.js 854 B +5 B (+0.59%)
packages/db/dist/esm/query/builder/functions.js 1.61 kB +50 B (+3.21%)
packages/db/dist/esm/query/builder/group-keys.js 157 B +157 B (new file) 🆕
packages/db/dist/esm/query/builder/include-functions.js 229 B +229 B (new file) 🆕
packages/db/dist/esm/query/builder/index.js 7.72 kB +247 B (+3.3%)
packages/db/dist/esm/query/compiler/find-aggregate.js 328 B +328 B (new file) 🆕
packages/db/dist/esm/query/compiler/group-by.js 4.37 kB -109 B (-2.43%)
packages/db/dist/esm/query/compiler/grouping.js 161 B +161 B (new file) 🆕
packages/db/dist/esm/query/compiler/index.js 10.4 kB +101 B (+0.98%)
packages/db/dist/esm/query/compiler/order-by.js 2.82 kB +22 B (+0.79%)
packages/db/dist/esm/query/equality-value-identity.js 736 B +1 B (+0.14%)
packages/db/dist/esm/query/ir.js 2.22 kB +23 B (+1.05%)
packages/db/dist/esm/query/live/collection-config-builder.js 6.95 kB +47 B (+0.68%)
packages/db/dist/esm/query/live/includes-runtime.js 212 B +212 B (new file) 🆕
packages/db/dist/esm/query/live/materialized-pipeline.js 1.94 kB -450 B (-18.81%) 👏
packages/db/dist/esm/query/live/public-key-reduction.js 970 B +970 B (new file) 🆕
packages/db/dist/esm/query/optimizer.js 2.95 kB -3 B (-0.1%)
packages/db/dist/esm/query/pooled-live-query.js 4.15 kB +18 B (+0.44%)
packages/db/dist/esm/query/pooled-source.js 219 B +219 B (new file) 🆕
packages/react-db/dist/esm/useLiveQuery.js 3.4 kB +37 B (+1.1%)
ℹ️ View Unchanged
Filename Size
packages/db/dist/esm/client.js 4.22 kB
packages/db/dist/esm/collection-options-brand.js 219 B
packages/db/dist/esm/collection-options.js 258 B
packages/db/dist/esm/collection/change-events.js 1.76 kB
packages/db/dist/esm/collection/changes.js 2.96 kB
packages/db/dist/esm/collection/cleanup-queue.js 901 B
packages/db/dist/esm/collection/config-errors.js 547 B
packages/db/dist/esm/collection/events.js 481 B
packages/db/dist/esm/collection/index.js 5.27 kB
packages/db/dist/esm/collection/indexes.js 2.3 kB
packages/db/dist/esm/collection/lifecycle.js 2.96 kB
packages/db/dist/esm/collection/mutations.js 2.99 kB
packages/db/dist/esm/collection/state.js 7.36 kB
packages/db/dist/esm/collection/subscription.js 8.89 kB
packages/db/dist/esm/collection/sync.js 5.4 kB
packages/db/dist/esm/collection/validate-config.js 1.17 kB
packages/db/dist/esm/deferred.js 207 B
packages/db/dist/esm/error-message.js 642 B
packages/db/dist/esm/event-emitter.js 1.06 kB
packages/db/dist/esm/indexed-db-wrapper.js 1.91 kB
packages/db/dist/esm/indexed-db.js 3.79 kB
packages/db/dist/esm/indexes/auto-index.js 924 B
packages/db/dist/esm/indexes/base-index.js 1.92 kB
packages/db/dist/esm/indexes/basic-index.js 1.93 kB
packages/db/dist/esm/indexes/btree-index.js 1.62 kB
packages/db/dist/esm/indexes/index-registry.js 916 B
packages/db/dist/esm/indexes/reverse-index.js 1.01 kB
packages/db/dist/esm/live-query-adapter.js 811 B
packages/db/dist/esm/live-query-primitives.js 340 B
packages/db/dist/esm/live-query-window-binding.js 1.38 kB
packages/db/dist/esm/live-query-window-controller.js 4.28 kB
packages/db/dist/esm/local-only.js 1.08 kB
packages/db/dist/esm/local-storage.js 4.58 kB
packages/db/dist/esm/optimistic-action.js 359 B
packages/db/dist/esm/paced-mutations.js 1.11 kB
packages/db/dist/esm/persisted-readiness.js 841 B
packages/db/dist/esm/proxy.js 3.51 kB
packages/db/dist/esm/query/builder/query-ir.js 312 B
packages/db/dist/esm/query/builder/ref-proxy-identity.js 292 B
packages/db/dist/esm/query/builder/ref-proxy.js 1.67 kB
packages/db/dist/esm/query/builder/wrapper-identity.js 221 B
packages/db/dist/esm/query/compiler/evaluators.js 2.51 kB
packages/db/dist/esm/query/compiler/expressions.js 603 B
packages/db/dist/esm/query/compiler/joins.js 3.42 kB
packages/db/dist/esm/query/compiler/lazy-targets.js 1.11 kB
packages/db/dist/esm/query/compiler/parent-routes.js 319 B
packages/db/dist/esm/query/compiler/query-equivalence.js 568 B
packages/db/dist/esm/query/compiler/route-metadata.js 1.24 kB
packages/db/dist/esm/query/compiler/select.js 1.5 kB
packages/db/dist/esm/query/effect.js 5.36 kB
packages/db/dist/esm/query/equality-conjunct.js 486 B
packages/db/dist/esm/query/expression-helpers.js 1.61 kB
packages/db/dist/esm/query/ir-stable-identity.js 4.2 kB
packages/db/dist/esm/query/join-conditions.js 257 B
packages/db/dist/esm/query/live-query-collection.js 391 B
packages/db/dist/esm/query/live/bucket-facade-adapter.js 3.17 kB
packages/db/dist/esm/query/live/collection-registry.js 264 B
packages/db/dist/esm/query/live/collection-subscriber.js 2.3 kB
packages/db/dist/esm/query/live/graph-scheduler.js 305 B
packages/db/dist/esm/query/live/internal.js 145 B
packages/db/dist/esm/query/live/ordered-source-loader.js 6.46 kB
packages/db/dist/esm/query/live/subset-demand-controller.js 1.76 kB
packages/db/dist/esm/query/live/utils.js 1.35 kB
packages/db/dist/esm/query/query-once.js 359 B
packages/db/dist/esm/query/runtime-reference-identity.js 630 B
packages/db/dist/esm/query/subset-dedupe.js 493 B
packages/db/dist/esm/scheduler.js 1.23 kB
packages/db/dist/esm/SortedMap.js 1.6 kB
packages/db/dist/esm/strategies/commit-completion.js 156 B
packages/db/dist/esm/strategies/debounceStrategy.js 658 B
packages/db/dist/esm/strategies/queueStrategy.js 523 B
packages/db/dist/esm/strategies/serial-pacer.js 486 B
packages/db/dist/esm/strategies/throttleStrategy.js 738 B
packages/db/dist/esm/sync-persistence.js 626 B
packages/db/dist/esm/sync-receipt.js 211 B
packages/db/dist/esm/transaction-commit-work.js 351 B
packages/db/dist/esm/transactions.js 4.61 kB
packages/db/dist/esm/utils.js 1.67 kB
packages/db/dist/esm/utils/array-utils.js 270 B
packages/db/dist/esm/utils/browser-polyfills.js 304 B
packages/db/dist/esm/utils/btree.js 3.02 kB
packages/db/dist/esm/utils/callbacks.js 219 B
packages/db/dist/esm/utils/comparison.js 1.94 kB
packages/db/dist/esm/utils/cursor.js 753 B
packages/db/dist/esm/utils/error.js 262 B
packages/db/dist/esm/utils/get-or-create.js 155 B
packages/db/dist/esm/utils/index-optimization.js 2.58 kB
packages/db/dist/esm/utils/source-record.js 140 B
packages/db/dist/esm/utils/type-guards.js 230 B
packages/db/dist/esm/utils/uuid.js 530 B
packages/db/dist/esm/virtual-props.js 413 B
packages/react-db/dist/esm/DbProvider.js 317 B
packages/react-db/dist/esm/development.js 190 B
packages/react-db/dist/esm/HydrationBoundary.js 263 B
packages/react-db/dist/esm/index.js 330 B
packages/react-db/dist/esm/live-query-internals.js 282 B
packages/react-db/dist/esm/source-id-bindings.js 339 B
packages/react-db/dist/esm/useLiveInfiniteQuery.js 1.51 kB
packages/react-db/dist/esm/useLiveQueryEffect.js 504 B
packages/react-db/dist/esm/useLiveSuspenseQuery.js 1.41 kB
packages/react-db/dist/esm/usePacedMutations.js 429 B

compressed-size-action::db-and-react-package-size

@pkg-pr-new

pkg-pr-new Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
More templates

@tanstack/angular-db

npm i https://pkg.pr.new/TanStack/db/@tanstack/angular-db@2232

@tanstack/browser-db-sqlite-persistence

npm i https://pkg.pr.new/TanStack/db/@tanstack/browser-db-sqlite-persistence@2232

@tanstack/capacitor-db-sqlite-persistence

npm i https://pkg.pr.new/TanStack/db/@tanstack/capacitor-db-sqlite-persistence@2232

@tanstack/cloudflare-durable-objects-db-sqlite-persistence

npm i https://pkg.pr.new/TanStack/db/@tanstack/cloudflare-durable-objects-db-sqlite-persistence@2232

@tanstack/db

npm i https://pkg.pr.new/TanStack/db/@tanstack/db@2232

@tanstack/db-ivm

npm i https://pkg.pr.new/TanStack/db/@tanstack/db-ivm@2232

@tanstack/db-sqlite-persistence-core

npm i https://pkg.pr.new/TanStack/db/@tanstack/db-sqlite-persistence-core@2232

@tanstack/electric-db-collection

npm i https://pkg.pr.new/TanStack/db/@tanstack/electric-db-collection@2232

@tanstack/electron-db-sqlite-persistence

npm i https://pkg.pr.new/TanStack/db/@tanstack/electron-db-sqlite-persistence@2232

@tanstack/expo-db-sqlite-persistence

npm i https://pkg.pr.new/TanStack/db/@tanstack/expo-db-sqlite-persistence@2232

@tanstack/node-db-sqlite-persistence

npm i https://pkg.pr.new/TanStack/db/@tanstack/node-db-sqlite-persistence@2232

@tanstack/offline-transactions

npm i https://pkg.pr.new/TanStack/db/@tanstack/offline-transactions@2232

@tanstack/powersync-db-collection

npm i https://pkg.pr.new/TanStack/db/@tanstack/powersync-db-collection@2232

@tanstack/preact-db

npm i https://pkg.pr.new/TanStack/db/@tanstack/preact-db@2232

@tanstack/query-db-collection

npm i https://pkg.pr.new/TanStack/db/@tanstack/query-db-collection@2232

@tanstack/react-db

npm i https://pkg.pr.new/TanStack/db/@tanstack/react-db@2232

@tanstack/react-native-db-sqlite-persistence

npm i https://pkg.pr.new/TanStack/db/@tanstack/react-native-db-sqlite-persistence@2232

@tanstack/react-router-with-db

npm i https://pkg.pr.new/TanStack/db/@tanstack/react-router-with-db@2232

@tanstack/rxdb-db-collection

npm i https://pkg.pr.new/TanStack/db/@tanstack/rxdb-db-collection@2232

@tanstack/solid-db

npm i https://pkg.pr.new/TanStack/db/@tanstack/solid-db@2232

@tanstack/svelte-db

npm i https://pkg.pr.new/TanStack/db/@tanstack/svelte-db@2232

@tanstack/tauri-db-sqlite-persistence

npm i https://pkg.pr.new/TanStack/db/@tanstack/tauri-db-sqlite-persistence@2232

@tanstack/trailbase-db-collection

npm i https://pkg.pr.new/TanStack/db/@tanstack/trailbase-db-collection@2232

@tanstack/vue-db

npm i https://pkg.pr.new/TanStack/db/@tanstack/vue-db@2232

commit: a19d861

Test and others added 4 commits October 22, 2026 21:23
… pool

A DbClient query never pools, so prepareLiveQueryValue drops pool and a
server preload hashes like a pooling hook. pool moves from
LiveQueryCollectionConfig to LiveQueryHookConfig, which the framework hooks
accept. Angular's { params, query } form takes pool. Join operators have a
named function type so their declarations stay portable. The benchmark runs
against either join API, and the minified API check lists the new errors.

Co-authored-by: Isaac <no-reply@databricks.com>
…rializer

A join clause carries one runtime object (compiler, pushdown, validation,
and public-key reduction), and the optimizer copies it by spreading the
clause. Public-key reduction moves to its own module, so a joined query with a
custom key no longer bundles the include materializer. The bundle test now
tracks the materializer and the shared reduction module.

Co-authored-by: Isaac <no-reply@databricks.com>
… input

caseWhen branches take include() for a subquery; the select-object branch no
longer accepts a query builder. include() of a non-builder throws a coded
error. The compiler finds aggregates with one walker, and the fn.select error
names include(). size:compare skips only a base that lacks a scenario's new
export.

Co-authored-by: Isaac <no-reply@databricks.com>
The shipped agent skills use join operators, include(), groupKeys(), and
pooledLiveQueries. join() and groupBy() JSDoc describe the new parameters.
The changeset covers Angular's params pool and hand-built IR. Oracle files
keep their opening contract prose above their imports.

Co-authored-by: Isaac <no-reply@databricks.com>
@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Incremental update benchmark

Comparing 272435451 (this PR) against 5649a07d4 (base). Write times are per-write medians over 100 iterations (20 warmup writes). Cold hydrate is one timed first load of each query.

Overall median write time vs base: 0.99× · cold hydrate time: 1.00× (geometric mean of per-case ratios; lower is faster).

Writes: 1 regression(s), 1 improvement(s) (threshold: ±20% and >0.05ms).

Cold hydrate: 0 regression(s), 1 improvement(s) (threshold: ±50% and >5ms).

Per-case flags are noisy on shared runners. Read the geometric means first.

Writes

Query Δ median write time (geomean) Best case Worst case Flags
list: newest 50 open +5.1% -33.1% +59.7% —
list + author -0.1% -15.7% +56.5% —
list + comment count -5.3% -47.2% +114.0% 1 🔴 1 🟢
list + 3 recent comments -5.3% -13.0% +12.8% —
issue detail + comments -7.1% -16.0% +0.5% —

Cold hydrate

Query Δ cold hydrate time (geomean) Best case Worst case Flags
list: newest 50 open +1.9% -22.6% +76.7% —
list + author -15.1% -72.1% +6.7% 1 🟢
list + comment count -6.6% -56.8% +171.3% —
list + 3 recent comments -3.6% -35.1% +62.4% —
issue detail + comments +26.0% -14.5% +385.3% —

Each row aggregates the 14.4 scale/index/write-mode configurations of that query; per-configuration tables below.

100 rows/collection | source indexes: none | synced writes — geomean 1.00×, cold 0.91×
Query Base median PR median Δ median Base p95 PR p95 Δ p95 Base cold PR cold Δ cold
list: newest 50 open 0.113ms 0.116ms +2.4% 0.214ms 0.220ms +2.7% 9.625ms 9.326ms -3.1%
list: newest 50 open 0.361ms 0.386ms +7.0% 0.528ms 0.658ms +24.5% 2.614ms 2.626ms +0.5%
list + author 0.131ms 0.118ms -9.8% 0.256ms 0.267ms +4.1% 7.864ms 6.037ms -23.2%
list + comment count 0.233ms 0.236ms +1.5% 0.399ms 0.427ms +7.1% 11.129ms 8.768ms -21.2%
list + 3 recent comments 0.125ms 0.136ms +8.6% 0.298ms 0.251ms -15.6% 7.680ms 6.638ms -13.6%
issue detail + comments 0.078ms 0.072ms -6.8% 0.167ms 0.163ms -2.6% 1.269ms 1.379ms +8.6%
100 rows/collection | source indexes: none | optimistic writes — geomean 0.94×, cold 1.24×
Query Base median PR median Δ median Base p95 PR p95 Δ p95 Base cold PR cold Δ cold
list: newest 50 open 0.057ms 0.063ms +11.1% 0.117ms 0.145ms +23.8% 1.874ms 1.450ms -22.6%
list: newest 50 open 0.044ms 0.037ms -16.8% 0.100ms 0.092ms -8.0% 1.816ms 1.464ms -19.4%
list + author 0.074ms 0.076ms +2.1% 0.182ms 0.180ms -1.4% 2.875ms 2.777ms -3.4%
list + comment count 0.143ms 0.136ms -5.2% 0.306ms 0.295ms -3.7% 3.781ms 2.870ms -24.1%
list + 3 recent comments 0.064ms 0.056ms -12.7% 0.177ms 0.115ms -34.8% 4.148ms 6.735ms +62.4%
issue detail + comments 0.077ms 0.067ms -13.0% 0.139ms 0.139ms +0.1% 0.816ms 3.958ms +385.3%
100 rows/collection | source indexes: manual | synced writes — geomean 1.04×, cold 0.97×
Query Base median PR median Δ median Base p95 PR p95 Δ p95 Base cold PR cold Δ cold
list: newest 50 open 0.048ms 0.074ms +53.2% 0.128ms 0.170ms +32.7% 2.463ms 2.415ms -2.0%
list: newest 50 open 0.303ms 0.294ms -3.0% 0.565ms 0.559ms -1.2% 1.037ms 1.014ms -2.2%
list + author 0.100ms 0.086ms -14.2% 0.149ms 0.139ms -6.5% 1.906ms 1.897ms -0.5%
list + comment count 0.147ms 0.143ms -2.5% 0.375ms 0.323ms -13.7% 2.772ms 2.658ms -4.1%
list + 3 recent comments 0.081ms 0.080ms -0.5% 0.225ms 0.213ms -5.6% 3.642ms 3.472ms -4.7%
issue detail + comments 0.059ms 0.059ms +0.1% 0.109ms 0.130ms +19.7% 0.468ms 0.439ms -6.2%
100 rows/collection | source indexes: manual | optimistic writes — geomean 0.98×, cold 1.10×
Query Base median PR median Δ median Base p95 PR p95 Δ p95 Base cold PR cold Δ cold
list: newest 50 open 0.044ms 0.043ms -2.2% 0.105ms 0.107ms +2.3% 0.989ms 0.933ms -5.7%
list: newest 50 open 0.038ms 0.037ms -1.7% 0.087ms 0.085ms -1.9% 0.867ms 0.801ms -7.6%
list + author 0.061ms 0.058ms -4.8% 0.146ms 0.141ms -3.5% 1.894ms 1.883ms -0.6%
list + comment count 0.144ms 0.128ms -11.6% 0.248ms 0.237ms -4.4% 2.294ms 2.436ms +6.2%
list + 3 recent comments 0.059ms 0.067ms +12.8% 0.139ms 0.149ms +7.1% 4.693ms 4.717ms +0.5%
issue detail + comments 0.046ms 0.044ms -5.0% 0.145ms 0.102ms -29.6% 0.457ms 0.867ms +89.6%
1,000 rows/collection | source indexes: none | synced writes — geomean 0.90×, cold 1.02×, 1 change(s)
Query Base median PR median Δ median Base p95 PR p95 Δ p95 Base cold PR cold Δ cold
list: newest 50 open 0.042ms 0.064ms +52.1% 0.088ms 0.088ms +0.3% 5.678ms 8.283ms +45.9%
list: newest 50 open 0.818ms 0.779ms -4.8% 1.963ms 1.515ms -22.8% 4.712ms 7.861ms +66.8%
list + author 0.054ms 0.048ms -11.0% 0.110ms 0.072ms -35.0% 20.409ms 14.534ms -28.8%
list + comment count 0.176ms 0.093ms -47.2% 0.248ms 0.195ms -21.5% 🟢 11.328ms 7.696ms -32.1%
list + 3 recent comments 0.126ms 0.111ms -12.2% 0.169ms 0.208ms +23.4% 7.362ms 7.209ms -2.1%
issue detail + comments 0.152ms 0.135ms -11.1% 0.201ms 0.196ms -2.4% 1.056ms 1.013ms -4.1%
1,000 rows/collection | source indexes: none | optimistic writes — geomean 1.05×, cold 0.99×
Query Base median PR median Δ median Base p95 PR p95 Δ p95 Base cold PR cold Δ cold
list: newest 50 open 0.044ms 0.068ms +55.5% 0.110ms 0.109ms -0.6% 5.848ms 4.810ms -17.7%
list: newest 50 open 0.030ms 0.029ms -2.0% 0.061ms 0.053ms -13.4% 4.337ms 4.256ms -1.9%
list + author 0.059ms 0.070ms +18.7% 0.130ms 0.163ms +25.2% 18.002ms 16.598ms -7.8%
list + comment count 0.092ms 0.085ms -7.9% 0.131ms 0.181ms +37.7% 6.810ms 9.266ms +36.1%
list + 3 recent comments 0.052ms 0.047ms -8.6% 0.118ms 0.103ms -13.3% 7.561ms 7.450ms -1.5%
issue detail + comments 0.044ms 0.039ms -11.4% 0.065ms 0.086ms +32.8% 0.985ms 0.929ms -5.7%
1,000 rows/collection | source indexes: manual | synced writes — geomean 0.88×, cold 0.81×
Query Base median PR median Δ median Base p95 PR p95 Δ p95 Base cold PR cold Δ cold
list: newest 50 open 0.041ms 0.036ms -12.7% 0.050ms 0.043ms -12.7% 0.859ms 0.786ms -8.4%
list: newest 50 open 0.202ms 0.204ms +1.0% 0.427ms 0.414ms -2.9% 0.680ms 0.647ms -4.8%
list + author 0.049ms 0.047ms -4.9% 0.079ms 0.097ms +22.2% 1.422ms 1.359ms -4.5%
list + comment count 0.129ms 0.097ms -24.8% 0.299ms 0.148ms -50.6% 5.809ms 2.508ms -56.8%
list + 3 recent comments 0.074ms 0.065ms -13.0% 0.104ms 0.082ms -20.6% 4.614ms 4.095ms -11.3%
issue detail + comments 0.056ms 0.047ms -16.0% 0.129ms 0.061ms -52.5% 0.328ms 0.288ms -12.0%
1,000 rows/collection | source indexes: manual | optimistic writes — geomean 0.88×, cold 1.17×
Query Base median PR median Δ median Base p95 PR p95 Δ p95 Base cold PR cold Δ cold
list: newest 50 open 0.043ms 0.038ms -12.2% 0.089ms 0.052ms -41.2% 0.626ms 0.619ms -1.0%
list: newest 50 open 0.034ms 0.033ms -3.1% 0.079ms 0.057ms -27.8% 0.665ms 0.633ms -4.8%
list + author 0.057ms 0.048ms -15.7% 0.127ms 0.065ms -48.6% 1.565ms 1.665ms +6.4%
list + comment count 0.103ms 0.083ms -19.2% 0.163ms 0.155ms -5.1% 2.229ms 6.049ms +171.3%
list + 3 recent comments 0.059ms 0.053ms -9.0% 0.081ms 0.096ms +18.3% 3.475ms 3.250ms -6.5%
issue detail + comments 0.047ms 0.043ms -9.0% 0.070ms 0.069ms -0.9% 0.282ms 0.283ms +0.4%
10,000 rows/collection | source indexes: none | synced writes — geomean 1.21×, cold 1.10×, 1 change(s)
Query Base median PR median Δ median Base p95 PR p95 Δ p95 Base cold PR cold Δ cold
list: newest 50 open 0.039ms 0.040ms +1.0% 0.054ms 0.068ms +27.4% 52.567ms 53.722ms +2.2%
list: newest 50 open 7.852ms 8.221ms +4.7% 8.365ms 9.390ms +12.3% 62.929ms 50.396ms -19.9%
list + author 0.057ms 0.089ms +56.5% 0.119ms 0.113ms -5.3% 162.235ms 156.199ms -3.7%
list + comment count 0.118ms 0.253ms +114.0% 0.263ms 0.362ms +37.8% 🔴 60.681ms 56.988ms -6.1%
list + 3 recent comments 0.066ms 0.061ms -6.8% 0.139ms 0.112ms -19.1% 53.704ms 65.405ms +21.8%
issue detail + comments 0.048ms 0.047ms -3.0% 0.075ms 0.062ms -17.8% 3.590ms 7.211ms +100.9%
10,000 rows/collection | source indexes: none | optimistic writes — geomean 1.01×, cold 0.92×
Query Base median PR median Δ median Base p95 PR p95 Δ p95 Base cold PR cold Δ cold
list: newest 50 open 0.044ms 0.043ms -2.2% 0.096ms 0.122ms +27.4% 48.730ms 50.838ms +4.3%
list: newest 50 open 0.029ms 0.046ms +59.7% 0.052ms 0.073ms +40.7% 50.057ms 48.985ms -2.1%
list + author 0.056ms 0.052ms -6.7% 0.125ms 0.077ms -38.7% 144.128ms 153.842ms +6.7%
list + comment count 0.119ms 0.100ms -16.0% 0.157ms 0.131ms -16.8% 85.351ms 52.770ms -38.2%
list + 3 recent comments 0.051ms 0.049ms -3.4% 0.082ms 0.076ms -7.9% 64.678ms 56.849ms -12.1%
issue detail + comments 0.046ms 0.042ms -8.5% 0.088ms 0.058ms -34.1% 3.875ms 4.033ms +4.1%
10,000 rows/collection | source indexes: manual | synced writes — geomean 1.04×, cold 1.06×
Query Base median PR median Δ median Base p95 PR p95 Δ p95 Base cold PR cold Δ cold
list: newest 50 open 0.042ms 0.048ms +14.5% 0.047ms 0.093ms +97.2% 1.490ms 1.928ms +29.4%
list: newest 50 open 0.767ms 0.795ms +3.7% 0.846ms 1.152ms +36.3% 1.358ms 1.422ms +4.7%
list + author 0.049ms 0.050ms +1.8% 0.088ms 0.091ms +3.5% 2.294ms 2.273ms -0.9%
list + comment count 0.114ms 0.121ms +6.9% 0.189ms 0.255ms +34.7% 3.261ms 3.410ms +4.6%
list + 3 recent comments 0.078ms 0.076ms -3.8% 0.116ms 0.171ms +47.5% 4.955ms 4.255ms -14.1%
issue detail + comments 0.054ms 0.054ms +0.5% 0.103ms 0.088ms -14.3% 0.449ms 0.537ms +19.6%
10,000 rows/collection | source indexes: manual | optimistic writes — geomean 0.95×, cold 0.81×, 1 change(s)
Query Base median PR median Δ median Base p95 PR p95 Δ p95 Base cold PR cold Δ cold
list: newest 50 open 0.069ms 0.046ms -33.1% 0.121ms 0.112ms -7.8% 1.369ms 2.419ms +76.7%
list: newest 50 open 0.035ms 0.037ms +5.2% 0.075ms 0.082ms +9.8% 1.447ms 1.382ms -4.5%
list + author 0.053ms 0.055ms +4.7% 0.074ms 0.099ms +33.1% 10.099ms 2.822ms -72.1% 🟢
list + comment count 0.133ms 0.148ms +10.8% 0.187ms 0.337ms +80.5% 3.033ms 3.336ms +10.0%
list + 3 recent comments 0.070ms 0.062ms -11.1% 0.119ms 0.107ms -10.2% 6.016ms 3.907ms -35.1%
issue detail + comments 0.051ms 0.051ms +0.2% 0.070ms 0.075ms +6.9% 0.576ms 0.492ms -14.5%

Runner: node v24.8.0, linux 6.17.0-1022-azure, INTEL(R) XEON(R) PLATINUM 8573C. Timings on shared CI runners are noisy; treat small deltas as indicative only.

autofix-ci Bot and others added 12 commits October 23, 2026 03:47
A join operator infers the query's context from .join(). TypeScript skips
that inference when noImplicitAny is off, which left every join condition
with unknown refs and compile errors. The context now defaults to any there,
so the condition is untyped like other unannotated callbacks in that mode.
Strict mode keeps full typing.

Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
Add scripts/check-doc-snippets.mjs, run in the CI lint job as
`pnpm test:doc-snippets`. It typechecks each TypeScript example in docs/
and the shipped skills against the workspace sources. Examples that
already failed are listed in a baseline by content hash, so a new or
edited example must pass.

The check found these errors:
- Joins lost their types without noImplicitAny. Strict mode keeps them;
  the test compiles a wrong field in both modes.
- A bare subquery in select type-checked, also nested, because the ref
  and nested-object shapes are open. Both select overloads now reject
  a value that holds a query builder outside include(), toArray(), or
  materialize().
- Guide and skill examples: a nested bare subquery, missing imports,
  an orderBy on $selected, and iteration over a Collection.

Co-authored-by: Isaac <no-reply@databricks.com>
The autofix bot reformatted skill examples, which changed their hashes and
made known failures look new. The baseline now hashes each example's
tokens without commas, semicolons, parentheses, and spacing, so a
reformatted example keeps its entry. An edit to its code still does not.

Co-authored-by: Isaac <no-reply@databricks.com>
The conformance suite checked pooling only in the config form with pool.
Two scenarios now run in every framework driver:

- pool-opt-in: queries without pool keep a source subscription each in
  the function, config, and parameterized forms.
- pooled-param-change: a pooled parameterized query follows its
  parameter between pool groups beside an unchanged peer, and releases
  its subscription on unmount.

mountControllable takes an optional pool, and each driver uses its
adapter's config form for it (React without deps, Angular params).
Pooling every query by default, a pooled identity that ignores literal
values, and an Angular params form that drops pool each fail them.

Co-authored-by: Isaac <no-reply@databricks.com>
CI does not build the packages before lint. A subpath import such as
`@tanstack/db-sqlite-persistence-core/broadcast-coordinator` resolved to
dist/ locally and to nothing in CI, so one skill example failed only in
CI. Each export in a package's manifest now maps to its source file.

Co-authored-by: Isaac <no-reply@databricks.com>
- groupKeys() compiles without noImplicitAny, as join operators do. Both
  use one OperatorCallback type. The TypeScript-modes test now covers
  groupKeys and a reusable join operator, which passes its context
  explicitly and stays typed in both modes.
- Document reusable join operators in the guide and the db-core skill.
- Migrate the React Native shopping-list example to include() and the
  projects README to the current join API.
- The changeset and skill say that the join methods are removed. They
  do not throw the coded error. The changeset notes the new type of
  resolveLiveQueryValue's pool option.
- The bundle test runs every operator value alone and every combination
  of operator families, and checks group-by.ts exactly.
- The doc example check reports typos of imported TanStack names and
  examples that do not parse, and keeps parentheses in its fingerprint.
- Correct ARCHITECTURE.md and includes-runtime.ts on which module owns
  public-key reduction.
- Remove dead code: containsAggregate, the pool key check in poolConfig,
  the joined-key parameter of materializeCompilation, and two needless
  exports.
- Record the open load-subset replay counterexample (seed 1593300187),
  which fails the same way on main, in the coverage map.

Co-authored-by: Isaac <no-reply@databricks.com>
- The TypeScript-modes test covers every operator and form: join and
  groupKeys, inline, reusable with context, and reusable without
  context, in both modes, with a stated result per cell. It compiles one
  program per mode, so it stays fast.
- Document the typed reusable groupKeys<Context>() form.
- Export JoinCondition and OperatorCallback, so a factory can name the
  condition type.
- The doc example check reads examples through the TypeScript syntax
  tree: JSX text no longer breaks the fingerprint, every import form is
  found, and only syntax errors count as "does not parse". The typo
  check ignores case-only and prefix differences. A self-test with
  positive and negative cases runs before each check.
- Regenerate the API reference.
- Record the untraced includes-oracle failure, and the second seed of
  the load-subset counterexample, in the coverage map.

Co-authored-by: Isaac <no-reply@databricks.com>
Test and others added 2 commits October 23, 2026 12:49
Joins are common, and models already know `.join(source, on)` and the
`.leftJoin()` family. Making them opt-in saved about 3.6 kB in apps that
never join. Grouping, includes, and pooling stay opt-in.

- Restore `.join(source, on, type)` and the `leftJoin`, `rightJoin`,
  `innerJoin`, and `fullJoin` methods. Remove the join operator values,
  `JoinCondition`, the join runtime on IR join clauses, and
  `JoinOperatorRequiredError` (245).
- Restore the static join compile path, main's optimizer, and main's
  joins.ts. Public-key reduction stays its own module, so a joined query
  with a custom key still does not bundle the include materializer.
- Tests: a reverse codemod restored main's exact join call at each site.
  25 files are identical to main again.
- Docs and skills use the existing join API again. The doc example check
  matches a fence by its backtick count, so a ````ts example that holds a
  ``` block is read whole.
- The TypeScript-modes test covers groupKeys only, and the bundle test
  treats join modules as core.

Typical app: 102,023 to 94,419 B gzip (-7.5%).

Co-authored-by: Isaac <no-reply@databricks.com>
@KyleAMathews KyleAMathews changed the title feat(db)!: make joins, grouping, includes, and pooling opt-in feat(db)!: make grouping, includes, and pooling opt-in Oct 23, 2026
Test and others added 6 commits October 23, 2026 16:09
- Pooling no longer ships in every adapter app. The live-query observer
  found a pooled view's source with `instanceof PooledLiveQuery`, which
  kept the pooled view in every app that uses a framework hook. Pooled
  views now register their source in a small core WeakMap. The bundle
  test's app includes every value the adapters import from
  @tanstack/db, and a test keeps that list in step with the adapters.
- The aggregate-select oracle checks the operator laws over its select
  grammar: bare group keys without an aggregate throw 246, a bare query
  builder as a field, in a nested object, or in a conditional branch
  throws 247, and a wrapped include that is not a top-level select value
  throws. It declares these states with createOracleReach.
- Export `groupingCompiler` and `includesRuntime` for hand-built IR.
- Svelte and Vue skills wrap their child query in include(). The doc
  example check reads the TypeScript script of Svelte and Vue examples.
- The doc example key keeps separator commas, so `f(a, -b)` and
  `f(a - b)` differ. The self-test uses current API names.
- Restore LiveQueryCollectionConfig's JSDoc, the join JSDoc examples, and
  the comments in join.test-d.ts that the join revert dropped.
- The guide and skill no longer call a Collection include the default.
  The glossary says that pooling needs `pool`, and adds the operator
  terms.
- A test checks at the adapter boundary that queries without `pool` keep
  a source subscription each. It fails on the merge-base, which pools by
  default.

Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
… opt-in-operators

- Renumber this PR's unreleased error codes after main's 245 and 246:
  GroupingOperatorRequiredError 247, IncludeOperatorRequiredError 248,
  and the two include() sites 249 and 250.
- React and Svelte take main's restructured binding; their resolve calls
  keep this PR's pool option (`false` for Suspense and DbClient queries).
- The conformance contract keeps both pool and queryKey. Every driver,
  Preact's included, keeps main's publication log and this PR's pooled
  parameterized form; React runs it on both identity paths.
- preact-db accepts `pool` in its query config.
- The bundle test scans preact-db, and its adapter value list follows the
  adapters' new imports. No new adapter import brings operator code.
- The doc example check matches framework packages by exact name, so
  Preact examples import from preact-db and React ones from react-db.
- Record an ordered-work counterexample that also fails on main.

Co-authored-by: Isaac <no-reply@databricks.com>
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.

1 participant