ScyllaDB University Live | Free Virtual Training Event
Learn more
ScyllaDB Documentation Logo Documentation
  • Deployments
    • Cloud
    • Server
  • Tools
    • ScyllaDB Manager
    • ScyllaDB Monitoring Stack
    • ScyllaDB Operator
  • Drivers
    • CQL Drivers
    • DynamoDB Drivers
    • Supported Driver Versions
  • Resources
    • ScyllaDB University
    • Community Forum
    • Tutorials
Install
Ask AI
ScyllaDB Docs ScyllaDB CPP RS Driver API Documentation CassUuid

Caution

You're viewing documentation for an unstable version of ScyllaDB CPP RS Driver. Switch to the latest stable version.

CassUuid¶

struct CassUuid¶

Version 1 (time-based) or version 4 (random) UUID.

Public Functions

void cass_uuid_min_from_time(cass_uint64_t time, CassUuid *output)¶

Sets the UUID to the minimum V1 (time) value for the specified time.

Parameters:
  • time – [in]

  • output – [out] A minimum V1 UUID for the specified time.

void cass_uuid_max_from_time(cass_uint64_t time, CassUuid *output)¶

Sets the UUID to the maximum V1 (time) value for the specified time.

Parameters:
  • time – [in]

  • output – [out] A maximum V1 UUID for the specified time.

cass_uint64_t cass_uuid_timestamp(CassUuid uuid)¶

Gets the timestamp for a V1 UUID

Parameters:

uuid – [in]

Returns:

The timestamp in milliseconds since the Epoch (00:00:00 UTC on 1 January 1970). 0 returned if the UUID is not V1.

cass_uint8_t cass_uuid_version(CassUuid uuid)¶

Gets the version for a UUID

Parameters:

uuid – [in]

Returns:

The version of the UUID (1 or 4)

void cass_uuid_string(CassUuid uuid, char *output)¶

Returns a null-terminated string for the specified UUID.

Parameters:
  • uuid – [in]

  • output – [out] A null-terminated string of length CASS_UUID_STRING_LENGTH.

CassError cass_uuid_from_string(const char *str, CassUuid *output)¶

Returns a UUID for the specified string.

Example: “550e8400-e29b-41d4-a716-446655440000”

Parameters:
  • str – [in]

  • output – [out]

CassError cass_uuid_from_string_n(const char *str, size_t str_length, CassUuid *output)¶

Same as cass_uuid_from_string(), but with lengths for string parameters.

See also

cass_uuid_from_string()

Parameters:
  • str – [in]

  • str_length – [in]

  • output – [out]

Returns:

same as cass_uuid_from_string()

Public Members

cass_uint64_t time_and_version¶

Represents the time and version part of a UUID. The most significant 4 bits represent the version and the bottom 60 bits representing the time part. For version 1 the time part represents the number of 100 nanosecond periods since 00:00:00 UTC, January 1, 1970 (the Epoch). For version 4 the time part is randomly generated.

cass_uint64_t clock_seq_and_node¶

Represents the clock sequence and the node part of a UUID. The most significant 16 bits represent the clock sequence (except for the most significant bit which is always set) and the bottom 48 bits represent the node part. For version 1 (time-based) the clock sequence part is randomly generated and the node part can be explicitly set, otherwise, it’s generated from node unique information. For version 4 both the clock sequence and the node parts are randomly generated.

Was this page helpful?

PREVIOUS
CassUserType
NEXT
CassUuidGen
  • Create an issue
  • Edit this page

On this page

  • CassUuid
    • CassUuid
      • cass_uuid_min_from_time()
      • cass_uuid_max_from_time()
      • cass_uuid_timestamp()
      • cass_uuid_version()
      • cass_uuid_string()
      • cass_uuid_from_string()
      • cass_uuid_from_string_n()
      • time_and_version
      • clock_seq_and_node
ScyllaDB CPP RS Driver
  • master
    • master
    • v1.0.0
  • ScyllaDB CPP RS Driver
  • API Documentation
    • BasicTypes
    • CassConsistency
    • CassError
    • CassValueType
    • CustomAllocator
    • Logging
    • Miscellaneous
    • CassAggregateMeta
    • CassAuthenticator
    • CassAuthenticatorCallbacks
    • CassBatch
    • CassCluster
    • CassCollection
    • CassColumnMeta
    • CassCustomPayload
    • CassDataType
    • CassErrorResult
    • CassExecProfile
    • CassFunctionMeta
    • CassFuture
    • CassIndexMeta
    • CassInet
    • CassIterator
    • CassKeyspaceMeta
    • CassMaterializedViewMeta
    • CassMetrics
    • CassNode
    • CassPrepared
    • CassResult
    • CassRetryPolicy
    • CassRow
    • CassSchemaMeta
    • CassSession
    • CassSpeculativeExecutionMetrics
    • CassSsl
    • CassStatement
    • CassTableMeta
    • CassTimestampGen
    • CassTuple
    • CassUserType
    • CassUuid
    • CassUuidGen
    • CassValue
    • CassVersion
  • Getting Started
  • Architecture Overview
  • Installation
  • Building
  • Testing
  • Using the Driver
    • Batches
    • Binding Parameters
    • Client-side timestamps
    • Consistency
    • Data Types
      • The date and time Types
      • Tuples
      • User-Defined Types (UDTs)
      • UUIDs
    • Futures
    • Handling Results
    • Keyspaces
    • Prepared Statements
    • Schema Metadata
  • Configuration
    • Load balancing
    • Retry policies
    • Speculative Execution
    • Connection
    • Execution Profiles
    • Performance Tips
    • Client Configuration
  • Security
    • Authentication
    • TLS
  • Observability
    • Logging
    • Tracing
    • Metrics
Docs Tutorials University Contact Us About Us
© 2026, ScyllaDB. All rights reserved. | Terms of Service | Privacy Policy | ScyllaDB, and ScyllaDB Cloud, are registered trademarks of ScyllaDB, Inc.
Last updated on 17 Mar 2026.
Powered by Sphinx 9.1.0 & ScyllaDB Theme 1.9.1
Ask AI