Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

MongoDB.CursorSetLimit

Limits the number of documents in the result set.

Component Version macOS Windows Linux Server iOS SDK
MongoDB 12.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "MongoDB.CursorSetLimit"; MongoDBRef; Limit )   More

Parameters

Parameter Description Example
MongoDBRef The reference number for the mongo connection. $MongoDB
Limit The new limit. 100

Result

Returns OK or error.

Description

Limits the number of documents in the result set.

Examples

Sets limit and shows it:

// first make a find
Set Variable [ $r ; Value: MBS( "MongoDB.CursorSetLimit"; $Mongo; 2) ]
Show Custom Dialog [ "Current cursor limit:" ; MBS( "MongoDB.CursorLimit"; $mongo ) ]

See also

Example Databases

This function checks for a license.

Created 22nd May 2022, last changed 20th June 2022


MongoDB.CursorSetBatchSize - MongoDB.CursorSetMaxAwaitTimeMS