diff options
author | 2020-11-18 23:26:45 +0100 | |
---|---|---|
committer | 2020-11-18 23:26:45 +0100 | |
commit | 81ddf9b700bc48a1f8e472209f080f9c1d9a9b09 (patch) | |
tree | 8b959d50c5a614cbf9fcb346ed556140374d4b6d /node_modules/mongodb/lib/operations/find.js | |
parent | 1870f3fdf43707a15fda0f609a021f516f45eb63 (diff) | |
download | website_creator-81ddf9b700bc48a1f8e472209f080f9c1d9a9b09.tar.gz website_creator-81ddf9b700bc48a1f8e472209f080f9c1d9a9b09.tar.bz2 website_creator-81ddf9b700bc48a1f8e472209f080f9c1d9a9b09.zip |
rm node_modules
Diffstat (limited to 'node_modules/mongodb/lib/operations/find.js')
-rw-r--r-- | node_modules/mongodb/lib/operations/find.js | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/node_modules/mongodb/lib/operations/find.js b/node_modules/mongodb/lib/operations/find.js deleted file mode 100644 index 09cb9a9..0000000 --- a/node_modules/mongodb/lib/operations/find.js +++ /dev/null @@ -1,40 +0,0 @@ -'use strict'; - -const OperationBase = require('./operation').OperationBase; -const Aspect = require('./operation').Aspect; -const defineAspects = require('./operation').defineAspects; -const ReadPreference = require('../core').ReadPreference; -const maxWireVersion = require('../core/utils').maxWireVersion; -const MongoError = require('../core/error').MongoError; - -class FindOperation extends OperationBase { - constructor(collection, ns, command, options) { - super(options); - - this.ns = ns; - this.cmd = command; - this.readPreference = ReadPreference.resolve(collection, this.options); - } - - execute(server, callback) { - // copied from `CommandOperationV2`, to be subclassed in the future - this.server = server; - - if (typeof this.cmd.allowDiskUse !== 'undefined' && maxWireVersion(server) < 4) { - callback(new MongoError('The `allowDiskUse` option is not supported on MongoDB < 3.2')); - return; - } - - // TOOD: use `MongoDBNamespace` through and through - const cursorState = this.cursorState || {}; - server.query(this.ns.toString(), this.cmd, cursorState, this.options, callback); - } -} - -defineAspects(FindOperation, [ - Aspect.READ_OPERATION, - Aspect.RETRYABLE, - Aspect.EXECUTE_WITH_SELECTION -]); - -module.exports = FindOperation; |