ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / Managing databases / Big Data / Managing Mongo data files
  • Properties specific to mongoWriteConcern variables
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
mongoWriteConcern (Variable type)
In french: mongoOptionEcriture
The mongoWriteConcern type is used to define the level of acknowledgment of receipt requested for the write operations in a stand-alone mongod, in a set of replicas or in fragmented clusters. You can define and change the characteristics of these options using different WLanguage properties.
Remarks:
  • This type of variable is used by mongoCollection variables.
  • For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable.
Example
MaCollection.OptionEcriture.Mode = mwcMajority
Properties

Properties specific to mongoWriteConcern variables

The following properties can be used to handle the options for writing into a Mongo collection:
Property nameType usedEffect
LogBoolean
  • True to write a trace of the write operation into the log.
  • False otherwise.
ModeInteger constantMinimum number of nodes that must have acknowledged the process to consider that the writing is performed. The following values are available:
  • moeDefault Only one node needs to have acknowledged processing for writing to be considered complete.
  • moeMajority: The majority of nodes must have acknowledged processing for writing to be considered complete.
  • moeTag: The number of nodes is the one defined in a pre-configuration defined on the server.. In this case, .Tag must be specified.
  • moeWithoutAcknowledgement: No node must have acknowledged processing for writing to be considered complete. Caution, no error is returned in this case.
  • Minimum number of nodes that must have acknowledged the process (strictly positive integer).
TagCharacter stringName of server pre-configuration.
TimeoutInteger or Duration
  • Maximum timeout to perform a writing. The write operations are considered as failed after this timeout.
  • 0 for no write timeout.
This property can correspond to:
  • an integer corresponding to the number of seconds,
  • a Duration variable,
  • the duration in a readable format (e.g., 1 s or 10 ms).
Minimum version required
  • Version 22
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/27/2025

Send a report | Local help