ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / Managing databases / Big Data / Managing Mongo data files
  • Properties specific to mongoCollectionOption variables
  • Functions that use the mongoCollectionOption type
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
mongoCollectionOption (Variable type)
In french: mongoCollectionOption
The mongoCollectionOption type is used to define the advanced characteristics of collection options in a MongoDB database. You can define and change the characteristics of these options using different WLanguage properties.
Note: 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)
Properties

Properties specific to 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.
Remarks

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

Last update: 09/19/2024

Send a report | Local help