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/OTapi/node_modules/mongodb/lib/cursor/ drwxr-xr-x | |
| Viewing file: Select action/file-type: "use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ClientBulkWriteCursor = void 0;
const client_bulk_write_1 = require("../operations/client_bulk_write/client_bulk_write");
const execute_operation_1 = require("../operations/execute_operation");
const utils_1 = require("../utils");
const abstract_cursor_1 = require("./abstract_cursor");
/**
* This is the cursor that handles client bulk write operations. Note this is never
* exposed directly to the user and is always immediately exhausted.
* @internal
*/
class ClientBulkWriteCursor extends abstract_cursor_1.AbstractCursor {
/** @internal */
constructor(client, commandBuilder, options = {}) {
super(client, new utils_1.MongoDBNamespace('admin', '$cmd'), options);
this.commandBuilder = commandBuilder;
this.clientBulkWriteOptions = options;
}
/**
* We need a way to get the top level cursor response fields for
* generating the bulk write result, so we expose this here.
*/
get response() {
if (this.cursorResponse)
return this.cursorResponse;
return null;
}
get operations() {
return this.commandBuilder.lastOperations;
}
clone() {
const clonedOptions = (0, utils_1.mergeOptions)({}, this.clientBulkWriteOptions);
delete clonedOptions.session;
return new ClientBulkWriteCursor(this.client, this.commandBuilder, {
...clonedOptions
});
}
/** @internal */
async _initialize(session) {
const clientBulkWriteOperation = new client_bulk_write_1.ClientBulkWriteOperation(this.commandBuilder, {
...this.clientBulkWriteOptions,
...this.cursorOptions,
session
});
const response = await (0, execute_operation_1.executeOperation)(this.client, clientBulkWriteOperation, this.timeoutContext);
this.cursorResponse = response;
return { server: clientBulkWriteOperation.server, session, response };
}
}
exports.ClientBulkWriteCursor = ClientBulkWriteCursor;
//# sourceMappingURL=client_bulk_write_cursor.js.map |
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0491 ]-- |