Module: Arel::Relation::Operable

Includes:
Writable
Included in:
Arel::Relation
Defined in:
lib/arel/algebra/relations/relation.rb

Defined Under Namespace

Modules: Writable Classes: JoinOperation

Instance Method Summary collapse

Methods included from Writable

#delete, #insert, #update

Instance Method Details

#aliasObject



58
59
60
# File 'lib/arel/algebra/relations/relation.rb', line 58

def alias
  Alias.new(self)
end

#join(other_relation = nil, join_class = InnerJoin) ⇒ Object



31
32
33
34
35
36
37
38
39
40
# File 'lib/arel/algebra/relations/relation.rb', line 31

def join(other_relation = nil, join_class = InnerJoin)
  case other_relation
  when String
    StringJoin.new(self, other_relation)
  when Relation
    JoinOperation.new(join_class, self, other_relation)
  else
    self
  end
end

#lock(locking = nil) ⇒ Object



54
55
56
# File 'lib/arel/algebra/relations/relation.rb', line 54

def lock(locking = nil)
  Lock.new(self, locking)
end

#outer_join(other_relation = nil) ⇒ Object



42
43
44
# File 'lib/arel/algebra/relations/relation.rb', line 42

def outer_join(other_relation = nil)
  join(other_relation, OuterJoin)
end