Skip to main content

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

ParameterTypeDescription
expressionsIndexMatchInput[]expressions matched by match

Returns

Calculation

  • 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

ParameterTypeDescription
expressionsIndexMatchInput[]expressions to match against the index
renameMap?RenameMaprename 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

ParameterTypeDescription
valuesIterable<IndexFillInput>the new values to index

Returns

void