TypeQL is the query language of TypeDB.

Conceptual and intuitive

TypeQL is based directly on the conceptual PERA data model of TypeDB. Its queries comprise sequences of statements that assemble into patterns. This mirrors natural language and makes it easy and intuitive to express even highly complex queries.

Fully declarative and composable

TypeQL is fully declarative, allowing us to define query patterns without considering execution strategy. The user only composes sets of requirements, and TypeDB finds all matching data to process.

A fully variablizable language

Any concept in TypeQL can be variablized in a query – even types! This enables TypeQL to express powerful parametric database operations.

Built for consistency

TypeQL patterns are underpinned by a powerful strong type system that ensures safety and consistency of database applications.

Schema and data manipulation

As a DDL, TypeQL lets us define a schema of a database.

As a DML, TypeQL lets us query (read&write) data of a database.

Syntax and grammar

The complete set of the TypeQL grammar can be seen in the ANTLR v.4 specification file: TypeQL.g4.

For query examples, see the TypeDB in 25 queries page.

Provide Feedback