Keyword glossary
Schema queries
define
-
Denotes the beginning of a Define query, used to add new types, constraints, or functions to the schema.
undefine
-
Denotes the beginning of a Undefine query, used to remove existing types, constraints, or functions from the schema.
redefine
-
Denotes the beginning of a Redefine query, used to modify existing types, constraints, or functions in the schema.
Data pipeline stages
Data manipulation stages
match
-
Denotes the beginning of a Match stage in a data pipeline, sed to match existing data instances in the database.
fetch
-
Denotes the beginning of a Fetch stage in a data pipeline, used to format the output of a data pipeline into JSON.
insert
-
Denotes the beginning of an Insert stage in a data pipeline, used to add new data instances into the database.
delete
-
Denotes the beginning of a Delete stage in a data pipeline, used to remove existing data instances from the database.
update
-
Denotes the beginning of an Update stage in a data pipeline, used to modify existing data instances in the database.
put
-
Denotes the beginning of a Put stage in a data pipeline, used to add new data instances to the database if they do not already exist.
Stream manipulation stages
select
-
Denotes the beginning of a Select operator in a data pipeline, used to keep specified variables for each element of the data stream and remove the rest.
require
-
Denotes the beginning of a Require stage in a data pipeline, used to remove elements from the data stream that do not contain specified optional variables.
sort
-
Denotes the beginning of a Sort operator in a data pipeline, used to order the elements of the data stream based on the value of specified variables.
limit
-
Denotes the beginning of a Limit operator in a data pipeline, used to keep a specified number of elements of the data stream and remove the rest.
offset
-
Denotes the beginning of an Offset operator in a data pipeline, used to remove a specified number of elements from the data stream.
reduce
-
Denotes the beginning of a Reduce operator in a data pipeline, used to perform reduction operations on the data stream according to specified groupings.
Special stages
with
-
Denotes the beginning of a With stage in a data pipeline, used to define functions on an ad-hoc basis for use in the data pipeline.
Pattern logic
or
-
Constructs a disjunction in a query pattern.
not
-
Constructs a negation in a query pattern.
try
-
Constructs an optional in a query pattern.
Statements
Type definition statements
entity
-
Constructs an
entity
statement, used to define a new entity type. relation
-
Constructs a
relation
statement, used to define a new relation type. attribute
-
Constructs an
attribute
statement, used to define a new attribute type. struct
-
Constructs a
struct
statement, used to define a new struct type. fun
-
Constructs a
fun
statement, used to to define a new function.
Constraint definition statements
sub
/sub!
-
Constructs a
sub
statement, used to define the supertype of a type. relates
/relates … as
-
Constructs a
relates
statement, used to define a new role for a relation type. plays
-
Constructs a
plays
statement, used to define a new roleplayer for a role. value
-
Constructs a
value
statement, used to define the value type of an attribute type. owns
-
Constructs an
owns
statement, used to define a new owner of an attribute type. alias
-
Constructs an
alias
statement, used to define an alias label for a type.
Instance statements
isa
/isa!
-
Constructs an
isa
statement, used to specify the type of a data instance. links
-
Constructs a
links
statement, used to specify the roleplayers in a relation. has
-
Constructs a
has
statement, used to specify an attribute of an entity or relation. is
-
Constructs an
is
statement, used to specify that two variables represent the same data instance. let … =
-
Constructs a
let … =
statement, used to assign the result of an expression to a variable. let … in
-
Constructs a
let … in
statement, used to assign a stream or list element to a variable. contains
-
Constructs a
contains
statement, used to specify that a stream or list contains a data instance, or that a string contains a specified substring. like
-
Constructs a
like
statement, used to specify that a string matches a specified regex pattern.
Identity statements
label
-
Constructs a
label
statement, used to identify a type by its label. iid
-
Constructs an
iid
statement, used to identify a data instance by its internal ID.
Annotations
Cardinality constraints
@card
-
Describes a
@card
annotation, used to specify cardinality ranges for roles and ownerships. @cascade
-
Describes a
@cascade
annotation, used to specify behaviour when deleting a relation’s roleplayers. @independent
-
Describes an
@independent
annotation, used to prevent attributes without owners from being deleted automatically.
Modality constraints
@abstract
-
Describes an
@abstract
annotation, used to specify that a type or role is abstract. @key
-
Describes a
@key
annotation, used to specify key attributes for entities and relations. @subkey
-
Describes a
@subkey
annotation, used to specify composite keys built from multiple attributes. @unique
-
Describes a
@unique
annotation, used to specify unique attributes for entities and relations.
Value constraints
@values
-
Describes a
@values
annotation, used to specify a set of permitted values for attributes. @range
-
Describes a
@range
annotation, used to specify a range of permitted values for attributes. @regex
-
Describes a
@regex
annotation, used to specify a regex pattern for permitted values of attributes. @distinct
-
Describes a
@distinct
annotation, used to restrict an owned list of attributes to distinct values.
Reductions
check
-
Reduces the stream to a boolean value, indicating whether it contains any elements. See 3.x@typeql::values/reductions.adoc for more information.
first
-
Reduces the stream to the first occurrence of a specified variable. See 3.x@typeql::values/reductions.adoc for more information.
count
-
Reduces the stream to the number of occurrences of a specified variable. See 3.x@typeql::values/reductions.adoc for more information.
max
-
Reduces the stream to the maximum value of a specified variable. See 3.x@typeql::values/reductions.adoc for more information.
min
-
Reduces the stream to the minimum value of a specified variable. See 3.x@typeql::values/reductions.adoc for more information.
mean
-
Reduces the stream to the arithmetic mean of a specified variable. See 3.x@typeql::values/reductions.adoc for more information.
median
-
Reduces the stream to the median of a specified variable. See 3.x@typeql::values/reductions.adoc for more information.
std
-
Reduces the stream to the (population) standard deviation of a given variable. See 3.x@typeql::values/reductions.adoc for more information.
sum
-
Reduces the stream to the sum over a specified variable. See 3.x@typeql::values/reductions.adoc for more information.
list
-
Reduces the stream to a list of occurrences of a specified variable. See 3.x@typeql::values/reductions.adoc for more information.
Value types
boolean
-
Declares the values of an attribute type to be booleans. See 3.x@typeql::values/primitives.adoc for more information.
long
-
Declares the values of an attribute type to be 64-bit signed integers. See 3.x@typeql::values/primitives.adoc for more information.
double
-
Declares the values of an attribute type to be 64-bit floating point numbers. See 3.x@typeql::values/primitives.adoc for more information.
decimal
-
Declares the values of an attribute type to be decimals, comprising a 64-bit signed integer component and 64-bit unsigned component representing up to 19 decimal places. See 3.x@typeql::values/primitives.adoc for more information.
datetime-tz
-
Declares the values of an attribute type to be nanosecond-precision ISO timestamps with timezones. See 3.x@typeql::values/primitives.adoc for more information.
datetime
-
Declares the values of an attribute type to be nanosecond-precision ISO timestamps without timezones. See 3.x@typeql::values/primitives.adoc for more information.
date
-
Declares the values of an attribute type to be ISO dates. See 3.x@typeql::values/primitives.adoc for more information.
duration
-
Declares the values of an attribute type to be ISO durations. See 3.x@typeql::values/primitives.adoc for more information.
string
-
Declares the values of an attribute type to be variable length UTF-8 encoded strings. See 3.x@typeql::values/primitives.adoc for more information.
Built-in functions
round(…)
-
Rounding function, returns the provided numeric argument rounded to the nearest integer. See 3.x@typeql::values/operators.adoc for more information.
ceil(…)
-
Ceiling function, returns the provided numeric argument rounded to the nearest greater integer. See 3.x@typeql::values/operators.adoc for more information.
floor(…)
-
Floor function, returns the provided numeric argument rounded to the nearest lesser integer. See 3.x@typeql::values/operators.adoc for more information.
abs(…)
-
Modulus function, returns the absolute value of the provided numeric argument. See 3.x@typeql::values/operators.adoc for more information.
length(…)
-
Length function, returns the length of the provided list argument. See 3.x@typeql::values/operators.adoc for more information.
min(…)
-
Minimum function, returns the minimum value of the provided list argument. See 3.x@typeql::values/operators.adoc for more information.
max(…)
-
Maximum function, returns the maximum value of the provided list argument. See 3.x@typeql::values/operators.adoc for more information.
Miscellaneous
asc
-
Used to specify ascending order for Sort stages in data pipelines.
desc
-
Used to specify descending order for Sort stages in data pipelines.
return
-
Denotes the return signature of a function. See Writing functions for more information.
of
-
Used to remove ownership of attributes and players of roles in Delete stages of data pipelines.
from
-
Used to remove traits, role specialisation, and annotations in Undefine queries.
in
-
Used to access stream or list elements. See
let … in
statement for more information. as
-
Used to specialise a role. See
relates
statement for more information.