YQL supports container types to define complex data structures organized in various ways.
Values of container types can be passed to YQL queries as input parameters or returned from YQL queries as columns of the set of results.
Container types can't be used as column data types for YDB tables.
||A variable-length sequence consisting of same-type elements.|
||Set of key-value pairs with a fixed type of keys and values.|
||A set of elements with a fixed type is a special case of a dictionary with the
||Set of unnamed fixed-length elements with types specified for all elements.|
||A set of named fields with specified value types, fixed at query start (must be data-independent).|
||Single-pass iterator by same-type values, not serializable|
|Variant on tuple||
||A tuple known to have exactly one element filled|
|Variant on structure||
||A structure known to have exactly one element filled|
||A container with exactly one enumeration element selected and defined only by its name.|
If necessary, you can nest containers in any combination, for example,
In certain contexts, optional values can also be considered a container type (
Optional<Type>) that behaves like a list of length 0 or 1.
To create literals of list containers, dictionary containers, set containers, tuple containers, or structure containers, you can use the operator notation.
To create a variant literal over a tuple or structure, use the function Variant.
To create an enumeration literal, use the function Enum.
To access the container elements, use a dot or square brackets, depending on the container type.