Class: Neo4j::Core::Query
- Inherits:
-
Object
- Object
- Neo4j::Core::Query
- Defined in:
- lib/neo4j/core/query.rb
Instance Attribute Summary collapse
-
#proxy_chain_level ⇒ Object
For instances where you turn a QueryProxy into a Query and then back to a QueryProxy with ‘#proxy_as`.
Instance Method Summary collapse
-
#proxy_as(model, var, optional = false) ⇒ Neo4j::ActiveNode::Query::QueryProxy
Creates a Neo4j::ActiveNode::Query::QueryProxy object that builds off of a Core::Query object.
-
#proxy_as_optional(model, var) ⇒ Object
Calls proxy_as with ‘optional` set true.
Instance Attribute Details
#proxy_chain_level ⇒ Object
For instances where you turn a QueryProxy into a Query and then back to a QueryProxy with ‘#proxy_as`
20 21 22 |
# File 'lib/neo4j/core/query.rb', line 20 def proxy_chain_level @proxy_chain_level end |
Instance Method Details
#proxy_as(model, var, optional = false) ⇒ Neo4j::ActiveNode::Query::QueryProxy
Creates a Neo4j::ActiveNode::Query::QueryProxy object that builds off of a Core::Query object.
9 10 11 12 |
# File 'lib/neo4j/core/query.rb', line 9 def proxy_as(model, var, optional = false) # TODO: Discuss whether it's necessary to call `break` on the query or if this should be left to the user. Neo4j::ActiveNode::Query::QueryProxy.new(model, nil, node: var, optional: optional, starting_query: self, chain_level: @proxy_chain_level) end |
#proxy_as_optional(model, var) ⇒ Object
Calls proxy_as with ‘optional` set true. This doesn’t offer anything different from calling ‘proxy_as` directly but it may be more readable.
15 16 17 |
# File 'lib/neo4j/core/query.rb', line 15 def proxy_as_optional(model, var) proxy_as(model, var, true) end |