Column
# File lib/arjdbc/jdbc/column.rb, line 27 def self.column_types # reset the column types if the # of constants changed since last call @column_types ||= begin types = driver_constants.select { |c| c.respond_to? :column_selector } types.map! { |c| c.column_selector } types.inject({}) { |h, val| h[ val[0] ] = val[1]; h } end end
# File lib/arjdbc/jdbc/column.rb, line 36 def self.driver_constants reset_constants @driver_constants ||= ::ArJdbc.constants.map { |c| ::ArJdbc.const_get c } end
# File lib/arjdbc/jdbc/column.rb, line 6 def initialize(config, name, default, *args) call_discovered_column_callbacks(config) super(name, default_value(default), *args) init_column(name, default, *args) end
# File lib/arjdbc/jdbc/column.rb, line 18 def call_discovered_column_callbacks(config) dialect = (config[:dialect] || config[:driver]).to_s for matcher, block in self.class.column_types block.call(config, self) if matcher === dialect end end
Generated with the Darkfish Rdoc Generator 2.