@neo4j/cypher-builder
Version:
A programmatic API for building Cypher queries for Neo4j
72 lines (71 loc) • 2.84 kB
TypeScript
import type { Variable } from "../../references/Variable";
import type { Expr } from "../../types";
import { CypherFunction } from "./CypherFunctions";
/**
* @see {@link https://neo4j.com/docs/cypher-manual/current/functions/list/#functions-keys | Cypher Documentation}
* @group Functions
* @category List
*/
export declare function keys(expr: Expr): CypherFunction;
/**
* @see {@link https://neo4j.com/docs/cypher-manual/current/functions/list/#functions-labels | Cypher Documentation}
* @group Functions
* @category List
*/
export declare function labels(nodeRef: Expr): CypherFunction;
/**
* @see {@link https://neo4j.com/docs/cypher-manual/current/functions/list/#functions-range | Cypher Documentation}
* @group Functions
* @category List
*/
export declare function range(start: Expr | number, end: Expr | number, step?: Expr | number): CypherFunction;
/**
* @see {@link https://neo4j.com/docs/cypher-manual/current/functions/list/#functions-reverse-list | Cypher Documentation}
* @group Functions
* @category List
*/
export declare function reverse(list: Expr): CypherFunction;
/**
* @see {@link https://neo4j.com/docs/cypher-manual/current/functions/list/#functions-tail | Cypher Documentation}
* @group Functions
* @category List
*/
export declare function tail(list: Expr): CypherFunction;
/**
* @see {@link https://neo4j.com/docs/cypher-manual/current/functions/list/#functions-tobooleanlist | Cypher Documentation}
* @group Functions
* @category List
*/
export declare function toBooleanList(list: Expr): CypherFunction;
/**
* @see {@link https://neo4j.com/docs/cypher-manual/current/functions/list/#functions-tofloatlist | Cypher Documentation}
* @group Functions
* @category List
*/
export declare function toFloatList(list: Expr): CypherFunction;
/**
* @see {@link https://neo4j.com/docs/cypher-manual/current/functions/list/#functions-tointegerlist | Cypher Documentation}
* @group Functions
* @category List
*/
export declare function toIntegerList(list: Expr): CypherFunction;
/**
* @see {@link https://neo4j.com/docs/cypher-manual/current/functions/list/#functions-tostringlist | Cypher Documentation}
* @group Functions
* @category List
*/
export declare function toStringList(list: Expr): CypherFunction;
/** Reduce a list by executing given expression.
* @see {@link https://neo4j.com/docs/cypher-manual/current/functions/list/#functions-reduce | Cypher Documentation}
* @group Functions
* @category List
* @example
* ```ts
* Cypher.reduce(totalAge, new Cypher.Literal(0), n, Cypher.nodes(p), Cypher.plus(totalAge, n.property("age")));
* ```
* _Cypher:_
* ```cypher
* reduce(totalAge = 0, n IN nodes(p) | totalAge + n.age)
* ```
*/
export declare function reduce(accVariable: Variable, defaultValue: Expr, variable: Variable, listExpr: Expr, mapExpr: Expr): CypherFunction;