EdgeQL Tutorial

Scalars

Subtopics

Tuples, like arrays, are ordered collections of scalar values, but the elements don't have to be the same type. In fact, tuple elements can be any type including arrays and tuples:

Input
Run
Output Objects
Press the 'Run' button to evaluate the input

Tuple elements can be accessed by specifying an index after a .:

Input
Run
Output Objects
Press the 'Run' button to evaluate the input

Tuples can also give names to their elements. In that case the tuple elements can be accessed by either name or index:

Input
Run
Output Objects
Press the 'Run' button to evaluate the input
Input
Run
Output Objects
Press the 'Run' button to evaluate the input
Input
Run
Output Objects
Press the 'Run' button to evaluate the input

You can also use casts to change the type of the elements inside tuples by using a "nested" cast notation:

Input
Run
Output Objects
Press the 'Run' button to evaluate the input