* 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)
| 37 | * @constructor |
| 38 | */ |
| 39 | function 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 |
nothing calls this directly
no test coverage detected