Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update from DBItest #367

Merged
merged 5 commits into from
Dec 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions R/DBConnection.R
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ show_connection <- function(object) {
#' @templateVar method_name dbDisconnect
#'
#' @inherit DBItest::spec_connection_disconnect return
#' @inheritSection DBItest::spec_connection_disconnect Specification
#' @inheritSection DBItest::spec_connection_disconnect Failure modes
#'
#' @inheritParams dbGetQuery
#' @family DBIConnection generics
Expand Down Expand Up @@ -96,6 +96,7 @@ setGeneric("dbDisconnect",
#' @templateVar method_name dbSendQuery
#'
#' @inherit DBItest::spec_result_send_query return
#' @inheritSection DBItest::spec_result_send_query Failure modes
#' @inheritSection DBItest::spec_result_send_query Additional arguments
#' @inheritSection DBItest::spec_result_send_query Specification
#' @inheritSection DBItest::spec_result_send_query Specification for the `immediate` argument
Expand Down Expand Up @@ -155,6 +156,7 @@ setGeneric("dbSendQuery",
#' @templateVar method_name dbSendStatement
#'
#' @inherit DBItest::spec_result_send_statement return
#' @inheritSection DBItest::spec_result_send_statement Failure modes
#' @inheritSection DBItest::spec_result_send_statement Additional arguments
#' @inheritSection DBItest::spec_result_send_statement Specification
#' @inheritSection DBItest::spec_result_send_statement Specification for the `immediate` argument
Expand Down Expand Up @@ -236,6 +238,7 @@ setMethod(
#' @templateVar method_name dbGetQuery
#'
#' @inherit DBItest::spec_result_get_query return
#' @inheritSection DBItest::spec_result_get_query Failure modes
#' @inheritSection DBItest::spec_result_get_query Additional arguments
#' @inheritSection DBItest::spec_result_get_query Specification
#' @inheritSection DBItest::spec_result_get_query Specification for the `immediate` argument
Expand Down Expand Up @@ -305,6 +308,7 @@ setMethod("dbGetQuery", signature("DBIConnection", "character"),
#' performance optimization.
#'
#' @inherit DBItest::spec_result_execute return
#' @inheritSection DBItest::spec_result_execute Failure modes
#' @inheritSection DBItest::spec_result_execute Additional arguments
#' @inheritSection DBItest::spec_result_execute Specification
#' @inheritSection DBItest::spec_result_execute Specification for the `immediate` argument
Expand Down Expand Up @@ -386,6 +390,7 @@ setGeneric("dbListResults",
#' @inheritParams dbReadTable
#'
#' @inherit DBItest::spec_sql_list_fields return
#' @inheritSection DBItest::spec_sql_list_fields Failure modes
#' @inheritSection DBItest::spec_sql_list_fields Specification
#'
#' @family DBIConnection generics
Expand Down Expand Up @@ -444,6 +449,7 @@ list_fields <- function(conn, name) {
#' @templateVar method_name dbListTables
#'
#' @inherit DBItest::spec_sql_list_tables return
#' @inheritSection DBItest::spec_sql_list_tables Failure modes
#'
#' @inheritParams dbGetQuery
#' @family DBIConnection generics
Expand Down Expand Up @@ -477,7 +483,7 @@ setGeneric("dbListTables",
#' @templateVar method_name dbListObjects
#'
#' @inherit DBItest::spec_sql_list_objects return
#' @inheritSection DBItest::spec_sql_list_objects Additional arguments
#' @inheritSection DBItest::spec_sql_list_objects Failure modes
#' @inheritSection DBItest::spec_sql_list_objects Specification
#'
#' @inheritParams dbGetQuery
Expand Down Expand Up @@ -524,6 +530,7 @@ setMethod("dbListObjects", signature("DBIConnection", "ANY"),
#' @templateVar method_name dbReadTable
#'
#' @inherit DBItest::spec_sql_read_table return
#' @inheritSection DBItest::spec_sql_read_table Failure modes
#' @inheritSection DBItest::spec_sql_read_table Additional arguments
#' @inheritSection DBItest::spec_sql_read_table Specification
#'
Expand Down Expand Up @@ -592,6 +599,7 @@ setMethod("dbReadTable", signature("DBIConnection", "Id"),
#' @templateVar method_name dbWriteTable
#'
#' @inherit DBItest::spec_sql_write_table return
#' @inheritSection DBItest::spec_sql_write_table Failure modes
#' @inheritSection DBItest::spec_sql_write_table Additional arguments
#' @inheritSection DBItest::spec_sql_write_table Specification
#'
Expand Down Expand Up @@ -637,6 +645,7 @@ setMethod("dbWriteTable", signature("DBIConnection", "Id", "ANY"),
#' @templateVar method_name dbExistsTable
#'
#' @inherit DBItest::spec_sql_exists_table return
#' @inheritSection DBItest::spec_sql_exists_table Failure modes
#' @inheritSection DBItest::spec_sql_exists_table Specification
#'
#' @inheritParams dbReadTable
Expand Down Expand Up @@ -672,6 +681,7 @@ setMethod("dbExistsTable", signature("DBIConnection", "Id"),
#' @templateVar method_name dbRemoveTable
#'
#' @inherit DBItest::spec_sql_remove_table return
#' @inheritSection DBItest::spec_sql_remove_table Failure modes
#' @inheritSection DBItest::spec_sql_remove_table Additional arguments
#' @inheritSection DBItest::spec_sql_remove_table Specification
#'
Expand Down
1 change: 1 addition & 0 deletions R/DBDriver.R
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ setGeneric("dbListConnections",
#' @templateVar method_name dbDataType
#'
#' @inherit DBItest::spec_driver_data_type return
#' @inheritSection DBItest::spec_driver_data_type Failure modes
#' @inheritSection DBItest::spec_driver_data_type Specification
#' @inheritSection DBItest::spec_result_create_table_with_data_type Specification
#'
Expand Down
8 changes: 8 additions & 0 deletions R/DBResult.R
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ show_result <- function(object) {
#' @templateVar method_name dbFetch
#'
#' @inherit DBItest::spec_result_fetch return
#' @inheritSection DBItest::spec_result_fetch Failure modes
#' @inheritSection DBItest::spec_result_fetch Specification
#' @inheritSection DBItest::spec_result_roundtrip Specification
#'
Expand Down Expand Up @@ -125,6 +126,7 @@ setGeneric("fetch",
#' @templateVar method_name dbClearResult
#'
#' @inherit DBItest::spec_result_clear_result return
#' @inheritSection DBItest::spec_result_clear_result Failure modes
#' @inheritSection DBItest::spec_result_clear_result Specification
#'
#' @param res An object inheriting from [DBIResult-class].
Expand Down Expand Up @@ -153,6 +155,7 @@ setGeneric("dbClearResult",
#' @inheritParams dbClearResult
#'
#' @inherit DBItest::spec_meta_column_info return
#' @inheritSection DBItest::spec_meta_column_info Failure modes
#' @inheritSection DBItest::spec_meta_column_info Specification
#'
#' @family DBIResult generics
Expand Down Expand Up @@ -180,6 +183,7 @@ setGeneric("dbColumnInfo",
#' @templateVar method_name dbGetStatement
#'
#' @inherit DBItest::spec_meta_get_statement return
#' @inheritSection DBItest::spec_meta_get_statement Failure modes
#'
#' @inheritParams dbClearResult
#' @family DBIResult generics
Expand Down Expand Up @@ -209,6 +213,7 @@ setGeneric("dbGetStatement",
#' @templateVar method_name dbHasCompleted
#'
#' @inherit DBItest::spec_meta_has_completed return
#' @inheritSection DBItest::spec_meta_has_completed Failure modes
#' @inheritSection DBItest::spec_meta_has_completed Specification
#'
#' @inheritParams dbClearResult
Expand Down Expand Up @@ -243,6 +248,7 @@ setGeneric("dbHasCompleted",
#' @templateVar method_name dbGetRowsAffected
#'
#' @inherit DBItest::spec_meta_get_rows_affected return
#' @inheritSection DBItest::spec_meta_get_rows_affected Failure modes
#'
#' @inheritParams dbClearResult
#' @family DBIResult generics
Expand Down Expand Up @@ -272,6 +278,7 @@ setGeneric("dbGetRowsAffected",
#' @templateVar method_name dbGetRowCount
#'
#' @inherit DBItest::spec_meta_get_row_count return
#' @inheritSection DBItest::spec_meta_get_row_count Failure modes
#'
#' @inheritParams dbClearResult
#' @family DBIResult generics
Expand Down Expand Up @@ -352,6 +359,7 @@ setMethod("dbGetInfo", signature("DBIResult"), function(dbObj, ...) {
#' @templateVar method_name dbBind
#'
#' @inherit DBItest::spec_meta_bind return
#' @inheritSection DBItest::spec_meta_bind Failure modes
#' @inheritSection DBItest::spec_meta_bind Specification
#'
#' @inheritParams dbClearResult
Expand Down
4 changes: 4 additions & 0 deletions R/quote.R
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ setMethod("show", "SQL", function(object) {
#' @templateVar method_name dbQuoteIdentifier
#'
#' @inherit DBItest::spec_sql_quote_identifier return
#' @inheritSection DBItest::spec_sql_quote_identifier Failure modes
#' @inheritSection DBItest::spec_sql_quote_identifier Specification
#'
#' @family DBIResult generics
Expand Down Expand Up @@ -161,6 +162,7 @@ setMethod("dbQuoteIdentifier", signature("DBIConnection", "Id"), quote_identifie
#' @templateVar method_name dbUnquoteIdentifier
#'
#' @inherit DBItest::spec_sql_unquote_identifier return
#' @inheritSection DBItest::spec_sql_unquote_identifier Failure modes
#' @inheritSection DBItest::spec_sql_unquote_identifier Specification
#'
#' @family DBIResult generics
Expand Down Expand Up @@ -251,6 +253,7 @@ as_table <- function(catalog, schema, table) {
#' @templateVar method_name dbQuoteString
#'
#' @inherit DBItest::spec_sql_quote_string return
#' @inheritSection DBItest::spec_sql_quote_string Failure modes
#' @inheritSection DBItest::spec_sql_quote_string Specification
#'
#' @family DBIResult generics
Expand Down Expand Up @@ -321,6 +324,7 @@ setMethod("dbQuoteString", signature("DBIConnection", "SQL"), quote_string)
#' @templateVar method_name dbQuoteLiteral
#'
#' @inherit DBItest::spec_sql_quote_literal return
#' @inheritSection DBItest::spec_sql_quote_literal Failure modes
#' @inheritSection DBItest::spec_sql_quote_literal Specification
#'
#' @family DBIResult generics
Expand Down
6 changes: 6 additions & 0 deletions R/table-create.R
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,12 @@ setMethod("sqlCreateTable", signature("DBIConnection"),
#' @inheritParams dbReadTable
#' @param row.names Must be `NULL`.
#' @inheritParams sqlCreateTable
#'
#' @inherit DBItest::spec_sql_create_table return
#' @inheritSection DBItest::spec_sql_create_table Failure modes
#' @inheritSection DBItest::spec_sql_create_table Additional arguments
#' @inheritSection DBItest::spec_sql_create_table Specification
#'
#' @family DBIConnection generics
#' @export
#' @examples
Expand Down
5 changes: 5 additions & 0 deletions R/table-insert.R
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,11 @@ sqlAppendTableTemplate <- function(con, table, values, row.names = NA, prefix =
#' with those in the target table in the database.
#' @param row.names Must be `NULL`.
#' @inheritParams sqlAppendTableTemplate
#'
#' @inherit DBItest::spec_sql_append_table return
#' @inheritSection DBItest::spec_sql_append_table Failure modes
#' @inheritSection DBItest::spec_sql_append_table Specification
#'
#' @family DBIConnection generics
#' @export
#' @examples
Expand Down
3 changes: 3 additions & 0 deletions R/table.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,20 @@ setClass("Id", slots = list(name = "character"))

#' Refer to a table nested in a hierarchy (e.g. within a schema)
#'
#' @description
#' Objects of class `Id` have a single slot `name`, which is a named
#' character vector.
#' The [dbQuoteIdentifier()] method converts `Id` objects to strings.
#' Support for `Id` objects depends on the database backend.
#' They can be used in the following methods as `name` or `table` argument:
#'
#' - [dbCreateTable()]
#' - [dbAppendTable()]
#' - [dbReadTable()]
#' - [dbWriteTable()]
#' - [dbExistsTable()]
#' - [dbRemoveTable()]
#'
#' Objects of this class are also returned from [dbListObjects()].
#'
#' @param ... Components of the hierarchy, e.g. `schema`, `table`,
Expand Down
2 changes: 2 additions & 0 deletions R/transactions.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ NULL
#' @templateVar method_name transactions
#'
#' @inherit DBItest::spec_transaction_begin_commit_rollback return
#' @inheritSection DBItest::spec_transaction_begin_commit_rollback Failure modes
#' @inheritSection DBItest::spec_transaction_begin_commit_rollback Specification
#'
#' @inheritParams dbGetQuery
Expand Down Expand Up @@ -94,6 +95,7 @@ setGeneric("dbRollback",
#' @templateVar method_name dbWithTransaction
#'
#' @inherit DBItest::spec_transaction_with_transaction return
#' @inheritSection DBItest::spec_transaction_with_transaction Failure modes
#' @inheritSection DBItest::spec_transaction_with_transaction Specification
#'
#' @inheritParams dbGetQuery
Expand Down
3 changes: 2 additions & 1 deletion man/Id.Rd

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

106 changes: 106 additions & 0 deletions man/dbAppendTable.Rd

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

Loading