🔍 MATCH: Pattern Matching
()→ Node[]→ Edge-→ Undirected edge- Labels:
:Label - Properties:
{key="value", age=30}
🛠 CREATE: Add Nodes & Edges
- Labels required for node creation
- No
RETURNclause - Use commas to create multiple items at once
🎯 Property Match Operators
-
:→ exact match -
~=→ string approximation (prefix-based, case-insensitive)
📦 Data Types
| Type | Example |
|---|---|
| String | "hello" or 'hello' |
| Integer | age=30 |
| Unsigned | age=30u |
| Boolean | flag=true |
| Double | score=3.14 |
✨ RETURN Clause
RETURN *→ expands to all variables- Select fields with
RETURN n.prop, m.prop
📌 Node ID Injection
- Use
@orATto reference internal IDs
🔬 Metaqueries (CALL)
| Query | Description |
|---|---|
CALL db.properties() | All node/edge property keys & types |
CALL db.labels() | All node labels |
CALL db.edgetypes() | All edge types |
CALL db.labelsets() | Combinations of labels |
🔧 Engine Commands
| Command | Description |
|---|---|
CREATE GRAPH <name> | Create a new named graph |
LOAD GRAPH <name> | Load an existing graph |
LIST GRAPH | List all available graphs |
HISTORY | Show commit history (versioning) |
CHANGE NEW | Create a new isolated change |
CHANGE SUBMIT | Merge current change into main |
CHANGE DELETE | Delete current change |
CHANGE LIST | List active uncommitted changes |
🧠 Useful Patterns
📘 Best Practices
- Use
CALL db.properties()to discover property keys - Use
RETURN *while prototyping - Use
@for precise node editing or merging - Avoid regex — use
~=for faster fuzzy search - All edges are directed

