module ArJdbc::DB2::Column::Cast
Public Instance Methods
string_to_date(value)
click to toggle source
@override
Calls superclass method
# File lib/arjdbc/db2/column.rb, line 133 def string_to_date(value) return nil unless value = current_date_time_parse(value) super end
string_to_dummy_time(value)
click to toggle source
@override
Calls superclass method
# File lib/arjdbc/db2/column.rb, line 147 def string_to_dummy_time(value) return nil unless value = current_date_time_parse(value) super end
string_to_time(value)
click to toggle source
@override
Calls superclass method
# File lib/arjdbc/db2/column.rb, line 140 def string_to_time(value) return nil unless value = current_date_time_parse(value) super end
Private Instance Methods
current_date_time_parse(value)
click to toggle source
# File lib/arjdbc/db2/column.rb, line 155 def current_date_time_parse(value) return value unless value.is_a?(String) return nil if value.empty? return Time.now if value.index('CURRENT') == 0 return value end