UNPKG

@neo4j/cypher-builder

Version:

A programmatic API for building Cypher queries for Neo4j

25 lines (24 loc) 991 B
import { CypherASTNode } from "../../CypherASTNode"; import type { CypherEnvironment } from "../../Environment"; import type { Expr } from "../../types"; /** Represents a Cypher Function, all Cypher functions provided by the library extend from this class, and it can be used to use custom functions * @see {@link https://neo4j.com/docs/cypher-manual/current/functions/ | Cypher Documentation} * @group Functions * @example * ```ts * const myFunction = new Cypher.Function("myFunction", [new Cypher.Literal("test"), new Cypher.Param("test2")]); * ``` * _Cypher:_ * ```cypher * myFunction("test", $param0) * ``` */ export declare class CypherFunction extends CypherASTNode { protected name: string; private readonly params; constructor(name: string, params?: Array<Expr>, namespace?: string); /** @internal */ getCypher(env: CypherEnvironment): string; protected addParam(param: Expr): void; protected serializeParams(env: CypherEnvironment): string; }