Class: ActiveRecord::ConnectionAdapters::MysqlAdapter::Column
- Inherits:
-
AbstractMysqlAdapter::Column
- Object
- Column
- AbstractMysqlAdapter::Column
- ActiveRecord::ConnectionAdapters::MysqlAdapter::Column
- Defined in:
- activerecord/lib/active_record/connection_adapters/mysql_adapter.rb
Overview
:nodoc:
Constant Summary
Constants inherited from Column
Column::FALSE_VALUES, Column::TRUE_VALUES
Instance Attribute Summary
Attributes inherited from AbstractMysqlAdapter::Column
Attributes inherited from Column
#coder, #default, #limit, #name, #null, #precision, #primary, #scale, #sql_type, #type
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from AbstractMysqlAdapter::Column
#case_sensitive?, #extract_default, #has_default?, #initialize
Methods inherited from Column
binary_to_string, #extract_default, #has_default?, #human_name, #initialize, #klass, #number?, #string_to_binary, string_to_binary, #text?, #type_cast, #type_cast_code, value_to_boolean, value_to_decimal
Constructor Details
This class inherits a constructor from ActiveRecord::ConnectionAdapters::AbstractMysqlAdapter::Column
Class Method Details
.string_to_date(v) ⇒ Object
82 83 84 85 |
# File 'activerecord/lib/active_record/connection_adapters/mysql_adapter.rb', line 82 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
77 78 79 80 |
# File 'activerecord/lib/active_record/connection_adapters/mysql_adapter.rb', line 77 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
65 66 67 68 69 70 71 72 73 74 75 |
# File 'activerecord/lib/active_record/connection_adapters/mysql_adapter.rb', line 65 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
87 88 89 |
# File 'activerecord/lib/active_record/connection_adapters/mysql_adapter.rb', line 87 def adapter MysqlAdapter end |