diff options
Diffstat (limited to 'src/mongo/db/ops/find_and_modify_command.idl')
-rw-r--r-- | src/mongo/db/ops/find_and_modify_command.idl | 112 |
1 files changed, 112 insertions, 0 deletions
diff --git a/src/mongo/db/ops/find_and_modify_command.idl b/src/mongo/db/ops/find_and_modify_command.idl new file mode 100644 index 00000000000..fde8bc3c037 --- /dev/null +++ b/src/mongo/db/ops/find_and_modify_command.idl @@ -0,0 +1,112 @@ +# Copyright (C) 2020-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, +# 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 +# <http://www.mongodb.com/licensing/server-side-public-license>. +# +# 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::write_ops" + cpp_includes: + - "mongo/db/ops/write_ops_parsers.h" + +imports: + - "mongo/db/ops/write_ops.idl" + - "mongo/db/pipeline/legacy_runtime_constants.idl" + - "mongo/idl/basic_types.idl" + - "mongo/db/query/hint.idl" + +commands: + findAndModify: + description: "Parser for the 'findAndModify' command." + command_name: findAndModify + cpp_name: FindAndModifyCommand + strict: true + namespace: concatenate_with_db + fields: + query: + description: "The query that matches documents to update. Uses the same query + selectors as used in the 'find' operation." + type: object_owned + default: mongo::BSONObj() + fields: + description: "A subset of fields to return." + type: object_owned + optional: true + sort: + description: "Determines which document the operation modifies if the query selects + multiple documents." + type: object_owned + optional: true + hint: + description: "Specifies the hint to use for the operation." + type: indexHint + default: mongo::BSONObj() + collation: + description: "Specifies the collation to use for the operation." + type: object + optional: true + arrayFilters: + description: "Specifies which array elements an update modifier should apply to." + type: array<object> + optional: true + remove: + description: "Removes the document specified in the query field." + # We use 'safeBool' here since the field also allows numeric values. + type: safeBool + optional: true + update: + description: "Modification to apply." + type: update_modification + optional: true + 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: safeBool + optional: true + new: + description: "Removes the document specified in the query field." + type: safeBool + optional: true + bypassDocumentValidation: + description: "Enables the operation to bypass document validation. This lets you + write documents that do not meet the validation requirements." + type: safeBool + optional: true + let: + description: "A set of user-specified constants used by pipeline-style update + operations and $expr." + type: object + optional: true + runtimeConstants: + description: "A collection of values that do not change once computed. These are + used by pipeline-style update operations." + cpp_name: legacyRuntimeConstants + type: LegacyRuntimeConstants + optional: true + writeConcern: + description: "Describes the write concern." + type: object + optional: true
\ No newline at end of file |