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

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