Sha256: 2b65d23be5bd27f9524a04d4050cf9258d85b7d36d0b96db6c4b42690e19f46c
Contents?: true
Size: 685 Bytes
Versions: 12
Compression:
Stored size: 685 Bytes
Contents
# frozen_string_literal: true require 'rom/sql/schema/attributes_inferrer' module ROM module SQL module MySQL class TypeBuilder < Schema::TypeBuilder defines :db_type_mapping db_type_mapping( 'tinytext' => Types::String, 'text' => Types::String, 'mediumtext' => Types::String, 'longtext' => Types::String ).freeze def map_type(ruby_type, db_type, **_) map_db_type(db_type) || super end def map_db_type(db_type) self.class.db_type_mapping[db_type] end end end Schema::TypeBuilder.register(:mysql, MySQL::TypeBuilder.new.freeze) end end
Version data entries
12 entries across 12 versions & 1 rubygems