Class: Axiom::Adapter::Arango::Gateway
- Inherits:
-
Relation
- Object
- Relation
- Axiom::Adapter::Arango::Gateway
- Defined in:
- lib/axiom/adapter/arango/gateway.rb
Overview
A relation backed by an adapter
Constant Summary collapse
- DECORATED_CLASS =
superclass
Instance Method Summary collapse
-
#difference(other) ⇒ Gateway, Algebra::Difference
Return the difference between relations.
-
#each {|tuple| ... } ⇒ self
Iterate over each row in the results.
-
#intersect(other) ⇒ Gateway, Algebra::Intersection
Return the intersection between relations.
-
#join(other) {|relation| ... } ⇒ Gateway, ...
Return a relation that is the join of two relations.
-
#product(other) ⇒ Gateway, Algebra::Product
Return a relation that is the Cartesian product of two relations.
-
#respond_to?(method) ⇒ Boolean
private
Test if the method is supported on this object.
-
#summarize(summarize_with = TABLE_DEE) {|function| ... } ⇒ Gateway, Algebra::Summarization
Return a summarized relation.
-
#union(other) ⇒ Gateway, Algebra::Union
Return the union between relations.
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ self, Object (private)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Proxy the message to the relation
214 215 216 |
# File 'lib/axiom/adapter/arango/gateway.rb', line 214 def method_missing(method, *args, &block) forwardable?(method) ? forward(method, *args, &block) : super end |
Instance Method Details
#difference(other) ⇒ Gateway, Algebra::Difference
Return the difference between relations
141 142 143 |
# File 'lib/axiom/adapter/arango/gateway.rb', line 141 def difference(other) binary_operation(__method__, other, Algebra::Difference) end |
#each {|tuple| ... } ⇒ self
Iterate over each row in the results
30 31 32 33 34 |
# File 'lib/axiom/adapter/arango/gateway.rb', line 30 def each return to_enum unless block_given? tuples.each { |tuple| yield tuple } self end |
#intersect(other) ⇒ Gateway, Algebra::Intersection
Return the intersection between relations
123 124 125 |
# File 'lib/axiom/adapter/arango/gateway.rb', line 123 def intersect(other) binary_operation(__method__, other, Algebra::Intersection) end |
#join(other) {|relation| ... } ⇒ Gateway, ...
Return a relation that is the join of two relations
65 66 67 68 69 70 71 |
# File 'lib/axiom/adapter/arango/gateway.rb', line 65 def join(other) if block_given? super else binary_operation(__method__, other, Algebra::Join) end end |
#product(other) ⇒ Gateway, Algebra::Product
Return a relation that is the Cartesian product of two relations
87 88 89 |
# File 'lib/axiom/adapter/arango/gateway.rb', line 87 def product(other) binary_operation(__method__, other, Algebra::Product) end |
#respond_to?(method) ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Test if the method is supported on this object
196 197 198 |
# File 'lib/axiom/adapter/arango/gateway.rb', line 196 def respond_to?(method, *) super || forwardable?(method) end |
#summarize(summarize_with = TABLE_DEE) {|function| ... } ⇒ Gateway, Algebra::Summarization
Return a summarized relation
181 182 183 184 185 186 187 |
# File 'lib/axiom/adapter/arango/gateway.rb', line 181 def summarize(summarize_with = TABLE_DEE, &block) if summarize_merge?(summarize_with) summarize_merge(summarize_with, &block) else summarize_split(summarize_with, &block) end end |
#union(other) ⇒ Gateway, Algebra::Union
Return the union between relations
105 106 107 |
# File 'lib/axiom/adapter/arango/gateway.rb', line 105 def union(other) binary_operation(__method__, other, Algebra::Union) end |