|
|
|
|
|
<mongoCollection variable>.ModifyAll (Función) Modifies documents in a collection of a MongoDB database. MyCollection is mongoCollection
let sFilter = "{ ""name"": ""Andy"" }"
let sModification = "{ ""$inc"": { ""score"": 1 } }"
MyCollection.ModifyAll(sFilter, sModification)
gclCollection is mongoCollection
sFilter is string = "{ ""Name"": ""SMITH"" }"
sModification is string = "{ ""$set"": {""Name"": ""PAULSON"" } }"
gclCollection.ModifyAll(sFilter, sModification)
Sintaxis
<Result> = <Collection>.ModifyAll(<Filter> , <Modification> [, <Options>])
<Result>: booleano - True if the operation was performed,
- False if a problem occurs. ErrorInfo is used to identify the error.
<Collection>: Variable de tipo mongoCollection Name of the mongoCollection variable that represents the MongoDB collection in which the modification must be made. <Filter>: Tipo de filtro utilizado Description of the MongoDB filter(s) that will be applied to select the documents to modify. This filter corresponds to: - a JSON document, in string format.
- a BSON document, in buffer format.
- a variant.
<Modification>: Tipo del formato utilizado Description of the modifications that will be made in the documents corresponding to the filter. Corresponds to: - a JSON document, in string format.
- a BSON document, in buffer format.
- a variant.
<Options>: Constante opcional de tipo Integer Editing options: | | mongoAddIfNotFound | Used to add the document if it does not exist in the collection. | mongoWithoutValidation | The document structure is not checked. |
Esta página también está disponible para…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|