Data

Data queries are fully-declarative and use composable polymorphic patterns to match data in a database and to further process it.

Queries

TypeQL data queries can be divided to two groups: read and write queries. Write queries can modify data in a database, but can’t use reasoning. Read queries can retrieve both data from a database and types from its schema. For schema manipulations, use schema queries.

Table 1. Data queries
Query type № of clauses Clause(s) Keyword Mandatory

Write queries

Insert

1-2

Match

match

No

Insert

insert

Yes

Delete

2

Match

match

Yes

Delete

delete

Yes

Update

3

Match

match

Yes

Delete

delete

Yes

Insert

insert

Yes

Read queries

Fetch

2

Match

match

Yes

Fetch

fetch

Yes

Get

2

Match

match

Yes

Get

get

Yes

Patterns

All Data queries use a match clause to select data from a database to work with and subsequent one or two clauses to specify what to do with it. For more information on pattern-based matching, see the Match clause page.

Provide Feedback