AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Administrar bases de datos / Big Data / Gestión de archivos de datos Mongo
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
Modifies documents in a collection of a MongoDB database.
Ejemplo
MyCollection is mongoCollection
let sFilter = "{ ""name"": ""Andy"" }"
let sModification = "{ ""$inc"": { ""score"": 1 } }"
MyCollection.ModifyAll(sFilter, sModification)
gclCollection is mongoCollection
// Find all contacts whose "Name" member is set to "SMITH" and modifies them to "PAULSON"
// Search filter
sFilter is string = "{ ""Name"": ""SMITH"" }"
// Modification criterion
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:
mongoAddIfNotFoundUsed to add the document if it does not exist in the collection.
mongoWithoutValidationThe document structure is not checked.
Componente: wd300big.dll
Versión mínima requerida
  • Versión 25
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 30/09/2024

Señalar un error o enviar una sugerencia | Ayuda local