List and array values
Plain bracket list constructors execute as Arrow lists. LIST and ARRAY prefixed constructors are accepted by the parser but are not executed.
RETURN [1, 2, 3] AS numbers, [] AS empty, ['Alice', 'Bob'] AS names;Lists can contain nulls and compatible numeric values. A null byte string is a null element of that list, as with numbers, strings and booleans. Nested lists find a common supported element type, including empty and all-null sublists. General heterogeneous union-valued lists are not executable.
FOR value IN [X'0A', NULL, X'FF']RETURN value;Comparisons widen integer and float lists to one element type, and they accept an empty list beside a typed list. [1, 2] = [1.0, 2.0] is true and [1] = [] is false. COALESCE and NULLIF use the same list type.
FOR expands lists. Paths and quantified groups produce lists of graph references; COLLECT_LIST can collect supported values. Explicit list/array type declarations, including maximum lengths, are described under value types.
TRIM(list, count) is parsed but not implemented by the query engine. See list trimming.
Prefixed constructor syntax
Section titled “Prefixed constructor syntax”The following forms are syntax only. Use plain brackets in executable queries.
RETURN LIST [1, 2, 3] AS numbers, ARRAY [1, 2] AS values;