UNPKG

@neo4j/cypher-builder

Version:

A programmatic API for building Cypher queries for Neo4j

36 lines (35 loc) 1.48 kB
import { Clause } from "../clauses/Clause"; import type { CypherEnvironment } from "../Environment"; import type { Literal } from "../references/Literal"; import type { Param } from "../references/Param"; import type { Variable } from "../references/Variable"; import type { Expr } from "../types"; import type { YieldProjectionColumn } from "./Yield"; import { Yield } from "./Yield"; /** @group Procedures */ export type InputArgument<T extends string | number> = T | Variable | Literal<T> | Param<T>; /** Cypher Procedure that does not yield columns * @see {@link https://neo4j.com/docs/cypher-manual/current/clauses/call/ | Cypher Documentation} * @group Procedures */ export declare class VoidCypherProcedure extends Clause { protected name: string; private readonly params; protected _optional: boolean; constructor(name: string, params?: Array<Expr>, namespace?: string); optional(): this; /** @internal */ getCypher(env: CypherEnvironment): string; private getProcedureCypher; protected generateOptionalStr(): string; } /** Cypher Procedure * @see {@link https://neo4j.com/docs/cypher-manual/current/clauses/call/ | Cypher Documentation} * @group Procedures */ export declare class CypherProcedure<T extends string = string> extends VoidCypherProcedure { private yieldStatement; yield(...columns: Array<"*" | YieldProjectionColumn<T>>): Yield<T>; /** @internal */ getCypher(env: CypherEnvironment): string; }