Add support for indexing operator [ ]
#65
Labels
subject/missing-syntax
Issues related to missing support for Cypher syntax
type/enhancement
New feature or request
Milestone
CYPHER has the indexing operator
[]
.Simple examples of its use are
WITH {a:'Hello World!'} AS map RETURN map['a']
andWITH ['Hello World!'] AS list RETURN list[0]
.More complicated examples are
WITH 2 AS a, ['a','b','Hello World!'] AS list RETURN list[a]
,WITH {a:'Hello World!',c:'a'} AS map RETURN map[map['c']]
andWITH ['a','Hello World!','b'] AS list, {ab:1} AS map RETURN list[map[list[0]+list[2]]]
All of these should return
Hello World!
I think
[]
should be implemented on things ofCompositeType
andCompositeTypeTrait
should have this implemented like->index($index)
where$index
is either a string-like thing or integer-like thing. (In particular, lists only accept integers and maps only accept strings if I'm correct).The text was updated successfully, but these errors were encountered: