Module: ApacheAge::Entities::Path
Instance Method Summary collapse
- #age_type ⇒ Object
- #all ⇒ Object
- #ensure_query_builder! ⇒ Object
-
#execute ⇒ Object
transforms the query and returns results.
- #first ⇒ Object
- #limit(limit_value) ⇒ Object
- #match(match_string) ⇒ Object
- #match_clause ⇒ Object
- #order(ordering) ⇒ Object
- #return(*variables) ⇒ Object
- #to_sql ⇒ Object
-
#where(*args) ⇒ Object
Delegate additional methods like ‘where`, `limit`, etc., to `QueryBuilder`.
Instance Method Details
#age_type ⇒ Object
11 |
# File 'lib/apache_age/entities/path.rb', line 11 def age_type = 'path' |
#all ⇒ Object
62 63 64 65 |
# File 'lib/apache_age/entities/path.rb', line 62 def all ensure_query_builder! @query_builder.all end |
#ensure_query_builder! ⇒ Object
13 14 15 |
# File 'lib/apache_age/entities/path.rb', line 13 def ensure_query_builder! @query_builder ||= ApacheAge::Entities::QueryBuilder.new(self.class) end |
#execute ⇒ Object
transforms the query and returns results
52 53 54 55 |
# File 'lib/apache_age/entities/path.rb', line 52 def execute ensure_query_builder! @query_builder.execute end |
#first ⇒ Object
57 58 59 60 |
# File 'lib/apache_age/entities/path.rb', line 57 def first ensure_query_builder! @query_builder.first end |
#limit(limit_value) ⇒ Object
39 40 41 42 43 |
# File 'lib/apache_age/entities/path.rb', line 39 def limit(limit_value) ensure_query_builder! @query_builder.limit(limit_value) self end |
#match(match_string) ⇒ Object
21 22 23 24 |
# File 'lib/apache_age/entities/path.rb', line 21 def match(match_string) @match_clause = match_string self end |
#match_clause ⇒ Object
17 18 19 |
# File 'lib/apache_age/entities/path.rb', line 17 def match_clause "path = (start_node)-[#{path_edge}#{path_length}#{path_properties}]->(end_node)" end |
#order(ordering) ⇒ Object
33 34 35 36 37 |
# File 'lib/apache_age/entities/path.rb', line 33 def order(ordering) ensure_query_builder! @query_builder.order(ordering) self end |
#return(*variables) ⇒ Object
45 46 47 48 49 |
# File 'lib/apache_age/entities/path.rb', line 45 def return(*variables) ensure_query_builder! @query_builder.return(*variables) self end |
#to_sql ⇒ Object
67 68 69 70 |
# File 'lib/apache_age/entities/path.rb', line 67 def to_sql ensure_query_builder! @query_builder.to_sql end |
#where(*args) ⇒ Object
Delegate additional methods like ‘where`, `limit`, etc., to `QueryBuilder`
27 28 29 30 31 |
# File 'lib/apache_age/entities/path.rb', line 27 def where(*args) ensure_query_builder! @query_builder.where(*args) self end |