Class: Index

metadata~Index(name, target, kind, options)

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 | String
options Object
Source:

Members

kind :Number

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

Type:
  • Number
Source:

name :String

Name of the index.

Type:
  • String
Source:

options :Object

An associative array containing the index options

Type:
  • Object
Source:

target :String

Target of the index.

Type:
  • String
Source:

Methods

isCompositesKind() → {Boolean}

Determines if the index is of composites kind

Source:
Returns:
Type
Boolean

isCustomKind() → {Boolean}

Determines if the index is of custom kind

Source:
Returns:
Type
Boolean

isKeysKind() → {Boolean}

Determines if the index is of keys kind

Source:
Returns:
Type
Boolean

(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}>
Deprecated:
  • It will be removed in the next major version.
Source:
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>
Deprecated:
  • It will be removed in the next major version.
Source:
Returns:
Type
Array.<Index>