3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
|
# File 'lib/active_record/connection_adapters/ibm_db_adapter.rb', line 3254
def quote_date_time_for_pstmt(value, column=nil)
if column && column.sql_type == 'time'
sep = TIME_SEP_CHAR[@adapter.time_sep]
value = value.to_s[/\d\d#{sep}\d\d#{sep}\d\d/]
elsif value.acts_like?(:date)
if column && column.sql_type == 'timestamp'
value = value.to_time
end
value = @adapter.quoted_date(value)
elsif value.acts_like?(:time)
value = @adapter.quoted_date(value)
else
value.to_yaml
end
end
|