Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Deprecated   Guides   Examples   Videos
New in version: 12.1   12.2   12.3   12.4   12.5   13.0   13.1   13.2   13.3   13.4    Statistic    FMM    Blog  

MongoDB.GetOptions

Queries the options from the URL.

Component Version macOS Windows Linux Server iOS SDK
MongoDB 13.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "MongoDB.GetOptions"; MongoDBRef )   More

Parameters

Parameter Description Example
MongoDBRef The reference number for the mongo connection. $MongoDB

Result

Returns JSON or error.

Description

Queries the options from the URL.
Fetches a JSON document containing all of the options provided after the ? of a URI.
Can be empty if not set.

Examples

Query options from URL:

Set Variable [ $Mongo ; Value: MBS( "MongoDB.New" ) ]
#
# set URL with options
Set Variable [ $r ; Value: MBS( "MongoDB.SetURI"; $Mongo; "mongodb://test@1.2.3.4/?ssl=true&tlsCAFile=" & GetAsURLEncoded ( "/Users/cs/cacert.pem" )) ]
#
# query and show options
Set Variable [ $options ; Value: MBS( "MongoDB.GetOptions"; $Mongo ) ]
Show Custom Dialog [ "Options" ; $options ]
#
# success
Exit Script [ Text Result: $Mongo ]

See also

Release notes

Blog Entries

This function checks for a license.

Created 22nd January 2023, last changed 7th May 2023


MongoDB.GetCompressors - MongoDB.GetPassword

💬 Ask a question or report a problem