Module: Neo4j::ActiveNode::Query::ClassMethods
- Defined in:
- lib/neo4j/active_node/query.rb
Instance Method Summary collapse
-
#as(node_var) ⇒ Neo4j::ActiveNode::Query::QueryProxy
Start a new QueryProxy with the starting identifier set to the given argument.
-
#query_as(var, with_labels = true) ⇒ Neo4j::Core::Query
Returns a Query object with all nodes for the model matched as the specified variable name.
- #query_proxy(options = {}) ⇒ Object
Instance Method Details
#as(node_var) ⇒ Neo4j::ActiveNode::Query::QueryProxy
Start a new QueryProxy with the starting identifier set to the given argument. This method does not exist within QueryProxy, it can only be called at the class level to create a new QP object. To set an identifier within a QueryProxy chain, give it as the first argument to a chained association.
70 71 72 |
# File 'lib/neo4j/active_node/query.rb', line 70 def as(node_var) query_proxy(node: node_var, context: self.name) end |
#query_as(var, with_labels = true) ⇒ Neo4j::Core::Query
Returns a Query object with all nodes for the model matched as the specified variable name
an early Cypher match has already filtered results) where including labels will degrade performance.
46 47 48 |
# File 'lib/neo4j/active_node/query.rb', line 46 def query_as(var, with_labels = true) query_proxy.query_as(var, with_labels) end |
#query_proxy(options = {}) ⇒ Object
56 57 58 |
# File 'lib/neo4j/active_node/query.rb', line 56 def query_proxy( = {}) Neo4j::ActiveNode::Query::QueryProxy.new(self, nil, ) end |