@neo4j/cypher-builder
Version:
A programmatic API for building Cypher queries for Neo4j
26 lines (25 loc) • 1.15 kB
TypeScript
import type { Literal } from "../../../references/Literal";
import { PropertyRef } from "../../../references/PropertyRef";
import { Variable } from "../../../references/Variable";
import type { Predicate } from "../../../types";
import { Where } from "../../sub-clauses/Where";
import { Mixin } from "../Mixin";
/** @inline */
type VariableLike = Variable | Literal | PropertyRef;
export declare abstract class WithWhere extends Mixin {
protected whereSubClause: Where | undefined;
/** Add a `WHERE` subclause
* @see {@link https://neo4j.com/docs/cypher-manual/current/clauses/where/ | Cypher Documentation}
*/
where(input: Predicate | undefined): this;
where(target: Variable | PropertyRef, params: Record<string, VariableLike>): this;
/** Shorthand for `AND` operation after a `WHERE` subclause
*/
and(input: Predicate | undefined): this;
and(target: Variable | PropertyRef, params: Record<string, VariableLike>): this;
private updateOrCreateWhereClause;
private createWhereInput;
/** Transforms a simple input into an operation sub tree */
private variableAndObjectToOperation;
}
export {};