flow like the river
This commit is contained in:
commit
013fe673f3
42435 changed files with 5764238 additions and 0 deletions
29
VISUALIZACION/node_modules/mongodb/lib/operations/search_indexes/create.js
generated
vendored
Executable file
29
VISUALIZACION/node_modules/mongodb/lib/operations/search_indexes/create.js
generated
vendored
Executable file
|
|
@ -0,0 +1,29 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.CreateSearchIndexesOperation = void 0;
|
||||
const operation_1 = require("../operation");
|
||||
/** @internal */
|
||||
class CreateSearchIndexesOperation extends operation_1.AbstractCallbackOperation {
|
||||
constructor(collection, descriptions) {
|
||||
super();
|
||||
this.collection = collection;
|
||||
this.descriptions = descriptions;
|
||||
}
|
||||
executeCallback(server, session, callback) {
|
||||
const namespace = this.collection.fullNamespace;
|
||||
const command = {
|
||||
createSearchIndexes: namespace.collection,
|
||||
indexes: this.descriptions
|
||||
};
|
||||
server.command(namespace, command, { session }, (err, res) => {
|
||||
if (err || !res) {
|
||||
callback(err);
|
||||
return;
|
||||
}
|
||||
const indexesCreated = res?.indexesCreated ?? [];
|
||||
callback(undefined, indexesCreated.map(({ name }) => name));
|
||||
});
|
||||
}
|
||||
}
|
||||
exports.CreateSearchIndexesOperation = CreateSearchIndexesOperation;
|
||||
//# sourceMappingURL=create.js.map
|
||||
Loading…
Add table
Add a link
Reference in a new issue