Class: ActiveRecord::ConnectionAdapters::IBM_DB_I5Column
Overview
Class Method Summary
collapse
binary_to_string, #type_cast
Class Method Details
.fast_string_to_time(string) ⇒ Object
643
644
645
646
647
648
|
# File 'lib/active_record/connection_adapters/ibm_db_adapter.rb', line 643
def fast_string_to_time(string)
if string =~ Column::Format::ISO_DATETIME || string =~ Column::Format::IBMI_SQL_DATETIME
microsec = ($7.to_r * 1_000_000).to_i
new_time $1.to_i, $2.to_i, $3.to_i, $4.to_i, $5.to_i, $6.to_i, microsec
end
end
|
.string_to_dummy_time(string) ⇒ Object
636
637
638
639
640
641
642
|
# File 'lib/active_record/connection_adapters/ibm_db_adapter.rb', line 636
def string_to_dummy_time(string)
if string =~ Column::Format::IBMI_TIME
fast_string_to_time "2000-01-01-#{string}"
else
super(string)
end
end
|