PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Declaration
  • Properties specific to the description of mongoGridFS variables
  • Functions that use the mongoGridFS 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
mongoGridFS (Type of variable)
In French: mongoGridFS
The mongoGridFS type is used to define the advanced characteristics of a file system for a MongoDB database. The characteristics of this file system can be defined and modified by several WLanguage properties.
Note: See Declaring a variable for more details.
Example
cntMDB is MongoConnection("mongodb://db1.example.net")
fs is MongoGridFS
fs..Database = cntMDB..Database["CRM"]
fs..Prefix = "myfs"
Trace(MongoGridFSListFile(fs))
Declaration
MyVariable is mongoGridFS(<Database>, <Prefix>)
<Database>: Character string with quotes
MongoDB database containing the file system.
<Prefix>: Character string with quotes
Prefix of collection.
The files will be stored in the collections in the following format: <prefix>.files and <prefix>.chunck.
Remarks

Properties specific to the description of mongoGridFS variables

The following properties can be used to handle a MongoDB file system:
Property nameType usedEffect
DatabasemongoDatabase variableDatabase containing the file system.
PrefixCharacter stringPrefix of collection.
The files will be stored in the collections in the following format: <prefix>.files and <prefix>.chunck.

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 mongoGridFS type

The following functions are using the mongoGridFS type:
Versions 22 and later
MongoGridFSDeleteFile
New in version 22
MongoGridFSDeleteFile
MongoGridFSDeleteFile
Deletes a file identified by its name from a MongoDB file system.
Versions 22 and later
MongoGridFSDeleteFileById
New in version 22
MongoGridFSDeleteFileById
MongoGridFSDeleteFileById
Deletes a file identified by its identifier from a MongoDB file system.
Versions 22 and later
MongoGridFSGetFile
New in version 22
MongoGridFSGetFile
MongoGridFSGetFile
Retrieves (on the local computer) a file identified by its name and found in a MongoDB file system.
Versions 22 and later
MongoGridFSGetFileById
New in version 22
MongoGridFSGetFileById
MongoGridFSGetFileById
Retrieves (on the local computer) a file identified by its identifier and found in a MongoDB file system.
Versions 23 and later
MongoGridFSGetFileInfo
New in version 23
MongoGridFSGetFileInfo
MongoGridFSGetFileInfo
Used to get information about a MongoDB file (gridFS).
Versions 22 and later
MongoGridFSListFile
New in version 22
MongoGridFSListFile
MongoGridFSListFile
Retrieves the list of MongoDB files found in the MongoDB file system (gridFS).
Versions 22 and later
MongoGridFSSendFile
New in version 22
MongoGridFSSendFile
MongoGridFSSendFile
Copies a file from the local computer to a MongoDB file system (gridFS).
Note: These functions can also be used to handle a MongoDB database. In this case, the prefix corresponds to the default value "fs".
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