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 CassPrepared

CassPrepared¶

struct CassPrepared¶

A statement that has been prepared cluster-side (It has been pre-parsed and cached).

A prepared statement is read-only and it is thread-safe to concurrently bind new statements.

Public Functions

void cass_prepared_free(const CassPrepared *prepared)¶

Frees a prepared instance.

Parameters:

prepared – [in]

CassStatement *cass_prepared_bind(const CassPrepared *prepared)¶

Creates a bound statement from a pre-prepared statement.

See also

cass_statement_free()

Parameters:

prepared – [in]

Returns:

Returns a bound statement that must be freed.

CassError cass_prepared_parameter_name(const CassPrepared *prepared, size_t index, const char **name, size_t *name_length)¶

Gets the name of a parameter at the specified index.

Parameters:
  • prepared – [in]

  • index – [in]

  • name – [out]

  • name_length – [out]

Returns:

CASS_OK if successful, otherwise an error occurred.

const CassDataType *cass_prepared_parameter_data_type(const CassPrepared *prepared, size_t index)¶

Gets the data type of a parameter at the specified index.

Parameters:
  • prepared – [in]

  • index – [in]

Returns:

Returns a reference to the data type of the parameter. Do not free this reference as it is bound to the lifetime of the prepared.

const CassDataType *cass_prepared_parameter_data_type_by_name(const CassPrepared *prepared, const char *name)¶

Gets the data type of a parameter for the specified name.

Parameters:
  • prepared – [in]

  • name – [in]

Returns:

Returns a reference to the data type of the parameter. Do not free this reference as it is bound to the lifetime of the prepared.

const CassDataType *cass_prepared_parameter_data_type_by_name_n(const CassPrepared *prepared, const char *name, size_t name_length)¶

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

See also

cass_prepared_parameter_data_type_by_name()

Parameters:
  • prepared – [in]

  • name – [in]

  • name_length – [in]

Returns:

Returns a reference to the data type of the parameter. Do not free this reference as it is bound to the lifetime of the prepared.

Was this page helpful?

PREVIOUS
CassNode
NEXT
CassResult
  • Create an issue
  • Edit this page

On this page

  • CassPrepared
    • CassPrepared
      • CassPrepared::cass_prepared_free()
      • CassPrepared::cass_prepared_bind()
      • CassPrepared::cass_prepared_parameter_name()
      • CassPrepared::cass_prepared_parameter_data_type()
      • CassPrepared::cass_prepared_parameter_data_type_by_name()
      • CassPrepared::cass_prepared_parameter_data_type_by_name_n()
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