Was this page helpful?
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 |
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¶
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
(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.
Returns:
(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.