UNPKG

couchbase-index-manager

Version:
35 lines 1.6 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ConfigurationType = exports.PartitionStrategy = void 0; exports.isIndex = isIndex; exports.isOverride = isOverride; exports.isNodeMap = isNodeMap; exports.isSameIndex = isSameIndex; const index_manager_1 = require("../index-manager"); const util_1 = require("../util"); var PartitionStrategy; (function (PartitionStrategy) { PartitionStrategy["Hash"] = "HASH"; })(PartitionStrategy || (exports.PartitionStrategy = PartitionStrategy = {})); var ConfigurationType; (function (ConfigurationType) { ConfigurationType["Index"] = "index"; ConfigurationType["Override"] = "override"; ConfigurationType["NodeMap"] = "nodeMap"; })(ConfigurationType || (exports.ConfigurationType = ConfigurationType = {})); function isIndex(item) { return !item.type || item.type === ConfigurationType.Index; } function isOverride(item) { return item.type === ConfigurationType.Override; } function isNodeMap(item) { return item.type === ConfigurationType.NodeMap; } function isSameIndex(a, b) { var _a, _b, _c, _d; return ((_a = a.scope) !== null && _a !== void 0 ? _a : index_manager_1.DEFAULT_SCOPE) === ((_b = b.scope) !== null && _b !== void 0 ? _b : index_manager_1.DEFAULT_SCOPE) && ((_c = a.collection) !== null && _c !== void 0 ? _c : index_manager_1.DEFAULT_COLLECTION) === ((_d = b.collection) !== null && _d !== void 0 ? _d : index_manager_1.DEFAULT_COLLECTION) && (0, util_1.ensureEscaped)(a.name) === (0, util_1.ensureEscaped)(b.name); } //# sourceMappingURL=types.js.map