Interface: Index
Defined in: packages/core/src/indices/index.ts:30
Represents a secondary index on a data structure.
Extended by
Properties
expressions
expressions:
Calculation[]
Defined in: packages/core/src/indices/index.ts:32
The indexed expressions. More expressions result in multi-level index.
Methods
createAccessor()
createAccessor(
expressions):Calculation
Defined in: packages/core/src/indices/index.ts:52
Create an accessor for the given expressions.
Parameters
| Parameter | Type | Description |
|---|---|---|
expressions | IndexMatchInput[] | expressions matched by match |
Returns
- a calculation returning iterable of matched values
match()
match(
expressions,renameMap?):number[]
Defined in: packages/core/src/indices/index.ts:45
Can the index be used to match the given expressions?
Parameters
| Parameter | Type | Description |
|---|---|---|
expressions | IndexMatchInput[] | expressions to match against the index |
renameMap? | RenameMap | rename the expressions before matching |
Returns
number[]
- ordered indices of the expressions that can be matched, or null if none can be matched
reindex()
reindex(
values):void
Defined in: packages/core/src/indices/index.ts:38
Rebuild the index with new values.
Parameters
| Parameter | Type | Description |
|---|---|---|
values | Iterable<IndexFillInput> | the new values to index |
Returns
void