UltipaDocs
Try Playground
  • Introduction
    • Overview
    • Node and Edge Patterns
    • Path Patterns
    • Quantified Paths
    • Shortest Paths
    • Graph Patterns
    • Overview
    • Typed Graph
    • Open Graph
    • Graph Sharding and Storage
    • Constraints
    • Unique Identifiers
    • INSERT
    • INSERT OVERWRITE
    • UPSERT
    • SET
    • REMOVE
    • DELETE
    • Query Composition
    • Result Table and Visualization
    • MATCH
    • OPTIONAL MATCH
    • FILTER
    • LET
    • FOR
    • ORDER BY
    • LIMIT
    • SKIP
    • CALL
    • RETURN
    • Composite Query
    • NEXT
    • All Functions
    • Scalar Functions
    • Path Functions
    • Aggregate Functions
    • Mathematical Functions
    • Trigonometric Functions
    • String Functions
    • List Functions
    • Datetime Functions
    • Spatial Functions
    • Table Functions
  • Operators
  • Predicates
  • Expressions
    • Index
    • Full-text Index
    • Vector Index
    • Managing HDC Graphs
    • HDC Graph Queries
  • Transaction
  • Trigger
    • Process
    • Job
    • Execution Plan
    • Variables
    • Values and Types
    • Comments
    • Reserved Words
    • Syntactic Notation
  • Access Control
  • GQL Conformance
  1. Docs
  2. /
  3. ISO GQL
  4. /
  5. Graph Pattern Matching

Graph Pattern Matching

Overview

In GQL, Graph Pattern Matching (GPM) is the fundamental operation used to query graph databases. GPM is the process of declaratively searching for nodes, edges, and paths within a graph that conform to a specified structural pattern.

The matching operation is performed using the MATCH statement. This statement instructs the database engine to traverse the graph and retrieve all instances of the data structure defined by your pattern.

A graph pattern is an assembly of smaller components. A graph pattern is a list of one or more path patterns, and a path pattern is built from individual node and edge patterns.

You may follow the sequence below to learn how to write graph patterns in GQL:

  • Node and Edge Patterns
  • Path Patterns
  • Quantified Paths
  • Shortest Paths
  • Graph Patterns