Class: ActiveRecord::ConnectionAdapters::Clickhouse::OID::Uuid

Inherits:
Type::Value
  • Object
show all
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

Instance Method Details

#changed?(old_value, new_value, _new_value_before_type_cast) ⇒ Boolean

Returns:

  • (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

Returns:

  • (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

#typeObject



13
14
15
# File 'lib/active_record/connection_adapters/clickhouse/oid/uuid.rb', line 13

def type
  :uuid
end