@override {ActiveRecord::ConnectionAdapters::JdbcColumn#default_value}
# File lib/arjdbc/sqlite3/adapter.rb, line 33 def default_value(value) # JDBC returns column default strings with actual single quotes : return $1 if value =~ /^'(.*)'$/ value end
@override {ActiveRecord::ConnectionAdapters::JdbcColumn#init_column}
# File lib/arjdbc/sqlite3/adapter.rb, line 24 def init_column(name, default, *args) if default =~ /NULL/ @default = nil else super end end
@override {ActiveRecord::ConnectionAdapters::Column#type_cast}
# File lib/arjdbc/sqlite3/adapter.rb, line 41 def type_cast(value) return nil if value.nil? case type when :string then value when :primary_key value.respond_to?(:to_i) ? value.to_i : ( value ? 1 : 0 ) when :float then value.to_f when :decimal then self.class.value_to_decimal(value) when :boolean then self.class.value_to_boolean(value) else super end end
Generated with the Darkfish Rdoc Generator 2.