Platforms to show: All Mac Windows Linux Cross-Platform
Back to MongoGridFSMBS class.
MongoGridFSMBS.Chunks as MongoCollectionMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | MongoDB | MBS MongoDB Plugin | 25.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
This instance is owned by the GridFS instance and should not be modified or freed.
MongoGridFSMBS.Constructor Private
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | MongoDB | MBS MongoDB Plugin | 25.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
MongoGridFSMBS.CreateFile(options as MongoGridFSFileOptionsMBS) as MongoGridFSFileMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | MongoDB | MBS MongoDB Plugin | 25.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
MongoGridFSMBS.CreateFileFromStream(stream as MongoStreamMBS, options as MongoGridFSFileOptionsMBS) as MongoGridFSFileMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | MongoDB | MBS MongoDB Plugin | 25.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Note that this function will read from stream until End of File, making it best suited for file-backed streams.
Some examples using this method:
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | MongoDB | MBS MongoDB Plugin | 25.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
MongoGridFSMBS.Files as MongoCollectionMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | MongoDB | MBS MongoDB Plugin | 25.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
MongoGridFSMBS.Find(filterJSON as String, OptionsJSON as String = "") as MongoGridFSFileListMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | MongoDB | MBS MongoDB Plugin | 25.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
You can iterate the matched gridfs files with the resulting file list.
See Find() in MongoCollectionMBS for a description of the filter and opts parameters.
This function is considered a retryable read operation. Upon a transient error (a network error, errors due to replica set failover, etc.) the operation is safely retried once. If retryreads is false in the URI, the retry behavior does not apply.
MongoGridFSMBS.Find2(filterJSON as String, OptionsJSON as String = "") as MongoGridFSFileMBS()
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | MongoDB | MBS MongoDB Plugin | 25.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Same as Find() but returns a Xojo array with all files.
MongoGridFSMBS.FindOne(filterJSON as String, OptionsJSON as String = "") as MongoGridFSFileMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | MongoDB | MBS MongoDB Plugin | 25.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
If there is an error, nil is returned and an exception is reported; if there is no error but no matching file is found, nil is returned.
See Find() for a description of the filter and opts parameters.
This function is considered a retryable read operation. Upon a transient error (a network error, errors due to replica set failover, etc.) the operation is safely retried once. If retryreads is false in the URI, the retry behavior does not apply.
MongoGridFSMBS.FindOneByFileName(FileName as String) as MongoGridFSFileMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | MongoDB | MBS MongoDB Plugin | 25.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
If there is an error, nil is returned and an exception is raised; if there is no error but no matching file is found, nil is returned.
This function is considered a retryable read operation. Upon a transient error (a network error, errors due to replica set failover, etc.) the operation is safely retried once. If retryreads is false in the URI the retry behavior does not apply.
Some examples using this method:
MongoGridFSMBS.RemoveByFileName(Name as String)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | MongoDB | MBS MongoDB Plugin | 25.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Returns true if successful, including when no files match. Returns false and raises exception if there are invalid arguments or a server or network error.
The items on this page are in the following plugins: MBS MongoDB Plugin.