Spaces:
Runtime error
Runtime error
Download static/node_modules/mongodb/lib/operations/search_indexes/create.js from kaab4321/NarrativeFlow: direct link, hf CLI and curl.
- Browser
- Download file 1 kB
-
https://huggingface.co/spaces/kaab4321/NarrativeFlow/resolve/main/static/node_modules/mongodb/lib/operations/search_indexes/create.js
- Command line
-
hf download hf://spaces/kaab4321/NarrativeFlow/static/node_modules/mongodb/lib/operations/search_indexes/create.js
-
curl -L -o create.js https://huggingface.co/spaces/kaab4321/NarrativeFlow/resolve/main/static/node_modules/mongodb/lib/operations/search_indexes/create.js
1 kB
| ; | |
| Object.defineProperty(exports, "__esModule", { value: true }); | |
| exports.CreateSearchIndexesOperation = void 0; | |
| const operation_1 = require("../operation"); | |
| /** @internal */ | |
| class CreateSearchIndexesOperation extends operation_1.AbstractOperation { | |
| constructor(collection, descriptions) { | |
| super(); | |
| this.collection = collection; | |
| this.descriptions = descriptions; | |
| } | |
| get commandName() { | |
| return 'createSearchIndexes'; | |
| } | |
| async execute(server, session) { | |
| const namespace = this.collection.fullNamespace; | |
| const command = { | |
| createSearchIndexes: namespace.collection, | |
| indexes: this.descriptions | |
| }; | |
| const res = await server.command(namespace, command, { session }); | |
| const indexesCreated = res?.indexesCreated ?? []; | |
| return indexesCreated.map(({ name }) => name); | |
| } | |
| } | |
| exports.CreateSearchIndexesOperation = CreateSearchIndexesOperation; | |
| //# sourceMappingURL=create.js.map |