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 output
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
  3 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
 
M.Alipour  
View profile   Translate to Translated (View Original)
 More options May 29 2012, 10:44 pm
From: "M.Alipour" <mahdialipour2...@gmail.com>
Date: Tue, 29 May 2012 19:44:31 -0700 (PDT)
Local: Tues, May 29 2012 10:44 pm
Subject: Cypher output
Hi,
I use this code in Cypher:

String qq="start n=node("+id+") match p=(n)-[?*]->(n) return p";
ExecutionEngine engine = new ExecutionEngine( graphDb );
ExecutionResult result = engine.execute(qq);
System.out.print("\n"+result.dumpToString());

and after running, i get:

+--------+
| p      |
+--------+
| <null> |
+--------+
1 row, 1 ms

my problem:   how can i handle returned value in this output? What is
the type of the Cypher output?Is table? Is string? or .... How i can
process Cypher output?
for example, i want this Pseudocode:

if output==Null then print "output is null"
if output=="myOutput" print "ok"

Thanks.


 
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 Coutinho  
View profile   Translate to Translated (View Original)
 More options May 29 2012, 10:58 pm
From: Luanne Coutinho <luanne.couti...@gmail.com>
Date: Wed, 30 May 2012 08:28:33 +0530
Local: Tues, May 29 2012 10:58 pm
Subject: Re: [Neo4j] Cypher output

result.iterator() will give you an iterator of type Map<String,Object>
where each map represents a "row"- the String is the column name and value
is the column value (p in your case).
If you just want the results of a single column, you can do
result.columnAs("p") which, in your case will give you an Iterator<Node>.

-Luanne

On Wed, May 30, 2012 at 8:14 AM, M.Alipour <mahdialipour2...@gmail.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   Translate to Translated (View Original)
 More options May 30 2012, 2:15 am
From: Michael Hunger <michael.hun...@neotechnology.com>
Date: Wed, 30 May 2012 08:15:31 +0200
Local: Wed, May 30 2012 2:15 am
Subject: Re: [Neo4j] Cypher output

Please use parameters (for input variables) and reuse the execution-engine. (see: http://docs.neo4j.org/chunked/milestone/cypher-parameters.html)

You could have also found the basic usage in the manual: http://docs.neo4j.org/chunked/milestone/tutorials-cypher-java.html

Michael

Am 30.05.2012 um 04:58 schrieb Luanne Coutinho:


 
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 »