Thanks Romiko. I found this very helpful.
On Tuesday, June 26, 2012 at 11:56:47 PM UTC-6, Romiko Derbynew wrote:
>
> Hi Michael,
>
> Excellent, I think the concat is perfect, doing it any other way would
> produce inconsistent results where one column would be longer than another,
> thanks for this, it is nice to see it work with adding items to array to!
> Thanks
>
> start n=node(1,2), m=node(2,3)
> with collect(n) as n, m as m
> return n + m
> +-------------------------------------------------------------------------+
> | n + m |
> +-------------------------------------------------------------------------+
> | [Node[1]{name:"Neo"},Node[2]{name:"Morpheus"},Node[3]{name:"Trinity"}] |
> | [Node[1]{name:"Neo"},Node[2]{name:"Morpheus"},Node[2]{name:"Morpheus"}] |
> +-------------------------------------------------------------------------+
>
> On Wednesday, June 27, 2012 3:11:36 PM UTC+10, Michael Hunger wrote:
>>
>> Should they end up in all the same collection or do you want a collection
>> of lists?
>>
>> aka. collect( [r1,r2,r3] )
>>
>> It should be probably possible to use the plus sign + to concatenate
>> collections
>>
>> http://console.neo4j.org/r/vea8b3
>>
>> Michael
>>
>> Yield for foreach would be interesting
>>
>> Am 27.06.2012 um 02:39 schrieb Romiko Derbynew:
>>
>> > Hi Guys,
>> >
>> > I would like to aggregate multiple columns of the same type in a Cypher
>> query.
>> >
>> > e.g. Collect(r1, r2, r3)
>> >
>> > What do you think, this can make projections nice and easy to work
>> with, when you have multiple columns with same data types?
>> >
>> > getting a bit ahead here, but this could also be cool:
>> > Collect(foreach(r1 in rel, yield r1), r2, r3)
>> > So i can aggregate same types, even if they in lists.
>>
>>
--
You received this message because you are subscribed to the Google Groups
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.