class Mysql2SqlTypesTest

Public Instance Methods

test_binary_types() click to toggle source
# File activerecord/test/cases/adapters/mysql2/sql_types_test.rb, line 6
def test_binary_types
  assert_equal "varbinary(64)", type_to_sql(:binary, 64)
  assert_equal "varbinary(4095)", type_to_sql(:binary, 4095)
  assert_equal "blob", type_to_sql(:binary, 4096)
  assert_equal "blob", type_to_sql(:binary)
end
type_to_sql(type, limit = nil) click to toggle source
# File activerecord/test/cases/adapters/mysql2/sql_types_test.rb, line 13
def type_to_sql(type, limit = nil)
  ActiveRecord::Base.connection.type_to_sql(type, limit: limit)
end