cosmos_mongo_endpoint {AzureCosmosR} | R Documentation |
MongoDB endpoint for Azure Cosmos DB
Description
MongoDB endpoint for Azure Cosmos DB
Usage
cosmos_mongo_endpoint(
host,
key,
mongo_options = list(),
connection_string = NULL
)
cosmos_mongo_connection(endpoint, ...)
## S3 method for class 'cosmos_mongo_endpoint'
cosmos_mongo_connection(endpoint, collection, database, ...)
Arguments
host |
For |
key |
For |
mongo_options |
For |
connection_string |
Alternatively, the full connection string for the MongoDB endpoint. If this is supplied, all other arguments to |
endpoint |
For |
... |
Optional arguments passed to lower-level functions. |
collection , database |
For |
Details
These functions act as a bridge between the Azure resource and the functionality provided by the mongolite package.
Value
For cosmos_mongo_endpoint
, an object of S3 class cosmos_mongo_endpoint
.
For cosmos_mongo_connection
, an object of class mongolite::mongo
which can then be used to interact with the given collection.
See Also
For the SQL API client framework: cosmos_endpoint, cosmos_database, cosmos_container, query_documents
Examples
## Not run:
mendp <- cosmos_mongo_endpoint("https://mymongoacct.mongo.cosmos.azure.com:443",
key="mykey")
cosmos_mongo_connection(mendp, "mycollection", "mydatabase")
## End(Not run)