diff --git a/.github/workflows/R_CMD_check_Hades.yaml b/.github/workflows/R_CMD_check_Hades.yaml index 01d90a51..79cf8773 100644 --- a/.github/workflows/R_CMD_check_Hades.yaml +++ b/.github/workflows/R_CMD_check_Hades.yaml @@ -180,4 +180,3 @@ jobs: if: ${{ env.new_version != '' }} run: | curl --data "build=true" -X POST https://registry.hub.docker.com/u/ohdsi/broadsea-methodslibrary/trigger/f0b51cec-4027-4781-9383-4b38b42dd4f5/ - diff --git a/.github/workflows/R_CMD_check_main_weekly.yaml b/.github/workflows/R_CMD_check_main_weekly.yaml index c2c2a074..4c5e0751 100644 --- a/.github/workflows/R_CMD_check_main_weekly.yaml +++ b/.github/workflows/R_CMD_check_main_weekly.yaml @@ -71,4 +71,4 @@ jobs: with: args: 'c("--no-manual", "--as-cran")' error-on: '"warning"' - check-dir: '"check"' + check-dir: '"check"' \ No newline at end of file diff --git a/R/Connect.R b/R/Connect.R index 783aece6..051379b5 100644 --- a/R/Connect.R +++ b/R/Connect.R @@ -778,7 +778,7 @@ connectUsingJdbcDriver <- function(jdbcDriver, abort(paste0("Unable to connect JDBC to ", url, " (", rJava::.jcall(x, "S", "getMessage"), ")")) } } - ensureDatabaseConnectorConnectionClassExists() + ensureDatabaseConnectorConnectionClassExists(dbms) class <- getClassDef("DatabaseConnectorJdbcConnection", where = class_cache, inherits = FALSE) if (is.null(class) || methods::isVirtualClass(class)) { setClass("DatabaseConnectorJdbcConnection", @@ -798,16 +798,30 @@ connectUsingJdbcDriver <- function(jdbcDriver, return(connection) } -ensureDatabaseConnectorConnectionClassExists <- function() { - class <- getClassDef("Microsoft SQL Server", where = class_cache, inherits = FALSE) +ensureDatabaseConnectorConnectionClassExists <- function(dbms) { + checkIfDbmsIsSupported(dbms) + dbmsClass <- switch(dbms, + "oracle" = "Oracle", + "postgresql" = "PqConnection", + "redshift" = "RedshiftConnection", + "sql server" = "Microsoft SQL Server", + "bigquery" = "BigQueryConnection", + "sqlite" = "SQLiteConnection", + "sqlite extended" = "SQLiteConnection", + "spark" = "Spark SQL", + "snowflake" = "Snowflake", + "synapse" = "Microsoft SQL Server", + "duckdb" = "duckdb_connection", + "blah") + + class <- getClassDef(dbmsClass, where = class_cache, inherits = FALSE) if (is.null(class) || methods::isVirtualClass(class)) { - setClass("Microsoft SQL Server", - where = class_cache) + setClass(dbmsClass, where = class_cache) } class <- getClassDef("DatabaseConnectorConnection", where = class_cache, inherits = FALSE) if (is.null(class) || methods::isVirtualClass(class)) { setClass("DatabaseConnectorConnection", - contains = c("Microsoft SQL Server", "DBIConnection"), + contains = c(dbmsClass, "DBIConnection"), slots = list( identifierQuote = "character", stringQuote = "character", @@ -822,7 +836,7 @@ connectUsingDbi <- function(dbiConnectionDetails) { dbms <- dbiConnectionDetails$dbms dbiConnectionDetails$dbms <- NULL dbiConnection <- do.call(DBI::dbConnect, dbiConnectionDetails) - ensureDatabaseConnectorConnectionClassExists() + ensureDatabaseConnectorConnectionClassExists(dbms) class <- getClassDef("DatabaseConnectorDbiConnection", where = class_cache, inherits = FALSE) if (is.null(class) || methods::isVirtualClass(class)) { setClass("DatabaseConnectorDbiConnection", @@ -956,7 +970,10 @@ dbms <- function(connection) { "RedshiftConnection" = "redshift", "BigQueryConnection" = "bigquery", "SQLiteConnection" = "sqlite", - "duckdb_connection" = "duckdb" + "duckdb_connection" = "duckdb", + "Spark Sql" = "spark", + "Snowflake" = "snowflake", + "Oracle" = "oracle" # add mappings from various DBI connection classes to SqlRender dbms here ) } diff --git a/R/DBI.R b/R/DBI.R index 669b8a0a..6cb13635 100644 --- a/R/DBI.R +++ b/R/DBI.R @@ -208,7 +208,7 @@ setClass("DatabaseConnectorDbiResult", setMethod( "dbSendQuery", signature("DatabaseConnectorJdbcConnection", "character"), - function(conn, statement, translate = TRUE, ...) { + function(conn, statement, translate = FALSE, ...) { if (rJava::is.jnull(conn@jConnection)) { abort("Connection is closed") } @@ -258,7 +258,7 @@ setMethod( setMethod( "dbSendQuery", signature("DatabaseConnectorDbiConnection", "character"), - function(conn, statement, translate = TRUE, ...) { + function(conn, statement, translate = FALSE, ...) { if (translate) { statement <- translateStatement( sql = statement, @@ -426,7 +426,7 @@ setMethod("dbGetRowsAffected", "DatabaseConnectorDbiResult", function(res, ...) setMethod( "dbGetQuery", signature("DatabaseConnectorConnection", "character"), - function(conn, statement, translate = TRUE, ...) { + function(conn, statement, translate = FALSE, ...) { if (translate) { statement <- translateStatement( sql = statement, @@ -447,7 +447,7 @@ setMethod( setMethod( "dbSendStatement", signature("DatabaseConnectorConnection", "character"), - function(conn, statement, translate = TRUE, ...) { + function(conn, statement, translate = FALSE, ...) { if (translate) { statement <- translateStatement( sql = statement, @@ -472,7 +472,7 @@ setMethod( setMethod( "dbExecute", signature("DatabaseConnectorConnection", "character"), - function(conn, statement, translate = TRUE, ...) { + function(conn, statement, translate = FALSE, ...) { if (isDbplyrSql(statement) && dbms(conn) %in% c("oracle", "bigquery", "spark", "hive") && grepl("^UPDATE STATISTICS", statement)) { # These platforms don't support this, so SqlRender translates to an empty string, which causes errors down the line. return(0) @@ -544,7 +544,9 @@ setMethod( #' @export setMethod( "dbWriteTable", - "DatabaseConnectorConnection", + c(conn = "DatabaseConnectorConnection", + name = "character", + value = "data.frame"), function(conn, name, value, databaseSchema = NULL, overwrite = FALSE, append = FALSE, temporary = FALSE, oracleTempSchema = NULL, tempEmulationSchema = getOption("sqlRenderTempEmulationSchema"), ...) { if (!is.null(oracleTempSchema) && oracleTempSchema != "") { diff --git a/man/dbAppendTable-DatabaseConnectorConnection-character-method.Rd b/man/dbAppendTable-DatabaseConnectorConnection-character-method.Rd index 24baee71..8b0104f1 100644 --- a/man/dbAppendTable-DatabaseConnectorConnection-character-method.Rd +++ b/man/dbAppendTable-DatabaseConnectorConnection-character-method.Rd @@ -63,6 +63,7 @@ as a placeholder for prepared queries can override \code{\link[DBI:sqlAppendTabl Other backends (with different placeholders or with entirely different ways to create tables) need to override the \code{dbAppendTable()} method. +\Sexpr[results=rd,stage=render]{DBI:::methods_as_rd("dbAppendTable")} } \details{ The \code{databaseSchema} argument is interpreted differently according to the different platforms: diff --git a/man/dbClearResult-DatabaseConnectorDbiResult-method.Rd b/man/dbClearResult-DatabaseConnectorDbiResult-method.Rd index 8632febb..3bbc8955 100644 --- a/man/dbClearResult-DatabaseConnectorDbiResult-method.Rd +++ b/man/dbClearResult-DatabaseConnectorDbiResult-method.Rd @@ -21,6 +21,7 @@ Frees all resources (local and remote) associated with a result set. This step is mandatory for all objects obtained by calling \code{\link[DBI:dbSendQuery]{dbSendQuery()}} or \code{\link[DBI:dbSendStatement]{dbSendStatement()}}. +\Sexpr[results=rd,stage=render]{DBI:::methods_as_rd("dbClearResult")} } \seealso{ Other DBIResult generics: diff --git a/man/dbClearResult-DatabaseConnectorJdbcResult-method.Rd b/man/dbClearResult-DatabaseConnectorJdbcResult-method.Rd index c3d761ad..2571e59b 100644 --- a/man/dbClearResult-DatabaseConnectorJdbcResult-method.Rd +++ b/man/dbClearResult-DatabaseConnectorJdbcResult-method.Rd @@ -21,6 +21,7 @@ Frees all resources (local and remote) associated with a result set. This step is mandatory for all objects obtained by calling \code{\link[DBI:dbSendQuery]{dbSendQuery()}} or \code{\link[DBI:dbSendStatement]{dbSendStatement()}}. +\Sexpr[results=rd,stage=render]{DBI:::methods_as_rd("dbClearResult")} } \seealso{ Other DBIResult generics: diff --git a/man/dbColumnInfo-DatabaseConnectorDbiResult-method.Rd b/man/dbColumnInfo-DatabaseConnectorDbiResult-method.Rd index a72c0c80..79efa9b0 100644 --- a/man/dbColumnInfo-DatabaseConnectorDbiResult-method.Rd +++ b/man/dbColumnInfo-DatabaseConnectorDbiResult-method.Rd @@ -28,6 +28,7 @@ should have as many rows as there are output fields in the result set, and each column in the data.frame describes an aspect of the result set field (field name, type, etc.) +\Sexpr[results=rd,stage=render]{DBI:::methods_as_rd("dbColumnInfo")} } \seealso{ Other DBIResult generics: diff --git a/man/dbColumnInfo-DatabaseConnectorJdbcResult-method.Rd b/man/dbColumnInfo-DatabaseConnectorJdbcResult-method.Rd index b1cf575b..5c4e48d7 100644 --- a/man/dbColumnInfo-DatabaseConnectorJdbcResult-method.Rd +++ b/man/dbColumnInfo-DatabaseConnectorJdbcResult-method.Rd @@ -28,6 +28,7 @@ should have as many rows as there are output fields in the result set, and each column in the data.frame describes an aspect of the result set field (field name, type, etc.) +\Sexpr[results=rd,stage=render]{DBI:::methods_as_rd("dbColumnInfo")} } \seealso{ Other DBIResult generics: diff --git a/man/dbCreateTable-DatabaseConnectorConnection-method.Rd b/man/dbCreateTable-DatabaseConnectorConnection-method.Rd index 788fa407..773cceab 100644 --- a/man/dbCreateTable-DatabaseConnectorConnection-method.Rd +++ b/man/dbCreateTable-DatabaseConnectorConnection-method.Rd @@ -64,6 +64,7 @@ Backends with a different SQL syntax can override \code{sqlCreateTable()}, backends with entirely different ways to create tables need to override this method. +\Sexpr[results=rd,stage=render]{DBI:::methods_as_rd("dbCreateTable")} } \details{ The \code{databaseSchema} argument is interpreted differently according to the different platforms: diff --git a/man/dbDisconnect-DatabaseConnectorConnection-method.Rd b/man/dbDisconnect-DatabaseConnectorConnection-method.Rd index ae801cbc..a4bb2620 100644 --- a/man/dbDisconnect-DatabaseConnectorConnection-method.Rd +++ b/man/dbDisconnect-DatabaseConnectorConnection-method.Rd @@ -17,6 +17,7 @@ This closes the connection, discards all pending work, and frees resources (e.g., memory, sockets). +\Sexpr[results=rd,stage=render]{DBI:::methods_as_rd("dbDisconnect")} } \seealso{ Other DBIConnection generics: diff --git a/man/dbExecute-DatabaseConnectorConnection-character-method.Rd b/man/dbExecute-DatabaseConnectorConnection-character-method.Rd index a49460d7..bf4e66fd 100644 --- a/man/dbExecute-DatabaseConnectorConnection-character-method.Rd +++ b/man/dbExecute-DatabaseConnectorConnection-character-method.Rd @@ -4,7 +4,7 @@ \alias{dbExecute,DatabaseConnectorConnection,character-method} \title{Execute an update statement, query number of rows affected, and then close result set} \usage{ -\S4method{dbExecute}{DatabaseConnectorConnection,character}(conn, statement, translate = TRUE, ...) +\S4method{dbExecute}{DatabaseConnectorConnection,character}(conn, statement, translate = FALSE, ...) } \arguments{ \item{conn}{A \linkS4class{DBIConnection} object, as returned by @@ -32,6 +32,7 @@ the result is always free-d by \code{\link[DBI:dbClearResult]{dbClearResult()}}. For passing query parameters, see \code{\link[DBI:dbBind]{dbBind()}}, in particular the "The command execution flow" section. +\Sexpr[results=rd,stage=render]{DBI:::methods_as_rd("dbExecute")} } \details{ You can also use \code{dbExecute()} to call a stored procedure diff --git a/man/dbExistsTable-DatabaseConnectorConnection-character-method.Rd b/man/dbExistsTable-DatabaseConnectorConnection-character-method.Rd index ac15c20a..7e102d11 100644 --- a/man/dbExistsTable-DatabaseConnectorConnection-character-method.Rd +++ b/man/dbExistsTable-DatabaseConnectorConnection-character-method.Rd @@ -33,6 +33,7 @@ This includes temporary tables if supported by the database. \description{ Returns if a table given by name exists in the database. +\Sexpr[results=rd,stage=render]{DBI:::methods_as_rd("dbExistsTable")} } \details{ The \code{databaseSchema} argument is interpreted differently according to the different platforms: diff --git a/man/dbFetch-DatabaseConnectorDbiResult-method.Rd b/man/dbFetch-DatabaseConnectorDbiResult-method.Rd index 0da6ef19..331c3d03 100644 --- a/man/dbFetch-DatabaseConnectorDbiResult-method.Rd +++ b/man/dbFetch-DatabaseConnectorDbiResult-method.Rd @@ -29,6 +29,7 @@ or zero rows. Fetch the next \code{n} elements (rows) from the result set and return them as a data.frame. +\Sexpr[results=rd,stage=render]{DBI:::methods_as_rd("dbFetch")} } \details{ \code{fetch()} is provided for compatibility with older DBI clients - for all diff --git a/man/dbFetch-DatabaseConnectorJdbcResult-method.Rd b/man/dbFetch-DatabaseConnectorJdbcResult-method.Rd index a829fb4a..b192321e 100644 --- a/man/dbFetch-DatabaseConnectorJdbcResult-method.Rd +++ b/man/dbFetch-DatabaseConnectorJdbcResult-method.Rd @@ -29,6 +29,7 @@ or zero rows. Fetch the next \code{n} elements (rows) from the result set and return them as a data.frame. +\Sexpr[results=rd,stage=render]{DBI:::methods_as_rd("dbFetch")} } \details{ \code{fetch()} is provided for compatibility with older DBI clients - for all diff --git a/man/dbGetInfo-DatabaseConnectorConnection-method.Rd b/man/dbGetInfo-DatabaseConnectorConnection-method.Rd index a6b3833a..45bfb34b 100644 --- a/man/dbGetInfo-DatabaseConnectorConnection-method.Rd +++ b/man/dbGetInfo-DatabaseConnectorConnection-method.Rd @@ -54,6 +54,7 @@ as returned by \code{\link[DBI:dbHasCompleted]{dbHasCompleted()}}. Retrieves information on objects of class \linkS4class{DBIDriver}, \linkS4class{DBIConnection} or \linkS4class{DBIResult}. +\Sexpr[results=rd,stage=render]{DBI:::methods_as_rd("dbGetInfo")} } \seealso{ Other DBIDriver generics: diff --git a/man/dbGetInfo-DatabaseConnectorDriver-method.Rd b/man/dbGetInfo-DatabaseConnectorDriver-method.Rd index 9f29460a..97c77c64 100644 --- a/man/dbGetInfo-DatabaseConnectorDriver-method.Rd +++ b/man/dbGetInfo-DatabaseConnectorDriver-method.Rd @@ -54,6 +54,7 @@ as returned by \code{\link[DBI:dbHasCompleted]{dbHasCompleted()}}. Retrieves information on objects of class \linkS4class{DBIDriver}, \linkS4class{DBIConnection} or \linkS4class{DBIResult}. +\Sexpr[results=rd,stage=render]{DBI:::methods_as_rd("dbGetInfo")} } \seealso{ Other DBIDriver generics: diff --git a/man/dbGetQuery-DatabaseConnectorConnection-character-method.Rd b/man/dbGetQuery-DatabaseConnectorConnection-character-method.Rd index 88e29a6a..680d1dc8 100644 --- a/man/dbGetQuery-DatabaseConnectorConnection-character-method.Rd +++ b/man/dbGetQuery-DatabaseConnectorConnection-character-method.Rd @@ -4,7 +4,7 @@ \alias{dbGetQuery,DatabaseConnectorConnection,character-method} \title{Send query, retrieve results and then clear result set} \usage{ -\S4method{dbGetQuery}{DatabaseConnectorConnection,character}(conn, statement, translate = TRUE, ...) +\S4method{dbGetQuery}{DatabaseConnectorConnection,character}(conn, statement, translate = FALSE, ...) } \arguments{ \item{conn}{A \linkS4class{DBIConnection} object, as returned by @@ -33,6 +33,7 @@ the result is always free-d by \code{\link[DBI:dbClearResult]{dbClearResult()}}. For retrieving chunked/paged results or for passing query parameters, see \code{\link[DBI:dbSendQuery]{dbSendQuery()}}, in particular the "The data retrieval flow" section. +\Sexpr[results=rd,stage=render]{DBI:::methods_as_rd("dbGetQuery")} } \details{ This method is for \code{SELECT} queries only diff --git a/man/dbGetRowCount-DatabaseConnectorDbiResult-method.Rd b/man/dbGetRowCount-DatabaseConnectorDbiResult-method.Rd index 66714830..2a8682a3 100644 --- a/man/dbGetRowCount-DatabaseConnectorDbiResult-method.Rd +++ b/man/dbGetRowCount-DatabaseConnectorDbiResult-method.Rd @@ -33,6 +33,7 @@ and after calling \code{dbFetch()}. Returns the total number of rows actually fetched with calls to \code{\link[DBI:dbFetch]{dbFetch()}} for this result set. +\Sexpr[results=rd,stage=render]{DBI:::methods_as_rd("dbGetRowCount")} } \seealso{ Other DBIResult generics: diff --git a/man/dbGetRowCount-DatabaseConnectorJdbcResult-method.Rd b/man/dbGetRowCount-DatabaseConnectorJdbcResult-method.Rd index cfac98ca..d829f8b4 100644 --- a/man/dbGetRowCount-DatabaseConnectorJdbcResult-method.Rd +++ b/man/dbGetRowCount-DatabaseConnectorJdbcResult-method.Rd @@ -33,6 +33,7 @@ and after calling \code{dbFetch()}. Returns the total number of rows actually fetched with calls to \code{\link[DBI:dbFetch]{dbFetch()}} for this result set. +\Sexpr[results=rd,stage=render]{DBI:::methods_as_rd("dbGetRowCount")} } \seealso{ Other DBIResult generics: diff --git a/man/dbGetRowsAffected-DatabaseConnectorDbiResult-method.Rd b/man/dbGetRowsAffected-DatabaseConnectorDbiResult-method.Rd index e655d81b..4b3eac6e 100644 --- a/man/dbGetRowsAffected-DatabaseConnectorDbiResult-method.Rd +++ b/man/dbGetRowsAffected-DatabaseConnectorDbiResult-method.Rd @@ -25,6 +25,7 @@ and after the call to \code{dbFetch()}. This method returns the number of rows that were added, deleted, or updated by a data manipulation statement. +\Sexpr[results=rd,stage=render]{DBI:::methods_as_rd("dbGetRowsAffected")} } \seealso{ Other DBIResult generics: diff --git a/man/dbGetRowsAffected-DatabaseConnectorJdbcResult-method.Rd b/man/dbGetRowsAffected-DatabaseConnectorJdbcResult-method.Rd index 6e6a6a67..bbe60fa5 100644 --- a/man/dbGetRowsAffected-DatabaseConnectorJdbcResult-method.Rd +++ b/man/dbGetRowsAffected-DatabaseConnectorJdbcResult-method.Rd @@ -25,6 +25,7 @@ and after the call to \code{dbFetch()}. This method returns the number of rows that were added, deleted, or updated by a data manipulation statement. +\Sexpr[results=rd,stage=render]{DBI:::methods_as_rd("dbGetRowsAffected")} } \seealso{ Other DBIResult generics: diff --git a/man/dbGetStatement-DatabaseConnectorDbiResult-method.Rd b/man/dbGetStatement-DatabaseConnectorDbiResult-method.Rd index b99830f1..e4a9b8a7 100644 --- a/man/dbGetStatement-DatabaseConnectorDbiResult-method.Rd +++ b/man/dbGetStatement-DatabaseConnectorDbiResult-method.Rd @@ -20,6 +20,7 @@ or \code{\link[DBI:dbSendStatement]{dbSendStatement()}}. Returns the statement that was passed to \code{\link[DBI:dbSendQuery]{dbSendQuery()}} or \code{\link[DBI:dbSendStatement]{dbSendStatement()}}. +\Sexpr[results=rd,stage=render]{DBI:::methods_as_rd("dbGetStatement")} } \seealso{ Other DBIResult generics: diff --git a/man/dbGetStatement-DatabaseConnectorJdbcResult-method.Rd b/man/dbGetStatement-DatabaseConnectorJdbcResult-method.Rd index 464874cb..0ef6bb43 100644 --- a/man/dbGetStatement-DatabaseConnectorJdbcResult-method.Rd +++ b/man/dbGetStatement-DatabaseConnectorJdbcResult-method.Rd @@ -20,6 +20,7 @@ or \code{\link[DBI:dbSendStatement]{dbSendStatement()}}. Returns the statement that was passed to \code{\link[DBI:dbSendQuery]{dbSendQuery()}} or \code{\link[DBI:dbSendStatement]{dbSendStatement()}}. +\Sexpr[results=rd,stage=render]{DBI:::methods_as_rd("dbGetStatement")} } \seealso{ Other DBIResult generics: diff --git a/man/dbHasCompleted-DatabaseConnectorDbiResult-method.Rd b/man/dbHasCompleted-DatabaseConnectorDbiResult-method.Rd index 8a0988ee..c359f5aa 100644 --- a/man/dbHasCompleted-DatabaseConnectorDbiResult-method.Rd +++ b/man/dbHasCompleted-DatabaseConnectorDbiResult-method.Rd @@ -24,6 +24,7 @@ This method returns if the operation has completed. A \code{SELECT} query is completed if all rows have been fetched. A data manipulation statement is always completed. +\Sexpr[results=rd,stage=render]{DBI:::methods_as_rd("dbHasCompleted")} } \seealso{ Other DBIResult generics: diff --git a/man/dbHasCompleted-DatabaseConnectorJdbcResult-method.Rd b/man/dbHasCompleted-DatabaseConnectorJdbcResult-method.Rd index c2db6f96..d2e4b702 100644 --- a/man/dbHasCompleted-DatabaseConnectorJdbcResult-method.Rd +++ b/man/dbHasCompleted-DatabaseConnectorJdbcResult-method.Rd @@ -24,6 +24,7 @@ This method returns if the operation has completed. A \code{SELECT} query is completed if all rows have been fetched. A data manipulation statement is always completed. +\Sexpr[results=rd,stage=render]{DBI:::methods_as_rd("dbHasCompleted")} } \seealso{ Other DBIResult generics: diff --git a/man/dbIsValid-DatabaseConnectorDbiConnection-method.Rd b/man/dbIsValid-DatabaseConnectorDbiConnection-method.Rd index 3179faec..36f2adcf 100644 --- a/man/dbIsValid-DatabaseConnectorDbiConnection-method.Rd +++ b/man/dbIsValid-DatabaseConnectorDbiConnection-method.Rd @@ -35,6 +35,7 @@ connectivity problems, server failure, etc.), \code{dbIsValid()} should return This generic tests whether a database object is still valid (i.e. it hasn't been disconnected or cleared). +\Sexpr[results=rd,stage=render]{DBI:::methods_as_rd("dbIsValid")} } \seealso{ Other DBIDriver generics: diff --git a/man/dbIsValid-DatabaseConnectorJdbcConnection-method.Rd b/man/dbIsValid-DatabaseConnectorJdbcConnection-method.Rd index 380a3da0..6fdab4d5 100644 --- a/man/dbIsValid-DatabaseConnectorJdbcConnection-method.Rd +++ b/man/dbIsValid-DatabaseConnectorJdbcConnection-method.Rd @@ -35,6 +35,7 @@ connectivity problems, server failure, etc.), \code{dbIsValid()} should return This generic tests whether a database object is still valid (i.e. it hasn't been disconnected or cleared). +\Sexpr[results=rd,stage=render]{DBI:::methods_as_rd("dbIsValid")} } \seealso{ Other DBIDriver generics: diff --git a/man/dbListFields-DatabaseConnectorConnection-character-method.Rd b/man/dbListFields-DatabaseConnectorConnection-character-method.Rd index c05e345a..8f7ab093 100644 --- a/man/dbListFields-DatabaseConnectorConnection-character-method.Rd +++ b/man/dbListFields-DatabaseConnectorConnection-character-method.Rd @@ -35,6 +35,7 @@ The returned names are suitable for quoting with \code{dbQuoteIdentifier()}. \description{ Returns the field names of a remote table as a character vector. +\Sexpr[results=rd,stage=render]{DBI:::methods_as_rd("dbListFields")} } \details{ The \code{databaseSchema} argument is interpreted differently according to the different platforms: diff --git a/man/dbListTables-DatabaseConnectorConnection-method.Rd b/man/dbListTables-DatabaseConnectorConnection-method.Rd index a8e3d7a1..c21cb8e2 100644 --- a/man/dbListTables-DatabaseConnectorConnection-method.Rd +++ b/man/dbListTables-DatabaseConnectorConnection-method.Rd @@ -35,6 +35,7 @@ connection. This should include views and temporary objects, but not all database backends (in particular \pkg{RMariaDB} and \pkg{RMySQL}) support this. +\Sexpr[results=rd,stage=render]{DBI:::methods_as_rd("dbListTables")} } \details{ The \code{databaseSchema} argument is interpreted differently according to the different platforms: diff --git a/man/dbReadTable-DatabaseConnectorConnection-character-method.Rd b/man/dbReadTable-DatabaseConnectorConnection-character-method.Rd index 9f621b1e..0362a755 100644 --- a/man/dbReadTable-DatabaseConnectorConnection-character-method.Rd +++ b/man/dbReadTable-DatabaseConnectorConnection-character-method.Rd @@ -71,6 +71,7 @@ Reads a database table to a data frame, optionally converting a column to row names and converting the column names to valid R identifiers. +\Sexpr[results=rd,stage=render]{DBI:::methods_as_rd("dbReadTable")} } \details{ The \code{databaseSchema} argument is interpreted differently according to the different platforms: diff --git a/man/dbRemoveTable-DatabaseConnectorConnection-ANY-method.Rd b/man/dbRemoveTable-DatabaseConnectorConnection-ANY-method.Rd index 3659ef6e..5b4cef27 100644 --- a/man/dbRemoveTable-DatabaseConnectorConnection-ANY-method.Rd +++ b/man/dbRemoveTable-DatabaseConnectorConnection-ANY-method.Rd @@ -44,6 +44,7 @@ can be created.} Remove a remote table (e.g., created by \code{\link[DBI:dbWriteTable]{dbWriteTable()}}) from the database. +\Sexpr[results=rd,stage=render]{DBI:::methods_as_rd("dbRemoveTable")} } \details{ The \code{databaseSchema} argument is interpreted differently according to the different platforms: diff --git a/man/dbSendQuery-DatabaseConnectorDbiConnection-character-method.Rd b/man/dbSendQuery-DatabaseConnectorDbiConnection-character-method.Rd index f8f12694..7ba2260b 100644 --- a/man/dbSendQuery-DatabaseConnectorDbiConnection-character-method.Rd +++ b/man/dbSendQuery-DatabaseConnectorDbiConnection-character-method.Rd @@ -4,7 +4,7 @@ \alias{dbSendQuery,DatabaseConnectorDbiConnection,character-method} \title{Execute a query on a given database connection} \usage{ -\S4method{dbSendQuery}{DatabaseConnectorDbiConnection,character}(conn, statement, translate = TRUE, ...) +\S4method{dbSendQuery}{DatabaseConnectorDbiConnection,character}(conn, statement, translate = FALSE, ...) } \arguments{ \item{conn}{A \linkS4class{DBIConnection} object, as returned by @@ -31,6 +31,7 @@ then you must call \code{\link[DBI:dbClearResult]{dbClearResult()}} when you fin records you need. For interactive use, you should almost always prefer \code{\link[DBI:dbGetQuery]{dbGetQuery()}}. +\Sexpr[results=rd,stage=render]{DBI:::methods_as_rd("dbSendQuery")} } \details{ This method is for \code{SELECT} queries only. Some backends may diff --git a/man/dbSendQuery-DatabaseConnectorJdbcConnection-character-method.Rd b/man/dbSendQuery-DatabaseConnectorJdbcConnection-character-method.Rd index eba179a3..c7d040b6 100644 --- a/man/dbSendQuery-DatabaseConnectorJdbcConnection-character-method.Rd +++ b/man/dbSendQuery-DatabaseConnectorJdbcConnection-character-method.Rd @@ -4,7 +4,7 @@ \alias{dbSendQuery,DatabaseConnectorJdbcConnection,character-method} \title{Execute a query on a given database connection} \usage{ -\S4method{dbSendQuery}{DatabaseConnectorJdbcConnection,character}(conn, statement, translate = TRUE, ...) +\S4method{dbSendQuery}{DatabaseConnectorJdbcConnection,character}(conn, statement, translate = FALSE, ...) } \arguments{ \item{conn}{A \linkS4class{DBIConnection} object, as returned by @@ -31,6 +31,7 @@ then you must call \code{\link[DBI:dbClearResult]{dbClearResult()}} when you fin records you need. For interactive use, you should almost always prefer \code{\link[DBI:dbGetQuery]{dbGetQuery()}}. +\Sexpr[results=rd,stage=render]{DBI:::methods_as_rd("dbSendQuery")} } \details{ This method is for \code{SELECT} queries only. Some backends may diff --git a/man/dbSendStatement-DatabaseConnectorConnection-character-method.Rd b/man/dbSendStatement-DatabaseConnectorConnection-character-method.Rd index 4551ffe4..a40812ae 100644 --- a/man/dbSendStatement-DatabaseConnectorConnection-character-method.Rd +++ b/man/dbSendStatement-DatabaseConnectorConnection-character-method.Rd @@ -4,7 +4,7 @@ \alias{dbSendStatement,DatabaseConnectorConnection,character-method} \title{Execute a data manipulation statement on a given database connection} \usage{ -\S4method{dbSendStatement}{DatabaseConnectorConnection,character}(conn, statement, translate = TRUE, ...) +\S4method{dbSendStatement}{DatabaseConnectorConnection,character}(conn, statement, translate = FALSE, ...) } \arguments{ \item{conn}{A \linkS4class{DBIConnection} object, as returned by @@ -33,6 +33,7 @@ returned result object. You must also call \code{\link[DBI:dbClearResult]{dbCle that. For interactive use, you should almost always prefer \code{\link[DBI:dbExecute]{dbExecute()}}. +\Sexpr[results=rd,stage=render]{DBI:::methods_as_rd("dbSendStatement")} } \details{ \code{\link[DBI:dbSendStatement]{dbSendStatement()}} comes with a default implementation that simply diff --git a/man/dbWriteTable-DatabaseConnectorConnection-ANY-method.Rd b/man/dbWriteTable-DatabaseConnectorConnection-character-data.frame-method.Rd similarity index 91% rename from man/dbWriteTable-DatabaseConnectorConnection-ANY-method.Rd rename to man/dbWriteTable-DatabaseConnectorConnection-character-data.frame-method.Rd index 8d8b6f25..5fed935c 100644 --- a/man/dbWriteTable-DatabaseConnectorConnection-ANY-method.Rd +++ b/man/dbWriteTable-DatabaseConnectorConnection-character-data.frame-method.Rd @@ -1,10 +1,10 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/DBI.R -\name{dbWriteTable,DatabaseConnectorConnection,ANY-method} -\alias{dbWriteTable,DatabaseConnectorConnection,ANY-method} +\name{dbWriteTable,DatabaseConnectorConnection,character,data.frame-method} +\alias{dbWriteTable,DatabaseConnectorConnection,character,data.frame-method} \title{Copy data frames to database tables} \usage{ -\S4method{dbWriteTable}{DatabaseConnectorConnection,ANY}( +\S4method{dbWriteTable}{DatabaseConnectorConnection,character,data.frame}( conn, name, value, @@ -56,6 +56,7 @@ can be created.} Writes, overwrites or appends a data frame to a database table, optionally converting row names to a column and specifying SQL data types for fields. +\Sexpr[results=rd,stage=render]{DBI:::methods_as_rd("dbWriteTable")} } \details{ The \code{databaseSchema} argument is interpreted differently according to the different platforms: diff --git a/tests/testthat/testthat-problems.rds b/tests/testthat/testthat-problems.rds index 4ff38fdc..3b9e32b0 100644 Binary files a/tests/testthat/testthat-problems.rds and b/tests/testthat/testthat-problems.rds differ