@neo4j/cypher-builder
Version: 
A programmatic API for building Cypher queries for Neo4j
34 lines (33 loc) • 1.12 kB
TypeScript
import type { BuildConfig } from "./Cypher";
import { Param } from "./references/Param";
import type { Variable } from "./references/Variable";
export type EnvPrefix = {
    params?: string;
    variables?: string;
};
export type EnvConfig = {
    labelOperator: NonNullable<BuildConfig["labelOperator"]>;
    unsafeEscapeOptions: NonNullable<BuildConfig["unsafeEscapeOptions"]>;
    cypherVersion: BuildConfig["cypherVersion"];
};
/** Hold the internal references of Cypher parameters and variables
 * @group Internal
 */
export declare class CypherEnvironment {
    private readonly globalPrefix;
    private readonly references;
    private readonly params;
    readonly config: EnvConfig;
    /**
     *  @internal
     */
    constructor(prefix?: string, config?: Partial<EnvConfig>);
    getReferenceId(reference: Variable): string;
    getParams(): Record<string, unknown>;
    addExtraParams(params: Record<string, Param>): void;
    addNamedParamReference(name: string, param: Param): void;
    getParamsSize(): number;
    private addParam;
    private addVariableReference;
    private isNamedReference;
}