primary=(value)
click to toggle source
# File lib/arjdbc/oracle/column.rb, line 17 def primary=(value) super @type = :integer if value && @sql_type =~ /^NUMBER$/ end
# File lib/arjdbc/oracle/column.rb, line 17 def primary=(value) super @type = :integer if value && @sql_type =~ /^NUMBER$/ end
# File lib/arjdbc/oracle/column.rb, line 22 def type_cast(value) return nil if value.nil? case type when :datetime then self.class.string_to_time(value) when :timestamp then self.class.string_to_time(value) when :boolean then self.class.value_to_boolean(value) else super end end
# File lib/arjdbc/oracle/column.rb, line 33 def type_cast_code(var_name) case type when :datetime then "#{self.class.name}.string_to_time(#{var_name})" when :timestamp then "#{self.class.name}.string_to_time(#{var_name})" when :boolean then "#{self.class.name}.value_to_boolean(#{var_name})" else super end end
Generated with the Darkfish Rdoc Generator 2.