Class: ActiveRecord::ConnectionAdapters::SqlTypeMetadata
Do not use. This class is for internal use only.
| Relationships & Source Files | |
| Super Chains via Extension / Inclusion / Inheritance | |
|
Instance Chain:
self,
Deduplicable
|
|
| Inherits: | Object |
| Defined in: | activerecord/lib/active_record/connection_adapters/sql_type_metadata.rb |
Class Method Summary
Instance Attribute Summary
- #limit readonly
- #precision readonly
- #scale readonly
- #sql_type readonly
- #type readonly
Instance Method Summary
- #==(other) (also: #eql?)
- #as_schema_json
-
#eql?(other)
Alias for #==.
- #hash
- #init_from_schema_json(coder, references)
- #deduplicated private
Deduplicable - Included
| #-@ | Alias for Deduplicable#deduplicate. |
| #deduplicate, #deduplicated | |
Constructor Details
.new(sql_type: nil, type: nil, limit: nil, precision: nil, scale: nil) ⇒ SqlTypeMetadata
Instance Attribute Details
#limit (readonly)
[ GitHub ]#precision (readonly)
[ GitHub ]#scale (readonly)
[ GitHub ]#sql_type (readonly)
[ GitHub ]#type (readonly)
[ GitHub ]Instance Method Details
#==(other) Also known as: #eql?
[ GitHub ]#as_schema_json
[ GitHub ]#deduplicated (private)
[ GitHub ]# File 'activerecord/lib/active_record/connection_adapters/sql_type_metadata.rb', line 53
def deduplicated @sql_type = -sql_type super end
#eql?(other)
Alias for #==.
# File 'activerecord/lib/active_record/connection_adapters/sql_type_metadata.rb', line 27
alias eql? ==
#hash
[ GitHub ]# File 'activerecord/lib/active_record/connection_adapters/sql_type_metadata.rb', line 29
def hash [ SqlTypeMetadata, @sql_type, @type, @limit, @precision, @scale, ].hash end
#init_from_schema_json(coder, references)
[ GitHub ]# File 'activerecord/lib/active_record/connection_adapters/sql_type_metadata.rb', line 44
def init_from_schema_json(coder, references) @sql_type = coder["sql_type"] @type = coder["type"]&.to_sym @limit = coder["limit"] @precision = coder["precision"] @scale = coder["scale"] end