PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Properties specific to the description of mongoWriteConcern variables
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
mongoWriteConcern (Type of variable)
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. The characteristics of these options can be defined and modified by several WLanguage properties.
Notes:
Example
MyCollection..WriteConcern..Mode = mwcMajority
Remarks

Properties specific to the description of 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:
  • mwcDefault: A single node must have acknowledged the process to consider that the writing is performed.
  • mwcMajority: The majority of nodes must have acknowledged the process to consider that the writing is performed.
  • mwcTag: The number of nodes is the one defined in a pre-configuration defined on the server. In this case, ..Tag must be specified.
  • mwcUnacknowledged: No node must have acknowledged the process to consider that the writing is performed. 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 ou Duration
  • Maximum time-out to perform a writing. The write operations are considered as failed after this time-out.
  • 0 for no write time-out.
This property can correspond to:
  • an integer corresponding to the number of seconds,
  • a Duration variable,
  • Versions 23 and later
    the direct indication of duration (1 s or 10 ms for example).
    New in version 23
    the direct indication of duration (1 s or 10 ms for example).
    the direct indication of duration (1 s or 10 ms for example).

Note: These properties can be handled by using one of the following syntaxes:
  • <Variable Name>..<Property Name>
  • <Variable Name>.<Property Name>
Minimum required version
  • Version 22
This page is also available for…
Comments
Click [Add] to post a comment