This class contains all the logic needed for manipulating columns of an object.

Inherits

Object

Classes

Direct Known Subclasses

Methods

name

Returns name of this column-container

Returns:
Type Details
String name of this column-container

id

Returns the id of this object in Cassandra.

Returns:
Type Details
Uuid the id of this object in Cassandra.

keyspace

Returns the keyspace that this column-container belongs to.

Returns:
Type Details
Keyspace the keyspace that this column-container belongs to.

options

Returns collection of configuration options of this column-container.

Returns:
Type Details
ColumnContainer::Options collection of configuration options of this column-container.

partition_key

Returns ordered list of column-names that make up the partition-key.

Returns:
Type Details
Array<Column> ordered list of column-names that make up the partition-key.

clustering_columns

Returns ordered list of column-names that make up the clustering-columns.

Returns:
Type Details
Array<Column> ordered list of column-names that make up the clustering-columns.

primary_key

Returns primary key of this column-container. It’s the combination of partition_key and clustering_columns.

Note
This composition produces a flat list, so it will not be possible for the caller to distinguish partition-key columns from clustering-columns.
Returns:
Type Details
Array<Column> primary key of this column-container. It’s the combination of partition_key and clustering_columns.

has_column?

(name)

Returns whether this column-container has a given column

Parameters:
Name Type Details
name String column name
Returns:
Type Details
Boolean whether this column-container has a given column

column

(name)

Returns a column or nil

Parameters:
Name Type Details
name String column name
Returns:
Type Details
(Column or nil) a column or nil

each_column

(&block) aliased as: columns

Yield or enumerate each column defined in this column-container

Overloads:
each_column {|column| … }

Returns self

Yield Parameters:
Name Type Details
column Column current column
Returns:
Type Details
ColumnContainer self
each_column

Returns a list of columns

Returns:
Type Details
Array<Column> a list of columns