feat(db): expose authoritative base rows through collection.base #1982
Merged
KyleAMathewsmerged 2 commits into
main fromrefs/pull/1982/head·merged by KyleAMathews Showing 5 changed files with 27 additions and 0 deletions (loading 2).
x
@@ -0,0 +1,5 @@
+---
+'@tanstack/db': patch
+---
+
+Expose `collection.base` for synchronous reads of applied authoritative rows without optimistic overlays. Reading the base does not start sync.
@@ -37,6 +37,7 @@
+| exposed authoritative base | The applied source rows available before a Collection adds optimistic mutations. Committed sync writes queued for reconciliation are not part of this base. `collection.base` reads it without starting sync. | Visible Collection state or a pending sync queue. |
@@ -14,6 +14,7 @@
+import type { SortedMap } from '../SortedMap.js'
@@ -47,6 +48,17 @@