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
Copy file name to clipboardExpand all lines: .changeset/optional-indexing.md
+8-2Lines changed: 8 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,15 +1,17 @@
1
1
---
2
-
"@tanstack/db": minor
2
+
'@tanstack/db': minor
3
3
---
4
4
5
5
Make indexing explicit with two index types for different use cases
6
6
7
7
**Breaking Changes:**
8
+
8
9
-`autoIndex` now defaults to `off` instead of `eager`
9
10
-`BTreeIndex` is no longer exported from `@tanstack/db` main entry point
10
11
- To use `createIndex()` or `autoIndex: 'eager'`, you must set `defaultIndexType` on the collection
11
12
12
13
**Changes:**
14
+
13
15
- New `@tanstack/db/indexing` entry point for tree-shakeable indexing
14
16
-**BasicIndex** - Lightweight index using Map + sorted Array for both equality and range queries (`eq`, `in`, `gt`, `gte`, `lt`, `lte`). O(n) updates but fast reads.
15
17
-**BTreeIndex** - Full-featured index with O(log n) updates and sorted iteration for ORDER BY optimization on large collections (10k+ items)
@@ -20,6 +22,7 @@ Make indexing explicit with two index types for different use cases
20
22
If you were relying on auto-indexing, set `defaultIndexType` on your collections:
21
23
22
24
1.**Lightweight indexing** (good for most use cases):
0 commit comments