apoc.coll.elements
Procedure
apoc.coll.elements(coll LIST<ANY>, limit INTEGER, offset INTEGER)
- deconstructs a LIST<ANY>
into identifiers indicating their specific type.
Signature
apoc.coll.elements(values :: LIST<ANY>, limit = -1 :: INTEGER, offset = 0 :: INTEGER) :: (_1 :: ANY, _2 :: ANY, _3 :: ANY, _4 :: ANY, _5 :: ANY, _6 :: ANY, _7 :: ANY, _8 :: ANY, _9 :: ANY, _10 :: ANY, _1s :: STRING, _2s :: STRING, _3s :: STRING, _4s :: STRING, _5s :: STRING, _6s :: STRING, _7s :: STRING, _8s :: STRING, _9s :: STRING, _10s :: STRING, _1i :: INTEGER, _2i :: INTEGER, _3i :: INTEGER, _4i :: INTEGER, _5i :: INTEGER, _6i :: INTEGER, _7i :: INTEGER, _8i :: INTEGER, _9i :: INTEGER, _10i :: INTEGER, _1f :: FLOAT, _2f :: FLOAT, _3f :: FLOAT, _4f :: FLOAT, _5f :: FLOAT, _6f :: FLOAT, _7f :: FLOAT, _8f :: FLOAT, _9f :: FLOAT, _10f :: FLOAT, _1b :: BOOLEAN, _2b :: BOOLEAN, _3b :: BOOLEAN, _4b :: BOOLEAN, _5b :: BOOLEAN, _6b :: BOOLEAN, _7b :: BOOLEAN, _8b :: BOOLEAN, _9b :: BOOLEAN, _10b :: BOOLEAN, _1l :: LIST<ANY>, _2l :: LIST<ANY>, _3l :: LIST<ANY>, _4l :: LIST<ANY>, _5l :: LIST<ANY>, _6l :: LIST<ANY>, _7l :: LIST<ANY>, _8l :: LIST<ANY>, _9l :: LIST<ANY>, _10l :: LIST<ANY>, _1m :: MAP, _2m :: MAP, _3m :: MAP, _4m :: MAP, _5m :: MAP, _6m :: MAP, _7m :: MAP, _8m :: MAP, _9m :: MAP, _10m :: MAP, _1n :: NODE, _2n :: NODE, _3n :: NODE, _4n :: NODE, _5n :: NODE, _6n :: NODE, _7n :: NODE, _8n :: NODE, _9n :: NODE, _10n :: NODE, _1r :: RELATIONSHIP, _2r :: RELATIONSHIP, _3r :: RELATIONSHIP, _4r :: RELATIONSHIP, _5r :: RELATIONSHIP, _6r :: RELATIONSHIP, _7r :: RELATIONSHIP, _8r :: RELATIONSHIP, _9r :: RELATIONSHIP, _10r :: RELATIONSHIP, _1p :: PATH, _2p :: PATH, _3p :: PATH, _4p :: PATH, _5p :: PATH, _6p :: PATH, _7p :: PATH, _8p :: PATH, _9p :: PATH, _10p :: PATH, elements :: INTEGER)
Output parameters
Name | Type |
---|---|
_1 |
ANY |
_2 |
ANY |
_3 |
ANY |
_4 |
ANY |
_5 |
ANY |
_6 |
ANY |
_7 |
ANY |
_8 |
ANY |
_9 |
ANY |
_10 |
ANY |
_1s |
STRING |
_2s |
STRING |
_3s |
STRING |
_4s |
STRING |
_5s |
STRING |
_6s |
STRING |
_7s |
STRING |
_8s |
STRING |
_9s |
STRING |
_10s |
STRING |
_1i |
INTEGER |
_2i |
INTEGER |
_3i |
INTEGER |
_4i |
INTEGER |
_5i |
INTEGER |
_6i |
INTEGER |
_7i |
INTEGER |
_8i |
INTEGER |
_9i |
INTEGER |
_10i |
INTEGER |
_1f |
FLOAT |
_2f |
FLOAT |
_3f |
FLOAT |
_4f |
FLOAT |
_5f |
FLOAT |
_6f |
FLOAT |
_7f |
FLOAT |
_8f |
FLOAT |
_9f |
FLOAT |
_10f |
FLOAT |
_1b |
BOOLEAN |
_2b |
BOOLEAN |
_3b |
BOOLEAN |
_4b |
BOOLEAN |
_5b |
BOOLEAN |
_6b |
BOOLEAN |
_7b |
BOOLEAN |
_8b |
BOOLEAN |
_9b |
BOOLEAN |
_10b |
BOOLEAN |
_1l |
LIST<ANY> |
_2l |
LIST<ANY> |
_3l |
LIST<ANY> |
_4l |
LIST<ANY> |
_5l |
LIST<ANY> |
_6l |
LIST<ANY> |
_7l |
LIST<ANY> |
_8l |
LIST<ANY> |
_9l |
LIST<ANY> |
_10l |
LIST<ANY> |
_1m |
MAP |
_2m |
MAP |
_3m |
MAP |
_4m |
MAP |
_5m |
MAP |
_6m |
MAP |
_7m |
MAP |
_8m |
MAP |
_9m |
MAP |
_10m |
MAP |
_1n |
NODE |
_2n |
NODE |
_3n |
NODE |
_4n |
NODE |
_5n |
NODE |
_6n |
NODE |
_7n |
NODE |
_8n |
NODE |
_9n |
NODE |
_10n |
NODE |
_1r |
RELATIONSHIP |
_2r |
RELATIONSHIP |
_3r |
RELATIONSHIP |
_4r |
RELATIONSHIP |
_5r |
RELATIONSHIP |
_6r |
RELATIONSHIP |
_7r |
RELATIONSHIP |
_8r |
RELATIONSHIP |
_9r |
RELATIONSHIP |
_10r |
RELATIONSHIP |
_1p |
PATH |
_2p |
PATH |
_3p |
PATH |
_4p |
PATH |
_5p |
PATH |
_6p |
PATH |
_7p |
PATH |
_8p |
PATH |
_9p |
PATH |
_10p |
PATH |
elements |
INTEGER |
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 |