class Bmg::Sql::Processor::Constants
Attributes
constants[R]
Public Class Methods
new(constants, builder)
click to toggle source
Calls superclass method
Bmg::Sql::Processor::new
# File lib/bmg/sql/processor/constants.rb, line 6 def initialize(constants, builder) super(builder) @constants = constants end
Public Instance Methods
on_select_list(sexpr)
click to toggle source
# File lib/bmg/sql/processor/constants.rb, line 23 def on_select_list(sexpr) sexpr + constants.each_pair.map{|(k,v)| builder.select_literal_item(v, k) } end
on_select_star(sexpr)
click to toggle source
# File lib/bmg/sql/processor/constants.rb, line 19 def on_select_star(sexpr) raise NotImplementedError, "Constants on * is not supported" end
on_set_operator(sexpr)
click to toggle source
# File lib/bmg/sql/processor/constants.rb, line 12 def on_set_operator(sexpr) apply(builder.from_self(sexpr)) end