@tanstack/db 0.5.33 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/collection/change-events.cjs.map +1 -1
- package/dist/cjs/collection/change-events.d.cts +3 -2
- package/dist/cjs/collection/changes.cjs +13 -4
- package/dist/cjs/collection/changes.cjs.map +1 -1
- package/dist/cjs/collection/changes.d.cts +10 -1
- package/dist/cjs/collection/cleanup-queue.cjs +89 -0
- package/dist/cjs/collection/cleanup-queue.cjs.map +1 -0
- package/dist/cjs/collection/cleanup-queue.d.cts +30 -0
- package/dist/cjs/collection/events.cjs +14 -0
- package/dist/cjs/collection/events.cjs.map +1 -1
- package/dist/cjs/collection/events.d.cts +39 -1
- package/dist/cjs/collection/index.cjs +66 -28
- package/dist/cjs/collection/index.cjs.map +1 -1
- package/dist/cjs/collection/index.d.cts +49 -36
- package/dist/cjs/collection/indexes.cjs +211 -62
- package/dist/cjs/collection/indexes.cjs.map +1 -1
- package/dist/cjs/collection/indexes.d.cts +27 -17
- package/dist/cjs/collection/lifecycle.cjs +5 -22
- package/dist/cjs/collection/lifecycle.cjs.map +1 -1
- package/dist/cjs/collection/lifecycle.d.cts +0 -1
- package/dist/cjs/collection/mutations.cjs +18 -0
- package/dist/cjs/collection/mutations.cjs.map +1 -1
- package/dist/cjs/collection/mutations.d.cts +1 -0
- package/dist/cjs/collection/state.cjs +381 -53
- package/dist/cjs/collection/state.cjs.map +1 -1
- package/dist/cjs/collection/state.d.cts +65 -1
- package/dist/cjs/collection/subscription.cjs +6 -0
- package/dist/cjs/collection/subscription.cjs.map +1 -1
- package/dist/cjs/collection/subscription.d.cts +4 -0
- package/dist/cjs/collection/sync.cjs +108 -1
- package/dist/cjs/collection/sync.cjs.map +1 -1
- package/dist/cjs/collection/sync.d.cts +2 -0
- package/dist/cjs/collection/transaction-metadata.cjs +5 -0
- package/dist/cjs/collection/transaction-metadata.cjs.map +1 -0
- package/dist/cjs/collection/transaction-metadata.d.cts +1 -0
- package/dist/cjs/errors.cjs +8 -0
- package/dist/cjs/errors.cjs.map +1 -1
- package/dist/cjs/errors.d.cts +3 -0
- package/dist/cjs/index.cjs +22 -4
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/index.d.cts +11 -3
- package/dist/cjs/indexes/auto-index.cjs +13 -6
- package/dist/cjs/indexes/auto-index.cjs.map +1 -1
- package/dist/cjs/indexes/base-index.cjs +0 -3
- package/dist/cjs/indexes/base-index.cjs.map +1 -1
- package/dist/cjs/indexes/base-index.d.cts +2 -6
- package/dist/cjs/indexes/basic-index.cjs +361 -0
- package/dist/cjs/indexes/basic-index.cjs.map +1 -0
- package/dist/cjs/indexes/basic-index.d.cts +102 -0
- package/dist/cjs/indexes/btree-index.cjs.map +1 -1
- package/dist/cjs/indexes/btree-index.d.cts +1 -1
- package/dist/cjs/indexes/index-options.d.cts +8 -9
- package/dist/cjs/indexes/index-registry.cjs +89 -0
- package/dist/cjs/indexes/index-registry.cjs.map +1 -0
- package/dist/cjs/indexes/index-registry.d.cts +61 -0
- package/dist/cjs/local-only.cjs +5 -0
- package/dist/cjs/local-only.cjs.map +1 -1
- package/dist/cjs/query/builder/functions.cjs +27 -11
- package/dist/cjs/query/builder/functions.cjs.map +1 -1
- package/dist/cjs/query/builder/functions.d.cts +25 -3
- package/dist/cjs/query/builder/index.cjs +200 -39
- package/dist/cjs/query/builder/index.cjs.map +1 -1
- package/dist/cjs/query/builder/index.d.cts +4 -3
- package/dist/cjs/query/builder/ref-proxy.cjs.map +1 -1
- package/dist/cjs/query/builder/ref-proxy.d.cts +14 -3
- package/dist/cjs/query/builder/types.d.cts +84 -19
- package/dist/cjs/query/compiler/evaluators.cjs +51 -0
- package/dist/cjs/query/compiler/evaluators.cjs.map +1 -1
- package/dist/cjs/query/compiler/group-by.cjs +100 -28
- package/dist/cjs/query/compiler/group-by.cjs.map +1 -1
- package/dist/cjs/query/compiler/group-by.d.cts +4 -2
- package/dist/cjs/query/compiler/index.cjs +283 -11
- package/dist/cjs/query/compiler/index.cjs.map +1 -1
- package/dist/cjs/query/compiler/index.d.cts +30 -2
- package/dist/cjs/query/compiler/order-by.cjs +29 -10
- package/dist/cjs/query/compiler/order-by.cjs.map +1 -1
- package/dist/cjs/query/compiler/order-by.d.cts +1 -1
- package/dist/cjs/query/compiler/select.cjs +8 -0
- package/dist/cjs/query/compiler/select.cjs.map +1 -1
- package/dist/cjs/query/index.d.cts +2 -1
- package/dist/cjs/query/ir.cjs +18 -1
- package/dist/cjs/query/ir.cjs.map +1 -1
- package/dist/cjs/query/ir.d.cts +21 -1
- package/dist/cjs/query/live/collection-config-builder.cjs +501 -5
- package/dist/cjs/query/live/collection-config-builder.cjs.map +1 -1
- package/dist/cjs/query/live/collection-config-builder.d.cts +7 -0
- package/dist/cjs/query/live/types.d.cts +3 -3
- package/dist/cjs/query/live/utils.cjs +43 -3
- package/dist/cjs/query/live/utils.cjs.map +1 -1
- package/dist/cjs/query/live/utils.d.cts +1 -0
- package/dist/cjs/query/live-query-collection.cjs.map +1 -1
- package/dist/cjs/query/live-query-collection.d.cts +9 -6
- package/dist/cjs/query/query-once.cjs.map +1 -1
- package/dist/cjs/query/query-once.d.cts +7 -5
- package/dist/cjs/query/subset-dedupe.cjs +9 -3
- package/dist/cjs/query/subset-dedupe.cjs.map +1 -1
- package/dist/cjs/types.d.cts +42 -8
- package/dist/cjs/utils/array-utils.cjs +27 -0
- package/dist/cjs/utils/array-utils.cjs.map +1 -0
- package/dist/cjs/utils/array-utils.d.cts +16 -0
- package/dist/cjs/utils/comparison.cjs +11 -0
- package/dist/cjs/utils/comparison.cjs.map +1 -1
- package/dist/cjs/utils/index-optimization.cjs +4 -0
- package/dist/cjs/utils/index-optimization.cjs.map +1 -1
- package/dist/cjs/utils.cjs +7 -9
- package/dist/cjs/utils.cjs.map +1 -1
- package/dist/cjs/utils.d.cts +6 -1
- package/dist/cjs/virtual-props.cjs +33 -0
- package/dist/cjs/virtual-props.cjs.map +1 -0
- package/dist/cjs/virtual-props.d.cts +196 -0
- package/dist/esm/collection/change-events.d.ts +3 -2
- package/dist/esm/collection/change-events.js.map +1 -1
- package/dist/esm/collection/changes.d.ts +10 -1
- package/dist/esm/collection/changes.js +13 -4
- package/dist/esm/collection/changes.js.map +1 -1
- package/dist/esm/collection/cleanup-queue.d.ts +30 -0
- package/dist/esm/collection/cleanup-queue.js +89 -0
- package/dist/esm/collection/cleanup-queue.js.map +1 -0
- package/dist/esm/collection/events.d.ts +39 -1
- package/dist/esm/collection/events.js +14 -0
- package/dist/esm/collection/events.js.map +1 -1
- package/dist/esm/collection/index.d.ts +49 -36
- package/dist/esm/collection/index.js +67 -29
- package/dist/esm/collection/index.js.map +1 -1
- package/dist/esm/collection/indexes.d.ts +27 -17
- package/dist/esm/collection/indexes.js +211 -62
- package/dist/esm/collection/indexes.js.map +1 -1
- package/dist/esm/collection/lifecycle.d.ts +0 -1
- package/dist/esm/collection/lifecycle.js +5 -22
- package/dist/esm/collection/lifecycle.js.map +1 -1
- package/dist/esm/collection/mutations.d.ts +1 -0
- package/dist/esm/collection/mutations.js +18 -0
- package/dist/esm/collection/mutations.js.map +1 -1
- package/dist/esm/collection/state.d.ts +65 -1
- package/dist/esm/collection/state.js +381 -53
- package/dist/esm/collection/state.js.map +1 -1
- package/dist/esm/collection/subscription.d.ts +4 -0
- package/dist/esm/collection/subscription.js +6 -0
- package/dist/esm/collection/subscription.js.map +1 -1
- package/dist/esm/collection/sync.d.ts +2 -0
- package/dist/esm/collection/sync.js +108 -1
- package/dist/esm/collection/sync.js.map +1 -1
- package/dist/esm/collection/transaction-metadata.d.ts +1 -0
- package/dist/esm/collection/transaction-metadata.js +5 -0
- package/dist/esm/collection/transaction-metadata.js.map +1 -0
- package/dist/esm/errors.d.ts +3 -0
- package/dist/esm/errors.js +8 -0
- package/dist/esm/errors.js.map +1 -1
- package/dist/esm/index.d.ts +11 -3
- package/dist/esm/index.js +25 -7
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/indexes/auto-index.js +13 -6
- package/dist/esm/indexes/auto-index.js.map +1 -1
- package/dist/esm/indexes/base-index.d.ts +2 -6
- package/dist/esm/indexes/base-index.js +1 -4
- package/dist/esm/indexes/base-index.js.map +1 -1
- package/dist/esm/indexes/basic-index.d.ts +102 -0
- package/dist/esm/indexes/basic-index.js +361 -0
- package/dist/esm/indexes/basic-index.js.map +1 -0
- package/dist/esm/indexes/btree-index.d.ts +1 -1
- package/dist/esm/indexes/btree-index.js.map +1 -1
- package/dist/esm/indexes/index-options.d.ts +8 -9
- package/dist/esm/indexes/index-registry.d.ts +61 -0
- package/dist/esm/indexes/index-registry.js +89 -0
- package/dist/esm/indexes/index-registry.js.map +1 -0
- package/dist/esm/local-only.js +5 -0
- package/dist/esm/local-only.js.map +1 -1
- package/dist/esm/query/builder/functions.d.ts +25 -3
- package/dist/esm/query/builder/functions.js +27 -11
- package/dist/esm/query/builder/functions.js.map +1 -1
- package/dist/esm/query/builder/index.d.ts +4 -3
- package/dist/esm/query/builder/index.js +201 -40
- package/dist/esm/query/builder/index.js.map +1 -1
- package/dist/esm/query/builder/ref-proxy.d.ts +14 -3
- package/dist/esm/query/builder/ref-proxy.js.map +1 -1
- package/dist/esm/query/builder/types.d.ts +84 -19
- package/dist/esm/query/compiler/evaluators.js +51 -0
- package/dist/esm/query/compiler/evaluators.js.map +1 -1
- package/dist/esm/query/compiler/group-by.d.ts +4 -2
- package/dist/esm/query/compiler/group-by.js +101 -29
- package/dist/esm/query/compiler/group-by.js.map +1 -1
- package/dist/esm/query/compiler/index.d.ts +30 -2
- package/dist/esm/query/compiler/index.js +285 -13
- package/dist/esm/query/compiler/index.js.map +1 -1
- package/dist/esm/query/compiler/order-by.d.ts +1 -1
- package/dist/esm/query/compiler/order-by.js +30 -11
- package/dist/esm/query/compiler/order-by.js.map +1 -1
- package/dist/esm/query/compiler/select.js +8 -0
- package/dist/esm/query/compiler/select.js.map +1 -1
- package/dist/esm/query/index.d.ts +2 -1
- package/dist/esm/query/ir.d.ts +21 -1
- package/dist/esm/query/ir.js +18 -1
- package/dist/esm/query/ir.js.map +1 -1
- package/dist/esm/query/live/collection-config-builder.d.ts +7 -0
- package/dist/esm/query/live/collection-config-builder.js +503 -7
- package/dist/esm/query/live/collection-config-builder.js.map +1 -1
- package/dist/esm/query/live/types.d.ts +3 -3
- package/dist/esm/query/live/utils.d.ts +1 -0
- package/dist/esm/query/live/utils.js +43 -3
- package/dist/esm/query/live/utils.js.map +1 -1
- package/dist/esm/query/live-query-collection.d.ts +9 -6
- package/dist/esm/query/live-query-collection.js.map +1 -1
- package/dist/esm/query/query-once.d.ts +7 -5
- package/dist/esm/query/query-once.js.map +1 -1
- package/dist/esm/query/subset-dedupe.js +9 -3
- package/dist/esm/query/subset-dedupe.js.map +1 -1
- package/dist/esm/types.d.ts +42 -8
- package/dist/esm/utils/array-utils.d.ts +16 -0
- package/dist/esm/utils/array-utils.js +27 -0
- package/dist/esm/utils/array-utils.js.map +1 -0
- package/dist/esm/utils/comparison.js +11 -0
- package/dist/esm/utils/comparison.js.map +1 -1
- package/dist/esm/utils/index-optimization.js +4 -0
- package/dist/esm/utils/index-optimization.js.map +1 -1
- package/dist/esm/utils.d.ts +6 -1
- package/dist/esm/utils.js +7 -9
- package/dist/esm/utils.js.map +1 -1
- package/dist/esm/virtual-props.d.ts +196 -0
- package/dist/esm/virtual-props.js +33 -0
- package/dist/esm/virtual-props.js.map +1 -0
- package/package.json +2 -2
- package/skills/db-core/collection-setup/references/electric-adapter.md +1 -1
- package/src/collection/change-events.ts +13 -9
- package/src/collection/changes.ts +30 -7
- package/src/collection/cleanup-queue.ts +105 -0
- package/src/collection/events.ts +65 -0
- package/src/collection/index.ts +110 -45
- package/src/collection/indexes.ts +283 -76
- package/src/collection/lifecycle.ts +5 -26
- package/src/collection/mutations.ts +21 -0
- package/src/collection/state.ts +545 -71
- package/src/collection/subscription.ts +7 -0
- package/src/collection/sync.ts +137 -0
- package/src/collection/transaction-metadata.ts +1 -0
- package/src/errors.ts +9 -0
- package/src/index.ts +46 -3
- package/src/indexes/auto-index.ts +18 -8
- package/src/indexes/base-index.ts +2 -10
- package/src/indexes/basic-index.ts +507 -0
- package/src/indexes/btree-index.ts +1 -1
- package/src/indexes/index-options.ts +17 -37
- package/src/indexes/index-registry.ts +174 -0
- package/src/local-only.ts +7 -0
- package/src/query/builder/functions.ts +84 -7
- package/src/query/builder/index.ts +329 -9
- package/src/query/builder/ref-proxy.ts +22 -4
- package/src/query/builder/types.ts +257 -62
- package/src/query/compiler/evaluators.ts +57 -0
- package/src/query/compiler/group-by.ts +156 -35
- package/src/query/compiler/index.ts +445 -15
- package/src/query/compiler/order-by.ts +51 -12
- package/src/query/compiler/select.ts +9 -0
- package/src/query/index.ts +7 -0
- package/src/query/ir.ts +23 -2
- package/src/query/live/collection-config-builder.ts +809 -9
- package/src/query/live/types.ts +10 -4
- package/src/query/live/utils.ts +64 -3
- package/src/query/live-query-collection.ts +43 -18
- package/src/query/query-once.ts +31 -12
- package/src/query/subset-dedupe.ts +11 -7
- package/src/types.ts +49 -9
- package/src/utils/array-utils.ts +49 -0
- package/src/utils/comparison.ts +14 -0
- package/src/utils/index-optimization.ts +4 -0
- package/src/utils.ts +12 -9
- package/src/virtual-props.ts +282 -0
- package/dist/cjs/indexes/lazy-index.cjs +0 -190
- package/dist/cjs/indexes/lazy-index.cjs.map +0 -1
- package/dist/cjs/indexes/lazy-index.d.cts +0 -96
- package/dist/esm/indexes/lazy-index.d.ts +0 -96
- package/dist/esm/indexes/lazy-index.js +0 -190
- package/dist/esm/indexes/lazy-index.js.map +0 -1
- package/src/indexes/lazy-index.ts +0 -251
|
@@ -1,190 +0,0 @@
|
|
|
1
|
-
function isConstructor(resolver) {
|
|
2
|
-
return typeof resolver === `function` && resolver.prototype !== void 0 && resolver.prototype.constructor === resolver;
|
|
3
|
-
}
|
|
4
|
-
async function resolveIndexConstructor(resolver) {
|
|
5
|
-
if (isConstructor(resolver)) {
|
|
6
|
-
return resolver;
|
|
7
|
-
} else {
|
|
8
|
-
return await resolver();
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
class LazyIndexWrapper {
|
|
12
|
-
constructor(id, expression, name, resolver, options, collectionEntries) {
|
|
13
|
-
this.id = id;
|
|
14
|
-
this.expression = expression;
|
|
15
|
-
this.name = name;
|
|
16
|
-
this.resolver = resolver;
|
|
17
|
-
this.options = options;
|
|
18
|
-
this.collectionEntries = collectionEntries;
|
|
19
|
-
this.indexPromise = null;
|
|
20
|
-
this.resolvedIndex = null;
|
|
21
|
-
if (isConstructor(this.resolver)) {
|
|
22
|
-
this.resolvedIndex = new this.resolver(
|
|
23
|
-
this.id,
|
|
24
|
-
this.expression,
|
|
25
|
-
this.name,
|
|
26
|
-
this.options
|
|
27
|
-
);
|
|
28
|
-
if (this.collectionEntries) {
|
|
29
|
-
this.resolvedIndex.build(this.collectionEntries);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Resolve the actual index
|
|
35
|
-
*/
|
|
36
|
-
async resolve() {
|
|
37
|
-
if (this.resolvedIndex) {
|
|
38
|
-
return this.resolvedIndex;
|
|
39
|
-
}
|
|
40
|
-
if (!this.indexPromise) {
|
|
41
|
-
this.indexPromise = this.createIndex();
|
|
42
|
-
}
|
|
43
|
-
this.resolvedIndex = await this.indexPromise;
|
|
44
|
-
return this.resolvedIndex;
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Check if already resolved
|
|
48
|
-
*/
|
|
49
|
-
isResolved() {
|
|
50
|
-
return this.resolvedIndex !== null;
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Get resolved index (throws if not ready)
|
|
54
|
-
*/
|
|
55
|
-
getResolved() {
|
|
56
|
-
if (!this.resolvedIndex) {
|
|
57
|
-
throw new Error(
|
|
58
|
-
`Index ${this.id} has not been resolved yet. Ensure collection is synced.`
|
|
59
|
-
);
|
|
60
|
-
}
|
|
61
|
-
return this.resolvedIndex;
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* Get the index ID
|
|
65
|
-
*/
|
|
66
|
-
getId() {
|
|
67
|
-
return this.id;
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* Get the index name
|
|
71
|
-
*/
|
|
72
|
-
getName() {
|
|
73
|
-
return this.name;
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* Get the index expression
|
|
77
|
-
*/
|
|
78
|
-
getExpression() {
|
|
79
|
-
return this.expression;
|
|
80
|
-
}
|
|
81
|
-
async createIndex() {
|
|
82
|
-
const IndexClass = await resolveIndexConstructor(this.resolver);
|
|
83
|
-
return new IndexClass(this.id, this.expression, this.name, this.options);
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
class IndexProxy {
|
|
87
|
-
constructor(indexId, lazyIndex) {
|
|
88
|
-
this.indexId = indexId;
|
|
89
|
-
this.lazyIndex = lazyIndex;
|
|
90
|
-
}
|
|
91
|
-
/**
|
|
92
|
-
* Get the resolved index (throws if not ready)
|
|
93
|
-
*/
|
|
94
|
-
get index() {
|
|
95
|
-
return this.lazyIndex.getResolved();
|
|
96
|
-
}
|
|
97
|
-
/**
|
|
98
|
-
* Check if index is ready
|
|
99
|
-
*/
|
|
100
|
-
get isReady() {
|
|
101
|
-
return this.lazyIndex.isResolved();
|
|
102
|
-
}
|
|
103
|
-
/**
|
|
104
|
-
* Wait for index to be ready
|
|
105
|
-
*/
|
|
106
|
-
async whenReady() {
|
|
107
|
-
return await this.lazyIndex.resolve();
|
|
108
|
-
}
|
|
109
|
-
/**
|
|
110
|
-
* Get the index ID
|
|
111
|
-
*/
|
|
112
|
-
get id() {
|
|
113
|
-
return this.indexId;
|
|
114
|
-
}
|
|
115
|
-
/**
|
|
116
|
-
* Get the index name (throws if not ready)
|
|
117
|
-
*/
|
|
118
|
-
get name() {
|
|
119
|
-
if (this.isReady) {
|
|
120
|
-
return this.index.name;
|
|
121
|
-
}
|
|
122
|
-
return this.lazyIndex.getName();
|
|
123
|
-
}
|
|
124
|
-
/**
|
|
125
|
-
* Get the index expression (available immediately)
|
|
126
|
-
*/
|
|
127
|
-
get expression() {
|
|
128
|
-
return this.lazyIndex.getExpression();
|
|
129
|
-
}
|
|
130
|
-
/**
|
|
131
|
-
* Check if index supports an operation (throws if not ready)
|
|
132
|
-
*/
|
|
133
|
-
supports(operation) {
|
|
134
|
-
return this.index.supports(operation);
|
|
135
|
-
}
|
|
136
|
-
/**
|
|
137
|
-
* Get index statistics (throws if not ready)
|
|
138
|
-
*/
|
|
139
|
-
getStats() {
|
|
140
|
-
return this.index.getStats();
|
|
141
|
-
}
|
|
142
|
-
/**
|
|
143
|
-
* Check if index matches a field path (available immediately)
|
|
144
|
-
*/
|
|
145
|
-
matchesField(fieldPath) {
|
|
146
|
-
const expr = this.expression;
|
|
147
|
-
return expr.type === `ref` && expr.path.length === fieldPath.length && expr.path.every((part, i) => part === fieldPath[i]);
|
|
148
|
-
}
|
|
149
|
-
/**
|
|
150
|
-
* Get the key count (throws if not ready)
|
|
151
|
-
*/
|
|
152
|
-
get keyCount() {
|
|
153
|
-
return this.index.keyCount;
|
|
154
|
-
}
|
|
155
|
-
// Test compatibility properties - delegate to resolved index
|
|
156
|
-
get indexedKeysSet() {
|
|
157
|
-
const resolved = this.index;
|
|
158
|
-
return resolved.indexedKeysSet;
|
|
159
|
-
}
|
|
160
|
-
get orderedEntriesArray() {
|
|
161
|
-
const resolved = this.index;
|
|
162
|
-
return resolved.orderedEntriesArray;
|
|
163
|
-
}
|
|
164
|
-
get valueMapData() {
|
|
165
|
-
const resolved = this.index;
|
|
166
|
-
return resolved.valueMapData;
|
|
167
|
-
}
|
|
168
|
-
// BTreeIndex compatibility methods
|
|
169
|
-
equalityLookup(value) {
|
|
170
|
-
const resolved = this.index;
|
|
171
|
-
return resolved.equalityLookup?.(value) ?? /* @__PURE__ */ new Set();
|
|
172
|
-
}
|
|
173
|
-
rangeQuery(options) {
|
|
174
|
-
const resolved = this.index;
|
|
175
|
-
return resolved.rangeQuery?.(options) ?? /* @__PURE__ */ new Set();
|
|
176
|
-
}
|
|
177
|
-
inArrayLookup(values) {
|
|
178
|
-
const resolved = this.index;
|
|
179
|
-
return resolved.inArrayLookup?.(values) ?? /* @__PURE__ */ new Set();
|
|
180
|
-
}
|
|
181
|
-
// Internal method for the collection to get the lazy wrapper
|
|
182
|
-
_getLazyWrapper() {
|
|
183
|
-
return this.lazyIndex;
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
export {
|
|
187
|
-
IndexProxy,
|
|
188
|
-
LazyIndexWrapper
|
|
189
|
-
};
|
|
190
|
-
//# sourceMappingURL=lazy-index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lazy-index.js","sources":["../../../src/indexes/lazy-index.ts"],"sourcesContent":["import type {\n BaseIndex,\n IndexConstructor,\n IndexResolver,\n} from './base-index.js'\nimport type { BasicExpression } from '../query/ir.js'\n\n/**\n * Utility to determine if a resolver is a constructor or async loader\n */\nfunction isConstructor<TKey extends string | number>(\n resolver: IndexResolver<TKey>,\n): resolver is IndexConstructor<TKey> {\n // Check if it's a function with a prototype (constructor)\n return (\n typeof resolver === `function` &&\n resolver.prototype !== undefined &&\n resolver.prototype.constructor === resolver\n )\n}\n\n/**\n * Resolve index constructor from resolver\n */\nasync function resolveIndexConstructor<TKey extends string | number>(\n resolver: IndexResolver<TKey>,\n): Promise<IndexConstructor<TKey>> {\n if (isConstructor(resolver)) {\n return resolver\n } else {\n // It's an async loader function\n return await resolver()\n }\n}\n\n/**\n * Wrapper that defers index creation until first sync\n */\nexport class LazyIndexWrapper<TKey extends string | number = string | number> {\n private indexPromise: Promise<BaseIndex<TKey>> | null = null\n private resolvedIndex: BaseIndex<TKey> | null = null\n\n constructor(\n private id: number,\n private expression: BasicExpression,\n private name: string | undefined,\n private resolver: IndexResolver<TKey>,\n private options: any,\n private collectionEntries?: Iterable<[TKey, any]>,\n ) {\n // For synchronous constructors, resolve immediately\n if (isConstructor(this.resolver)) {\n this.resolvedIndex = new this.resolver(\n this.id,\n this.expression,\n this.name,\n this.options,\n )\n // Build with initial data if provided\n if (this.collectionEntries) {\n this.resolvedIndex.build(this.collectionEntries)\n }\n }\n }\n\n /**\n * Resolve the actual index\n */\n async resolve(): Promise<BaseIndex<TKey>> {\n if (this.resolvedIndex) {\n return this.resolvedIndex\n }\n\n if (!this.indexPromise) {\n this.indexPromise = this.createIndex()\n }\n\n this.resolvedIndex = await this.indexPromise\n return this.resolvedIndex\n }\n\n /**\n * Check if already resolved\n */\n isResolved(): boolean {\n return this.resolvedIndex !== null\n }\n\n /**\n * Get resolved index (throws if not ready)\n */\n getResolved(): BaseIndex<TKey> {\n if (!this.resolvedIndex) {\n throw new Error(\n `Index ${this.id} has not been resolved yet. Ensure collection is synced.`,\n )\n }\n return this.resolvedIndex\n }\n\n /**\n * Get the index ID\n */\n getId(): number {\n return this.id\n }\n\n /**\n * Get the index name\n */\n getName(): string | undefined {\n return this.name\n }\n\n /**\n * Get the index expression\n */\n getExpression(): BasicExpression {\n return this.expression\n }\n\n private async createIndex(): Promise<BaseIndex<TKey>> {\n const IndexClass = await resolveIndexConstructor(this.resolver)\n return new IndexClass(this.id, this.expression, this.name, this.options)\n }\n}\n\n/**\n * Proxy that provides synchronous interface while index loads asynchronously\n */\nexport class IndexProxy<TKey extends string | number = string | number> {\n constructor(\n private indexId: number,\n private lazyIndex: LazyIndexWrapper<TKey>,\n ) {}\n\n /**\n * Get the resolved index (throws if not ready)\n */\n get index(): BaseIndex<TKey> {\n return this.lazyIndex.getResolved()\n }\n\n /**\n * Check if index is ready\n */\n get isReady(): boolean {\n return this.lazyIndex.isResolved()\n }\n\n /**\n * Wait for index to be ready\n */\n async whenReady(): Promise<BaseIndex<TKey>> {\n return await this.lazyIndex.resolve()\n }\n\n /**\n * Get the index ID\n */\n get id(): number {\n return this.indexId\n }\n\n /**\n * Get the index name (throws if not ready)\n */\n get name(): string | undefined {\n if (this.isReady) {\n return this.index.name\n }\n return this.lazyIndex.getName()\n }\n\n /**\n * Get the index expression (available immediately)\n */\n get expression(): BasicExpression {\n return this.lazyIndex.getExpression()\n }\n\n /**\n * Check if index supports an operation (throws if not ready)\n */\n supports(operation: any): boolean {\n return this.index.supports(operation)\n }\n\n /**\n * Get index statistics (throws if not ready)\n */\n getStats() {\n return this.index.getStats()\n }\n\n /**\n * Check if index matches a field path (available immediately)\n */\n matchesField(fieldPath: Array<string>): boolean {\n const expr = this.expression\n return (\n expr.type === `ref` &&\n expr.path.length === fieldPath.length &&\n expr.path.every((part, i) => part === fieldPath[i])\n )\n }\n\n /**\n * Get the key count (throws if not ready)\n */\n get keyCount(): number {\n return this.index.keyCount\n }\n\n // Test compatibility properties - delegate to resolved index\n get indexedKeysSet(): Set<TKey> {\n const resolved = this.index as any\n return resolved.indexedKeysSet\n }\n\n get orderedEntriesArray(): Array<[any, Set<TKey>]> {\n const resolved = this.index as any\n return resolved.orderedEntriesArray\n }\n\n get valueMapData(): Map<any, Set<TKey>> {\n const resolved = this.index as any\n return resolved.valueMapData\n }\n\n // BTreeIndex compatibility methods\n equalityLookup(value: any): Set<TKey> {\n const resolved = this.index as any\n return resolved.equalityLookup?.(value) ?? new Set()\n }\n\n rangeQuery(options: any): Set<TKey> {\n const resolved = this.index as any\n return resolved.rangeQuery?.(options) ?? new Set()\n }\n\n inArrayLookup(values: Array<any>): Set<TKey> {\n const resolved = this.index as any\n return resolved.inArrayLookup?.(values) ?? new Set()\n }\n\n // Internal method for the collection to get the lazy wrapper\n _getLazyWrapper(): LazyIndexWrapper<TKey> {\n return this.lazyIndex\n }\n}\n"],"names":[],"mappings":"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"}
|
|
@@ -1,251 +0,0 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
BaseIndex,
|
|
3
|
-
IndexConstructor,
|
|
4
|
-
IndexResolver,
|
|
5
|
-
} from './base-index.js'
|
|
6
|
-
import type { BasicExpression } from '../query/ir.js'
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Utility to determine if a resolver is a constructor or async loader
|
|
10
|
-
*/
|
|
11
|
-
function isConstructor<TKey extends string | number>(
|
|
12
|
-
resolver: IndexResolver<TKey>,
|
|
13
|
-
): resolver is IndexConstructor<TKey> {
|
|
14
|
-
// Check if it's a function with a prototype (constructor)
|
|
15
|
-
return (
|
|
16
|
-
typeof resolver === `function` &&
|
|
17
|
-
resolver.prototype !== undefined &&
|
|
18
|
-
resolver.prototype.constructor === resolver
|
|
19
|
-
)
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Resolve index constructor from resolver
|
|
24
|
-
*/
|
|
25
|
-
async function resolveIndexConstructor<TKey extends string | number>(
|
|
26
|
-
resolver: IndexResolver<TKey>,
|
|
27
|
-
): Promise<IndexConstructor<TKey>> {
|
|
28
|
-
if (isConstructor(resolver)) {
|
|
29
|
-
return resolver
|
|
30
|
-
} else {
|
|
31
|
-
// It's an async loader function
|
|
32
|
-
return await resolver()
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Wrapper that defers index creation until first sync
|
|
38
|
-
*/
|
|
39
|
-
export class LazyIndexWrapper<TKey extends string | number = string | number> {
|
|
40
|
-
private indexPromise: Promise<BaseIndex<TKey>> | null = null
|
|
41
|
-
private resolvedIndex: BaseIndex<TKey> | null = null
|
|
42
|
-
|
|
43
|
-
constructor(
|
|
44
|
-
private id: number,
|
|
45
|
-
private expression: BasicExpression,
|
|
46
|
-
private name: string | undefined,
|
|
47
|
-
private resolver: IndexResolver<TKey>,
|
|
48
|
-
private options: any,
|
|
49
|
-
private collectionEntries?: Iterable<[TKey, any]>,
|
|
50
|
-
) {
|
|
51
|
-
// For synchronous constructors, resolve immediately
|
|
52
|
-
if (isConstructor(this.resolver)) {
|
|
53
|
-
this.resolvedIndex = new this.resolver(
|
|
54
|
-
this.id,
|
|
55
|
-
this.expression,
|
|
56
|
-
this.name,
|
|
57
|
-
this.options,
|
|
58
|
-
)
|
|
59
|
-
// Build with initial data if provided
|
|
60
|
-
if (this.collectionEntries) {
|
|
61
|
-
this.resolvedIndex.build(this.collectionEntries)
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* Resolve the actual index
|
|
68
|
-
*/
|
|
69
|
-
async resolve(): Promise<BaseIndex<TKey>> {
|
|
70
|
-
if (this.resolvedIndex) {
|
|
71
|
-
return this.resolvedIndex
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
if (!this.indexPromise) {
|
|
75
|
-
this.indexPromise = this.createIndex()
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
this.resolvedIndex = await this.indexPromise
|
|
79
|
-
return this.resolvedIndex
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* Check if already resolved
|
|
84
|
-
*/
|
|
85
|
-
isResolved(): boolean {
|
|
86
|
-
return this.resolvedIndex !== null
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* Get resolved index (throws if not ready)
|
|
91
|
-
*/
|
|
92
|
-
getResolved(): BaseIndex<TKey> {
|
|
93
|
-
if (!this.resolvedIndex) {
|
|
94
|
-
throw new Error(
|
|
95
|
-
`Index ${this.id} has not been resolved yet. Ensure collection is synced.`,
|
|
96
|
-
)
|
|
97
|
-
}
|
|
98
|
-
return this.resolvedIndex
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* Get the index ID
|
|
103
|
-
*/
|
|
104
|
-
getId(): number {
|
|
105
|
-
return this.id
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
/**
|
|
109
|
-
* Get the index name
|
|
110
|
-
*/
|
|
111
|
-
getName(): string | undefined {
|
|
112
|
-
return this.name
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
/**
|
|
116
|
-
* Get the index expression
|
|
117
|
-
*/
|
|
118
|
-
getExpression(): BasicExpression {
|
|
119
|
-
return this.expression
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
private async createIndex(): Promise<BaseIndex<TKey>> {
|
|
123
|
-
const IndexClass = await resolveIndexConstructor(this.resolver)
|
|
124
|
-
return new IndexClass(this.id, this.expression, this.name, this.options)
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
/**
|
|
129
|
-
* Proxy that provides synchronous interface while index loads asynchronously
|
|
130
|
-
*/
|
|
131
|
-
export class IndexProxy<TKey extends string | number = string | number> {
|
|
132
|
-
constructor(
|
|
133
|
-
private indexId: number,
|
|
134
|
-
private lazyIndex: LazyIndexWrapper<TKey>,
|
|
135
|
-
) {}
|
|
136
|
-
|
|
137
|
-
/**
|
|
138
|
-
* Get the resolved index (throws if not ready)
|
|
139
|
-
*/
|
|
140
|
-
get index(): BaseIndex<TKey> {
|
|
141
|
-
return this.lazyIndex.getResolved()
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
/**
|
|
145
|
-
* Check if index is ready
|
|
146
|
-
*/
|
|
147
|
-
get isReady(): boolean {
|
|
148
|
-
return this.lazyIndex.isResolved()
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
/**
|
|
152
|
-
* Wait for index to be ready
|
|
153
|
-
*/
|
|
154
|
-
async whenReady(): Promise<BaseIndex<TKey>> {
|
|
155
|
-
return await this.lazyIndex.resolve()
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
/**
|
|
159
|
-
* Get the index ID
|
|
160
|
-
*/
|
|
161
|
-
get id(): number {
|
|
162
|
-
return this.indexId
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
/**
|
|
166
|
-
* Get the index name (throws if not ready)
|
|
167
|
-
*/
|
|
168
|
-
get name(): string | undefined {
|
|
169
|
-
if (this.isReady) {
|
|
170
|
-
return this.index.name
|
|
171
|
-
}
|
|
172
|
-
return this.lazyIndex.getName()
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
/**
|
|
176
|
-
* Get the index expression (available immediately)
|
|
177
|
-
*/
|
|
178
|
-
get expression(): BasicExpression {
|
|
179
|
-
return this.lazyIndex.getExpression()
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
/**
|
|
183
|
-
* Check if index supports an operation (throws if not ready)
|
|
184
|
-
*/
|
|
185
|
-
supports(operation: any): boolean {
|
|
186
|
-
return this.index.supports(operation)
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
/**
|
|
190
|
-
* Get index statistics (throws if not ready)
|
|
191
|
-
*/
|
|
192
|
-
getStats() {
|
|
193
|
-
return this.index.getStats()
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
/**
|
|
197
|
-
* Check if index matches a field path (available immediately)
|
|
198
|
-
*/
|
|
199
|
-
matchesField(fieldPath: Array<string>): boolean {
|
|
200
|
-
const expr = this.expression
|
|
201
|
-
return (
|
|
202
|
-
expr.type === `ref` &&
|
|
203
|
-
expr.path.length === fieldPath.length &&
|
|
204
|
-
expr.path.every((part, i) => part === fieldPath[i])
|
|
205
|
-
)
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
/**
|
|
209
|
-
* Get the key count (throws if not ready)
|
|
210
|
-
*/
|
|
211
|
-
get keyCount(): number {
|
|
212
|
-
return this.index.keyCount
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
// Test compatibility properties - delegate to resolved index
|
|
216
|
-
get indexedKeysSet(): Set<TKey> {
|
|
217
|
-
const resolved = this.index as any
|
|
218
|
-
return resolved.indexedKeysSet
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
get orderedEntriesArray(): Array<[any, Set<TKey>]> {
|
|
222
|
-
const resolved = this.index as any
|
|
223
|
-
return resolved.orderedEntriesArray
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
get valueMapData(): Map<any, Set<TKey>> {
|
|
227
|
-
const resolved = this.index as any
|
|
228
|
-
return resolved.valueMapData
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
// BTreeIndex compatibility methods
|
|
232
|
-
equalityLookup(value: any): Set<TKey> {
|
|
233
|
-
const resolved = this.index as any
|
|
234
|
-
return resolved.equalityLookup?.(value) ?? new Set()
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
rangeQuery(options: any): Set<TKey> {
|
|
238
|
-
const resolved = this.index as any
|
|
239
|
-
return resolved.rangeQuery?.(options) ?? new Set()
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
inArrayLookup(values: Array<any>): Set<TKey> {
|
|
243
|
-
const resolved = this.index as any
|
|
244
|
-
return resolved.inArrayLookup?.(values) ?? new Set()
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
// Internal method for the collection to get the lazy wrapper
|
|
248
|
-
_getLazyWrapper(): LazyIndexWrapper<TKey> {
|
|
249
|
-
return this.lazyIndex
|
|
250
|
-
}
|
|
251
|
-
}
|