Created
November 13, 2012 19:23
-
-
Save halfdan/4067808 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ ruby test.rb | |
I, [2012-11-13T20:14:01.402000 #16322] INFO -- : Starting local Neo4j using db /rahome/becker/test/db using Java::OrgNeo4jKernel::EmbeddedGraphDatabase | |
I, [2012-11-13T20:14:04.356000 #16322] INFO -- : Neo4j has been shutdown using storage_path: /rahome/becker/test/db | |
CypherParserImpl.scala:46:in `parse': string matching regex `$' expected but `R' found | |
Think we should have better error message here? Help us by sending this query to [email protected]. | |
Thank you, the Neo4j Team. | |
" RELATE left-[r:interacts_with {type:'PDB'}]->right" | |
^ | |
from CypherParser.scala:44:in `parse' | |
from ExecutionEngine.scala:61:in `apply' | |
from ExecutionEngine.scala:61:in `apply' | |
from LRUCache.scala:31:in `getOrElseUpdate' | |
from ExecutionEngine.scala:61:in `prepare' | |
from ExecutionEngine.scala:55:in `execute' | |
from ExecutionEngine.scala:52:in `execute' | |
from ExecutionEngine.java:63:in `execute' | |
from NativeMethodAccessorImpl.java:-2:in `invoke0' | |
from NativeMethodAccessorImpl.java:57:in `invoke' | |
from DelegatingMethodAccessorImpl.java:43:in `invoke' | |
from Method.java:616:in `invoke' | |
from JavaMethod.java:455:in `invokeDirectWithExceptionHandling' | |
from JavaMethod.java:316:in `invokeDirect' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'neo4j-core' | |
n1=0 | |
n2=1 | |
interaction = "PDB" | |
Neo4j::Transaction.run do | |
cypher = <<-CYP | |
START left=node(#{n1}), right=node(#{n2}) | |
RELATE left-[r:interacts_with {type:'#{interaction}'}]->right | |
RETURN r | |
CYP | |
Neo4j._query(cypher) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment