Sha256: 57f57103e037164bb5fbba4a3826c1ef6733e9e140177f1c4f8e72af94aaf7ae

Contents?: true

Size: 775 Bytes

Versions: 37

Compression:

Stored size: 775 Bytes

Contents

# frozen_string_literal: true

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

37 entries across 37 versions & 4 rubygems

Version Path
activerecord-5.2.8.1 lib/active_record/connection_adapters/mysql/type_metadata.rb
activerecord-5.2.8 lib/active_record/connection_adapters/mysql/type_metadata.rb
activerecord-5.2.7.1 lib/active_record/connection_adapters/mysql/type_metadata.rb
activerecord-5.2.7 lib/active_record/connection_adapters/mysql/type_metadata.rb
activerecord-5.2.6.3 lib/active_record/connection_adapters/mysql/type_metadata.rb
activerecord-5.2.6.2 lib/active_record/connection_adapters/mysql/type_metadata.rb
activerecord-5.2.6.1 lib/active_record/connection_adapters/mysql/type_metadata.rb
activerecord-5.2.6 lib/active_record/connection_adapters/mysql/type_metadata.rb
activerecord-5.2.4.6 lib/active_record/connection_adapters/mysql/type_metadata.rb
activerecord-5.2.5 lib/active_record/connection_adapters/mysql/type_metadata.rb
activerecord-5.2.4.5 lib/active_record/connection_adapters/mysql/type_metadata.rb
activerecord-5.2.4.4 lib/active_record/connection_adapters/mysql/type_metadata.rb
activerecord-5.2.4.3 lib/active_record/connection_adapters/mysql/type_metadata.rb
activerecord-5.2.4.2 lib/active_record/connection_adapters/mysql/type_metadata.rb
activerecord-5.2.4.1 lib/active_record/connection_adapters/mysql/type_metadata.rb
activerecord-5.2.4 lib/active_record/connection_adapters/mysql/type_metadata.rb
activerecord-5.2.4.rc1 lib/active_record/connection_adapters/mysql/type_metadata.rb
spiral_form-0.1.1 vendor/bundle/gems/activerecord-5.2.3/lib/active_record/connection_adapters/mysql/type_metadata.rb
spiral_form-0.1.0 vendor/bundle/gems/activerecord-5.2.3/lib/active_record/connection_adapters/mysql/type_metadata.rb
activerecord-5.2.3 lib/active_record/connection_adapters/mysql/type_metadata.rb