Class: ActiveRecord::ConnectionAdapters::PostgreSQL::TypeMetadata
- Inherits:
-
SqlTypeMetadata
- Object
- SqlTypeMetadata
- ActiveRecord::ConnectionAdapters::PostgreSQL::TypeMetadata
- Defined in:
- lib/active_record/connection_adapters/postgresql/type_metadata.rb
Instance Attribute Summary collapse
-
#fmod ⇒ Object
readonly
Returns the value of attribute fmod.
-
#oid ⇒ Object
readonly
Returns the value of attribute oid.
Attributes inherited from SqlTypeMetadata
#limit, #precision, #scale, #sql_type, #type
Instance Method Summary collapse
- #==(other) ⇒ Object (also: #eql?)
- #hash ⇒ Object
-
#initialize(type_metadata, oid: nil, fmod: nil) ⇒ TypeMetadata
constructor
A new instance of TypeMetadata.
Constructor Details
#initialize(type_metadata, oid: nil, fmod: nil) ⇒ TypeMetadata
Returns a new instance of TypeMetadata.
12 13 14 15 16 |
# File 'lib/active_record/connection_adapters/postgresql/type_metadata.rb', line 12 def initialize(, oid: nil, fmod: nil) super() @oid = oid @fmod = fmod end |
Instance Attribute Details
#fmod ⇒ Object (readonly)
Returns the value of attribute fmod.
10 11 12 |
# File 'lib/active_record/connection_adapters/postgresql/type_metadata.rb', line 10 def fmod @fmod end |
#oid ⇒ Object (readonly)
Returns the value of attribute oid.
10 11 12 |
# File 'lib/active_record/connection_adapters/postgresql/type_metadata.rb', line 10 def oid @oid end |
Instance Method Details
#==(other) ⇒ Object Also known as: eql?
18 19 20 21 22 23 |
# File 'lib/active_record/connection_adapters/postgresql/type_metadata.rb', line 18 def ==(other) other.is_a?(TypeMetadata) && __getobj__ == other.__getobj__ && oid == other.oid && fmod == other.fmod end |
#hash ⇒ Object
26 27 28 29 30 31 |
# File 'lib/active_record/connection_adapters/postgresql/type_metadata.rb', line 26 def hash TypeMetadata.hash ^ __getobj__.hash ^ oid.hash ^ fmod.hash end |