Class: ActiveRecord::ConnectionAdapters::MysqlAdapter::Column
- Inherits:
-
AbstractMysqlAdapter::Column
- Object
- Column
- AbstractMysqlAdapter::Column
- ActiveRecord::ConnectionAdapters::MysqlAdapter::Column
- Defined in:
- 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, #default_function, #limit, #name, #null, #precision, #primary, #scale, #sql_type, #type
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from AbstractMysqlAdapter::Column
#blob_or_text_column?, #case_sensitive?, #extract_default, #has_default?, #initialize
Methods inherited from Column
#binary?, binary_to_string, #extract_default, #has_default?, #human_name, #initialize, #klass, #number?, #string_to_binary, string_to_binary, #text?, #type_cast, #type_cast_code, #type_cast_for_write, value_to_boolean, value_to_date, value_to_decimal, value_to_integer
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 '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 '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 '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 'lib/active_record/connection_adapters/mysql_adapter.rb', line 87 def adapter MysqlAdapter end |