@neo4j/cypher-builder
Version:
A programmatic API for building Cypher queries for Neo4j
23 lines (22 loc) • 597 B
TypeScript
import type { CypherEnvironment } from "../../Environment";
import type { CypherCompilable, Expr } from "../../types";
/**
* @group Lists
*/
export declare class ListIndex implements CypherCompilable {
private readonly value;
private readonly index;
/**
* @internal
*/
constructor(variable: Expr, index: number);
/** @internal */
getCypher(env: CypherEnvironment): string;
}
/** Adds a index access operator (`[ ]`) to an expression
* @example
* ```cypher
* collect(var)[0]
* ```
*/
export declare function listIndex(expr: Expr, index: number): ListIndex;