PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • 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/iPadApple WatchUniversal Windows 10 AppWindows Mobile
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 modified by several WLanguage properties.
Note: See Declaring a variable for more details.
Example
Option is MongoCollectionOption
Option..MaxSize = 100*1024*1024
MongoCreateCollection(DatabaseMDB, "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
StorageEngineCharacter string, Buffer or VariantDocument in JSON/BSON/variant format describing the list of options passed to the storage engine.
See the documentation about MongoDB for more details.
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.
ValidationLevelCharacter stringValidation level when modifying an existing document. The available options are:
  • "off",
  • "strict",
  • "moderate".
See the documentation about MongoDB for more details.
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.
ValidatorCharacter string, Buffer or VariantDocument in JSON/BSON/variant format describing the conditions for validating the documents that will be added to the collection.
See the documentation about MongoDB for more details.


Note: These properties can be handled by using one of the following syntaxes:
  • <Variable Name>..<Property Name>
  • <Variable Name>.<Property Name>

Functions that use the mongoCollectionOption type

The following functions are using the mongoCollectionOption variables:
Versions 22 and later
MongoCreateCollection
New in version 22
MongoCreateCollection
MongoCreateCollection
Creates 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 required version
  • Version 22
This page is also available for…
Comments
Click [Add] to post a comment