apoc.coll.elements
Syntax |
|
||
Description |
Deconstructs a |
||
Input arguments |
Name |
Type |
Description |
|
|
A list of values to deconstruct. |
|
|
|
The maximum size of elements to deconstruct from the given list. The default is: |
|
|
|
The offset to start deconstructing from. The default is: |
|
Return arguments |
Name |
Type |
Description |
|
|
The value of the first item to tenth item. |
|
|
|
The value of the first to tenth item, if it is a string value. |
|
|
|
The value of the first to tenth item, if it is an integer value. |
|
|
|
The value of the first to tenth item, if it is a float value. |
|
|
|
The value of the first to tenth item, if it is a boolean value. |
|
|
|
The value of the first to tenth item, if it is a list value. |
|
|
|
The value of the first to tenth item, if it is a map value. |
|
|
|
The value of the first to tenth item, if it is a node value. |
|
|
|
The value of the first to tenth item, if it is a relationship value. |
|
|
|
The value of the first to tenth item, if it is a path value. |
|
|
|
The number of deconstructed elements. |
Usage Examples
The following deconstructs a list of 3 values into identifiers of the correct type:
CALL apoc.coll.elements([9, true, "Neo4j"])
YIELD _1, _1s, _1i, _1b, _1l, _1m, _1n, _1r, _1p,
_2, _2s, _2i, _2b, _2l, _2m, _2n, _2r, _2p,
_3, _3s, _3i, _3b, _3l, _3m, _3n, _3r, _3p
RETURN _1, _1s, _1i, _1b, _1l, _1m, _1n, _1r, _1p,
_2, _2s, _2i, _2b, _2l, _2m, _2n, _2r, _2p,
_3, _3s, _3i, _3b, _3l, _3m, _3n, _3r, _3p;
The output below would usually be in one table, but for readability we format it into multiple tables
_1 | _1s | _1i | _1b | _1l | _1m | _1n | _1r | _1p |
---|---|---|---|---|---|---|---|---|
9 |
NULL |
9 |
NULL |
NULL |
NULL |
NULL |
NULL |
NULL |
_2 | _2s | _2i | _2b | _2l | _2m | _2n | _2r | _2p |
---|---|---|---|---|---|---|---|---|
TRUE |
NULL |
NULL |
TRUE |
NULL |
NULL |
NULL |
NULL |
NULL |
_3 | _3s | _3i | _3b | _3l | _3m | _3n | _3r | _3p |
---|---|---|---|---|---|---|---|---|
"Neo4j" |
"Neo4j" |
NULL |
NULL |
NULL |
NULL |
NULL |
NULL |
NULL |