@dxos/echo-pipeline 0.8.3 → 0.8.4-main.05e74ebcff
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/LICENSE +102 -5
- package/README.md +1 -1
- package/dist/lib/neutral/chunk-46DCRDA7.mjs +271 -0
- package/dist/lib/neutral/chunk-46DCRDA7.mjs.map +7 -0
- package/dist/lib/{browser/chunk-35I6ERLG.mjs → neutral/chunk-LR7UFVQX.mjs} +313 -709
- package/dist/lib/neutral/chunk-LR7UFVQX.mjs.map +7 -0
- package/dist/lib/{browser → neutral}/filter/index.mjs +3 -2
- package/dist/lib/neutral/index.mjs +7332 -0
- package/dist/lib/neutral/index.mjs.map +7 -0
- package/dist/lib/neutral/meta.json +1 -0
- package/dist/lib/{browser → neutral}/testing/index.mjs +90 -311
- package/dist/lib/neutral/testing/index.mjs.map +7 -0
- package/dist/types/src/automerge/automerge-host-subduction.test.d.ts +2 -0
- package/dist/types/src/automerge/automerge-host-subduction.test.d.ts.map +1 -0
- package/dist/types/src/automerge/automerge-host.d.ts +119 -54
- package/dist/types/src/automerge/automerge-host.d.ts.map +1 -1
- package/dist/types/src/automerge/automerge-repo-subduction.test.d.ts +2 -0
- package/dist/types/src/automerge/automerge-repo-subduction.test.d.ts.map +1 -0
- package/dist/types/src/automerge/automerge-repo.test.d.ts +1 -1
- package/dist/types/src/automerge/automerge-repo.test.d.ts.map +1 -1
- package/dist/types/src/automerge/automerge-subduction.test.d.ts +2 -0
- package/dist/types/src/automerge/automerge-subduction.test.d.ts.map +1 -0
- package/dist/types/src/automerge/collection-synchronizer.d.ts +25 -4
- package/dist/types/src/automerge/collection-synchronizer.d.ts.map +1 -1
- package/dist/types/src/automerge/echo-data-monitor.d.ts.map +1 -1
- package/dist/types/src/automerge/echo-network-adapter.d.ts +23 -10
- package/dist/types/src/automerge/echo-network-adapter.d.ts.map +1 -1
- package/dist/types/src/automerge/echo-replicator.d.ts +46 -15
- package/dist/types/src/automerge/echo-replicator.d.ts.map +1 -1
- package/dist/types/src/automerge/errors.d.ts +35 -0
- package/dist/types/src/automerge/errors.d.ts.map +1 -0
- package/dist/types/src/automerge/handle-state.d.ts +52 -0
- package/dist/types/src/automerge/handle-state.d.ts.map +1 -0
- package/dist/types/src/automerge/heads-store.d.ts +9 -2
- package/dist/types/src/automerge/heads-store.d.ts.map +1 -1
- package/dist/types/src/automerge/index.d.ts +3 -1
- package/dist/types/src/automerge/index.d.ts.map +1 -1
- package/dist/types/src/automerge/leveldb-storage-adapter.d.ts +11 -5
- package/dist/types/src/automerge/leveldb-storage-adapter.d.ts.map +1 -1
- package/dist/types/src/automerge/mesh-echo-replicator-connection.d.ts +9 -8
- package/dist/types/src/automerge/mesh-echo-replicator-connection.d.ts.map +1 -1
- package/dist/types/src/automerge/mesh-echo-replicator.d.ts +6 -5
- package/dist/types/src/automerge/mesh-echo-replicator.d.ts.map +1 -1
- package/dist/types/src/automerge/network-protocol.d.ts.map +1 -1
- package/dist/types/src/automerge/space-collection.d.ts.map +1 -1
- package/dist/types/src/common/codec.d.ts +1 -1
- package/dist/types/src/common/codec.d.ts.map +1 -1
- package/dist/types/src/common/feeds.d.ts.map +1 -1
- package/dist/types/src/common/space-id.d.ts.map +1 -1
- package/dist/types/src/db-host/automerge-data-source.d.ts +35 -0
- package/dist/types/src/db-host/automerge-data-source.d.ts.map +1 -0
- package/dist/types/src/db-host/automerge-data-source.test.d.ts +2 -0
- package/dist/types/src/db-host/automerge-data-source.test.d.ts.map +1 -0
- package/dist/types/src/db-host/automerge-metrics.d.ts.map +1 -1
- package/dist/types/src/db-host/data-service.d.ts +13 -7
- package/dist/types/src/db-host/data-service.d.ts.map +1 -1
- package/dist/types/src/db-host/database-root.d.ts +9 -3
- package/dist/types/src/db-host/database-root.d.ts.map +1 -1
- package/dist/types/src/db-host/documents-synchronizer.d.ts +30 -8
- package/dist/types/src/db-host/documents-synchronizer.d.ts.map +1 -1
- package/dist/types/src/db-host/echo-host.d.ts +74 -28
- package/dist/types/src/db-host/echo-host.d.ts.map +1 -1
- package/dist/types/src/db-host/index.d.ts +2 -0
- package/dist/types/src/db-host/index.d.ts.map +1 -1
- package/dist/types/src/db-host/invalidation-hint.d.ts +19 -0
- package/dist/types/src/db-host/invalidation-hint.d.ts.map +1 -0
- package/dist/types/src/db-host/local-queue-service.d.ts +19 -0
- package/dist/types/src/db-host/local-queue-service.d.ts.map +1 -0
- package/dist/types/src/db-host/query-invalidation.test.d.ts +2 -0
- package/dist/types/src/db-host/query-invalidation.test.d.ts.map +1 -0
- package/dist/types/src/db-host/query-service.d.ts +19 -11
- package/dist/types/src/db-host/query-service.d.ts.map +1 -1
- package/dist/types/src/db-host/queue-data-source.d.ts +38 -0
- package/dist/types/src/db-host/queue-data-source.d.ts.map +1 -0
- package/dist/types/src/db-host/queue-service.test.d.ts +2 -0
- package/dist/types/src/db-host/queue-service.test.d.ts.map +1 -0
- package/dist/types/src/db-host/space-state-manager.d.ts +4 -3
- package/dist/types/src/db-host/space-state-manager.d.ts.map +1 -1
- package/dist/types/src/db-host/stub.d.ts +11 -0
- package/dist/types/src/db-host/stub.d.ts.map +1 -0
- package/dist/types/src/edge/echo-edge-replicator.d.ts +10 -7
- package/dist/types/src/edge/echo-edge-replicator.d.ts.map +1 -1
- package/dist/types/src/edge/echo-edge-subduction-replicator.d.ts +39 -0
- package/dist/types/src/edge/echo-edge-subduction-replicator.d.ts.map +1 -0
- package/dist/types/src/edge/echo-edge-subduction-replicator.test.d.ts +2 -0
- package/dist/types/src/edge/echo-edge-subduction-replicator.test.d.ts.map +1 -0
- package/dist/types/src/edge/index.d.ts +1 -0
- package/dist/types/src/edge/index.d.ts.map +1 -1
- package/dist/types/src/edge/inflight-request-limiter.d.ts.map +1 -1
- package/dist/types/src/filter/filter-match.d.ts +4 -1
- package/dist/types/src/filter/filter-match.d.ts.map +1 -1
- package/dist/types/src/metadata/metadata-store.d.ts +1 -1
- package/dist/types/src/metadata/metadata-store.d.ts.map +1 -1
- package/dist/types/src/pipeline/message-selector.d.ts.map +1 -1
- package/dist/types/src/pipeline/pipeline.d.ts +3 -3
- package/dist/types/src/pipeline/pipeline.d.ts.map +1 -1
- package/dist/types/src/pipeline/timeframe-clock.d.ts.map +1 -1
- package/dist/types/src/query/errors.d.ts +22 -10
- package/dist/types/src/query/errors.d.ts.map +1 -1
- package/dist/types/src/query/plan.d.ts +66 -8
- package/dist/types/src/query/plan.d.ts.map +1 -1
- package/dist/types/src/query/query-executor.d.ts +66 -11
- package/dist/types/src/query/query-executor.d.ts.map +1 -1
- package/dist/types/src/query/query-planner.d.ts +12 -1
- package/dist/types/src/query/query-planner.d.ts.map +1 -1
- package/dist/types/src/space/admission-discovery-extension.d.ts.map +1 -1
- package/dist/types/src/space/auth.d.ts +3 -3
- package/dist/types/src/space/auth.d.ts.map +1 -1
- package/dist/types/src/space/control-pipeline.d.ts +5 -4
- package/dist/types/src/space/control-pipeline.d.ts.map +1 -1
- package/dist/types/src/space/space-manager.d.ts +8 -8
- package/dist/types/src/space/space-manager.d.ts.map +1 -1
- package/dist/types/src/space/space-protocol.d.ts +10 -9
- package/dist/types/src/space/space-protocol.d.ts.map +1 -1
- package/dist/types/src/space/space.d.ts +6 -6
- package/dist/types/src/space/space.d.ts.map +1 -1
- package/dist/types/src/testing/change-metadata.d.ts.map +1 -1
- package/dist/types/src/testing/index.d.ts +0 -2
- package/dist/types/src/testing/index.d.ts.map +1 -1
- package/dist/types/src/testing/test-agent-builder.d.ts +2 -2
- package/dist/types/src/testing/test-agent-builder.d.ts.map +1 -1
- package/dist/types/src/testing/test-feed-builder.d.ts.map +1 -1
- package/dist/types/src/testing/test-network-adapter.d.ts +1 -1
- package/dist/types/src/testing/test-network-adapter.d.ts.map +1 -1
- package/dist/types/src/testing/test-replicator.d.ts +14 -13
- package/dist/types/src/testing/test-replicator.d.ts.map +1 -1
- package/dist/types/src/util.d.ts +1 -1
- package/dist/types/src/util.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +59 -55
- package/src/automerge/automerge-host-subduction.test.ts +263 -0
- package/src/automerge/automerge-host.test.ts +162 -39
- package/src/automerge/automerge-host.ts +679 -201
- package/src/automerge/automerge-repo-subduction.test.ts +1054 -0
- package/src/automerge/automerge-repo.test.ts +349 -91
- package/src/automerge/automerge-subduction.test.ts +330 -0
- package/src/automerge/collection-synchronizer.test.ts +98 -17
- package/src/automerge/collection-synchronizer.ts +141 -37
- package/src/automerge/echo-data-monitor.ts +1 -1
- package/src/automerge/echo-network-adapter.test.ts +5 -4
- package/src/automerge/echo-network-adapter.ts +76 -31
- package/src/automerge/echo-replicator.ts +50 -15
- package/src/automerge/errors.ts +10 -0
- package/src/automerge/handle-state.ts +62 -0
- package/src/automerge/heads-store.ts +42 -3
- package/src/automerge/index.ts +3 -1
- package/src/automerge/leveldb-storage-adapter.ts +77 -11
- package/src/automerge/mesh-echo-replicator-connection.ts +12 -8
- package/src/automerge/mesh-echo-replicator.ts +15 -11
- package/src/automerge/storage-adapter.test.ts +1 -1
- package/src/common/space-id.ts +1 -1
- package/src/db-host/automerge-data-source.test.ts +299 -0
- package/src/db-host/automerge-data-source.ts +187 -0
- package/src/db-host/data-service.ts +35 -26
- package/src/db-host/database-root.ts +20 -8
- package/src/db-host/documents-synchronizer.test.ts +145 -14
- package/src/db-host/documents-synchronizer.ts +163 -51
- package/src/db-host/echo-host.ts +384 -99
- package/src/db-host/index.ts +2 -0
- package/src/db-host/invalidation-hint.ts +50 -0
- package/src/db-host/local-queue-service.ts +127 -0
- package/src/db-host/query-invalidation.test.ts +270 -0
- package/src/db-host/query-service.ts +111 -106
- package/src/db-host/queue-data-source.ts +160 -0
- package/src/db-host/queue-service.test.ts +145 -0
- package/src/db-host/space-state-manager.ts +12 -10
- package/src/db-host/stub.ts +33 -0
- package/src/edge/echo-edge-replicator.test.ts +12 -10
- package/src/edge/echo-edge-replicator.ts +144 -58
- package/src/edge/echo-edge-subduction-replicator.test.ts +158 -0
- package/src/edge/echo-edge-subduction-replicator.ts +377 -0
- package/src/edge/index.ts +1 -0
- package/src/filter/filter-match.test.ts +68 -32
- package/src/filter/filter-match.ts +230 -21
- package/src/metadata/metadata-store.ts +11 -8
- package/src/pipeline/pipeline-stress.test.ts +1 -1
- package/src/pipeline/pipeline.test.ts +2 -2
- package/src/pipeline/pipeline.ts +9 -7
- package/src/query/errors.ts +3 -1
- package/src/query/plan.ts +84 -9
- package/src/query/query-executor.ts +1197 -165
- package/src/query/query-planner.test.ts +993 -81
- package/src/query/query-planner.ts +503 -27
- package/src/space/admission-discovery-extension.ts +3 -3
- package/src/space/auth.ts +6 -6
- package/src/space/control-pipeline.test.ts +5 -4
- package/src/space/control-pipeline.ts +16 -13
- package/src/space/space-manager.browser.test.ts +1 -1
- package/src/space/space-manager.ts +16 -20
- package/src/space/space-protocol.browser.test.ts +15 -14
- package/src/space/space-protocol.test.ts +15 -14
- package/src/space/space-protocol.ts +22 -18
- package/src/space/space.test.ts +3 -3
- package/src/space/space.ts +11 -11
- package/src/testing/index.ts +0 -2
- package/src/testing/test-agent-builder.ts +3 -3
- package/src/testing/test-network-adapter.ts +24 -3
- package/src/testing/test-replicator.ts +19 -20
- package/src/util.ts +7 -3
- package/dist/lib/browser/chunk-35I6ERLG.mjs.map +0 -7
- package/dist/lib/browser/chunk-CGS2ULMK.mjs +0 -11
- package/dist/lib/browser/chunk-CGS2ULMK.mjs.map +0 -7
- package/dist/lib/browser/chunk-TQJTKNMS.mjs +0 -126
- package/dist/lib/browser/chunk-TQJTKNMS.mjs.map +0 -7
- package/dist/lib/browser/index.mjs +0 -4743
- package/dist/lib/browser/index.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/lib/browser/testing/index.mjs.map +0 -7
- package/dist/lib/node/chunk-HOPOFWAL.cjs +0 -147
- package/dist/lib/node/chunk-HOPOFWAL.cjs.map +0 -7
- package/dist/lib/node/chunk-JXX6LF5U.cjs +0 -2084
- package/dist/lib/node/chunk-JXX6LF5U.cjs.map +0 -7
- package/dist/lib/node/chunk-Q7SFCCGT.cjs +0 -33
- package/dist/lib/node/chunk-Q7SFCCGT.cjs.map +0 -7
- package/dist/lib/node/filter/index.cjs +0 -32
- package/dist/lib/node/filter/index.cjs.map +0 -7
- package/dist/lib/node/index.cjs +0 -4699
- package/dist/lib/node/index.cjs.map +0 -7
- package/dist/lib/node/meta.json +0 -1
- package/dist/lib/node/testing/index.cjs +0 -753
- package/dist/lib/node/testing/index.cjs.map +0 -7
- package/dist/lib/node-esm/chunk-5BHLPT24.mjs +0 -2067
- package/dist/lib/node-esm/chunk-5BHLPT24.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +0 -11
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-RVK35BS7.mjs +0 -126
- package/dist/lib/node-esm/chunk-RVK35BS7.mjs.map +0 -7
- package/dist/lib/node-esm/filter/index.mjs +0 -11
- package/dist/lib/node-esm/filter/index.mjs.map +0 -7
- package/dist/lib/node-esm/index.mjs +0 -4743
- package/dist/lib/node-esm/index.mjs.map +0 -7
- package/dist/lib/node-esm/meta.json +0 -1
- package/dist/lib/node-esm/testing/index.mjs +0 -742
- package/dist/lib/node-esm/testing/index.mjs.map +0 -7
- package/dist/types/src/db-host/documents-iterator.d.ts +0 -7
- package/dist/types/src/db-host/documents-iterator.d.ts.map +0 -1
- package/dist/types/src/testing/test-data.d.ts +0 -18
- package/dist/types/src/testing/test-data.d.ts.map +0 -1
- package/dist/types/src/testing/test-schema.d.ts +0 -37
- package/dist/types/src/testing/test-schema.d.ts.map +0 -1
- package/src/db-host/documents-iterator.ts +0 -74
- package/src/testing/test-data.ts +0 -127
- package/src/testing/test-schema.ts +0 -53
- /package/dist/lib/{browser → neutral}/filter/index.mjs.map +0 -0
package/src/query/plan.ts
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import type { QueryAST } from '@dxos/echo-protocol';
|
|
6
|
-
import type { EscapedPropPath } from '@dxos/
|
|
7
|
-
import type { DXN, ObjectId
|
|
6
|
+
import type { EscapedPropPath } from '@dxos/index-core';
|
|
7
|
+
import type { DXN, ObjectId } from '@dxos/keys';
|
|
8
8
|
|
|
9
9
|
export namespace QueryPlan {
|
|
10
10
|
export type TextSearchKind = 'full-text' | 'vector' | 'hybrid';
|
|
@@ -32,7 +32,9 @@ export namespace QueryPlan {
|
|
|
32
32
|
| FilterDeletedStep
|
|
33
33
|
| TraverseStep
|
|
34
34
|
| UnionStep
|
|
35
|
-
| SetDifferenceStep
|
|
35
|
+
| SetDifferenceStep
|
|
36
|
+
| OrderStep
|
|
37
|
+
| LimitStep;
|
|
36
38
|
|
|
37
39
|
/**
|
|
38
40
|
* Clear the current working set.
|
|
@@ -43,20 +45,34 @@ export namespace QueryPlan {
|
|
|
43
45
|
|
|
44
46
|
/**
|
|
45
47
|
* Select objects based on id, typename, or other predicates.
|
|
46
|
-
* Specifies the spaces to select from.
|
|
48
|
+
* Specifies the spaces and/or queues to select from.
|
|
49
|
+
* The results from spaces and queues are unioned together.
|
|
47
50
|
*/
|
|
48
51
|
export type SelectStep = {
|
|
49
52
|
_tag: 'SelectStep';
|
|
50
53
|
|
|
51
|
-
|
|
54
|
+
/**
|
|
55
|
+
* What to select from the scope.
|
|
56
|
+
*/
|
|
52
57
|
selector: Selector;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Where to select from.
|
|
61
|
+
*/
|
|
62
|
+
scope: QueryAST.Scope;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Optional limit on the number of results to select.
|
|
66
|
+
* When set, the index scan can be optimized to stop early.
|
|
67
|
+
*/
|
|
68
|
+
limit?: number;
|
|
53
69
|
};
|
|
54
70
|
|
|
55
71
|
/**
|
|
56
72
|
* Specifier to scan the database for objects.
|
|
57
73
|
* Optimized to utilize database indexes.
|
|
58
74
|
*/
|
|
59
|
-
export type Selector = WildcardSelector | IdSelector | TypeSelector | TextSelector;
|
|
75
|
+
export type Selector = WildcardSelector | IdSelector | TypeSelector | TextSelector | TimestampSelector;
|
|
60
76
|
|
|
61
77
|
export type WildcardSelector = {
|
|
62
78
|
_tag: 'WildcardSelector';
|
|
@@ -90,6 +106,24 @@ export namespace QueryPlan {
|
|
|
90
106
|
|
|
91
107
|
text: string;
|
|
92
108
|
searchKind: TextSearchKind;
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Optionally select only objects of the given typenames.
|
|
112
|
+
*/
|
|
113
|
+
typename: DXN.String[] | null;
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Select objects by timestamp range (createdAt / updatedAt).
|
|
118
|
+
* Uses the ObjectMetaIndex timestamp columns.
|
|
119
|
+
*/
|
|
120
|
+
export type TimestampSelector = {
|
|
121
|
+
_tag: 'TimestampSelector';
|
|
122
|
+
|
|
123
|
+
updatedAfter?: number;
|
|
124
|
+
updatedBefore?: number;
|
|
125
|
+
createdAfter?: number;
|
|
126
|
+
createdBefore?: number;
|
|
93
127
|
};
|
|
94
128
|
|
|
95
129
|
/**
|
|
@@ -110,7 +144,8 @@ export namespace QueryPlan {
|
|
|
110
144
|
step.filter.typename === null &&
|
|
111
145
|
(step.filter.id === undefined || step.filter.id.length === 0) &&
|
|
112
146
|
(step.filter.props === undefined || Object.keys(step.filter.props).length === 0) &&
|
|
113
|
-
(step.filter.foreignKeys === undefined || step.filter.foreignKeys.length === 0)
|
|
147
|
+
(step.filter.foreignKeys === undefined || step.filter.foreignKeys.length === 0) &&
|
|
148
|
+
step.filter.metaKey === undefined
|
|
114
149
|
);
|
|
115
150
|
}
|
|
116
151
|
default:
|
|
@@ -140,7 +175,7 @@ export namespace QueryPlan {
|
|
|
140
175
|
/**
|
|
141
176
|
* Describes a traversal of the object graph.
|
|
142
177
|
*/
|
|
143
|
-
export type Traversal = ReferenceTraversal | RelationTraversal;
|
|
178
|
+
export type Traversal = ReferenceTraversal | RelationTraversal | HierarchyTraversal;
|
|
144
179
|
|
|
145
180
|
/**
|
|
146
181
|
* Traverse a reference connection.
|
|
@@ -150,8 +185,9 @@ export namespace QueryPlan {
|
|
|
150
185
|
|
|
151
186
|
/**
|
|
152
187
|
* Property path where the reference is located.
|
|
188
|
+
* If null, matches references from any property (only valid for incoming direction).
|
|
153
189
|
*/
|
|
154
|
-
property: EscapedPropPath;
|
|
190
|
+
property: EscapedPropPath | null;
|
|
155
191
|
|
|
156
192
|
/**
|
|
157
193
|
* outgoing: the reference points from the anchor object to the target.
|
|
@@ -173,6 +209,19 @@ export namespace QueryPlan {
|
|
|
173
209
|
direction: 'source-to-relation' | 'relation-to-source' | 'target-to-relation' | 'relation-to-target';
|
|
174
210
|
};
|
|
175
211
|
|
|
212
|
+
/**
|
|
213
|
+
* Traverse parent-child hierarchy.
|
|
214
|
+
*/
|
|
215
|
+
export type HierarchyTraversal = {
|
|
216
|
+
_tag: 'HierarchyTraversal';
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* to-parent: traverse from child to parent.
|
|
220
|
+
* to-children: traverse from parent to children.
|
|
221
|
+
*/
|
|
222
|
+
direction: 'to-parent' | 'to-children';
|
|
223
|
+
};
|
|
224
|
+
|
|
176
225
|
/**
|
|
177
226
|
* Combine results from multiple plans.
|
|
178
227
|
* Each of the plans starts with a copy of the current working set.
|
|
@@ -193,4 +242,30 @@ export namespace QueryPlan {
|
|
|
193
242
|
source: Plan;
|
|
194
243
|
exclude: Plan;
|
|
195
244
|
};
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* Order the results of the plan.
|
|
248
|
+
*/
|
|
249
|
+
export type OrderStep = {
|
|
250
|
+
_tag: 'OrderStep';
|
|
251
|
+
|
|
252
|
+
// Defaults to natural order if empty.
|
|
253
|
+
order: readonly QueryAST.Order[];
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* Optional limit on the number of results to return after ordering.
|
|
257
|
+
* When set, the sorting can be optimized to only track the top N elements.
|
|
258
|
+
*/
|
|
259
|
+
// TODO(dmaretskyi): Remove. This doesn't belong here.
|
|
260
|
+
limit?: number;
|
|
261
|
+
};
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* Limit the number of results.
|
|
265
|
+
*/
|
|
266
|
+
export type LimitStep = {
|
|
267
|
+
_tag: 'LimitStep';
|
|
268
|
+
|
|
269
|
+
limit: number;
|
|
270
|
+
};
|
|
196
271
|
}
|