GQL Query Language¶
GQL (Graph Query Language) is the ISO standard for querying property graphs (ISO/IEC 39075). Grafeo implements GQL as its primary query language.
Overview¶
GQL uses pattern matching to query and manipulate graph data. If you're familiar with Cypher, you'll find GQL very similar.
Quick Reference¶
| Operation | Syntax |
|---|---|
| Match nodes | MATCH (n:Label) |
| Match edges | MATCH (a)-[:TYPE]->(b) |
| Filter | WHERE n.property > value |
| Return | RETURN n.property |
| Create | INSERT (:Label {prop: value}) |
| Update | SET n.property = value |
| Delete | DELETE n |
Learn More¶
-
MATCH, RETURN, and basic pattern matching.
-
Node and edge patterns in detail.
-
WHERE clauses and conditions.
-
COUNT, SUM, AVG, and grouping.
-
Variable-length paths and shortest paths.
-
INSERT, SET, DELETE operations.