You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* feat: add virtual properties core support
* test: update expectations for virtual props
* ci: apply automated fixes
* Fix virtual props semantics and types
* ci: apply automated fixes
* Deduplicate test helpers and emit synced flips
Co-authored-by: sam.willis <[email protected]>
* ci: apply automated fixes
* Fix tests for virtual props helpers
* Fix type constraints in tests
* Update local-only and test typings
* ci: apply automated fixes
* Fix type expectations for virtual props
* Align query key types in tests
* Adjust key types in type tests
* Update query type tests for virtual props
* Align query types with expectations
* Use string in query type tests
* Expect numeric in query types
* Use union in query type tests
* Relax query type assertions for
* Loosen join query key expectations
* ci: apply automated fixes
* Default OutputWithVirtual key to union
* Update query tests for virtual props
* test: strip virtual props in query expectations
* test: normalize virtual props in truncate/group/indexes
* ci: apply automated fixes
* test: strip virtual props in collection/local-only
* ci: apply automated fixes
* test: fix remaining virtual props expectations
* fix: preserve local origin across sync confirmation
* ci: apply automated fixes
* fix: account for virtual sync confirmations
* ci: apply automated fixes
* fix: keep optimistic state until sync
* fix: track pending local origins
* fix: persist direct optimistic state
* fix: handle virtual prop filters and origins
* fix: carry virtual props through query output
* feat: cache virtual props with WeakMap
* ci: apply automated fixes
* fix: restore virtual props helper import
* chore: reuse db test utils in query-db
* test: align electric type tests with virtual props
* ci: apply automated fixes
* test: normalize electric tag state for virtual props
* ci: apply automated fixes
* test: strip virtual props in electric integration assertions
* test: normalize electric collection state comparisons
* test: strip virtual props in rxdb assertions
* test: align react useLiveQuery types with virtual props
* test: strip virtual props in query-db-collection tests
* test: strip virtual props in query-db cache comparisons
* test: strip virtual props in trailbase state assertions
* test: align vue useLiveQuery types with virtual props
* fix query select types include virtual props
* ci: apply automated fixes
* update subquery type tests for virtual props
* loosen select result key type for virtual props
* relax join and group-by type assertions
* align subscribeChanges options with virtual props
* document virtual props in live query docs
* document virtual props in live queries guide
* add changeset for virtual props updates
* ci: apply automated fixes
* update changeset summary for virtual props
* fix tests for virtual props and queryOnce typing
Align local-only and group-by expectations with virtual props on returned rows, and make queryOnce's array return cast explicit for the updated type constraints.
Made-with: Cursor
* refactor group-by aggregate setup
Reuse the per-query virtual aggregate map directly instead of copying it before adding select aggregates.
Made-with: Cursor
* ci: apply automated fixes
* fix angular live query type assertions
Align Angular injectLiveQuery type tests with current live query result shapes, including virtual props and single-result inference.
Made-with: Cursor
* ci: apply automated fixes
* fix package test suites across frameworks
Update stale React assertions for virtual props, switch PowerSync tests to the supported sqlite backend with its test dependency, and add DOM libs for TrailBase package typechecking.
Made-with: Cursor
* ci: apply automated fixes
* make powersync test backend selection robust
Use a supported sqlite backend when available and skip the PowerSync integration suites on runtimes that do not support either backend path.
Made-with: Cursor
* ci: apply automated fixes
* fix powersync sqlite backend probe
Verify that better-sqlite3 can actually open a database before selecting it for PowerSync tests so CI can fall back cleanly when native bindings are unavailable.
Made-with: Cursor
* fix db virtual prop edge cases
Address truncate and failed-transaction virtual prop cleanup, preserve previousValue snapshots for optimistic changes, and tighten the virtual prop typing/tests.
Made-with: Cursor
* fix lockfile for powersync sqlite peer
Regenerate pnpm-lock.yaml so the powersync package manifest and frozen-lockfile installs agree in CI.
Made-with: Cursor
* ci: apply automated fixes
* ci: apply automated fixes
---------
Co-authored-by: Cursor Agent <[email protected]>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
The result types are automatically inferred from your query structure, providing full TypeScript support. When you use a `select` clause, the result type matches your projection. Without `select`, you get the full schema with proper join optionality.
31
31
32
+
## Virtual properties
33
+
34
+
Live query results include computed, read-only virtual properties on every row:
35
+
36
+
-`$synced`: `true` when the row is confirmed by sync; `false` when it is still optimistic.
37
+
-`$origin`: `"local"` if the last confirmed change came from this client, otherwise `"remote"`.
38
+
-`$key`: the row key for the result.
39
+
-`$collectionId`: the source collection ID.
40
+
41
+
These props can be used in `where`, `select`, and `orderBy` clauses. They are added to
42
+
query outputs automatically and should not be persisted back to storage.
43
+
32
44
## Table of Contents
33
45
34
46
-[Creating Live Query Collections](#creating-live-query-collections)
0 commit comments