Methods

Attributes

[R] array
[R] fmod
[R] oid

Class Public methods

new(type_metadata, oid: nil, fmod: nil)

📝 Source code
# File activerecord/lib/active_record/connection_adapters/postgresql/type_metadata.rb, line 10
      def initialize(type_metadata, oid: nil, fmod: nil)
        super(type_metadata)
        @type_metadata = type_metadata
        @oid = oid
        @fmod = fmod
        @array = /\[\]$/.match?(type_metadata.sql_type)
      end
🔎 See on GitHub

Instance Public methods

==(other)

Also aliased as: eql?
📝 Source code
# File activerecord/lib/active_record/connection_adapters/postgresql/type_metadata.rb, line 22
      def ==(other)
        other.is_a?(PostgreSQLTypeMetadata) &&
          attributes_for_hash == other.attributes_for_hash
      end
🔎 See on GitHub

eql?(other)

Alias for: ==

hash()

📝 Source code
# File activerecord/lib/active_record/connection_adapters/postgresql/type_metadata.rb, line 28
      def hash
        attributes_for_hash.hash
      end
🔎 See on GitHub

sql_type()

📝 Source code
# File activerecord/lib/active_record/connection_adapters/postgresql/type_metadata.rb, line 18
      def sql_type
        super.gsub(/\[\]$/, "".freeze)
      end
🔎 See on GitHub

Instance Protected methods

attributes_for_hash()

📝 Source code
# File activerecord/lib/active_record/connection_adapters/postgresql/type_metadata.rb, line 34
        def attributes_for_hash
          [self.class, @type_metadata, oid, fmod]
        end
🔎 See on GitHub