Class: Cequel::Type::Timeuuid

Inherits:
Uuid
  • Object
show all
Defined in:
lib/cequel/type.rb

Overview

‘timeuuid` columns are a special type of UUID column that support time-based queries. For instance, a `timeuuid` clustering column can be filtered by ranges of times into which the UUIDs must fall. This functionality presumes the use of type 1 UUIDs, which encode the timestamp of their creation.

See Also:

Since:

  • 1.0.0

Instance Method Summary collapse

Methods inherited from Base

#compatible_types, #cql_aliases, #cql_name, #internal_name, #to_s

Instance Method Details

#cast(value) ⇒ Object

Since:

  • 1.0.0



462
463
464
# File 'lib/cequel/type.rb', line 462

def cast(value)
  Cassandra::TimeUuid.new(super.value)
end

#internal_namesObject

Since:

  • 1.0.0



466
467
468
# File 'lib/cequel/type.rb', line 466

def internal_names
  ['org.apache.cassandra.db.marshal.TimeUUIDType']
end