Module: Alf::Sql::FromClause

Includes:
Expr
Defined in:
lib/alf/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, #limit_or_offset?, #ordering, #set_operator?, #with_insert, #with_push, #with_update

Instance Method Details

#join?Boolean

Returns:

  • (Boolean)


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

def join?
  table_spec.join?
end

#table_specObject



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

def table_spec
  last
end

#to_sql(buffer = "") ⇒ Object



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

def to_sql(buffer = "")
  buffer << FROM << SPACE
  last.to_sql(buffer)
  buffer
end