A combination of utilities used internally by pycassa and utilities available for use by others working with pycassa.
Converts a datetime or timestamp to a type 1 uuid.UUID.
This is to assist with getting a time slice of columns or creating columns when column names are TimeUUIDType. Note that this is done automatically in most cases if name packing and value packing are enabled.
Also, be careful not to rely on this when specifying a discrete set of columns to fetch, as the non-timestamp portions of the UUID will be generated randomly. This problem does not matter with slice arguments, however, as the non-timestamp portions can be set to their lowest or highest possible values.
Parameters: |
|
---|---|
Return type: | uuid.UUID |
Changed in version 1.7.0: Prior to 1.7.0, datetime objects were expected to be in local time. In 1.7.0 and beyond, naive datetimes are assumed to be in UTC and tz-aware objects will be automatically converted to UTC.
Converts a version 1 uuid.UUID to a timestamp with the same precision as time.time() returns. This is useful for examining the results of queries returning a v1 UUID.
Parameters: | uuid_arg – a version 1 UUID |
---|---|
Return type: | timestamp |
A dictionary which maintains the insertion order of keys.
A dictionary which maintains the insertion order of keys.