class Neo4j::QueryProxy

Overview

works with a very simplified model of Cypher (MATCH, WHEREs, ORDER BYs, SKIP, LIMIT, RETURN)

Defined in:

neo4j/querying.cr

Instance Method Summary

Instance Method Detail

def add_proxy : QueryProxy | Nil #

for associations


[View source]
def add_proxy=(add_proxy : QueryProxy | Nil) #

for associations


[View source]
def chain(proxy : QueryProxy) #

chaining two proxies together will join the two match clauses and wheres (everything else will use the last value)


[View source]
def clone_for_chain : QueryProxy #

clone the query, not the results


[View source]
def create_merge : String #

[View source]
def create_merge=(create_merge : String) #

[View source]
def cypher_params : Hash(String, Neo4j::Value) #

[View source]
def cypher_query : String | Nil #

expose query building properties to make debugging easier


[View source]
def delete_proxy : QueryProxy | Nil #

[View source]
def delete_proxy=(delete_proxy : QueryProxy | Nil) #

[View source]
def distinct : QueryProxy #

[View source]
def executed? : Bool #

[View source]
def expand_where(where : Where) : ExpandedWhere #

this will be overridden in subclass


[View source]
def limit(limit : Int32) : QueryProxy #

[View source]
def limit : Int32 #

[View source]
def limit=(limit : Int32) #

[View source]
def match : String #

[View source]
def match=(match : String) #

[View source]
def obj_variable_name : String #

[View source]
def obj_variable_name=(obj_variable_name : String) #

[View source]
def order(prop : Symbol | String, dir : SortDirection = Neo4j::QueryProxy::SortDirection::ASC) : QueryProxy #

this form is mainly for internal use, but use it if you need it


[View source]
def order(*params) : QueryProxy #

ex: .order(:name, :created_by)


[View source]
def order(**params) : QueryProxy #

ex: .order(name: :ASC, created_by: :desc)


[View source]
def order_bys : Array({String | Symbol, Neo4j::QueryProxy::SortDirection}) #

[View source]
def order_bys=(order_bys : Array(Tuple(String | Symbol, Neo4j::QueryProxy::SortDirection))) #

[View source]
def query_as(obj_var : Symbol | String, rel_var : Symbol | String) : QueryProxy #

[View source]
def query_as(obj_var : Symbol | String) : QueryProxy #

TODO want to expose #query_as as part of public api, but would first need to do some find/replace magic on existing match/create_merge/wheres/ret

NOTE ActiveNode called this .as, but crystal doesn't allow that name


[View source]
def raw_result : Neo4j::Result | Nil #

[View source]
def rel_variable_name : String #

[View source]
def rel_variable_name=(rel_variable_name : String) #

[View source]
def removes : Array(String) #

[View source]
def removes=(removes : Array(String)) #

[View source]
def reorder(*params) : QueryProxy #

[View source]
def reorder(**params) : QueryProxy #

[View source]
def reset_query #

[View source]
def ret : String #

[View source]
def ret=(ret : String) #

[View source]
def ret_distinct : Bool #

[View source]
def ret_distinct=(ret_distinct : Bool) #

[View source]
def return_values : Array(Hash(String, Array(Neo4j::Value) | Bool | Float64 | Hash(String, Neo4j::Value) | Int16 | Int32 | Int64 | Int8 | Neo4j::Duration | Neo4j::LatLng | Neo4j::Node | Neo4j::Path | Neo4j::Point2D | Neo4j::Point3D | Neo4j::Relationship | Neo4j::UnboundRelationship | String | Time | Nil)) #

[View source]
def set(params) : QueryProxy #

[View source]
def set(**params) : QueryProxy #

[View source]
def sets : Array({String, Hash(String | Symbol, Neo4j::Value)}) #

[View source]
def sets=(sets : Array(Tuple(String, Hash(String | Symbol, Neo4j::Value)))) #

[View source]
def skip(skip : Int32) : QueryProxy #

shown here for documentation purposes, but actual definition is in macro included (type-specific subclass) due to conflict with Enumerable#skip


[View source]
def skip : Int32 #

[View source]
def skip=(skip : Int32) #

[View source]
def unorder : QueryProxy #

[View source]
def where(str : String, **params) : QueryProxy #

[View source]
def where(**params) : QueryProxy #

[View source]
def where_not(str : String, **params) : QueryProxy #

[View source]
def where_not(**params) : QueryProxy #

[View source]
def wheres : Array({String, Hash(String, Neo4j::Value)}) #

[View source]
def wheres=(wheres : Array(Tuple(String, Hash(String, Neo4j::Value)))) #

[View source]