Represents an index on a cassandra table

Specifications:
Index should unescape target
ind = Cassandra::Index.new(table, 'myind', :composites, 'f1', {})
expect(ind.target).to eq('f1')
ind = Cassandra::Index.new(table, 'myind', :composites, '"f1"', {})
expect(ind.target).to eq('f1')

Inherits

Object

Methods

table

Returns table that the index applies to.

Returns:
Type Details
Table table that the index applies to.

name

Returns name of the index.

Returns:
Type Details
String name of the index.

kind

Returns kind of index: :keys, :composites, or :custom.

Returns:
Type Details
Symbol kind of index: :keys, :composites, or :custom.

target

Returns name of column that the index applies to.

Returns:
Type Details
String name of column that the index applies to.

options

Returns options of the index.

Returns:
Type Details
Hash options of the index.

custom_index?

Returns whether or not this index uses a custom class.

Returns:
Type Details
Boolean whether or not this index uses a custom class.

custom_class_name

Returns name of the index class if this is a custom index; nil otherwise.

Returns:
Type Details
String name of the index class if this is a custom index; nil otherwise.

to_cql

Returns a cql representation of this index

Returns:
Type Details
String a cql representation of this index

options_cql