# Copyright (C) 2022-present MongoDB, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the Server Side Public License, version 1, # as published by MongoDB, Inc. # # This program is distributed in the hope that it will be useful,b # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # Server Side Public License for more details. # # You should have received a copy of the Server Side Public License # along with this program. If not, see # . # # As a special exception, the copyright holders give permission to link the # code of portions of this program with the OpenSSL library under certain # conditions as described in each individual source file and distribute # linked combinations including the program with the OpenSSL library. You # must comply with the Server Side Public License in all respects for # all of the code used other than as permitted herein. If you modify file(s) # with this exception, you may extend this exception to your version of the # file(s), but you are not obligated to do so. If you do not wish to do so, # delete this exception statement from your version. If you delete this # exception statement from all source files in the program, then also delete # it in the license file. # global: cpp_namespace: "mongo" cpp_includes: - "mongo/client/read_preference.h" - "mongo/db/commands/bulk_write_parser.h" - "mongo/db/repl/optime.h" - "mongo/s/database_version.h" - "mongo/s/shard_version.h" imports: - "mongo/client/read_preference_setting.idl" - "mongo/db/basic_types.idl" - "mongo/db/ops/write_ops.idl" - "mongo/db/repl/read_concern_args.idl" - "mongo/db/repl/replication_types.idl" - "mongo/db/write_concern_options.idl" - "mongo/s/sharding_types.idl" types: BulkWriteReplyItem: bson_serialization_type: object description: "Structure used to report a single reply resulting from a batch write command." cpp_type: "mongo::BulkWriteReplyItem" serializer: "mongo::BulkWriteReplyItem::serialize" deserializer: "mongo::BulkWriteReplyItem::parse" structs: BulkWriteInsertOp: description: "A struct representing inserts in the 'bulkWrite' command." strict: true fields: insert: description: "Insert command which references the namespace index in 'nsInfo'." type: safeInt validator: { gte: 0 } stability: unstable document: description: "The document to insert into the given collection" type: object stability: unstable BulkWriteUpdateOp: description: "A struct representing updates in the 'bulkWrite' command." strict: true fields: update: description: "Update command which references the namespace index in 'nsInfo'." type: safeInt validator: { gte: 0 } stability: unstable filter: description: "The query that matches documents to update. Uses the same query selectors as used in the 'find' operation." type: object stability: unstable multi: description: "If true, updates all documents that meet the query criteria. If false, limits the update to one document which meets the query criteria." type: bool default: false stability: unstable updateMods: description: "Set of modifications to apply." type: update_modification stability: unstable upsert: description: "If true, perform an insert if no documents match the query. If both upsert and multi are true and no documents match the query, the update operation inserts only a single document." type: bool default: false stability: unstable upsertSupplied: description: "Only applicable when upsert is true. If set, and if no documents match the query, the update subsystem will insert the document supplied as 'let.new' rather than generating a new document from the update spec." type: optionalBool stability: unstable arrayFilters: description: "Specifies which array elements an update modifier should apply to" type: array optional: true stability: unstable hint: description: "Specifies the hint to use for the operation." type: indexHint default: mongo::BSONObj() stability: unstable constants: description: "Specifies constant values that can be referred to in the pipeline performing a custom update." type: object optional: true stability: unstable collation: description: "Specifies the collation to use for the operation." type: object optional: true stability: unstable sort: description: "Determines which document the operation modifies if the query selects multiple documents." type: object optional: true stability: unstable return: description: "When set to 'post', returns the modified document rather than the original. Default is to return the original ('pre')." type: string optional: true validator: callback: validateUpdateReturn stability: unstable returnFields: description: "A subset of fields to return." type: object optional: true stability: unstable BulkWriteDeleteOp: description: "A struct representing deletes in the 'bulkWrite' command." strict: true fields: delete: description: "Delete command which references the namespace index in 'nsInfo'." cpp_name: deleteCommand # `delete` is a C++ keyword. type: safeInt validator: { gte: 0 } stability: unstable filter: description: "The query that matches documents to update. Uses the same query selectors as used in the 'find' operation." type: object stability: unstable multi: description: "If true, updates all documents that meet the query criteria. If false, limits the update to one document which meets the query criteria." type: bool default: false stability: unstable hint: description: "Specifies the hint to use for the operation." type: indexHint default: mongo::BSONObj() stability: unstable collation: description: "Specifies the collation to use for the operation." type: object optional: true stability: unstable sort: description: "Determines which document the operation modifies if the query selects multiple documents." type: object optional: true stability: unstable return: description: "When true, returns the deleted document rather than nothing." type: optionalBool stability: unstable returnFields: description: "A subset of fields to return." type: object optional: true stability: unstable NamespaceInfoEntry: description: "Holds information about each namespace in the bulk write" strict: true fields: ns: description: "The namespace for the entry" type: namespacestring stability: unstable collectionUUID: description: "The expected UUID of the collection." type: uuid optional: true stability: unstable encryptionInformation: description: "Encryption Information schema and other tokens for CRUD commands" type: EncryptionInformation optional: true stability: unstable isTimeseriesNamespace: description: "This flag is set to true when the command was originally sent to mongos on the time-series view, but got rewritten to target time-series buckets namespace before being sent to shards." type: optionalBool stability: internal shardVersion: description: "The shard version of the collection. This is to be attached by mongos before being sent to a shard." type: shard_version optional: true stability: internal databaseVersion: description: "The database version of the collection. This is to be attached by mongos before being sent to a shard." type: database_version optional: true stability: internal BulkWriteCommandResponseCursor: description: "Cursor holding results for a successful 'bulkWrite' command." fields: id: type: long stability: unstable firstBatch: type: array stability: unstable BulkWriteCommandReply: description: "Holds reply information for the 'bulkWrite' command." strict: true is_command_reply: true fields: cursor: type: BulkWriteCommandResponseCursor stability: unstable numErrors: type: int stability: unstable electionId: type: int optional: true stability: unstable opTime: description: "Operation time for the 'bulkWrite' command." type: optime optional: true stability: unstable retriedStmtIds: description: "The statement numbers for the write statements that had already been executed, thus were not executed by this command." type: array optional: true stability: unstable commands: bulkWrite: description: "Parser for the 'bulkWrite' command." command_name: bulkWrite cpp_name: BulkWriteCommandRequest strict: true namespace: ignored api_version: "1" access_check: simple: privilege: resource_pattern: exact_namespace action_type: [bypassDocumentValidation, find, insert, update, remove] reply_type: BulkWriteCommandReply fields: ops: description: "An array of CRUD ops in the bulk write." type: array> supports_doc_sequence: true stability: unstable nsInfo: description: "An array of namespaces this bulk write operates on." type: array supports_doc_sequence: true stability: unstable cursor: description: "Cursor info struct that holds batch size setting." type: SimpleCursorOptions optional: true stability: unstable bypassDocumentValidation: description: "Enables the operation to bypass document validation. This lets you write documents that do not meet the validation requirements." type: safeBool default: false stability: unstable ordered: description: "If true, then when a write statement fails, the bulkWrite command returns without executing the remaining statements. If false, then statements are allowed to be executed in parallel and if a statement fails, continue with the remaining statements, if any." type: bool default: true stability: unstable stmtId: description: "A statement number relative to the transaction." type: int optional: true stability: unstable stmtIds: description: "An array of statement numbers relative to the transaction." type: array optional: true stability: unstable let: description: "Specifies constant values." type: object optional: true stability: unstable