Description Usage Arguments Details Value See Also Examples
Create a connection to a Mongo database through JSON Studio
1 2 3 |
url |
the url where JSON Studio can be accessed |
host |
the hostname of the Mongo server, as it would be entered from the JSON Studio login screen |
db |
the name of the database you intend to access |
port |
the port number where Mongo is running |
username |
a username to log in to the database, if necessary |
pwd |
a password to log in to the database, if necessary |
sdb |
the name of a database to store JSON Studio-related collections |
ssl |
TRUE to connect using SSL |
anyCert |
TRUE to accept any SSL certificate |
krb |
TRUE to authenticate using Kerberos |
mapCredentials |
TRUE to map credentials to a functional user account with which to access data |
secondaryPref |
TRUE to allow connecting to a secondary of a replica set and prefer a secondary if the host value passed in is a replica set |
This function returns a SonarConnection object which can be used with
sonarFind
and sonarAgg
to query a Mongo
database.
The parameters for this function are explained in greater detail in the JSON Studio help page Using the Gateway.
A SonarConnection object to connect to the given Mongo database
through JSON Studio, which can be used with sonarFind
or
sonarAgg
.
http://jsonstudio.com/wp-content/uploads/2014/04/manual141/_build/html/index.html
Other connection: sonarAgg
;
sonarCSV
; sonarFind
;
sonarJSON
1 | con <- new.SonarConnection('https://localhost:8443', 'localhost', 'test')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.