Sha256: 6655291c23f47dbd31202f534d37d2a32f07d1e88496739dbae0b48110e2c0f6

Contents?: true

Size: 744 Bytes

Versions: 19

Compression:

Stored size: 744 Bytes

Contents

module ActiveRecord
  module ConnectionAdapters
    module MySQL
      class TypeMetadata < DelegateClass(SqlTypeMetadata) # :nodoc:
        undef to_yaml if method_defined?(:to_yaml)

        attr_reader :extra

        def initialize(type_metadata, extra: "")
          super(type_metadata)
          @type_metadata = type_metadata
          @extra = extra
        end

        def ==(other)
          other.is_a?(MySQL::TypeMetadata) &&
            attributes_for_hash == other.attributes_for_hash
        end
        alias eql? ==

        def hash
          attributes_for_hash.hash
        end

        protected

          def attributes_for_hash
            [self.class, @type_metadata, extra]
          end
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
activerecord-5.1.7 lib/active_record/connection_adapters/mysql/type_metadata.rb
activerecord-5.1.7.rc1 lib/active_record/connection_adapters/mysql/type_metadata.rb
activerecord-5.1.6.2 lib/active_record/connection_adapters/mysql/type_metadata.rb
activerecord-5.1.6.1 lib/active_record/connection_adapters/mysql/type_metadata.rb
activerecord-5.1.6 lib/active_record/connection_adapters/mysql/type_metadata.rb
activerecord-5.1.5 lib/active_record/connection_adapters/mysql/type_metadata.rb
activerecord-5.1.5.rc1 lib/active_record/connection_adapters/mysql/type_metadata.rb
activerecord-5.1.4 lib/active_record/connection_adapters/mysql/type_metadata.rb
activerecord-5.1.4.rc1 lib/active_record/connection_adapters/mysql/type_metadata.rb
activerecord-5.1.3 lib/active_record/connection_adapters/mysql/type_metadata.rb
activerecord-5.1.3.rc3 lib/active_record/connection_adapters/mysql/type_metadata.rb
activerecord-5.1.3.rc2 lib/active_record/connection_adapters/mysql/type_metadata.rb
activerecord-5.1.3.rc1 lib/active_record/connection_adapters/mysql/type_metadata.rb
activerecord-5.1.2 lib/active_record/connection_adapters/mysql/type_metadata.rb
activerecord-5.1.2.rc1 lib/active_record/connection_adapters/mysql/type_metadata.rb
activerecord-5.1.1 lib/active_record/connection_adapters/mysql/type_metadata.rb
activerecord-5.1.0 lib/active_record/connection_adapters/mysql/type_metadata.rb
activerecord-5.1.0.rc2 lib/active_record/connection_adapters/mysql/type_metadata.rb
activerecord-5.1.0.rc1 lib/active_record/connection_adapters/mysql/type_metadata.rb