module Bmg::Sql::SelectExp
Constants
- SELECT
- SELECT_DISTINCT
Public Instance Methods
all?()
click to toggle source
# File lib/bmg/sql/nodes/select_exp.rb, line 26 def all? set_quantifier.all? end
complex_clause?()
click to toggle source
# File lib/bmg/sql/nodes/select_exp.rb, line 42 def complex_clause? where_clause or order_by_clause or limit_clause or offset_clause end
desaliaser(*args, &bl)
click to toggle source
# File lib/bmg/sql/nodes/select_exp.rb, line 90 def desaliaser(*args, &bl) select_list.desaliaser(*args, &bl) end
distinct?()
click to toggle source
# File lib/bmg/sql/nodes/select_exp.rb, line 22 def distinct? set_quantifier.distinct? end
from_clause()
click to toggle source
# File lib/bmg/sql/nodes/select_exp.rb, line 66 def from_clause find_child(:from_clause) end
group_by_clause()
click to toggle source
# File lib/bmg/sql/nodes/select_exp.rb, line 74 def group_by_clause find_child(:group_by_clause) end
has_computed_attributes?()
click to toggle source
# File lib/bmg/sql/nodes/select_exp.rb, line 30 def has_computed_attributes? select_list.has_computed_attributes? end
is_select_star?()
click to toggle source
# File lib/bmg/sql/nodes/select_exp.rb, line 54 def is_select_star? self[2].first == :select_star end
is_table_dee?()
click to toggle source
# File lib/bmg/sql/nodes/select_exp.rb, line 18 def is_table_dee? from_clause.nil? && select_list.is_table_dee? end
join?()
click to toggle source
# File lib/bmg/sql/nodes/select_exp.rb, line 34 def join? from_clause && from_clause.join? end
limit_clause()
click to toggle source
# File lib/bmg/sql/nodes/select_exp.rb, line 82 def limit_clause find_child(:limit_clause) end
offset_clause()
click to toggle source
# File lib/bmg/sql/nodes/select_exp.rb, line 86 def offset_clause find_child(:offset_clause) end
order_by_clause()
click to toggle source
# File lib/bmg/sql/nodes/select_exp.rb, line 78 def order_by_clause find_child(:order_by_clause) end
predicate()
click to toggle source
# File lib/bmg/sql/nodes/select_exp.rb, line 62 def predicate where_clause && where_clause.predicate end
select_exp()
click to toggle source
# File lib/bmg/sql/nodes/select_exp.rb, line 46 def select_exp self end
select_list()
click to toggle source
# File lib/bmg/sql/nodes/select_exp.rb, line 50 def select_list self[2] end
set_quantifier()
click to toggle source
# File lib/bmg/sql/nodes/select_exp.rb, line 10 def set_quantifier self[1] end
should_be_reused?()
click to toggle source
# File lib/bmg/sql/nodes/select_exp.rb, line 38 def should_be_reused? join? or distinct? or complex_clause? end
table_spec()
click to toggle source
# File lib/bmg/sql/nodes/select_exp.rb, line 70 def table_spec from_clause.table_spec end
to_attr_list()
click to toggle source
to_xxx
# File lib/bmg/sql/nodes/select_exp.rb, line 96 def to_attr_list select_list.to_attr_list end
to_sql(buffer, dialect, parenthesize = !buffer.empty?)
click to toggle source
# File lib/bmg/sql/nodes/select_exp.rb, line 102 def to_sql(buffer, dialect, parenthesize = !buffer.empty?) if parenthesize sql_parenthesized(buffer){|b| to_sql(b, dialect, false) } else buffer << (distinct? ? SELECT_DISTINCT : SELECT) each_child(1) do |elm,i| buffer << SPACE elm.to_sql(buffer, dialect) end buffer end end
where_clause()
click to toggle source
# File lib/bmg/sql/nodes/select_exp.rb, line 58 def where_clause find_child(:where_clause) end
with_exp?()
click to toggle source
# File lib/bmg/sql/nodes/select_exp.rb, line 14 def with_exp? false end