Class: ActiveRecord::ConnectionAdapters::PostgreSQLTypeMetadata
Relationships & Source Files | |
Inherits: |
ActiveRecord::ConnectionAdapters::SqlTypeMetadata
|
Defined in: | activerecord/lib/active_record/connection_adapters/postgresql/type_metadata.rb |
Class Method Summary
Instance Attribute Summary
Instance Method Summary
- #==(other) (also: #eql?)
-
#eql?(other)
Alias for #==.
- #hash
- #sql_type
Constructor Details
.new(type_metadata, oid: nil, fmod: nil) ⇒ PostgreSQLTypeMetadata
Instance Attribute Details
#array (readonly)
[ GitHub ]#fmod (readonly)
[ GitHub ]#oid (readonly)
[ GitHub ]Instance Method Details
#==(other) Also known as: #eql?
[ GitHub ]# 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
#eql?(other)
Alias for #==.
# File 'activerecord/lib/active_record/connection_adapters/postgresql/type_metadata.rb', line 26
alias eql? ==
#hash
[ GitHub ]# File 'activerecord/lib/active_record/connection_adapters/postgresql/type_metadata.rb', line 28
def hash attributes_for_hash.hash end
#sql_type
[ GitHub ]# File 'activerecord/lib/active_record/connection_adapters/postgresql/type_metadata.rb', line 18
def sql_type super.gsub(/\[\]$/, "".freeze) end