UNPKG

couchbase-index-manager

Version:
33 lines 1.02 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.IndexMutation = void 0; const index_manager_1 = require("../index-manager"); /** * Abstract base class for index mutations */ class IndexMutation { /** * A display name for the index which includes the scope and collection if non-default. */ get displayName() { if (this.scope === index_manager_1.DEFAULT_SCOPE && this.collection === index_manager_1.DEFAULT_COLLECTION) { return this.name; } else { return `${this.scope}.${this.collection}.${this.name}`; } } constructor(definition, name) { this.definition = definition; this.definition = definition; this.name = name || definition.name; this.scope = definition.scope; this.collection = definition.collection; this.phase = 1; } isSafe() { return true; } } exports.IndexMutation = IndexMutation; //# sourceMappingURL=index-mutation.js.map