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
| Parameter | Type | Description |
|---|---|---|
expressions | Calculation[] | Index key expressions - the edge or node identifiers this index is built on. |
db | DortDBAsFriend | - |
Returns
ConnectionIndex
Properties
adapter
protectedadapter:CypherDataAdapter
Defined in: lang-cypher/src/indices/connection-index.ts:28
Graph data adapter retrieved from the registered Cypher language.
calcBuilders
protectedcalcBuilders: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
protectedeqCheckers: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
Methods
createAccessor()
createAccessor(
expressions):Calculation
Defined in: lang-cypher/src/indices/connection-index.ts:72
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
Implementation of
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
| Parameter | Type | Description |
|---|---|---|
exprs | 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
Implementation of
matchesFromItemKey()
protectedmatchesFromItemKey(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
| Parameter | Type |
|---|---|
expr | ASTIdentifier | 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
| Parameter | Type | Description |
|---|---|---|
values | Iterable<IndexFillInput> | the new values to index |
Returns
void