Contents
- Usage page
-
API docs index
-
Cassandra module
- AddressResolution module
- AttrBoolean module
- Auth module
- Compression module
- Error module
- Errors module
- Execution module
- LoadBalancing module
- Reconnection module
- Retry module
- Statement module
- Statements module
- TimestampGenerator module
- Types module
- Aggregate class
- Argument class
- Cluster class
- Column class
- ColumnContainer class
- Function class
- Future class
- Host class
- Index class
- Keyspace class
- Listener class
- Logger class
- MaterializedView class
- Result class
- Session class
- Table class
- Time class
-
TimeUuid class
- Tuple class
- Type class
- UDT class
- Uuid class
-
Cassandra module
A variant of UUID which can extract its time component.
You can use Uuid::Generator
to generate TimeUuid
s
Inherits
Includes
Comparable
Methods
Returns the time component from this UUID as a Time.
- Returns:
-
Type Details Time
- Specifications:
-
-
TimeUuid#to_time
returns a Time x = TimeUuid.new('00b69180-d0e1-11e2-8b8b-0800200c9a66') x.to_time.should be > ::Time.utc(2013, 6, 9, 8, 45, 57) x.to_time.should be < ::Time.utc(2013, 6, 9, 8, 45, 58)
-
Compares this timeuuid with another timeuuid
- Parameters:
-
Name Type Details other TimeUuid
another timeuuid to compare - Returns:
-
Type Details nil
when other is not a Uuid
Integer
-1
when less thanother
,0
when equal toother
and1
when greater thanother
- See Also:
-
Comparable
- Specifications:
-
-
TimeUuid#<=>
sorts by the time component uuids.shuffle.sort.should == uuids
-
TimeUuid#<=>
allows comparison of UUID and TimeUUID x = generator.now y = Uuid.new(x.value) x.should == y
-
TimeUuid#<=>
allows comparison of TimeUUID and nil x = generator.now y = nil lambda { x.should_not == y }.should_not raise_error
-