Skip to main content

Class: ConnectionIndex

Defined in: lang-cypher/src/indices/connection-index.ts:22

A secondary index that translates joins based on connected nodes into graph lookups. This index does not actually store any indexed data.

Implements

Constructors

Constructor

new ConnectionIndex(expressions, db): ConnectionIndex

Defined in: lang-cypher/src/indices/connection-index.ts:30

Parameters

ParameterTypeDescription
expressionsCalculation[]Index key expressions - the edge or node identifiers this index is built on.
dbDortDBAsFriend-

Returns

ConnectionIndex

Properties

adapter

protected adapter: CypherDataAdapter

Defined in: lang-cypher/src/indices/connection-index.ts:28

Graph data adapter retrieved from the registered Cypher language.


calcBuilders

protected calcBuilders: Record<string, PlanVisitor<CalculationParams>>

Defined in: lang-cypher/src/indices/connection-index.ts:26

Calculation builders keyed by language name, used when building the accessor calculation.


eqCheckers

protected eqCheckers: Record<string, EqualityChecker>

Defined in: lang-cypher/src/indices/connection-index.ts:24

Equality checkers keyed by language name, used when building the accessor calculation.


expressions

expressions: Calculation[]

Defined in: lang-cypher/src/indices/connection-index.ts:32

Index key expressions - the edge or node identifiers this index is built on.

Implementation of

Index.expressions

Methods

createAccessor()

createAccessor(expressions): Calculation

Defined in: lang-cypher/src/indices/connection-index.ts:72

Create an accessor for the given expressions.

Parameters

ParameterTypeDescription
expressionsIndexMatchInput[]expressions matched by match

Returns

Calculation

  • a calculation returning iterable of matched values

Implementation of

Index.createAccessor


match()

match(exprs, renameMap?): number[]

Defined in: lang-cypher/src/indices/connection-index.ts:43

Can the index be used to match the given expressions?

Parameters

ParameterTypeDescription
exprsIndexMatchInput[]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

Implementation of

Index.match


matchesFromItemKey()

protected matchesFromItemKey(expr, renames?): boolean

Defined in: lang-cypher/src/indices/connection-index.ts:60

Returns true when any dependency of expr is mapped to the fromItemIndexKey, meaning the expression references the current from-item and can be satisfied by a graph traversal.

Parameters

ParameterType
exprASTIdentifier | PlanOperator
renames?RenameMap

Returns

boolean


reindex()

reindex(values): void

Defined in: lang-cypher/src/indices/connection-index.ts:42

Rebuild the index with new values.

Parameters

ParameterTypeDescription
valuesIterable<IndexFillInput>the new values to index

Returns

void

Implementation of

Index.reindex