Class: ActiveRecord::ConnectionAdapters::MysqlAdapter::Column
- Inherits:
-
AbstractMysqlAdapter::Column
- Object
- AbstractMysqlAdapter::Column
- ActiveRecord::ConnectionAdapters::MysqlAdapter::Column
- Defined in:
- lib/active_record/connection_adapters/mysql_adapter.rb
Overview
:nodoc:
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.string_to_date(v) ⇒ Object
81 82 83 84 |
# File 'lib/active_record/connection_adapters/mysql_adapter.rb', line 81 def self.string_to_date(v) return super unless Mysql::Time === v new_date(v.year, v.month, v.day) end |
.string_to_dummy_time(v) ⇒ Object
76 77 78 79 |
# File 'lib/active_record/connection_adapters/mysql_adapter.rb', line 76 def self.string_to_dummy_time(v) return super unless Mysql::Time === v new_time(2000, 01, 01, v.hour, v.minute, v.second, v.second_part) end |
.string_to_time(value) ⇒ Object
64 65 66 67 68 69 70 71 72 73 74 |
# File 'lib/active_record/connection_adapters/mysql_adapter.rb', line 64 def self.string_to_time(value) return super unless Mysql::Time === value new_time( value.year, value.month, value.day, value.hour, value.minute, value.second, value.second_part) end |
Instance Method Details
#adapter ⇒ Object
86 87 88 |
# File 'lib/active_record/connection_adapters/mysql_adapter.rb', line 86 def adapter MysqlAdapter end |