2.7. The Trovares Query Language (TQL)

At this point you have loaded data into the system and defined vertex and edge frames with their associated schemas in order to represent your data as a graph. This document discusses how to phrase and ask interesting queries on graph data stored in the xGT system.

The Trovares Query Language (TQL) uses a subset of the Cypher language to express queries. The supported subset of Cypher enables powerful and expressive queries, while taking advantage of xGT’s strongly typed graph elements in order to achieve very high performance and scalability.

A TQL query consists of a combination of the following components, all of which are optional:

TQL’s Cypher subset has specific syntax for each component of a query:

MATCH "structure"
WHERE "constraints on graph elements"
OPTIONAL MATCH "structure"
UNWIND "list"
CALL "procedure" [YIELD]
SET "property modifications"
MERGE "additions of vertices"
CREATE "additions of vertices and edges"
DETACH DELETE "deletions of vertices"
DELETE "deletions of edges"
WITH "query part separator"
RETURN "description of the results set"
"solution modifiers"
UNION/UNION ALL "union subquery separator"
INTO "results table name"

Note that if there are no constraints supplied, the WHERE keyword should not be present in the query.

We describe each of these components in detail in later sections.