Skip to content

Commit

Permalink
test: Fix checks without suggested packages
Browse files Browse the repository at this point in the history
  • Loading branch information
krlmlr committed Nov 8, 2023
1 parent 7d6454e commit bec2cde
Show file tree
Hide file tree
Showing 74 changed files with 119 additions and 41 deletions.
2 changes: 1 addition & 1 deletion R/01-DBIObject.R
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ NULL
#'
#' @docType class
#' @family DBI classes
#' @examples
#' @examplesIf requireNamespace("RSQLite", quietly = TRUE)
#' drv <- RSQLite::SQLite()
#' con <- dbConnect(drv)
#'
Expand Down
2 changes: 1 addition & 1 deletion R/03-DBIConnection.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#' @name DBIConnection-class
#' @family DBI classes
#' @family DBIConnection generics
#' @examples
#' @examplesIf requireNamespace("RSQLite", quietly = TRUE)
#' con <- dbConnect(RSQLite::SQLite(), ":memory:")
#' con
#' dbDisconnect(con)
Expand Down
2 changes: 1 addition & 1 deletion R/11-dbAppendTable.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#'
#' @family DBIConnection generics
#' @export
#' @examples
#' @examplesIf requireNamespace("RSQLite", quietly = TRUE)
#' con <- dbConnect(RSQLite::SQLite(), ":memory:")
#' dbCreateTable(con, "iris", iris)
#' dbAppendTable(con, "iris", iris)
Expand Down
2 changes: 1 addition & 1 deletion R/12-dbCreateTable.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#'
#' @family DBIConnection generics
#' @export
#' @examples
#' @examplesIf requireNamespace("RSQLite", quietly = TRUE)
#' con <- dbConnect(RSQLite::SQLite(), ":memory:")
#' dbCreateTable(con, "iris", iris)
#' dbReadTable(con, "iris")
Expand Down
2 changes: 1 addition & 1 deletion R/13-dbWriteTable.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#' For `dbWriteTableArrow()`, an object coercible to an Arrow RecordBatchReader.
#' @family DBIConnection generics
#' @export
#' @examples
#' @examplesIf requireNamespace("RSQLite", quietly = TRUE)
#' con <- dbConnect(RSQLite::SQLite(), ":memory:")
#'
#' dbWriteTable(con, "mtcars", mtcars[1:5, ])
Expand Down
2 changes: 1 addition & 1 deletion R/DBI-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#' @inheritSection DBItest::spec_compliance_methods DBI classes and methods
#' @inheritSection DBItest::spec_driver_constructor Construction of the DBIDriver object
#'
#' @examples
#' @examplesIf requireNamespace("RSQLite", quietly = TRUE)
#' RSQLite::SQLite()
#' @seealso
#' Important generics: [dbConnect()], [dbGetQuery()],
Expand Down
2 changes: 1 addition & 1 deletion R/DBIConnector.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ NULL
#' @family DBI classes
#' @family DBIConnector generics
#' @export
#' @examples
#' @examplesIf requireNamespace("RSQLite", quietly = TRUE)
#' # Create a connector:
#' cnr <- new("DBIConnector",
#' .drv = RSQLite::SQLite(),
Expand Down
2 changes: 1 addition & 1 deletion R/dbBind.R
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
#' @family data retrieval generics
#' @family command execution generics
#' @export
#' @examples
#' @examplesIf requireNamespace("RSQLite", quietly = TRUE)
#' con <- dbConnect(RSQLite::SQLite(), ":memory:")
#'
#' dbWriteTable(con, "iris", iris)
Expand Down
2 changes: 1 addition & 1 deletion R/dbCanConnect.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#' @inheritParams dbConnect
#' @family DBIDriver generics
#' @export
#' @examples
#' @examplesIf requireNamespace("RSQLite", quietly = TRUE)
#' # SQLite only needs a path to the database. (Here, ":memory:" is a special
#' # path that creates an in-memory database.) Other database drivers
#' # will require more details (like user, password, host, port, etc.)
Expand Down
2 changes: 1 addition & 1 deletion R/dbClearResult.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#' @family data retrieval generics
#' @family command execution generics
#' @export
#' @examples
#' @examplesIf requireNamespace("RSQLite", quietly = TRUE)
#' con <- dbConnect(RSQLite::SQLite(), ":memory:")
#'
#' rs <- dbSendQuery(con, "SELECT 1")
Expand Down
2 changes: 1 addition & 1 deletion R/dbColumnInfo.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#'
#' @family DBIResult generics
#' @export
#' @examples
#' @examplesIf requireNamespace("RSQLite", quietly = TRUE)
#' con <- dbConnect(RSQLite::SQLite(), ":memory:")
#'
#' rs <- dbSendQuery(con, "SELECT 1 AS a, 2 AS b")
Expand Down
2 changes: 1 addition & 1 deletion R/dbConnect.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#' @family DBIDriver generics
#' @family DBIConnector generics
#' @export
#' @examples
#' @examplesIf requireNamespace("RSQLite", quietly = TRUE)
#' # SQLite only needs a path to the database. (Here, ":memory:" is a special
#' # path that creates an in-memory database.) Other database drivers
#' # will require more details (like user, password, host, port, etc.)
Expand Down
1 change: 1 addition & 0 deletions R/dbDataType.R
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
#' dbDataType(ANSI(), I(3))
#'
#' dbDataType(ANSI(), iris)
#' @examplesIf requireNamespace("RSQLite", quietly = TRUE)
#'
#' con <- dbConnect(RSQLite::SQLite(), ":memory:")
#'
Expand Down
2 changes: 1 addition & 1 deletion R/dbDisconnect.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#' @inheritParams dbGetQuery
#' @family DBIConnection generics
#' @export
#' @examples
#' @examplesIf requireNamespace("RSQLite", quietly = TRUE)
#' con <- dbConnect(RSQLite::SQLite(), ":memory:")
#' dbDisconnect(con)
setGeneric("dbDisconnect",
Expand Down
2 changes: 1 addition & 1 deletion R/dbDriver.R
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#' @family DBIDriver generics
#' @export
#' @keywords internal
#' @examples
#' @examplesIf requireNamespace("RSQLite", quietly = TRUE)
#' # Create a RSQLite driver with a string
#' d <- dbDriver("SQLite")
#' d
Expand Down
2 changes: 1 addition & 1 deletion R/dbExecute.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#' @family command execution generics
#' @seealso For queries: [dbSendQuery()] and [dbGetQuery()].
#' @export
#' @examples
#' @examplesIf requireNamespace("RSQLite", quietly = TRUE)
#' con <- dbConnect(RSQLite::SQLite(), ":memory:")
#'
#' dbWriteTable(con, "cars", head(cars, 3))
Expand Down
2 changes: 1 addition & 1 deletion R/dbExistsTable.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#' @inheritParams dbReadTable
#' @family DBIConnection generics
#' @export
#' @examples
#' @examplesIf requireNamespace("RSQLite", quietly = TRUE)
#' con <- dbConnect(RSQLite::SQLite(), ":memory:")
#'
#' dbExistsTable(con, "iris")
Expand Down
2 changes: 1 addition & 1 deletion R/dbFetch.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#' finish retrieving the records you want.
#' @family DBIResult generics
#' @family data retrieval generics
#' @examples
#' @examplesIf requireNamespace("RSQLite", quietly = TRUE)
#' con <- dbConnect(RSQLite::SQLite(), ":memory:")
#'
#' dbWriteTable(con, "mtcars", mtcars)
Expand Down
2 changes: 1 addition & 1 deletion R/dbGetConnectArgs.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#' instead of evaluating them.
#' @param ... Other arguments passed on to methods. Not otherwise used.
#' @family DBIConnector generics
#' @examples
#' @examplesIf requireNamespace("RSQLite", quietly = TRUE)
#' cnr <- new("DBIConnector",
#' .drv = RSQLite::SQLite(),
#' .conn_args = list(dbname = ":memory:", password = function() "supersecret")
Expand Down
2 changes: 1 addition & 1 deletion R/dbGetQuery.R
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
#' @family data retrieval generics
#' @seealso For updates: [dbSendStatement()] and [dbExecute()].
#' @export
#' @examples
#' @examplesIf requireNamespace("RSQLite", quietly = TRUE)
#' con <- dbConnect(RSQLite::SQLite(), ":memory:")
#'
#' dbWriteTable(con, "mtcars", mtcars)
Expand Down
2 changes: 1 addition & 1 deletion R/dbGetQueryArrow.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#' @export
#' @examplesIf packageVersion("nanoarrow") >= "0.1.0.2"
#' @examplesIf requireNamespace("RSQLite", quietly = TRUE) && requireNamespace("nanoarrow", quietly = TRUE) && packageVersion("nanoarrow") >= "0.1.0.2"
#' # Retrieve data as arrow table
#' con <- dbConnect(RSQLite::SQLite(), ":memory:")
#'
Expand Down
2 changes: 1 addition & 1 deletion R/dbGetRowCount.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#' @inheritParams dbClearResult
#' @family DBIResult generics
#' @export
#' @examples
#' @examplesIf requireNamespace("RSQLite", quietly = TRUE)
#' con <- dbConnect(RSQLite::SQLite(), ":memory:")
#'
#' dbWriteTable(con, "mtcars", mtcars)
Expand Down
2 changes: 1 addition & 1 deletion R/dbGetRowsAffected.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#' @family DBIResult generics
#' @family command execution generics
#' @export
#' @examples
#' @examplesIf requireNamespace("RSQLite", quietly = TRUE)
#' con <- dbConnect(RSQLite::SQLite(), ":memory:")
#'
#' dbWriteTable(con, "mtcars", mtcars)
Expand Down
2 changes: 1 addition & 1 deletion R/dbGetStatement.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#' @inheritParams dbClearResult
#' @family DBIResult generics
#' @export
#' @examples
#' @examplesIf requireNamespace("RSQLite", quietly = TRUE)
#' con <- dbConnect(RSQLite::SQLite(), ":memory:")
#'
#' dbWriteTable(con, "mtcars", mtcars)
Expand Down
2 changes: 1 addition & 1 deletion R/dbHasCompleted.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#' @family DBIResult generics
#' @family data retrieval generics
#' @export
#' @examples
#' @examplesIf requireNamespace("RSQLite", quietly = TRUE)
#' con <- dbConnect(RSQLite::SQLite(), ":memory:")
#'
#' dbWriteTable(con, "mtcars", mtcars)
Expand Down
2 changes: 1 addition & 1 deletion R/dbIsValid.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#' @family DBIConnection generics
#' @family DBIResult generics
#' @export
#' @examples
#' @examplesIf requireNamespace("RSQLite", quietly = TRUE)
#' dbIsValid(RSQLite::SQLite())
#'
#' con <- dbConnect(RSQLite::SQLite(), ":memory:")
Expand Down
2 changes: 1 addition & 1 deletion R/dbListFields.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#' @family DBIConnection generics
#' @seealso [dbColumnInfo()] to get the type of the fields.
#' @export
#' @examples
#' @examplesIf requireNamespace("RSQLite", quietly = TRUE)
#' con <- dbConnect(RSQLite::SQLite(), ":memory:")
#'
#' dbWriteTable(con, "mtcars", mtcars)
Expand Down
2 changes: 1 addition & 1 deletion R/dbListObjects.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#' If given the method will return all objects accessible through this prefix.
#' @family DBIConnection generics
#' @export
#' @examples
#' @examplesIf requireNamespace("RSQLite", quietly = TRUE)
#' con <- dbConnect(RSQLite::SQLite(), ":memory:")
#'
#' dbListObjects(con)
Expand Down
2 changes: 1 addition & 1 deletion R/dbListTables.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#' @inheritParams dbGetQuery
#' @family DBIConnection generics
#' @export
#' @examples
#' @examplesIf requireNamespace("RSQLite", quietly = TRUE)
#' con <- dbConnect(RSQLite::SQLite(), ":memory:")
#'
#' dbListTables(con)
Expand Down
2 changes: 1 addition & 1 deletion R/dbReadTable.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#' given verbatim, e.g. `SQL('"my_schema"."table_name"')`
#' @family DBIConnection generics
#' @export
#' @examples
#' @examplesIf requireNamespace("RSQLite", quietly = TRUE)
#' con <- dbConnect(RSQLite::SQLite(), ":memory:")
#'
#' dbWriteTable(con, "mtcars", mtcars[1:10, ])
Expand Down
2 changes: 1 addition & 1 deletion R/dbReadTableArrow.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#' @rdname dbReadTable
#' @export
#' @examplesIf packageVersion("nanoarrow") >= "0.1.0.2"
#' @examplesIf requireNamespace("RSQLite", quietly = TRUE) && requireNamespace("nanoarrow", quietly = TRUE) && packageVersion("nanoarrow") >= "0.1.0.2"
#' # Read data as Arrow table
#' con <- dbConnect(RSQLite::SQLite(), ":memory:")
#'
Expand Down
2 changes: 1 addition & 1 deletion R/dbRemoveTable.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#' @inheritParams dbReadTable
#' @family DBIConnection generics
#' @export
#' @examples
#' @examplesIf requireNamespace("RSQLite", quietly = TRUE)
#' con <- dbConnect(RSQLite::SQLite(), ":memory:")
#'
#' dbExistsTable(con, "iris")
Expand Down
2 changes: 1 addition & 1 deletion R/dbSendQuery.R
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
#' @family DBIConnection generics
#' @family data retrieval generics
#' @seealso For updates: [dbSendStatement()] and [dbExecute()].
#' @examples
#' @examplesIf requireNamespace("RSQLite", quietly = TRUE)
#' con <- dbConnect(RSQLite::SQLite(), ":memory:")
#'
#' dbWriteTable(con, "mtcars", mtcars)
Expand Down
2 changes: 1 addition & 1 deletion R/dbSendQueryArrow.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#' @rdname dbSendQuery
#' @examplesIf packageVersion("nanoarrow") >= "0.1.0.2"
#' @examplesIf requireNamespace("RSQLite", quietly = TRUE) && requireNamespace("nanoarrow", quietly = TRUE) && packageVersion("nanoarrow") >= "0.1.0.2"
#' # Retrieve data as arrow table
#' con <- dbConnect(RSQLite::SQLite(), ":memory:")
#'
Expand Down
2 changes: 1 addition & 1 deletion R/dbSendStatement.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#' @family command execution generics
#'
#' @seealso For queries: [dbSendQuery()] and [dbGetQuery()].
#' @examples
#' @examplesIf requireNamespace("RSQLite", quietly = TRUE)
#' con <- dbConnect(RSQLite::SQLite(), ":memory:")
#'
#' dbWriteTable(con, "cars", head(cars, 3))
Expand Down
2 changes: 1 addition & 1 deletion R/dbWithTransaction.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#' @param code An arbitrary block of R code.
#'
#' @export
#' @examples
#' @examplesIf requireNamespace("RSQLite", quietly = TRUE)
#' con <- dbConnect(RSQLite::SQLite(), ":memory:")
#'
#' dbWriteTable(con, "cash", data.frame(amount = 100))
Expand Down
2 changes: 1 addition & 1 deletion R/sqlData.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#' @templateVar method_name sqlData
#'
#' @export
#' @examples
#' @examplesIf requireNamespace("RSQLite", quietly = TRUE)
#' con <- dbConnect(RSQLite::SQLite(), ":memory:")
#'
#' sqlData(con, head(iris))
Expand Down
2 changes: 1 addition & 1 deletion R/transactions.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#'
#' @inheritParams dbGetQuery
#' @seealso Self-contained transactions: [dbWithTransaction()]
#' @examples
#' @examplesIf requireNamespace("RSQLite", quietly = TRUE)
#' con <- dbConnect(RSQLite::SQLite(), ":memory:")
#'
#' dbWriteTable(con, "cash", data.frame(amount = 100))
Expand Down
2 changes: 2 additions & 0 deletions man/DBI-package.Rd

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

2 changes: 2 additions & 0 deletions man/DBIConnection-class.Rd

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

2 changes: 2 additions & 0 deletions man/DBIConnector-class.Rd

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

2 changes: 2 additions & 0 deletions man/DBIObject-class.Rd

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

Loading

0 comments on commit bec2cde

Please sign in to comment.