|
|
|
|
|
- Properties specific to mongoFindOption variables
mongoFindOption (Variable type) In french: mongoChercheOption
The mongoFindOption type is used to define the advanced characteristics of a search in a MongoDB database. You can define and change the characteristics of this search 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. MesOptions is mongoFindOption
MesOptions.Limit = 5
let MaRecherche = MongoFind(CnxMdb.BaseDeDonnées["CRM"].Collection["produits"], "{}", MesOptions)
Option is mongoFindOption
Option.Trie = "{ ""age"" : -1 }"
sFiltre is string = "{}"
let MonRésultat = MongoFind(CnxMdb.BaseDeDonnées["CRM"].Collection["Acteurs"], sFiltre, Option)
Properties Properties specific to mongoFindOption variables The following properties can be used to handle the search options: | | | Property name | Type used | Effect |
---|
Limit | Integer | Maximum number of documents that will be returned during the search. | Projection | Variant, Buffer or Character string | Document in JSON format (Character string), in BSON format (buffer) or variant defining the items to return. | Skip | Integer | Number of skipped documents. The first document returned will be the document corresponding to this value +1. | Sort | Variant, Buffer or Character string | Document in JSON format (Character string), in BSON format (buffer) or variant defining the sort parameters. To get an ascending sort, the name of the key must be followed by ":1". To get a descending sort, the name of the key must be followed by ":-1". |
Related Examples:
|
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.
|
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|