method
integer_to_sql
v5.2.3 -
Show latest stable
- Class:
ActiveRecord::ConnectionAdapters
integer_to_sql(limit)private
No documentation available.
# File activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 828
def integer_to_sql(limit) # :nodoc:
case limit
when 1; "tinyint"
when 2; "smallint"
when 3; "mediumint"
when nil, 4; "int"
when 5..8; "bigint"
else raise(ActiveRecordError, "No integer type has byte size #{limit}. Use a decimal with scale 0 instead.")
end
end