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
MATCH + CREATE and MATCH + CREATE + RETURN
WHERE: Filter nodes and edges by properties
To filter on node label:Property Match Operators
:→ exact match using property filter in node directly=→ exact match using property filter in WHERE clause
Boolean operators
-
OR -
AND
Comparison operators
-
Equal:
= -
Inequal:
<> -
Less than:
< -
Less than or equal to:
<= -
Greater than:
> -
Greater than or equal to:
>= -
is null:
IS NULL -
is not null:
IS NOT NULL
Data Types
| Type | Example |
|---|---|
| String | 'hello' or "hello" |
| Integer | age=30 |
| Boolean | flag=true |
| Double | score=3.14 |
RETURN Clause
- Select fields with
RETURN n.prop, m.prop
LOAD graphs
Load TuringDB graph
Files have to be available ingraphs subdirectory of turing-dir.
Load external data into TuringDB graph
Files have to be available indata subdirectory of turing-dir.
Metaqueries (CALL)
| Query | Description |
|---|---|
CALL db.propertyTypes() | All node/edge property keys & types |
CALL db.labels() | All node labels |
CALL db.edgeTypes() | All edge types |
CALL db.history() | Commit history |
Engine Commands
| Command | Description |
|---|---|
CREATE GRAPH <name> | Create a new named graph |
LOAD GRAPH <name> | Load an existing graph |
LOAD GML 'mygraph.gml' AS my_graph | Load the specified GML as TuringDB graph. Requires the GML to be accessible in TuringDB directory (--turing-dir, data subdir) |
LOAD JSONL 'mygraph.gml' AS my_graph | Load the specified JSONL as TuringDB graph. Requires the JSONL to be accessible in TuringDB directory (--turing-dir, data subdir) |
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 |

