@neo4j/cypher-builder
Version:
A programmatic API for building Cypher queries for Neo4j
28 lines (27 loc) • 1.11 kB
TypeScript
import type { CypherEnvironment } from "../Environment";
import { WithWhere } from "../clauses/mixins/sub-clauses/WithWhere";
import type { Variable } from "../references/Variable";
import { type NodePatternOptions, type Pattern, type RelationshipPatternOptions } from "./Pattern";
import { PatternElement } from "./PatternElement";
export interface PartialPattern extends WithWhere {
}
/** Partial pattern, cannot be used until connected to a node with {@link to}
* @group Patterns
*/
export declare class PartialPattern extends PatternElement {
private readonly length;
private readonly direction;
private readonly previous;
private readonly properties;
private readonly type;
constructor(variable: Variable | undefined, options: RelationshipPatternOptions, previous: Pattern);
/** Connects pattern to a target Node */
to(node: Variable | undefined, options?: NodePatternOptions): Pattern;
to(nodeConfig?: NodePatternOptions): Pattern;
/**
* @internal
*/
getCypher(env: CypherEnvironment): string;
private generateLengthStr;
private getTypeStr;
}