Matches a node with optional variable, labels, and properties.
(<variable>:<Label> {<prop>: <val>, ...})
## Overview The node pattern is the fundamental building block of Cypher pattern matching. It describes a single node to match within the graph, optionally filtered by variable binding, labels, and inline property constraints. Node patterns appear inside parentheses and are used within MATCH, CREATE, MERGE, and other pattern-accepting clauses. In DeltaForge, each node in the graph corresponds to a row in a Delta table registered as the node source in the graph definition. Labels map to a designated label column, and properties map to other columns in the same table. When a node pattern specifies labels or properties, the engine applies these as filters during CSR traversal. ## Behavior - An empty node pattern `()` matches any node in the graph without binding it to a variable. - A variable name (e.g., `(n)`) binds the matched node so it can be referenced in WHERE, RETURN, SET, and other clauses. - Label constraints filter nodes by the label column. The label value must exactly match the specified string (case-sensitive). - Property constraints in the inline map are evaluated as equality predicates pushed into the traversal engine. This is equivalent to, and optimized identically to, a WHERE clause with the same conditions. - Multiple labels on a single node pattern require the node to satisfy all labels (AND semantics). Multiple relationship types use OR semantics, but node labels use AND. ## Limitations - Wildcard label matching (e.g., match any label starting with 'Emp') is not supported. Use WHERE with string predicates for partial label matching. - Inline property constraints support only equality. For range comparisons or complex predicates, use the WHERE clause. - Node patterns with a WHERE predicate inside the parentheses (extended syntax) are supported for filtering within the pattern definition, but mixing inline WHERE with inline property maps is not allowed.
| Name | Type | Description |
|---|---|---|
variable | Binds the matched node to a named variable for reference in subsequent clauses. Omit to match anonymously when the node identity is not needed downstream. | |
labels | Specifies one or more node labels to filter by. Multiple labels are treated as a conjunction (the node must have all specified labels). Labels map to the label column(s) in the underlying Delta table. | |
properties | Specifies inline property constraints as key-value pairs. Each entry is evaluated as an equality predicate (equivalent to WHERE n.key = value). Property names correspond to columns in the backing Delta table. |
-- Anonymous node: match all nodes
()
-- Named node without label filter
(n)
-- Node with a single label
(p:Employee)
-- Node with label and property constraints
(p:Employee {name: 'Dr. Chen', department: 'Neurology'})
-- Node with multiple labels (conjunction)
(p:Employee:Senior)
-- Used in a full query: match employees in a specific city
USE my_zone.my_schema.my_graph
MATCH (n:Employee {city: 'London'})
RETURN n.name AS name, n.department AS dept;