Module: Bmg::Sql::FromClause

Includes:
Expr
Defined in:
lib/bmg/sql/nodes/from_clause.rb

Constant Summary collapse

FROM =
"FROM".freeze

Constants included from Expr

Expr::AND, Expr::AS, Expr::COMMA, Expr::DOT, Expr::EQUAL, Expr::EXISTS, Expr::FALSE, Expr::GREATER, Expr::GREATER_OR_EQUAL, Expr::IN, Expr::LEFT_PARENTHESE, Expr::LESS, Expr::LESS_OR_EQUAL, Expr::NOT, Expr::NOT_EQUAL, Expr::OR, Expr::QUOTE, Expr::RIGHT_PARENTHESE, Expr::SPACE, Expr::TRUE

Instance Method Summary collapse

Methods included from Expr

#each_child, #flatten, #group_by?, #limit_or_offset?, #order_by?, #ordering, #set_operator?, #with_insert, #with_push, #with_update

Instance Method Details

#join?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/bmg/sql/nodes/from_clause.rb', line 12

def join?
  table_spec.join?
end

#table_specObject



8
9
10
# File 'lib/bmg/sql/nodes/from_clause.rb', line 8

def table_spec
  last
end

#to_sql(buffer, dialect) ⇒ Object



16
17
18
19
20
# File 'lib/bmg/sql/nodes/from_clause.rb', line 16

def to_sql(buffer, dialect)
  buffer << FROM << SPACE
  last.to_sql(buffer, dialect)
  buffer
end