@neo4j/cypher-builder
Version:
A programmatic API for building Cypher queries for Neo4j
27 lines (26 loc) • 950 B
TypeScript
import type { LabelExpr } from "..";
import { CypherASTNode } from "../CypherASTNode";
import type { CypherEnvironment } from "../Environment";
import type { NodeRef } from "../references/NodeRef";
import type { RelationshipRef } from "../references/RelationshipRef";
/** Generates a predicate to check if a node has a label or a relationship has a type
* @see {@link https://neo4j.com/docs/cypher-manual/current/clauses/where/#filter-on-node-label | Cypher Documentation}
* @group Expressions
* @example
* ```cypher
* MATCH(this)
* WHERE this:MyNode
* ```
*/
export declare class HasLabel extends CypherASTNode {
private readonly node;
private readonly expectedLabels;
/**
* @internal
*/
constructor(node: NodeRef | RelationshipRef, expectedLabels: string[] | LabelExpr);
/** @internal */
getCypher(env: CypherEnvironment): string;
private generateLabelExpressionStr;
private validateLabelsInput;
}