ScyllaDB University Live | Free Virtual Training Event
Learn more
ScyllaDB Documentation Logo Documentation
  • Server
  • Cloud
  • Tools
    • ScyllaDB Manager
    • ScyllaDB Monitoring Stack
    • ScyllaDB Operator
  • Drivers
    • CQL Drivers
    • DynamoDB Drivers
  • Resources
    • ScyllaDB University
    • Community Forum
    • Tutorials
Download
ScyllaDB Docs Scylla C/C++ Driver API Documentation CassUuidGen

CassUuidGen¶

struct CassUuidGen¶

A UUID generator object.

Instances of the UUID generator object are thread-safe to generate UUIDs.

Public Functions

CassUuidGen *cass_uuid_gen_new()¶

Creates a new UUID generator.

Note: This object is thread-safe. It is best practice to create and reuse a single object per application.

Note: If unique node information (IP address) is unable to be determined then random node information will be generated.

See also

cass_uuid_gen_free()

See also

cass_uuid_gen_new_with_node()

Returns:

Returns a UUID generator that must be freed.

CassUuidGen *cass_uuid_gen_new_with_node(cass_uint64_t node)¶

Creates a new UUID generator with custom node information.

Note: This object is thread-safe. It is best practice to create and reuse a single object per application.

See also

cass_uuid_gen_free()

Returns:

Returns a UUID generator that must be freed.

void cass_uuid_gen_free(CassUuidGen *uuid_gen)¶

Frees a UUID generator instance.

Parameters:

uuid_gen – [in]

void cass_uuid_gen_time(CassUuidGen *uuid_gen, CassUuid *output)¶

Generates a V1 (time) UUID.

Note: This method is thread-safe

Parameters:
  • uuid_gen – [in]

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

void cass_uuid_gen_random(CassUuidGen *uuid_gen, CassUuid *output)¶

Generates a new V4 (random) UUID

Note:: This method is thread-safe

Parameters:
  • uuid_gen – [in]

  • output – A randomly generated V4 UUID.

void cass_uuid_gen_from_time(CassUuidGen *uuid_gen, cass_uint64_t timestamp, CassUuid *output)¶

Generates a V1 (time) UUID for the specified time.

Note:: This method is thread-safe

Parameters:
  • uuid_gen – [in]

  • timestamp – [in]

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

Was this page helpful?

PREVIOUS
CassUuid
NEXT
CassValue
  • Create an issue
  • Edit this page

On this page

  • CassUuidGen
    • CassUuidGen
      • CassUuidGen::cass_uuid_gen_new()
      • CassUuidGen::cass_uuid_gen_new_with_node()
      • CassUuidGen::cass_uuid_gen_free()
      • CassUuidGen::cass_uuid_gen_time()
      • CassUuidGen::cass_uuid_gen_random()
      • CassUuidGen::cass_uuid_gen_from_time()
Scylla C/C++ Driver
  • master
    • master
  • C/C++ Driver for ScyllaDB
  • API Documentation
    • CassAggregateMeta
    • CassAuthenticator
    • CassAuthenticatorCallbacks
    • CassBatch
    • CassCluster
    • CassCollection
    • CassColumnMeta
    • CassCustomPayload
    • CassDataType
    • CassErrorResult
    • CassExecProfile
    • CassFunctionMeta
    • CassFuture
    • CassIndexMeta
    • CassInet
    • CassIterator
    • CassKeyspaceMeta
    • CassLogMessage
    • CassMaterializedViewMeta
    • CassMetrics
    • CassNode
    • CassPrepared
    • CassResult
    • CassRetryPolicy
    • CassRow
    • CassSchemaMeta
    • CassSession
    • CassSpeculativeExecutionMetrics
    • CassSsl
    • CassStatement
    • CassTableMeta
    • CassTimestampGen
    • CassTuple
    • CassUserType
    • CassUuid
    • CassUuidGen
    • CassValue
    • CassVersion
    • DseDateRange
    • DseDateRangeBound
    • DseLineString
    • DseLineStringIterator
    • DsePolygon
    • DsePolygonIterator
  • Features
    • Basics
      • Batches
      • Binding Parameters
      • Client-side timestamps
      • Consistency
      • Data Types
      • The date and time Types
      • Futures
      • Handling Results
      • Keyspaces
      • Prepared Statements
      • Schema Metadata
      • Tuples
      • User-Defined Types (UDTs)
      • UUIDs
    • Building
    • Client Configuration
    • Cloud
    • Configuration
      • Retry policies
    • Execution Profiles
    • FAQ
    • Installation
    • Logging
    • Metrics
    • Scylla Specific Features
    • Security
      • SSL
    • Testing
      • Cassandra Cluster Manager (CCM)
    • Tracing
  • DSE Features
    • Authentication
    • Geospatial types
Docs Tutorials University Contact Us About Us
© 2025, ScyllaDB. All rights reserved. | Terms of Service | Privacy Policy | ScyllaDB, and ScyllaDB Cloud, are registered trademarks of ScyllaDB, Inc.
Last updated on 28 April 2025.
Powered by Sphinx 7.4.7 & ScyllaDB Theme 1.8.6