Sha256: e31c8d94bc392188fb56749d8e7e0f5d30ab5311d5d07450543edc3a9a8c84fe

Contents?: true

Size: 826 Bytes

Versions: 36

Compression:

Stored size: 826 Bytes

Contents

# frozen_string_literal: true

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

        attr_reader :oid, :fmod

        def initialize(type_metadata, oid: nil, fmod: nil)
          super(type_metadata)
          @oid = oid
          @fmod = fmod
        end

        def ==(other)
          other.is_a?(TypeMetadata) &&
            __getobj__ == other.__getobj__ &&
            oid == other.oid &&
            fmod == other.fmod
        end
        alias eql? ==

        def hash
          TypeMetadata.hash ^
            __getobj__.hash ^
            oid.hash ^
            fmod.hash
        end
      end
    end
    PostgreSQLTypeMetadata = PostgreSQL::TypeMetadata
  end
end

Version data entries

36 entries across 36 versions & 4 rubygems

Version Path
activerecord-6.0.6.1 lib/active_record/connection_adapters/postgresql/type_metadata.rb
activerecord-6.0.6 lib/active_record/connection_adapters/postgresql/type_metadata.rb
activerecord-6.0.5.1 lib/active_record/connection_adapters/postgresql/type_metadata.rb
activerecord-6.0.5 lib/active_record/connection_adapters/postgresql/type_metadata.rb
activerecord-6.0.4.8 lib/active_record/connection_adapters/postgresql/type_metadata.rb
activerecord-6.0.4.7 lib/active_record/connection_adapters/postgresql/type_metadata.rb
activerecord-6.0.4.6 lib/active_record/connection_adapters/postgresql/type_metadata.rb
activerecord-6.0.4.5 lib/active_record/connection_adapters/postgresql/type_metadata.rb
activerecord-6.0.4.4 lib/active_record/connection_adapters/postgresql/type_metadata.rb
activerecord-6.0.4.3 lib/active_record/connection_adapters/postgresql/type_metadata.rb
activerecord-6.0.4.2 lib/active_record/connection_adapters/postgresql/type_metadata.rb
activerecord-6.0.4.1 lib/active_record/connection_adapters/postgresql/type_metadata.rb
activerecord-6.0.4 lib/active_record/connection_adapters/postgresql/type_metadata.rb
activerecord-6.0.3.7 lib/active_record/connection_adapters/postgresql/type_metadata.rb
activerecord-6.0.3.6 lib/active_record/connection_adapters/postgresql/type_metadata.rb
activerecord-6.0.3.5 lib/active_record/connection_adapters/postgresql/type_metadata.rb
activerecord-6.0.3.4 lib/active_record/connection_adapters/postgresql/type_metadata.rb
activerecord-6.0.3.3 lib/active_record/connection_adapters/postgresql/type_metadata.rb
activerecord-6.0.3.2 lib/active_record/connection_adapters/postgresql/type_metadata.rb
activerecord-6.0.3.1 lib/active_record/connection_adapters/postgresql/type_metadata.rb