Awesome, thanks Russel and Michael! I knew I was missing a permutation.
And to round things out, to remove a value from an array I use the following query:
SET node.array = filter(x in node.array : not(x=value))
And yeah, adding more of these sorts of queries to the examples would be great.
-Mat
On Sunday, July 1, 2012 12:13:19 AM UTC-7, Michael Hunger wrote:
Thanks Russell, that's correct, I think we should add an example for this whole use-case to the manual.
Michael
Am 01.07.2012 um 01:46 schrieb Russell Duhon:
Hi,
First time posting on the list, but I've been doing some similar stuff.
You can deal with the not-yet-created problem with coalesce, eg
start node = ...
set node.array = coalesce(node.array?, []) + value
(Just tried it out on a reasonably recent milestone).
I hope that helps,
Russell