module Neo4j::Cypher
Constants
- VERSION
Public Class Methods
query(*args, &dsl_block)
click to toggle source
Creates a Cypher
DSL query. To create a new cypher query you must initialize it either an String or a Block.
@example START n0=node(3) MATCH (n0)--(x) RETURN x
same as
Cypher.query { start n = node(3); match n <=> :x; ret :x }.to_s
@example START n0=node(3) MATCH (n0)-[:`r`]->(x) RETURN r
same as
Cypher.query { node(3) > :r > :x; :r }
@example START n0=node(3) MATCH (n0)-->(x) RETURN x
same as
Cypher.query { node(3) >> :x; :x }
@param args the argument for the dsl_block @yield the block which will be evaluated in the context of this object in order to create an Cypher
Query string @yieldreturn [Return, Object] If the return is not an instance of Return
it will be converted it to a Return
object (if possible). @return [Cypher::Result]
# File lib/neo4j-cypher.rb 44 def self.query(*args, &dsl_block) 45 Result.new(*args, &dsl_block) 46 end