Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Cypher: Single column results
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Luanne Coutinho  
View profile  
 More options Apr 27 2012, 2:41 pm
From: Luanne Coutinho <luanne.couti...@gmail.com>
Date: Sat, 28 Apr 2012 00:11:24 +0530
Local: Fri, Apr 27 2012 2:41 pm
Subject: Cypher: Single column results

Hi,

For a query like this:

start n=node(13), targetPerson=node(17)
match
(person)<-[:knows|works_with]-(n)-[?:friend]-(friend)-[?:knows|works_with]- (friendProfile)
return person.name,friendProfile.name

is there a way to transpose this single row result into multiple rows with
a single column?

e.g if the result is-
PersonA | PersonB
PersonC | PersonD

can I somehow get:
PersonA
PersonB
PersonC
PersonD

Or could I concatenate the two columns into a delimited one such as:
PersonA,PersonB
PersonC,PersonD

(like a COLLECT)?

Thanks
Luanne


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Andres Taylor  
View profile  
 More options Apr 28 2012, 4:17 am
From: Andres Taylor <andres.tay...@neotechnology.com>
Date: Sat, 28 Apr 2012 10:17:32 +0200
Local: Sat, Apr 28 2012 4:17 am
Subject: Re: [Neo4j] Cypher: Single column results

On Fri, Apr 27, 2012 at 8:41 PM, Luanne Coutinho
<luanne.couti...@gmail.com>wrote:

Interesting idea. Right now, no you can't. But if you could concatenate
lists of stuff, something like this might work:

return collect(person.name) + collect(friendProfile.name)

WDYT?

Andrés


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Luanne Misquiita  
View profile  
 More options Apr 28 2012, 9:06 am
From: Luanne Misquiita <luanne.couti...@gmail.com>
Date: Sat, 28 Apr 2012 18:36:53 +0530
Local: Sat, Apr 28 2012 9:06 am
Subject: Re: [Neo4j] Cypher: Single column results

Yes, that would work. The challenge with this kind of graph is that I've got to go in different directions from the start node to find the result and those paths are difficult to combine and the have optional sub-paths. At the end of the day, I still want person nodes- rows with multiple columns each for a person, with some columns per row possibly null is a bit of a pain to deal with.  

Regards
Luanne

Sent from my iPad

On 28-Apr-2012, at 1:47 PM, Andres Taylor <andres.tay...@neotechnology.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michael Hunger  
View profile  
 More options Apr 28 2012, 9:14 am
From: Michael Hunger <michael.hun...@neotechnology.com>
Date: Sat, 28 Apr 2012 15:14:50 +0200
Local: Sat, Apr 28 2012 9:14 am
Subject: Re: [Neo4j] Cypher: Single column results

Do you run these queries embedded or against the server?

It should be pretty simple to combine them in the client into a single-column stream? Just a nested iterator.

Michael

Am 28.04.2012 um 15:06 schrieb Luanne Misquiita:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Luanne Misquiita  
View profile  
 More options Apr 28 2012, 9:30 am
From: Luanne Misquiita <luanne.couti...@gmail.com>
Date: Sat, 28 Apr 2012 19:00:42 +0530
Local: Sat, Apr 28 2012 9:30 am
Subject: Re: [Neo4j] Cypher: Single column results

Embedded- that's what I'm doing right now, combining on the client side.

-luanne

Sent from my iPad

On 28-Apr-2012, at 6:44 PM, Michael Hunger <michael.hun...@neotechnology.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »