Class: ActiveRecord::ConnectionAdapters::Clickhouse::OID::Uuid
- Inherits:
-
Type::Value
- Object
- Type::Value
- ActiveRecord::ConnectionAdapters::Clickhouse::OID::Uuid
- Defined in:
- lib/active_record/connection_adapters/clickhouse/oid/uuid.rb
Overview
:nodoc:
Constant Summary collapse
- ACCEPTABLE_UUID =
%r{\A(\{)?([a-fA-F0-9]{4}-?){8}(?(1)\}|)\z}
- CANONICAL_UUID =
%r{\A[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}\z}
Instance Method Summary collapse
- #changed?(old_value, new_value, _new_value_before_type_cast) ⇒ Boolean
- #changed_in_place?(raw_old_value, new_value) ⇒ Boolean
- #type ⇒ Object
Instance Method Details
#changed?(old_value, new_value, _new_value_before_type_cast) ⇒ Boolean
17 18 19 20 |
# File 'lib/active_record/connection_adapters/clickhouse/oid/uuid.rb', line 17 def changed?(old_value, new_value, _new_value_before_type_cast) old_value.class != new_value.class || new_value != old_value end |
#changed_in_place?(raw_old_value, new_value) ⇒ Boolean
22 23 24 25 |
# File 'lib/active_record/connection_adapters/clickhouse/oid/uuid.rb', line 22 def changed_in_place?(raw_old_value, new_value) raw_old_value.class != new_value.class || new_value != raw_old_value end |
#type ⇒ Object
13 14 15 |
# File 'lib/active_record/connection_adapters/clickhouse/oid/uuid.rb', line 13 def type :uuid end |