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
  • Resources
    • ScyllaDB University
    • Community Forum
    • Tutorials
Install
Ask AI
ScyllaDB Docs ScyllaDB CPP-Rust Driver API Documentation CassDataType

CassDataType¶

struct CassDataType¶

A data type used to describe a value, collection or user defined type.

Public Functions

CassDataType *cass_data_type_new(CassValueType type)¶

Creates a new data type with value type.

See also

cass_data_type_free()

Parameters:

type – [in]

Returns:

Returns a data type that must be freed.

CassDataType *cass_data_type_new_from_existing(const CassDataType *data_type)¶

Creates a new data type from an existing data type.

See also

cass_data_type_free()

Parameters:

data_type – [in]

Returns:

Returns a data type that must be freed.

CassDataType *cass_data_type_new_tuple(size_t item_count)¶

Creates a new tuple data type.

See also

cass_data_type_free()

Parameters:

item_count – [in] The number of items in the tuple

Returns:

Returns a data type that must be freed.

CassDataType *cass_data_type_new_udt(size_t field_count)¶

Creates a new UDT (user defined type) data type.

See also

cass_data_type_free()

Parameters:

field_count – [in] The number of fields in the UDT

Returns:

Returns a data type that must be freed.

void cass_data_type_free(CassDataType *data_type)¶

Frees a data type instance.

Parameters:

data_type – [in]

CassError cass_data_type_set_type_name_n(CassDataType *data_type, const char *type_name, size_t type_name_length)¶

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

Parameters:
  • data_type – [in]

  • type_name – [in]

  • type_name_length – [in]

Returns:

Returns a data type that must be freed.

CassError cass_data_type_set_keyspace_n(CassDataType *data_type, const char *keyspace, size_t keyspace_length)¶

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

Parameters:
  • data_type – [in]

  • keyspace – [in]

  • keyspace_length – [in]

Returns:

Returns a data type that must be freed.

CassError cass_data_type_set_class_name_n(CassDataType *data_type, const char *class_name, size_t class_name_length)¶

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

Parameters:
  • data_type – [in]

  • class_name – [in]

  • class_name_length – [in]

Returns:

Returns a data type that must be freed.

const CassDataType *cass_data_type_sub_data_type_by_name_n(const CassDataType *data_type, const char *name, size_t name_length)¶

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

Parameters:
  • data_type – [in]

  • name – [in]

  • name_length – [in]

Returns:

Returns a reference to a child data type. Do not free this reference as it is bound to the lifetime of the parent data type. NULL is returned if the name doesn’t exist.

Was this page helpful?

PREVIOUS
CassCustomPayload
NEXT
CassErrorResult
  • Create an issue
  • Edit this page

On this page

  • CassDataType
    • CassDataType
      • CassDataType::cass_data_type_new()
      • CassDataType::cass_data_type_new_from_existing()
      • CassDataType::cass_data_type_new_tuple()
      • CassDataType::cass_data_type_new_udt()
      • CassDataType::cass_data_type_free()
      • CassDataType::cass_data_type_set_type_name_n()
      • CassDataType::cass_data_type_set_keyspace_n()
      • CassDataType::cass_data_type_set_class_name_n()
      • CassDataType::cass_data_type_sub_data_type_by_name_n()
ScyllaDB CPP-Rust Driver
  • master
    • master
  • CPP-over-Rust Driver
  • 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
  • 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
© 2025, ScyllaDB. All rights reserved. | Terms of Service | Privacy Policy | ScyllaDB, and ScyllaDB Cloud, are registered trademarks of ScyllaDB, Inc.
Last updated on 16 Sep 2025.
Powered by Sphinx 7.4.7 & ScyllaDB Theme 1.8.8
Ask AI