Platforms to show: All Mac Windows Linux Cross-Platform

MongoCollectionMBS class

Type Topic Plugin Version macOS Windows Linux iOS Targets
class MongoDB MBS MongoDB Plugin 22.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
This class provides access to a MongoDB collection.

This handle is useful for actions for most CRUD operations, I.e. insert, update, delete, find, etc.
This is an abstract class. You can't create an instance, but you can get one from various plugin functions.

  • 3 properties
  • 19 methods
    • method Aggregate(flags as Integer, pipelineJSON as String, OptionsJSON as String = "") as MongoCursorMBS
    • method Command(commandJSON as String, OptionsJSON as String = "") as String
    • method Constructor   Private
    • method Copy as MongoCollectionMBS
    • method DeleteMany(selectorJSON as String, OptionsJSON as String = "") as String
    • method DeleteOne(selectorJSON as String, OptionsJSON as String = "") as String
    • method EstimatedDocumentCount(OptionsJSON as String = "") as Int64
    • method EstimatedDocumentCount(OptionsJSON as String, byref ReplyJSON as String) as Int64
    • method Find(FilterJSON as String, OptionsJSON as String = "") as MongoCursorMBS
    • method FindIndexes(OptionsJSON as String = "") as MongoCursorMBS
    • method InsertMany(documentArrayJSON as String, OptionsJSON as String = "") as String
    • method InsertMany(documentJSON() as String, OptionsJSON as String = "") as String
    • method InsertOne(documentJSON as String, OptionsJSON as String = "") as String
    • method Keys as String()
    • method Rename(NewDatabaseName as String, NewCollectionName as String, DropTargetBeforeRename as Boolean = false, OptionsJSON as String = "") as boolean
    • method ReplaceOne(selectorJSON as String, replacementJSON as String, OptionsJSON as String = "") as String
    • method UpdateMany(selectorJSON as String, updateJSON as String, OptionsJSON as String = "") as String
    • method UpdateOne(selectorJSON as String, updateJSON as String, OptionsJSON as String = "") as String
    • method Watch(pipelineJSON as String, OptionsJSON as String = "") as MongoChangeStreamMBS
  • 7 constants

Flags

Constant Value Description
kFlagAwaitData 32 Use with kFlagTailableCursor. Block rather than returning no data. After a period, time out.
kFlagExhaust 64 Stream the data down full blast in multiple “reply” packets. Faster when you are pulling down a lot of data and you know you want to retrieve it all. Only applies to cursors created from a find operation (i.e. find).
kFlagNoCursorTimeout 16 The server normally times out an idle cursor after an inactivity period (10 minutes). This prevents that.
kFlagNone 0 Specify no query flags.
kFlagPartial 128 Get partial results from mongos if some shards are down (instead of throwing an error).
kFlagSecondaryOk 4 Allow query of replica set secondaries.
kFlagTailableCursor 2 Cursor will not be closed when the last data is retrieved. You can resume this cursor later.

This class has no sub classes.

Some methods using this class:

Some examples using this class:

Blog Entries

Xojo Developer Magazine

Release notes


The items on this page are in the following plugins: MBS MongoDB Plugin.


MongoClientMBS   -   MongoCursorMBS


The biggest plugin in space...