Class: ActiveRecord::ConnectionAdapters::YugabyteDB::OID::Uuid
- Inherits:
-
Type::Value
- Object
- Type::Value
- ActiveRecord::ConnectionAdapters::YugabyteDB::OID::Uuid
- Defined in:
- lib/active_record/connection_adapters/yugabytedb/oid/uuid.rb
Overview
:nodoc:
Constant Summary collapse
- ACCEPTABLE_UUID =
%r{\A(\{)?([a-fA-F0-9]{4}-?){8}(?(1)\}|)\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
16 17 18 19 |
# File 'lib/active_record/connection_adapters/yugabytedb/oid/uuid.rb', line 16 def changed?(old_value, new_value, _new_value_before_type_cast) old_value.class != new_value.class || new_value && old_value.casecmp(new_value) != 0 end |
#changed_in_place?(raw_old_value, new_value) ⇒ Boolean
21 22 23 24 |
# File 'lib/active_record/connection_adapters/yugabytedb/oid/uuid.rb', line 21 def changed_in_place?(raw_old_value, new_value) raw_old_value.class != new_value.class || new_value && raw_old_value.casecmp(new_value) != 0 end |
#type ⇒ Object
12 13 14 |
# File 'lib/active_record/connection_adapters/yugabytedb/oid/uuid.rb', line 12 def type :uuid end |