@neo4j/cypher-builder
Version:
A programmatic API for building Cypher queries for Neo4j
28 lines (27 loc) • 1.15 kB
TypeScript
import type { CypherEnvironment } from "../Environment";
import { type ListIndex } from "../expressions/list/ListIndex";
import type { ListRange } from "../expressions/list/ListRange";
import type { CypherCompilable, Expr } from "../types";
import type { Variable } from "./Variable";
/** Reference to a variable property
* @group Variables
* @example `new Node({labels: ["Movie"]}).property("title")`
*/
export declare class PropertyRef implements CypherCompilable {
private readonly _variable;
private readonly propertyPath;
/**
* @internal
*/
constructor(variable: Variable, ...properties: Array<string | Expr>);
get variable(): Variable;
/** Access individual property via the PropertyRef class, using dot notation or square brackets notation if an expression is provided */
property(prop: string | Expr): PropertyRef;
/** Access individual elements in the list */
index(index: number): ListIndex;
/** Adds a list range operator (`[ .. ]`) */
range(from: number, to: number): ListRange;
/** @internal */
getCypher(env: CypherEnvironment): string;
private getPropertyCypher;
}