Class: Index

metadata~ Index

Describes a CQL index.

Constructor

new Index(name, target, kind, options)

Creates a new Index instance.
Parameters:
Name Type Description
name String
target String
kind Number
options Object

Members

kind :Number

A numeric value representing index kind (0: custom, 1: keys, 2: composite);
Type:
  • Number

name :String

Name of the index.
Type:
  • String

options :Object

An associative array containing the index options
Type:
  • Object

target :String

Target of the index.
Type:
  • String

Methods

(static) fromColumnRows(columnRows, columnsByName) → {Array.<Index>}

Parses Index information from rows in the legacy 'system.schema_columns' table
Parameters:
Name Type Description
columnRows Array.<Row>
columnsByName Object.<String, {name, type}>
Returns:
Type
Array.<Index>

(static) fromRows(indexRows) → {Array.<Index>}

Parses Index information from rows in the 'system_schema.indexes' table
Parameters:
Name Type Description
indexRows Array.<Row>
Returns:
Type
Array.<Index>

isCompositesKind() → {Boolean}

Determines if the index is of composites kind
Returns:
Type
Boolean

isCustomKind() → {Boolean}

Determines if the index is of custom kind
Returns:
Type
Boolean

isKeysKind() → {Boolean}

Determines if the index is of keys kind
Returns:
Type
Boolean