Class: ActiveRecord::ConnectionAdapters::Mysql2Adapter::Column
- Inherits:
-
AbstractMysqlAdapter::Column
- Object
- AbstractMysqlAdapter::Column
- ActiveRecord::ConnectionAdapters::Mysql2Adapter::Column
- Defined in:
- lib/activerecord-mysql-unsigned/active_record/v3/connection_adapters/mysql2_adapter.rb,
lib/activerecord-mysql-unsigned/active_record/v4/connection_adapters/mysql2_adapter.rb
Instance Attribute Summary collapse
-
#unsigned ⇒ Object
readonly
Returns the value of attribute unsigned.
Instance Method Summary collapse
-
#initialize(name, default, sql_type = nil, null = true, collation = nil, strict = false, extra = "") ⇒ Column
constructor
A new instance of Column.
Constructor Details
#initialize(name, default, sql_type = nil, null = true, collation = nil, strict = false, extra = "") ⇒ Column
Returns a new instance of Column.
10 11 12 13 14 15 16 17 |
# File 'lib/activerecord-mysql-unsigned/active_record/v3/connection_adapters/mysql2_adapter.rb', line 10 def initialize(name, default, sql_type = nil, null = true, collation = nil) if sql_type.present? @unsigned = sql_type.include? "unsigned" else @unsigned = false end super(name, default, sql_type, null, collation) end |
Instance Attribute Details
#unsigned ⇒ Object (readonly)
Returns the value of attribute unsigned.
8 9 10 |
# File 'lib/activerecord-mysql-unsigned/active_record/v3/connection_adapters/mysql2_adapter.rb', line 8 def unsigned @unsigned end |