PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
  • Properties specific to the description of mongoCollectionOption variables
  • Functions that use the mongoCollectionOption type
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
mongoCollectionOption (Type of variable)
In french: mongoCollectionOption
The mongoCollectionOption type is used to define the advanced characteristics of collection options in a MongoDB database. The characteristics of these options can be defined and changed using different WLanguage properties.
Remark: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable.
Example
Option is mongoCollectionOption
Option.MaxSize = 100*1024*1024
MongoCreateCollection(MDBDatabase, "product", Option)
Remarks

Properties specific to the description of mongoCollectionOption variables

The following properties can be used to handle the collection options:
Property nameType usedEffect
MaxNbDocumentIntegerMaximum number of documents in the collection. The oldest documents will be removed when the number of documents in the collection reaches this limit.
The collection is not limited if this property is not filled.
MaxSizeIntegerMaximum size of a collection. The oldest documents will be removed when the size of the collection reaches this limit.
The collection is not limited if this property is not filled.
StorageEngineCharacter string, Buffer or VariantDocument in JSON/BSON/variant format describing the list of options passed to the storage engine.
For more details, see the documentation about MongoDB.
ValidationLevelCharacter stringValidation level when modifying an existing document. The available options are:
  • "off",
  • "strict",
  • "moderate".
For more details, see the documentation about MongoDB.
ValidatorCharacter string, Buffer or VariantDocument in JSON/BSON/variant format describing the conditions for validating the documents that will be added to the collection.
For more details, see the documentation about MongoDB.

Functions that use the mongoCollectionOption type

The following functions are using the mongoCollectionOption variables:
MongoCreateCollectionCreates a collection in a MongoDB database while specifying the options of this collection.
Related Examples:
Native access to MongoDB Unit examples (WINDEV): Native access to MongoDB
[ + ] This example shows how to use the main functions of native access to MongoDB databases: adding data, reading (searching), modifying and deleting data in the database. The example also shows functions for saving files in the MongoDB GridFS data system.
Minimum version required
  • Version 22
This page is also available for…
Comments
Click [Add] to post a comment