|
|
|
|
|
MongoInfo (Function) In french: MongoInfo Returns information about a MongoDB database. infoMDB is mongoDatabaseInfo
infoMDB = MongoInfo(BaseMDB)
Trace("La base " + infoMDB.Name + " contient " + infoMDB.NbDocuments + " documents.")
clInfo is mongoDatabaseInfo = MongoInfo(gclBase)
sInfo is string = ChaîneConstruit([
Informations sur la base MongoDB
--------------------------------
Nom de la base: %1
Nombre de collections: %2
Nombre de documents: %3
Taille moyenne des documents: %4
Taille totale de la base: %5
Taille totale du stockage: %6
],
clInfo.Name,
clInfo.NbCollections,
clInfo.NbDocuments,
LengthToString(clInfo.AverageDocumentSize),
LengthToString(clInfo.DataSize),
LengthToString(clInfo.StorageSize))
Info(sInfo)
Syntax
<Result> = MongoInfo(<Database>)
<Result>: mongoDatabaseInfo variable mongoDatabaseInfo variable containing information about the database. <Database>: mongoDatabase variable Name of the mongoDatabase variable corresponding to the MongoDB database being handled.
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…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|