Menu

CassIterator

struct CassIterator

An object used to iterate over a group of rows, columns or collection values.

Public Functions

void cass_iterator_free(CassIterator *iterator)

Frees an iterator instance.

Parameters
  • iterator:

CassIteratorType cass_iterator_type(CassIterator *iterator)

Gets the type of the specified iterator.

Return

The type of the iterator.

Parameters
  • iterator:

cass_bool_t cass_iterator_next(CassIterator *iterator)

Advance the iterator to the next row, column or collection item.

Return

false if no more rows, columns or items, otherwise true

Parameters
  • iterator:

const CassRow *cass_iterator_get_row(const CassIterator *iterator)

Gets the row at the result iterator’s current position.

Calling cass_iterator_next() will invalidate the previous row returned by this method.

Return

A row

Parameters
  • iterator:

const CassValue *cass_iterator_get_column(const CassIterator *iterator)

Gets the column value at the row iterator’s current position.

Calling cass_iterator_next() will invalidate the previous column returned by this method.

Return

A value

Parameters
  • iterator:

const CassValue *cass_iterator_get_value(const CassIterator *iterator)

Gets the value at a collection or tuple iterator’s current position.

Calling cass_iterator_next() will invalidate the previous value returned by this method.

Return

A value

Parameters
  • iterator:

const CassValue *cass_iterator_get_map_key(const CassIterator *iterator)

Gets the key at the map iterator’s current position.

Calling cass_iterator_next() will invalidate the previous value returned by this method.

Return

A value

Parameters
  • iterator:

const CassValue *cass_iterator_get_map_value(const CassIterator *iterator)

Gets the value at the map iterator’s current position.

Calling cass_iterator_next() will invalidate the previous value returned by this method.

Return

A value

Parameters
  • iterator:

CassError cass_iterator_get_user_type_field_name(const CassIterator *iterator, const char **name, size_t *name_length)

Gets the field name at the user type defined iterator’s current position.

Calling cass_iterator_next() will invalidate the previous name returned by this method.

Requires Apache Cassandra: 2.1+

Return

CASS_OK if successful, otherwise error occurred

Parameters
  • iterator:

  • name:

  • name_length:

const CassValue *cass_iterator_get_user_type_field_value(const CassIterator *iterator)

Gets the field value at the user type defined iterator’s current position.

Calling cass_iterator_next() will invalidate the previous value returned by this method.

Requires Apache Cassandra: 2.1+

Return

A value

Parameters
  • iterator:

const CassKeyspaceMeta *cass_iterator_get_keyspace_meta(const CassIterator *iterator)

Gets the keyspace metadata entry at the iterator’s current position.

Calling cass_iterator_next() will invalidate the previous value returned by this method.

Return

A keyspace metadata entry

Parameters
  • iterator:

const CassTableMeta *cass_iterator_get_table_meta(const CassIterator *iterator)

Gets the table metadata entry at the iterator’s current position.

Calling cass_iterator_next() will invalidate the previous value returned by this method.

Return

A table metadata entry

Parameters
  • iterator:

const CassMaterializedViewMeta *cass_iterator_get_materialized_view_meta(const CassIterator *iterator)

Gets the materialized view metadata entry at the iterator’s current position.

Calling cass_iterator_next() will invalidate the previous value returned by this method.

Requires Apache Cassandra: 3.0+

Return

A materialized view metadata entry

Parameters
  • iterator:

const CassDataType *cass_iterator_get_user_type(const CassIterator *iterator)

Gets the type metadata entry at the iterator’s current position.

Calling cass_iterator_next() will invalidate the previous value returned by this method.

Requires Apache Cassandra: 2.1+

Return

A type metadata entry

Parameters
  • iterator:

const CassFunctionMeta *cass_iterator_get_function_meta(const CassIterator *iterator)

Gets the function metadata entry at the iterator’s current position.

Calling cass_iterator_next() will invalidate the previous value returned by this method.

Requires Apache Cassandra: 2.2+

Return

A function metadata entry

Parameters
  • iterator:

const CassAggregateMeta *cass_iterator_get_aggregate_meta(const CassIterator *iterator)

Gets the aggregate metadata entry at the iterator’s current position.

Calling cass_iterator_next() will invalidate the previous value returned by this method.

Requires Apache Cassandra: 2.2+

Return

A aggregate metadata entry

Parameters
  • iterator:

const CassColumnMeta *cass_iterator_get_column_meta(const CassIterator *iterator)

Gets the column metadata entry at the iterator’s current position.

Calling cass_iterator_next() will invalidate the previous value returned by this method.

Return

A column metadata entry

Parameters
  • iterator:

const CassIndexMeta *cass_iterator_get_index_meta(const CassIterator *iterator)

Gets the index metadata entry at the iterator’s current position.

Calling cass_iterator_next() will invalidate the previous value returned by this method.

Return

A index metadata entry

Parameters
  • iterator:

CassError cass_iterator_get_meta_field_name(const CassIterator *iterator, const char **name, size_t *name_length)

Gets the metadata field name at the iterator’s current position.

Calling cass_iterator_next() will invalidate the previous value returned by this method.

Return

CASS_OK if successful, otherwise error occurred

Parameters
  • iterator:

  • name:

  • name_length:

const CassValue *cass_iterator_get_meta_field_value(const CassIterator *iterator)

Gets the metadata field value at the iterator’s current position.

Calling cass_iterator_next() will invalidate the previous value returned by this method.

Return

A metadata field value

Parameters
  • iterator: