Describes a CQL index.

Members

Number

kind

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

String

name

Name of the index.

Object

options

An associative array containing the index options

String

target

Target of the index.

Constructor

new

Index

(String name, String target, Number or String kind, Object options)

Creates a new Index instance.

Parameters:
Name Type Description
name String
target String
kind Number or String
options Object

Methods

Index.fromColumnRows

(Array<Row> columnRows, Object<String, {name, type}> columnsByName)

Parses Index information from rows in the legacy ‘system.schema_columns’ table.

Static
This function is static
Parameters:
Name Type Description
columnRows Array<Row>
columnsByName Object<String, {name, type}>
Returns:
Type Description
Array<Index>

Index.fromRows

(Array<Row> indexRows)

Parses Index information from rows in the ‘system_schema.indexes’ table

Static
This function is static
Parameters:
Name Type Description
indexRows Array<Row>
Returns:
Type Description
Array<Index>

isCompositesKind

()

Determines if the index is of composites kind

Returns:
Type Description
Boolean

isCustomKind

()

Determines if the index is of custom kind

Returns:
Type Description
Boolean

isKeysKind

()

Determines if the index is of keys kind

Returns:
Type Description
Boolean