Description Usage Arguments Details Value See Also Examples
Methods for working with Azure Cosmos DB containers
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | get_cosmos_container(object, ...)
## S3 method for class 'cosmos_database'
get_cosmos_container(object, container, ...)
## S3 method for class 'cosmos_endpoint'
get_cosmos_container(object, database, container, ...)
create_cosmos_container(object, ...)
## S3 method for class 'cosmos_database'
create_cosmos_container(
object,
container,
partition_key,
partition_version = 2,
autoscale_maxRUs = NULL,
manual_RUs = NULL,
headers = list(),
...
)
delete_cosmos_container(object, ...)
## S3 method for class 'cosmos_database'
delete_cosmos_container(object, container, confirm = TRUE, ...)
## S3 method for class 'cosmos_container'
delete_cosmos_container(object, ...)
list_cosmos_containers(object, ...)
## S3 method for class 'cosmos_database'
list_cosmos_containers(object, ...)
|
object |
A Cosmos DB database object, as obtained from |
container |
The name of the container. |
database |
For |
partition_key |
For |
partition_version |
For |
autoscale_maxRUs, manual_RUs |
For |
headers, ... |
Optional arguments passed to lower-level functions. |
confirm |
For |
These are methods for working with Cosmos DB containers using the core (SQL) API. A container is analogous to a table in SQL, or a collection in MongoDB.
get_cosmos_container
, create_cosmos_container
, delete_cosmos_container
and list_cosmos_containers
provide basic container management functionality.
get_partition_key
returns the name of the partition key column in the container, and list_partition_key_values
returns all the distinct values for this column. These are useful when working with queries that have to be mapped across partitions.
For get_cosmos_container
and create_cosmos_container
, an object of class cosmos_container. For
list_cosmos_container', a list of such objects.
cosmos_container, query_documents, bulk_import, bulk_delete
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ## Not run:
endp <- cosmos_endpoint("https://myaccount.documents.azure.com:443/", key="mykey")
db <- get_cosmos_database(endp, "mydatabase")
create_cosmos_container(db, "mycontainer", partition_key="sex")
list_cosmos_containers(db)
cont <- get_cosmos_container(db, "mycontainer")
delete_cosmos_container(cont)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.