Skip to content

Commit

Permalink
rm attachment code (deprecated), other cran fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
hongooi73 committed Jan 18, 2021
1 parent 53b131a commit 58e0461
Show file tree
Hide file tree
Showing 12 changed files with 27 additions and 240 deletions.
10 changes: 0 additions & 10 deletions NAMESPACE
Expand Up @@ -3,14 +3,11 @@
S3method(bulk_delete,cosmos_container)
S3method(bulk_import,cosmos_container)
S3method(cosmos_mongo_connection,cosmos_mongo_endpoint)
S3method(create_attachment,cosmos_document)
S3method(create_cosmos_container,cosmos_database)
S3method(create_cosmos_database,cosmos_endpoint)
S3method(create_document,cosmos_container)
S3method(create_stored_procedure,cosmos_container)
S3method(create_udf,cosmos_container)
S3method(delete_attachment,cosmos_attachment)
S3method(delete_attachment,cosmos_document)
S3method(delete_cosmos_container,cosmos_container)
S3method(delete_cosmos_container,cosmos_database)
S3method(delete_cosmos_database,cosmos_database)
Expand All @@ -25,7 +22,6 @@ S3method(do_cosmos_op,cosmos_container)
S3method(do_cosmos_op,cosmos_database)
S3method(do_cosmos_op,cosmos_document)
S3method(do_cosmos_op,cosmos_endpoint)
S3method(download_attachment,cosmos_attachment)
S3method(exec_stored_procedure,cosmos_container)
S3method(exec_stored_procedure,cosmos_stored_procedure)
S3method(get_cosmos_container,cosmos_database)
Expand All @@ -34,13 +30,11 @@ S3method(get_cosmos_database,cosmos_endpoint)
S3method(get_document,cosmos_container)
S3method(get_stored_procedure,cosmos_container)
S3method(get_udf,cosmos_container)
S3method(list_attachments,cosmos_document)
S3method(list_cosmos_containers,cosmos_database)
S3method(list_cosmos_databases,cosmos_endpoint)
S3method(list_documents,cosmos_container)
S3method(list_stored_procedures,cosmos_container)
S3method(list_udfs,cosmos_container)
S3method(print,cosmos_attachment)
S3method(print,cosmos_container)
S3method(print,cosmos_database)
S3method(print,cosmos_document)
Expand All @@ -62,28 +56,24 @@ export(call_cosmos_endpoint)
export(cosmos_endpoint)
export(cosmos_mongo_connection)
export(cosmos_mongo_endpoint)
export(create_attachment)
export(create_cosmos_container)
export(create_cosmos_database)
export(create_document)
export(create_stored_procedure)
export(create_udf)
export(delete_attachment)
export(delete_cosmos_container)
export(delete_cosmos_database)
export(delete_document)
export(delete_stored_procedure)
export(delete_udf)
export(do_cosmos_op)
export(download_attachment)
export(exec_stored_procedure)
export(get_cosmos_container)
export(get_cosmos_database)
export(get_document)
export(get_partition_key)
export(get_stored_procedure)
export(get_udf)
export(list_attachments)
export(list_cosmos_containers)
export(list_cosmos_databases)
export(list_documents)
Expand Down
156 changes: 0 additions & 156 deletions R/attachment.R

This file was deleted.

6 changes: 5 additions & 1 deletion R/bulk.R
Expand Up @@ -10,6 +10,8 @@
#' This is a convenience function to import a dataset into a container. It works by creating a stored procedure and then calling it in a loop, passing the to-be-imported data in chunks. The dataset must include a column for the container's partition key or an error will result.
#'
#' Note that this function is not meant for production use. In particular, if the import fails midway through, it will not clean up after itself: you should call `bulk_delete` to remove the remnants of a failed import.
#' @return
#' A list containing the number of rows imported, for each value of the partition key.
#' @seealso
#' [bulk_delete], [cosmos_container]
#' @examples
Expand All @@ -24,7 +26,7 @@
#' bulk_import(cont, dplyr::starwars)
#'
#' # importing from a JSON file
#' writeLines(jsonlite::toJSON(dplyr::starwars), "starwars.json"
#' writeLines(jsonlite::toJSON(dplyr::starwars), "starwars.json")
#' bulk_import(cont, "starwars.json")
#'
#' }
Expand Down Expand Up @@ -101,6 +103,8 @@ import_by_key <- function(container, key, data, procname, init_chunksize, header
#' @param headers,... Optional arguments passed to lower-level functions.
#' @details
#' This is a convenience function to delete multiple documents from a container. It works by creating a stored procedure and then calling it with the supplied query as a parameter. This function is not meant for production use.
#' @return
#' The number of rows deleted.
#' @seealso
#' [bulk_import], [cosmos_container]
#' @examples
Expand Down
2 changes: 2 additions & 0 deletions R/query.R
Expand Up @@ -17,6 +17,8 @@
#' The `by_pkrange` argument allows running the query separately across all _partition key ranges_. Each partition key range corresponds to a separate physical partition, and contains the documents for one or more key values. You can set this to TRUE to run a query that fails when run across partitions; the returned object will be a list containing the individual query results from each pkrange.
#'
#' As an alternative to AzureCosmosR, you can also use the ODBC protocol to interface with the SQL API. By installing a suitable ODBC driver, you can then talk to Cosmos DB in a manner similar to other SQL databases. An advantage of the ODBC interface is that it fully supports cross-partition queries, unlike the REST API. A disadvantage is that it does not support nested document fields; functions like `array_contains()` cannot be used, and attempts to reference arrays and objects may return incorrect results.
#' @return
#' `query_documents` returns the results of the query. Most of the time this will be a data frame, or list of data frames if `by_pkrange=TRUE`.
#' @seealso
#' [cosmos_container], [cosmos_document], [list_partition_key_values], [list_partition_key_ranges]
#' @examples
Expand Down
2 changes: 2 additions & 0 deletions R/sproc.R
Expand Up @@ -9,6 +9,8 @@
#' @details
#' These are methods for working with stored procedures in Azure Cosmos DB using the core (SQL) API. In the Cosmos DB model, stored procedures are written in JavaScript and associated with a container.
#'
#' @return
#' For `get_stored_procedure` and `create_stored_procedure`, an object of class `cosmos_stored_procedure`. For `list_stored_procedures`, a list of such objects.
#' @seealso
#' [cosmos_container], [get_udf]
#' @examples
Expand Down
2 changes: 2 additions & 0 deletions R/udf.R
Expand Up @@ -8,6 +8,8 @@
#' @details
#' These are methods for working with user-defined functions (UDFs) in Azure Cosmos DB using the core (SQL) API. In the Cosmos DB model, UDFs are written in JavaScript and associated with a container.
#'
#' @return
#' For `get_udf` and `create_udf`, an object of class `cosmos_udf`. For `list_udfs`, a list of such objects.
#' @seealso
#' [cosmos_container], [get_stored_procedure]
#' @examples
Expand Down
3 changes: 3 additions & 0 deletions man/bulk_delete.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion man/bulk_import.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

72 changes: 0 additions & 72 deletions man/cosmos_attachment.Rd

This file was deleted.

3 changes: 3 additions & 0 deletions man/cosmos_stored_procedure.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions man/cosmos_udf.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 58e0461

Please sign in to comment.