Module: Bmg::Sql::QualifiedName

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

Overview

[:qualified_name,

[:range_var_name `qualifier`],
[:column_name, `as_name`] ]

Constant Summary

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?, #join?, #limit_or_offset?, #order_by?, #ordering, #set_operator?, #with_insert, #with_push, #with_update

Instance Method Details

#as_nameObject



15
16
17
# File 'lib/bmg/sql/nodes/qualified_name.rb', line 15

def as_name
  last.as_name
end

#is_computed?Boolean

Returns:

  • (Boolean)


23
24
25
# File 'lib/bmg/sql/nodes/qualified_name.rb', line 23

def is_computed?
  false
end

#qualifierObject



11
12
13
# File 'lib/bmg/sql/nodes/qualified_name.rb', line 11

def qualifier
  self[1].qualifier
end

#to_sql(buffer, dialect) ⇒ Object



27
28
29
30
31
32
# File 'lib/bmg/sql/nodes/qualified_name.rb', line 27

def to_sql(buffer, dialect)
  self[1].to_sql(buffer, dialect)
  buffer << '.'
  self[2].to_sql(buffer, dialect)
  buffer
end

#would_be_nameObject



19
20
21
# File 'lib/bmg/sql/nodes/qualified_name.rb', line 19

def would_be_name
  as_name
end