MCPcopy Create free account
hub / github.com/apache/cassandra-nodejs-driver / Index

Function Index

lib/metadata/schema-index.js:39–60  ·  view source on GitHub ↗

* Creates a new Index instance. * @classdesc Describes a CQL index. * @param {String} name * @param {String} target * @param {Number|String} kind * @param {Object} options * @alias module:metadata~Index * @constructor

(name, target, kind, options)

Source from the content-addressed store, hash-verified

37 * @constructor
38 */
39function Index(name, target, kind, options) {
40 /**
41 * Name of the index.
42 * @type {String}
43 */
44 this.name = name;
45 /**
46 * Target of the index.
47 * @type {String}
48 */
49 this.target = target;
50 /**
51 * A numeric value representing index kind (0: custom, 1: keys, 2: composite);
52 * @type {Number}
53 */
54 this.kind = typeof kind === 'string' ? getKindByName(kind) : kind;
55 /**
56 * An associative array containing the index options
57 * @type {Object}
58 */
59 this.options = options;
60}
61
62/**
63 * Determines if the index is of composites kind

Callers

nothing calls this directly

Calls 1

getKindByNameFunction · 0.85

Tested by

no test coverage detected