module Axiom::Algebra::Join::Methods
Public Instance Methods
join(other, &block)
click to toggle source
Return a relation that is the join of two relations
@example natural join
join = relation.join(other)
@example theta-join using a block
join = relation.join(other) { |r| r.a.gte(r.b) }
@param [Relation] other
the other relation to join
@yield [relation]
optional block to restrict the tuples with
@yieldparam [Relation] relation
the context to evaluate the restriction with
@yieldreturn [Function, call]
predicate to restrict the tuples with
@return [Join, Restriction]
@api public
# File lib/axiom/algebra/join.rb, line 169 def join(other, &block) relation = Join.new(self, other) relation = relation.restrict(&block) if block relation end