Spaces:
Runtime error
Runtime error
Download static/node_modules/mongodb/lib/operations/options_operation.js from kaab4321/NarrativeFlow: direct link, hf CLI and curl.
- Browser
- Download file 1.06 kB
-
https://huggingface.co/spaces/kaab4321/NarrativeFlow/resolve/main/static/node_modules/mongodb/lib/operations/options_operation.js
- Command line
-
hf download hf://spaces/kaab4321/NarrativeFlow/static/node_modules/mongodb/lib/operations/options_operation.js
-
curl -L -o options_operation.js https://huggingface.co/spaces/kaab4321/NarrativeFlow/resolve/main/static/node_modules/mongodb/lib/operations/options_operation.js
1.06 kB
| ; | |
| Object.defineProperty(exports, "__esModule", { value: true }); | |
| exports.OptionsOperation = void 0; | |
| const error_1 = require("../error"); | |
| const operation_1 = require("./operation"); | |
| /** @internal */ | |
| class OptionsOperation extends operation_1.AbstractOperation { | |
| constructor(collection, options) { | |
| super(options); | |
| this.options = options; | |
| this.collection = collection; | |
| } | |
| get commandName() { | |
| return 'listCollections'; | |
| } | |
| async execute(server, session) { | |
| const coll = this.collection; | |
| const [collection] = await coll.s.db | |
| .listCollections({ name: coll.collectionName }, { ...this.options, nameOnly: false, readPreference: this.readPreference, session }) | |
| .toArray(); | |
| if (collection == null || collection.options == null) { | |
| throw new error_1.MongoAPIError(`collection ${coll.namespace} not found`); | |
| } | |
| return collection.options; | |
| } | |
| } | |
| exports.OptionsOperation = OptionsOperation; | |
| //# sourceMappingURL=options_operation.js.map |