module Bmg::Sql::Join

Constants

JOIN
ON

Public Instance Methods

join?() click to toggle source
# File lib/bmg/sql/nodes/join.rb, line 13
def join?
  true
end
left() click to toggle source
# File lib/bmg/sql/nodes/join.rb, line 17
def left
  self[1]
end
predicate() click to toggle source
# File lib/bmg/sql/nodes/join.rb, line 25
def predicate
  last
end
right() click to toggle source
# File lib/bmg/sql/nodes/join.rb, line 21
def right
  self[2]
end
to_sql(buffer, dialect) click to toggle source
# File lib/bmg/sql/nodes/join.rb, line 29
def to_sql(buffer, dialect)
  left.to_sql(buffer, dialect)
  if type.nil?
    buffer << SPACE << JOIN << SPACE
  else
    buffer << SPACE << TYPE << SPACE << JOIN << SPACE
  end
  right.to_sql(buffer, dialect)
  buffer << SPACE << ON << SPACE
  predicate.to_sql(buffer, dialect)
  buffer
end
type() click to toggle source
# File lib/bmg/sql/nodes/join.rb, line 9
def type
  nil
end