UNPKG

@neo4j/cypher-builder

Version:

A programmatic API for building Cypher queries for Neo4j

24 lines (23 loc) 647 B
import type { CypherEnvironment } from "../../Environment"; import type { CypherCompilable, Expr } from "../../types"; /** * @group Lists */ export declare class ListRange implements CypherCompilable { private readonly value; private readonly from; private readonly to; /** * @internal */ constructor(variable: Expr, from: number, to: number); /** @internal */ getCypher(env: CypherEnvironment): string; } /** Adds a list range operator (`[ .. ]`) to an expression * @example * ```cypher * collect(var)[1..2] * ``` */ export declare function listRange(expr: Expr, from: number, to: number): ListRange;