Class: ActiveRecord::ConnectionAdapters::Spanner::TypeMetadata
- Inherits:
-
SqlTypeMetadata
- Object
- SqlTypeMetadata
- ActiveRecord::ConnectionAdapters::Spanner::TypeMetadata
- Includes:
- Deduplicable
- Defined in:
- lib/active_record/connection_adapters/spanner/type_metadata.rb
Instance Attribute Summary collapse
-
#allow_commit_timestamp ⇒ Object
readonly
Returns the value of attribute allow_commit_timestamp.
-
#generated ⇒ Object
readonly
Returns the value of attribute generated.
-
#ordinal_position ⇒ Object
readonly
Returns the value of attribute ordinal_position.
Instance Method Summary collapse
- #==(other) ⇒ Object (also: #eql?)
- #hash ⇒ Object
-
#initialize(type_metadata, ordinal_position: nil, allow_commit_timestamp: nil, generated: nil) ⇒ TypeMetadata
constructor
A new instance of TypeMetadata.
Constructor Details
#initialize(type_metadata, ordinal_position: nil, allow_commit_timestamp: nil, generated: nil) ⇒ TypeMetadata
Returns a new instance of TypeMetadata.
19 20 21 22 23 24 |
# File 'lib/active_record/connection_adapters/spanner/type_metadata.rb', line 19 def initialize , ordinal_position: nil, allow_commit_timestamp: nil, generated: nil super @ordinal_position = ordinal_position = @generated = generated end |
Instance Attribute Details
#allow_commit_timestamp ⇒ Object (readonly)
Returns the value of attribute allow_commit_timestamp.
17 18 19 |
# File 'lib/active_record/connection_adapters/spanner/type_metadata.rb', line 17 def end |
#generated ⇒ Object (readonly)
Returns the value of attribute generated.
17 18 19 |
# File 'lib/active_record/connection_adapters/spanner/type_metadata.rb', line 17 def generated @generated end |
#ordinal_position ⇒ Object (readonly)
Returns the value of attribute ordinal_position.
17 18 19 |
# File 'lib/active_record/connection_adapters/spanner/type_metadata.rb', line 17 def ordinal_position @ordinal_position end |
Instance Method Details
#==(other) ⇒ Object Also known as: eql?
26 27 28 29 30 31 32 |
# File 'lib/active_record/connection_adapters/spanner/type_metadata.rb', line 26 def == other other.is_a?(TypeMetadata) && __getobj__ == other.__getobj__ && ordinal_position == other.ordinal_position && == other. && generated == other.generated end |
#hash ⇒ Object
35 36 37 38 39 40 41 |
# File 'lib/active_record/connection_adapters/spanner/type_metadata.rb', line 35 def hash TypeMetadata.hash ^ __getobj__.hash ^ ordinal_position.hash ^ .hash ^ generated.hash end |