Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /var/www/html/wincloud_gateway/node_modules/mongodb/lib/operations/ drwxr-xr-x | |
| Viewing file: Select action/file-type: '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;
|
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0039 ]-- |