diff --git a/.github/workflows/R_CMD_check_Hades.yaml b/.github/workflows/R_CMD_check_Hades.yaml index 73ecbc34..2d22d9fb 100644 --- a/.github/workflows/R_CMD_check_Hades.yaml +++ b/.github/workflows/R_CMD_check_Hades.yaml @@ -111,16 +111,31 @@ jobs: path: check/*.tar.gz - name: Install covr - if: runner.os == 'macOS' + if: runner.os == 'Linux' run: | - install.packages("covr") + remotes::install_cran("covr") + remotes::install_cran("xml2") shell: Rscript {0} - + - name: Test coverage - if: runner.os == 'macOS' - run: covr::codecov() + if: runner.os == 'Linux' + run: | + cov <- covr::package_coverage( + quiet = FALSE, + clean = FALSE, + install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package") + ) + covr::to_cobertura(cov) shell: Rscript {0} + - uses: codecov/codecov-action@v4 + if: runner.os == 'Linux' + with: + file: ./cobertura.xml + plugin: noop + disable_search: true + token: ${{ secrets.CODECOV_TOKEN }} + Release: needs: R-CMD-Check diff --git a/CRAN-SUBMISSION b/CRAN-SUBMISSION index 55064784..7924be52 100644 --- a/CRAN-SUBMISSION +++ b/CRAN-SUBMISSION @@ -1,3 +1,3 @@ -Version: 6.3.2 -Date: 2023-12-11 13:54:30 UTC -SHA: dd511ec8b23927ffb61a17bedd9ee8bb81cbe476 +Version: 6.3.3 +Date: 2025-01-16 00:44:34 UTC +SHA: 7b5548f88a19ff84ca3f1b7c075ab370723e8341 diff --git a/DESCRIPTION b/DESCRIPTION index 0d8d39a2..18807f51 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -2,7 +2,7 @@ Package: DatabaseConnector Type: Package Title: Connecting to Various Database Platforms Version: 6.3.3 -Date: 2024-06-13 +Date: 2025-01-15 Authors@R: c( person("Martijn", "Schuemie", email = "schuemie@ohdsi.org", role = c("aut", "cre")), person("Marc", "Suchard", role = c("aut")), diff --git a/NAMESPACE b/NAMESPACE index a89c645e..e83c41cd 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -1,9 +1,19 @@ # Generated by roxygen2: do not edit by hand +S3method(compileReconnectCode,DatabaseConnectorDbiConnection) +S3method(compileReconnectCode,default) S3method(disconnect,DatabaseConnectorDbiConnection) S3method(disconnect,default) +S3method(getCatalogs,DatabaseConnectorDbiConnection) +S3method(getCatalogs,default) +S3method(getSchemaNames,DatabaseConnectorDbiConnection) +S3method(getSchemaNames,default) +S3method(getServer,DatabaseConnectorDbiConnection) +S3method(getServer,default) S3method(insertTable,DatabaseConnectorDbiConnection) S3method(insertTable,default) +S3method(listDatabaseConnectorColumns,DatabaseConnectorDbiConnection) +S3method(listDatabaseConnectorColumns,default) S3method(lowLevelExecuteSql,DatabaseConnectorDbiConnection) S3method(lowLevelExecuteSql,default) S3method(lowLevelQuerySql,DatabaseConnectorDbiConnection) diff --git a/NEWS.md b/NEWS.md index de98fff4..97f8159f 100644 --- a/NEWS.md +++ b/NEWS.md @@ -7,6 +7,10 @@ Changes: - Updated Databricks driver to 2.6.36. +- Updated BigQuery driver to 1.6.2. + +- Using `INSERT` with multiple values in `insertTable()` for DataBricks for faster inserts. + DatabaseConnector 6.3.2 ======================= diff --git a/R/Andromeda.R b/R/Andromeda.R index ac4ca261..7dd57878 100644 --- a/R/Andromeda.R +++ b/R/Andromeda.R @@ -1,4 +1,4 @@ -# Copyright 2023 Observational Health Data Sciences and Informatics +# Copyright 2025 Observational Health Data Sciences and Informatics # # This file is part of DatabaseConnector # diff --git a/R/BulkLoad.R b/R/BulkLoad.R index e441ecee..31a62d6e 100644 --- a/R/BulkLoad.R +++ b/R/BulkLoad.R @@ -1,6 +1,6 @@ # @file BulkLoad.R # -# Copyright 2023 Observational Health Data Sciences and Informatics +# Copyright 2025 Observational Health Data Sciences and Informatics # # This file is part of DatabaseConnector # @@ -299,7 +299,19 @@ bulkLoadPostgres <- function(connection, sqlTableName, sqlFieldNames, sqlDataTyp readr::write_excel_csv(data, csvFileName, na = "") on.exit(unlink(csvFileName)) - hostServerDb <- strsplit(attr(connection, "server")(), "/")[[1]] + server <- attr(connection, "server")() + if (is.null(server)) { + # taken directly from DatabaseConnector R/RStudio.R - getServer.default, could an attr too? + databaseMetaData <- rJava::.jcall( + connection@jConnection, + "Ljava/sql/DatabaseMetaData;", + "getMetaData" + ) + server <- rJava::.jcall(databaseMetaData, "Ljava/lang/String;", "getURL") + server <- strsplit(server, "//")[[1]][2] + } + + hostServerDb <- strsplit(server, "/")[[1]] port <- attr(connection, "port")() user <- attr(connection, "user")() password <- attr(connection, "password")() diff --git a/R/Compression.R b/R/Compression.R index 3d973e0c..11b06b77 100644 --- a/R/Compression.R +++ b/R/Compression.R @@ -1,6 +1,6 @@ # @file InsertTable.R # -# Copyright 2023 Observational Health Data Sciences and Informatics +# Copyright 2025 Observational Health Data Sciences and Informatics # # This file is part of DatabaseConnector # diff --git a/R/Connect.R b/R/Connect.R index fbe4740c..8c510f95 100644 --- a/R/Connect.R +++ b/R/Connect.R @@ -1,6 +1,6 @@ # @file Connect.R # -# Copyright 2023 Observational Health Data Sciences and Informatics +# Copyright 2025 Observational Health Data Sciences and Informatics # # This file is part of DatabaseConnector # diff --git a/R/CtasHack.R b/R/CtasHack.R index d46acbe8..a659719d 100644 --- a/R/CtasHack.R +++ b/R/CtasHack.R @@ -1,6 +1,6 @@ # @file CtasHack.R # -# Copyright 2023 Observational Health Data Sciences and Informatics +# Copyright 2025 Observational Health Data Sciences and Informatics # # This file is part of DatabaseConnector # @@ -178,3 +178,41 @@ ctasHack <- function(connection, sqlTableName, tempTable, sqlFieldNames, sqlData delta <- Sys.time() - startTime inform(paste("Inserting data took", signif(delta, 3), attr(delta, "units"))) } + +multiValuesInsert <- function(connection, sqlTableName, sqlFieldNames, sqlDataTypes, data, progressBar, tempEmulationSchema) { + logTrace(sprintf("Inserting %d rows into table '%s' using multi-values inserts", nrow(data), sqlTableName)) + + assign("noLogging", TRUE, envir = globalVars) + on.exit( + assign("noLogging", NULL, envir = globalVars) + ) + startTime <- Sys.time() + batchSize <- 1000 + + # Insert data in batches using multi-value inserts: + if (progressBar) { + pb <- txtProgressBar(style = 3) + } + for (start in seq(1, nrow(data), by = batchSize)) { + if (progressBar) { + setTxtProgressBar(pb, start / nrow(data)) + } + end <- min(start + batchSize - 1, nrow(data)) + batch <- toStrings(data[start:end, , drop = FALSE], sqlDataTypes) + valuesString <- paste("(", paste(apply(batch, MARGIN = 1, FUN = paste, collapse = ","), collapse = "),("), ")") + + sql <- "INSERT INTO @table (@fields) VALUES @values;" + sql <- SqlRender::render(sql = sql, + table = sqlTableName, + fields = sqlFieldNames, + values = valuesString) + sql <- SqlRender::translate(sql, targetDialect = dbms(connection), tempEmulationSchema = tempEmulationSchema) + executeSql(connection, sql, progressBar = FALSE, reportOverallTime = FALSE) + } + if (progressBar) { + setTxtProgressBar(pb, 1) + close(pb) + } + delta <- Sys.time() - startTime + inform(paste("Inserting data took", signif(delta, 3), attr(delta, "units"))) +} diff --git a/R/DBI.R b/R/DBI.R index 669b8a0a..ff9a956d 100644 --- a/R/DBI.R +++ b/R/DBI.R @@ -1,4 +1,4 @@ -# Copyright 2023 Observational Health Data Sciences and Informatics +# Copyright 2025 Observational Health Data Sciences and Informatics # # This file is part of DatabaseConnector # diff --git a/R/DataHash.R b/R/DataHash.R index cc165a29..91c9b6ec 100644 --- a/R/DataHash.R +++ b/R/DataHash.R @@ -1,4 +1,4 @@ -# Copyright 2023 Observational Health Data Sciences and Informatics +# Copyright 2025 Observational Health Data Sciences and Informatics # # This file is part of DatabaseConnector # @@ -263,4 +263,4 @@ bulkHashRedShift <- function(connection, databaseSchema, tables) { strings <- sapply(subsets, createStringPerTable) names(strings) <- NULL return(strings) -} \ No newline at end of file +} diff --git a/R/DatabaseConnector.R b/R/DatabaseConnector.R index 726ed2cf..b03b82fe 100644 --- a/R/DatabaseConnector.R +++ b/R/DatabaseConnector.R @@ -1,6 +1,6 @@ # @file DatabaseConnector.R # -# Copyright 2023 Observational Health Data Sciences and Informatics +# Copyright 2025 Observational Health Data Sciences and Informatics # # This file is part of DatabaseConnector # @@ -63,12 +63,12 @@ NULL #' # Netezza #' #' Read the instructions -#' [here](https://www.ibm.com/docs/en/SSULQD_7.2.1/com.ibm.nz.datacon.doc/t_datacon_setup_JDBC.html) +#' [here](https://www.ibm.com/docs/en/netezza?topic=dls-installing-configuring-jdbc) #' on how to obtain the Netezza JDBC driver. #' #' # Impala #' -#' Go to [Cloudera's site](https://www.cloudera.com/downloads/connectors/impala/jdbc/2-5-5.html), pick +#' Go to [Cloudera's site](https://www.cloudera.com/downloads/connectors/impala/jdbc.html), pick #' your OS version, and click "GET IT NOW!'. Register, and you should be able to download the driver. #' #' # SQLite diff --git a/R/DbiDateFunctions.R b/R/DbiDateFunctions.R index 4e62d344..0b5db703 100644 --- a/R/DbiDateFunctions.R +++ b/R/DbiDateFunctions.R @@ -1,4 +1,4 @@ -# Copyright 2023 Observational Health Data Sciences and Informatics +# Copyright 2025 Observational Health Data Sciences and Informatics # # This file is part of DatabaseConnector # diff --git a/R/Drivers.R b/R/Drivers.R index 581ffef3..7861ba8d 100644 --- a/R/Drivers.R +++ b/R/Drivers.R @@ -1,6 +1,6 @@ # @file Drivers.R # -# Copyright 2023 Observational Health Data Sciences and Informatics +# Copyright 2025 Observational Health Data Sciences and Informatics # # This file is part of DatabaseConnector # @@ -98,9 +98,10 @@ downloadJdbcDrivers <- function(dbms, pathToDriver = Sys.getenv("DATABASECONNECT 4,oracle,oracleV19.8.zip,https://ohdsi.github.io/DatabaseConnectorJars/ 5,spark,DatabricksJDBC42-2.6.36.1062.zip,https://databricks-bi-artifacts.s3.us-east-2.amazonaws.com/simbaspark-drivers/jdbc/2.6.36/ 6,snowflake,snowflake-jdbc-3.16.1.jar,https://repo1.maven.org/maven2/net/snowflake/snowflake-jdbc/3.16.1/ - 7,bigquery,SimbaBigQueryJDBC42-1.3.2.1003.zip,https://storage.googleapis.com/simba-bq-release/jdbc/ + 7,bigquery,SimbaJDBCDriverforGoogleBigQuery42_1.6.2.1003.zip,https://storage.googleapis.com/simba-bq-release/jdbc/ 8,iris,intersystems-jdbc-3.10.2.jar,https://repo1.maven.org/maven2/com/intersystems/intersystems-jdbc/3.10.2/" ) + if (dbms == "all") { dbms <- jdbcDriverSources$dbms } diff --git a/R/HelperFunctions.R b/R/HelperFunctions.R index d777ffba..a49e032e 100644 --- a/R/HelperFunctions.R +++ b/R/HelperFunctions.R @@ -1,4 +1,4 @@ -# Copyright 2023 Observational Health Data Sciences and Informatics +# Copyright 2025 Observational Health Data Sciences and Informatics # # This file is part of DatabaseConnector # diff --git a/R/InsertTable.R b/R/InsertTable.R index 9e996695..a4ccb9f4 100644 --- a/R/InsertTable.R +++ b/R/InsertTable.R @@ -1,6 +1,6 @@ # @file InsertTable.R # -# Copyright 2023 Observational Health Data Sciences and Informatics +# Copyright 2025 Observational Health Data Sciences and Informatics # # This file is part of DatabaseConnector # @@ -312,6 +312,8 @@ insertTable.default <- function(connection, } else if (useCtasHack) { # Inserting using CTAS hack ---------------------------------------------------------------- ctasHack(connection, sqlTableName, tempTable, sqlFieldNames, sqlDataTypes, data, progressBar, tempEmulationSchema) + } else if (dbms == "spark") { + multiValuesInsert(connection, sqlTableName, sqlFieldNames, sqlDataTypes, data, progressBar, tempEmulationSchema) } else { # Inserting using SQL inserts -------------------------------------------------------------- logTrace(sprintf("Inserting %d rows into table '%s'", nrow(data), sqlTableName)) diff --git a/R/ListTables.R b/R/ListTables.R index 72f8c62c..911d8c6b 100644 --- a/R/ListTables.R +++ b/R/ListTables.R @@ -1,6 +1,6 @@ # @file ListTables.R # -# Copyright 2023 Observational Health Data Sciences and Informatics +# Copyright 2025 Observational Health Data Sciences and Informatics # # This file is part of DatabaseConnector # diff --git a/R/RStudio.R b/R/RStudio.R index dc4c83f6..02ef0997 100644 --- a/R/RStudio.R +++ b/R/RStudio.R @@ -1,6 +1,6 @@ # @file RStudio.R # -# Copyright 2023 Observational Health Data Sciences and Informatics +# Copyright 2025 Observational Health Data Sciences and Informatics # # This file is part of DatabaseConnector # @@ -87,6 +87,7 @@ listDatabaseConnectorColumns <- function(connection, UseMethod("listDatabaseConnectorColumns", connection) } +#' @exportS3Method listDatabaseConnectorColumns.default <- function(connection, catalog = NULL, schema = NULL, @@ -136,6 +137,7 @@ listDatabaseConnectorColumns.default <- function(connection, return(data.frame(name = fields, type = types, stringsAsFactors = FALSE)) } +#' @exportS3Method listDatabaseConnectorColumns.DatabaseConnectorDbiConnection <- function(connection, catalog = NULL, schema = NULL, @@ -220,6 +222,7 @@ getServer <- function(connection) { UseMethod("getServer", connection) } +#' @exportS3Method getServer.default <- function(connection) { if (dbms(connection) == "hive") { url <- connection@url @@ -235,6 +238,7 @@ getServer.default <- function(connection) { return(server) } +#' @exportS3Method getServer.DatabaseConnectorDbiConnection <- function(connection) { return(connection@server) } @@ -243,6 +247,7 @@ compileReconnectCode <- function(connection) { UseMethod("compileReconnectCode", connection) } +#' @exportS3Method compileReconnectCode.default <- function(connection) { databaseMetaData <- rJava::.jcall( connection@jConnection, @@ -265,6 +270,7 @@ compileReconnectCode.default <- function(connection) { return(code) } +#' @exportS3Method compileReconnectCode.DatabaseConnectorDbiConnection <- function(connection) { code <- sprintf( "library(DatabaseConnector)\ncon <- connect(dbms = \"%s\", server = \"%s\")", @@ -278,6 +284,7 @@ getSchemaNames <- function(conn, catalog = NULL) { UseMethod("getSchemaNames", conn) } +#' @exportS3Method getSchemaNames.default <- function(conn, catalog = NULL) { if (is.null(catalog)) { catalog <- rJava::.jnull("java/lang/String") @@ -301,6 +308,7 @@ getSchemaNames.default <- function(conn, catalog = NULL) { return(schemas) } +#' @exportS3Method getSchemaNames.DatabaseConnectorDbiConnection <- function(conn, catalog = NULL) { if (dbms(conn) %in% c("sqlite", "sqlite extended")) { return("main") @@ -319,6 +327,7 @@ getCatalogs <- function(connection) { UseMethod("getCatalogs", connection) } +#' @exportS3Method getCatalogs.default <- function(connection) { metaData <- rJava::.jcall(connection@jConnection, "Ljava/sql/DatabaseMetaData;", "getMetaData") resultSet <- rJava::.jcall(metaData, "Ljava/sql/ResultSet;", "getCatalogs") @@ -331,6 +340,7 @@ getCatalogs.default <- function(connection) { return(catalogs) } +#' @exportS3Method getCatalogs.DatabaseConnectorDbiConnection <- function(connection) { if (connection@dbms == "duckdb") { sql <- " diff --git a/R/Sql.R b/R/Sql.R index c5687a2a..f1e990bd 100644 --- a/R/Sql.R +++ b/R/Sql.R @@ -1,6 +1,6 @@ # @file Sql.R # -# Copyright 2023 Observational Health Data Sciences and Informatics +# Copyright 2025 Observational Health Data Sciences and Informatics # # This file is part of DatabaseConnector # diff --git a/cran-comments.md b/cran-comments.md index 5bf4c873..66f905aa 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,12 +1,12 @@ -This update includes 1 bugfix. (see NEWS.md). +This update includes 4 minor changes. (see NEWS.md). --- ## Test environments -* Ubuntu 20.04, R 4.3.1 -* MacOS, R 4.2.3 -* MacOS, 4.3.1 -* Windows 10, R 4.3.1 +* Ubuntu 20.04, R 4.4.2 +* MacOS, R 4.4.2 +* MacOS, 4.4.1 +* Windows 10, R 4.4.2 ## R CMD check results diff --git a/docs/404.html b/docs/404.html index d96e7633..1ffed6c0 100644 --- a/docs/404.html +++ b/docs/404.html @@ -6,7 +6,7 @@ Page not found (404) • DatabaseConnector - + @@ -18,7 +18,7 @@ - +
@@ -44,7 +44,7 @@
- +
@@ -109,16 +109,16 @@

Page not found (404)

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/articles/Connecting.html b/docs/articles/Connecting.html index 6093fee8..28f4e92b 100644 --- a/docs/articles/Connecting.html +++ b/docs/articles/Connecting.html @@ -6,13 +6,12 @@ Connecting to a database • DatabaseConnector - + - + - - +
@@ -45,7 +44,7 @@
- +
@@ -92,7 +91,7 @@

Using DatabaseConnector through DBI and

Martijn J. Schuemie

-

2023-12-11

+

2025-01-15

Source: vignettes/DbiAndDbplyr.Rmd @@ -274,9 +273,7 @@

Closing the connection - -

+
@@ -289,16 +286,16 @@

Closing the connection

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/articles/Querying.html b/docs/articles/Querying.html index fa8014d2..eb55fd9f 100644 --- a/docs/articles/Querying.html +++ b/docs/articles/Querying.html @@ -6,20 +6,19 @@ Querying a database • DatabaseConnector - + - - +
@@ -45,7 +44,7 @@
- +
@@ -91,7 +90,7 @@

Querying a database

Martijn J. Schuemie

-

2023-12-11

+

2025-01-15

Source: vignettes/Querying.Rmd @@ -224,9 +223,7 @@

Logging all queries - -

+
@@ -239,16 +236,16 @@

Logging all queries

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/articles/index.html b/docs/articles/index.html index 190d18ea..f10d69c2 100644 --- a/docs/articles/index.html +++ b/docs/articles/index.html @@ -1,9 +1,9 @@ -Articles • DatabaseConnectorArticles • DatabaseConnector - +
@@ -28,7 +28,7 @@
- +
@@ -85,15 +85,15 @@

All vignettes

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/authors.html b/docs/authors.html index 9e4eab45..b5e81fc5 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -1,9 +1,9 @@ -Authors and Citation • DatabaseConnectorAuthors and Citation • DatabaseConnector - +
@@ -28,7 +28,7 @@
- +
- +
  • -

    Martijn Schuemie. Author, maintainer. +

    Martijn Schuemie. Author, maintainer.

  • -

    Marc Suchard. Author. +

    Marc Suchard. Author.

  • -

    Observational Health Data Science and Informatics. Copyright holder. +

    Observational Health Data Science and Informatics. Copyright holder.

  • -

    Microsoft Inc.. Copyright holder. +

    Microsoft Inc.. Copyright holder.
    SQL Server JDBC driver

  • -

    PostgreSQL Global Development Group. Copyright holder. +

    PostgreSQL Global Development Group. Copyright holder.
    PostgreSQL JDBC driver

  • -

    Oracle Inc.. Copyright holder. +

    Oracle Inc.. Copyright holder.
    Oracle JDBC driver

  • -

    Amazon Inc.. Copyright holder. +

    Amazon Inc.. Copyright holder.
    RedShift JDBC driver

@@ -104,15 +104,16 @@

Citation

-

Schuemie M, Suchard M (2023). +

Schuemie M, Suchard M (2025). DatabaseConnector: Connecting to Various Database Platforms. -https://ohdsi.github.io/DatabaseConnector/, https://github.com/OHDSI/DatabaseConnector. +R package version 6.3.3, https://github.com/OHDSI/DatabaseConnector, https://ohdsi.github.io/DatabaseConnector/.

@Manual{,
   title = {DatabaseConnector: Connecting to Various Database Platforms},
   author = {Martijn Schuemie and Marc Suchard},
-  year = {2023},
-  note = {https://ohdsi.github.io/DatabaseConnector/, https://github.com/OHDSI/DatabaseConnector},
+  year = {2025},
+  note = {R package version 6.3.3, https://github.com/OHDSI/DatabaseConnector},
+  url = {https://ohdsi.github.io/DatabaseConnector/},
 }
@@ -126,15 +127,15 @@

Citation

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/index.html b/docs/index.html index 17a6202b..9d5e7325 100644 --- a/docs/index.html +++ b/docs/index.html @@ -6,22 +6,20 @@ Connecting to Various Database Platforms • DatabaseConnector - + - + - +
@@ -47,7 +45,7 @@
- +
@@ -92,7 +90,7 @@
-

Build Status codecov.io CRAN_Status_Badge CRAN_Status_Badge

+

Build Status codecov.io CRAN_Status_Badge CRAN_Status_Badge

DatabaseConnector is part of HADES.

@@ -271,16 +269,16 @@

Developers

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/news/index.html b/docs/news/index.html index 558a086c..6c3729a0 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -1,9 +1,9 @@ -Changelog • DatabaseConnectorChangelog • DatabaseConnector - +
@@ -28,7 +28,7 @@
- +
@@ -67,7 +67,15 @@

Changelog

- + +

Changes:

+
  • Updated Snowflake driver to 3.16.1.

  • +
  • Updated Databricks driver to 2.6.36.

  • +
  • Updated BigQuery driver to 1.6.2.

  • +
  • Using INSERT with multiple values in insertTable() for DataBricks for faster inserts.

  • +
+
+

Bugfixes:

  1. Fixed bug caused in 6.3.1 when Andromeda is not installed.
@@ -358,15 +366,15 @@
-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index 3c39c6b9..0a107182 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -1,9 +1,8 @@ -pandoc: 3.1.1 -pkgdown: 2.0.7 +pandoc: 3.1.11 +pkgdown: 2.1.1 pkgdown_sha: ~ articles: Connecting: Connecting.html DbiAndDbplyr: DbiAndDbplyr.html Querying: Querying.html -last_built: 2023-12-11T11:09Z - +last_built: 2025-01-15T11:59Z diff --git a/docs/reference/DatabaseConnector-package.html b/docs/reference/DatabaseConnector-package.html index e39e085b..e0dcd24a 100644 --- a/docs/reference/DatabaseConnector-package.html +++ b/docs/reference/DatabaseConnector-package.html @@ -1,9 +1,9 @@ -DatabaseConnector: Connecting to Various Database Platforms — DatabaseConnector-package • DatabaseConnectorDatabaseConnector: Connecting to Various Database Platforms — DatabaseConnector-package • DatabaseConnector - +
@@ -28,7 +28,7 @@
- +
@@ -102,15 +102,15 @@

Author

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/reference/DatabaseConnectorDbiResult-class.html b/docs/reference/DatabaseConnectorDbiResult-class.html index 9a2e501a..855fd821 100644 --- a/docs/reference/DatabaseConnectorDbiResult-class.html +++ b/docs/reference/DatabaseConnectorDbiResult-class.html @@ -1,9 +1,9 @@ -DatabaseConnector DBI results class. — DatabaseConnectorDbiResult-class • DatabaseConnectorDatabaseConnector DBI results class. — DatabaseConnectorDbiResult-class • DatabaseConnector - +
@@ -28,7 +28,7 @@
- +
@@ -85,15 +85,15 @@

DatabaseConnector DBI results class.

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/reference/DatabaseConnectorDriver-class.html b/docs/reference/DatabaseConnectorDriver-class.html index b4bf85ed..1b3fb1b2 100644 --- a/docs/reference/DatabaseConnectorDriver-class.html +++ b/docs/reference/DatabaseConnectorDriver-class.html @@ -1,9 +1,9 @@ -DatabaseConnectorDriver class. — DatabaseConnectorDriver-class • DatabaseConnectorDatabaseConnectorDriver class. — DatabaseConnectorDriver-class • DatabaseConnector - +
@@ -28,7 +28,7 @@
- +
@@ -85,15 +85,15 @@

DatabaseConnectorDriver class.

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/reference/DatabaseConnectorDriver.html b/docs/reference/DatabaseConnectorDriver.html index 5d1af97a..1f9aca13 100644 --- a/docs/reference/DatabaseConnectorDriver.html +++ b/docs/reference/DatabaseConnectorDriver.html @@ -1,9 +1,9 @@ -Create a DatabaseConnectorDriver object — DatabaseConnectorDriver • DatabaseConnectorCreate a DatabaseConnectorDriver object — DatabaseConnectorDriver • DatabaseConnector - +
@@ -28,7 +28,7 @@
- +
@@ -88,15 +88,15 @@

Create a DatabaseConnectorDriver object

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/reference/DatabaseConnectorJdbcResult-class.html b/docs/reference/DatabaseConnectorJdbcResult-class.html index 7c899589..4dc8a380 100644 --- a/docs/reference/DatabaseConnectorJdbcResult-class.html +++ b/docs/reference/DatabaseConnectorJdbcResult-class.html @@ -1,9 +1,9 @@ -DatabaseConnector JDBC results class. — DatabaseConnectorJdbcResult-class • DatabaseConnectorDatabaseConnector JDBC results class. — DatabaseConnectorJdbcResult-class • DatabaseConnector - +
@@ -28,7 +28,7 @@
- +
@@ -85,15 +85,15 @@

DatabaseConnector JDBC results class.

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/reference/assertTempEmulationSchemaSet.html b/docs/reference/assertTempEmulationSchemaSet.html index 8b3f0b0e..fcf81520 100644 --- a/docs/reference/assertTempEmulationSchemaSet.html +++ b/docs/reference/assertTempEmulationSchemaSet.html @@ -1,11 +1,11 @@ -Assert the temp emulation schema is set — assertTempEmulationSchemaSet • DatabaseConnectorAssert the temp emulation schema is set — assertTempEmulationSchemaSet • DatabaseConnector - +
@@ -30,7 +30,7 @@
- +
@@ -84,20 +84,20 @@

Assert the temp emulation schema is set

Arguments

-
dbms
+ + +
dbms

The type of DBMS running on the server. See connect() or createConnectionDetails() for valid values.

-
tempEmulationSchema
+
tempEmulationSchema

The temp emulation schema specified by the user.

Value

- - -

Does not return anything. Throws an error if the DBMS requires temp emulation but the +

Does not return anything. Throws an error if the DBMS requires temp emulation but the temp emulation schema is not set.

@@ -113,15 +113,15 @@

Value

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/reference/computeDataHash.html b/docs/reference/computeDataHash.html index 2691e696..03cb9aa0 100644 --- a/docs/reference/computeDataHash.html +++ b/docs/reference/computeDataHash.html @@ -1,11 +1,11 @@ -Compute hash of data — computeDataHash • DatabaseConnectorCompute hash of data — computeDataHash • DatabaseConnector - +
@@ -30,7 +30,7 @@
- +
@@ -81,29 +81,29 @@

Compute hash of data

Arguments

-
connection
+ + +
connection

The connection to the database server created using either -connect() or dbConnect().

+connect() or DBI::dbConnect().

-
databaseSchema
+
databaseSchema

The name of the database schema. See details for platform-specific details.

-
tables
+
tables

(Optional) A list of tables to restrict to.

-
progressBar
+
progressBar

When true, a progress bar is shown based on the number of tables in the database schema.

Value

- - -

A string representing the MD5 hash code.

+

A string representing the MD5 hash code.

Details

@@ -126,15 +126,15 @@

Details

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/reference/connect.html b/docs/reference/connect.html index 46d4e205..11dd41f0 100644 --- a/docs/reference/connect.html +++ b/docs/reference/connect.html @@ -1,5 +1,5 @@ -connect — connect • DatabaseConnectorconnect — connect • DatabaseConnector - +
@@ -163,7 +163,7 @@
- +
@@ -311,12 +311,14 @@

Windows authentication for SQL S

Arguments

-
connectionDetails
+ + +
connectionDetails

An object of class connectionDetails as created by the createConnectionDetails() function.

-
dbms
+
dbms

The type of DBMS running on the server. Valid values are

  • "oracle" for Oracle

  • "postgresql" for PostgreSQL

  • "redshift" for Amazon Redshift

  • @@ -331,43 +333,43 @@

    Arguments

-
user
+
user

The user name used to access the server.

-
password
+
password

The password for that user.

-
server
+
server

The name of the server.

-
port
+
port

(optional) The port on the server to connect to.

-
extraSettings
+
extraSettings

(optional) Additional configuration settings specific to the database provider to configure things as security for SSL. For connections using JDBC these will be appended to end of the connection string. For connections using DBI, these settings will additionally be used to call -dbConnect().

+DBI::dbConnect().

-
oracleDriver
+
oracleDriver

Specify which Oracle drive you want to use. Choose between "thin" or "oci".

-
connectionString
+
connectionString

The JDBC connection string. If specified, the server, port, extraSettings, and oracleDriver fields are ignored. If user and password are not specified, they are assumed to already be included in the connection string.

-
pathToDriver
+
pathToDriver

Path to a folder containing the JDBC driver JAR files. See downloadJdbcDrivers() for instructions on how to download the relevant drivers.

@@ -375,9 +377,7 @@

Arguments

Value

- - -

An object that extends DBIConnection in a database-specific manner. This object is used to +

An object that extends DBIConnection in a database-specific manner. This object is used to direct commands to the database engine.

@@ -387,7 +387,7 @@

Details

Examples

-
if (FALSE) {
+    
if (FALSE) { # \dontrun{
 connectionDetails <- createConnectionDetails(
   dbms = "postgresql",
   server = "localhost/postgres",
@@ -418,7 +418,7 @@ 

Examples

) dbGetQuery(conn, "SELECT COUNT(*) FROM person") disconnect(conn) -} +} # }
@@ -433,15 +433,15 @@

Examples

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/reference/createConnectionDetails.html b/docs/reference/createConnectionDetails.html index e85de7b5..4fb2a175 100644 --- a/docs/reference/createConnectionDetails.html +++ b/docs/reference/createConnectionDetails.html @@ -1,5 +1,5 @@ -createConnectionDetails — createConnectionDetails • DatabaseConnectorcreateConnectionDetails — createConnectionDetails • DatabaseConnector - +
@@ -162,7 +162,7 @@
- +
@@ -309,7 +309,9 @@

Windows authentication for SQL S

Arguments

-
dbms
+ + +
dbms

The type of DBMS running on the server. Valid values are

  • "oracle" for Oracle

  • "postgresql" for PostgreSQL

  • "redshift" for Amazon Redshift

  • @@ -324,43 +326,43 @@

    Arguments

-
user
+
user

The user name used to access the server.

-
password
+
password

The password for that user.

-
server
+
server

The name of the server.

-
port
+
port

(optional) The port on the server to connect to.

-
extraSettings
+
extraSettings

(optional) Additional configuration settings specific to the database provider to configure things as security for SSL. For connections using JDBC these will be appended to end of the connection string. For connections using DBI, these settings will additionally be used to call -dbConnect().

+DBI::dbConnect().

-
oracleDriver
+
oracleDriver

Specify which Oracle drive you want to use. Choose between "thin" or "oci".

-
connectionString
+
connectionString

The JDBC connection string. If specified, the server, port, extraSettings, and oracleDriver fields are ignored. If user and password are not specified, they are assumed to already be included in the connection string.

-
pathToDriver
+
pathToDriver

Path to a folder containing the JDBC driver JAR files. See downloadJdbcDrivers() for instructions on how to download the relevant drivers.

@@ -368,9 +370,7 @@

Arguments

Value

- - -

A list with all the details needed to connect to a database.

+

A list with all the details needed to connect to a database.

Details

@@ -383,25 +383,25 @@

Details

Examples

-
if (FALSE) {
+    
if (FALSE) { # \dontrun{
 # Needs to be done only once on a machine. Credentials will then be stored in
 # the operating system's secure credential manager:
-keyring::key_set_with_value("server", password = "localhost/postgres")
-keyring::key_set_with_value("user", password = "root")
-keyring::key_set_with_value("password", password = "secret")
+keyring::key_set_with_value("server", password = "localhost/postgres")
+keyring::key_set_with_value("user", password = "root")
+keyring::key_set_with_value("password", password = "secret")
 
 # Create connection details using keyring. Note: the connection details will
 # not store the credentials themselves, but the reference to get the credentials.
 connectionDetails <- createConnectionDetails(
   dbms = "postgresql",
-  server = keyring::key_get("server"),
-  user = keyring::key_get("user"),
-  password = keyring::key_get("password"),
+  server = keyring::key_get("server"),
+  user = keyring::key_get("user"),
+  password = keyring::key_get("password"),
 )
 conn <- connect(connectionDetails)
 dbGetQuery(conn, "SELECT COUNT(*) FROM person")
 disconnect(conn)
-}
+} # }
 
@@ -416,15 +416,15 @@

Examples

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/reference/createDbiConnectionDetails.html b/docs/reference/createDbiConnectionDetails.html index 97cf338a..8d85cdb3 100644 --- a/docs/reference/createDbiConnectionDetails.html +++ b/docs/reference/createDbiConnectionDetails.html @@ -1,11 +1,11 @@ -Create DBI connection details — createDbiConnectionDetails • DatabaseConnectorCreate DBI connection details — createDbiConnectionDetails • DatabaseConnector - +
@@ -30,7 +30,7 @@
- +
@@ -81,7 +81,9 @@

Create DBI connection details

Arguments

-
dbms
+ + +
dbms

The type of DBMS running on the server. Valid values are

  • "oracle" for Oracle

  • "postgresql" for PostgreSQL

  • "redshift" for Amazon Redshift

  • @@ -96,21 +98,19 @@

    Arguments

-
drv
+
drv

An object that inherits from DBIDriver, or an existing DBIConnection object (in order to clone an existing connection).

-
...
+
...

authentication arguments needed by the DBMS instance; these typically include user, password, host, port, dbname, etc. For details see the appropriate DBIDriver

Value

- - -

A list with all the details needed to connect to a database.

+

A list with all the details needed to connect to a database.

@@ -125,15 +125,15 @@

Value

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/reference/createZipFile.html b/docs/reference/createZipFile.html index 0f71dcdf..cd4a952d 100644 --- a/docs/reference/createZipFile.html +++ b/docs/reference/createZipFile.html @@ -1,9 +1,9 @@ -Compress files and/or folders into a single zip file — createZipFile • DatabaseConnectorCompress files and/or folders into a single zip file — createZipFile • DatabaseConnector - +
@@ -28,7 +28,7 @@
- +
@@ -77,19 +77,21 @@

Compress files and/or folders into a single zip file

Arguments

-
zipFile
+ + +
zipFile

The path to the zip file to be created.

-
files
+
files

The files and/or folders to be included in the zip file. Folders will be included recursively.

-
rootFolder
+
rootFolder

The root folder. All files will be stored with relative paths relative to this folder.

-
compressionLevel
+
compressionLevel

A number between 1 and 9. 9 compresses best, but it also takes the longest.

@@ -111,15 +113,15 @@

Details

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/reference/dateAdd.html b/docs/reference/dateAdd.html index 04105d94..99b3b696 100644 --- a/docs/reference/dateAdd.html +++ b/docs/reference/dateAdd.html @@ -1,10 +1,10 @@ -Add an interval to a date — dateAdd • DatabaseConnectorAdd an interval to a date — dateAdd • DatabaseConnector - +
@@ -29,7 +29,7 @@
- +
@@ -79,23 +79,23 @@

Add an interval to a date

Arguments

-
interval
+ + +
interval

Unit for the interval. Can be "day", "week", "month", "year".

-
number
+
number

The number of units to add to the date.

-
date
+
date

The date to add to.

Value

- - -

A new date.

+

A new date.

@@ -117,15 +117,15 @@

Examples

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/reference/dateDiff.html b/docs/reference/dateDiff.html index 58059e49..934be611 100644 --- a/docs/reference/dateDiff.html +++ b/docs/reference/dateDiff.html @@ -1,10 +1,10 @@ -Compute difference between dates — dateDiff • DatabaseConnectorCompute difference between dates — dateDiff • DatabaseConnector - +
@@ -29,7 +29,7 @@
- +
@@ -79,23 +79,23 @@

Compute difference between dates

Arguments

-
interval
+ + +
interval

Unit for the interval. Can be "day", "week", "month", "year".

-
date1
+
date1

The first date.

-
date2
+
date2

The second date.

Value

- - -

The numeric value of the difference.

+

The numeric value of the difference.

@@ -117,15 +117,15 @@

Examples

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/reference/dateFromParts.html b/docs/reference/dateFromParts.html index 853d630b..d27a8922 100644 --- a/docs/reference/dateFromParts.html +++ b/docs/reference/dateFromParts.html @@ -1,10 +1,10 @@ -Construct a date from parts — dateFromParts • DatabaseConnectorConstruct a date from parts — dateFromParts • DatabaseConnector - +
@@ -29,7 +29,7 @@
- +
@@ -79,23 +79,23 @@

Construct a date from parts

Arguments

-
year
+ + +
year

The calendar year.

-
month
+
month

The calendar month (1 = January).

-
day
+
day

The day of the month.

Value

- - -

The date.

+

The date.

@@ -117,15 +117,15 @@

Examples

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/reference/day.html b/docs/reference/day.html index 9788dc39..1621a62f 100644 --- a/docs/reference/day.html +++ b/docs/reference/day.html @@ -1,10 +1,10 @@ -Extract the day from a date — day • DatabaseConnectorExtract the day from a date — day • DatabaseConnector - +
@@ -29,7 +29,7 @@
- +
@@ -79,15 +79,15 @@

Extract the day from a date

Arguments

-
date
+ + +
date

The date.

Value

- - -

The day

+

The day

@@ -109,15 +109,15 @@

Examples

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/reference/dbAppendTable-DatabaseConnectorConnection-character-method.html b/docs/reference/dbAppendTable-DatabaseConnectorConnection-character-method.html index 8ce259a1..d34e9a8c 100644 --- a/docs/reference/dbAppendTable-DatabaseConnectorConnection-character-method.html +++ b/docs/reference/dbAppendTable-DatabaseConnectorConnection-character-method.html @@ -1,17 +1,13 @@ -Insert rows into a table — dbAppendTable,DatabaseConnectorConnection,character-method • DatabaseConnectorInsert rows into a table — dbAppendTable,DatabaseConnectorConnection,character-method • DatabaseConnector - +
@@ -36,7 +32,7 @@
- +
@@ -79,16 +75,12 @@

Insert rows into a table

The dbAppendTable() method assumes that the table has been created beforehand, e.g. with dbCreateTable(). The default implementation calls sqlAppendTableTemplate() and then -dbExecute() with the param argument. Backends compliant to -ANSI SQL 99 which use ? as a placeholder for prepared queries don't need -to override it. Backends with a different SQL syntax which use ? -as a placeholder for prepared queries can override sqlAppendTable(). -Other backends (with different placeholders or with entirely different -ways to create tables) need to override the dbAppendTable() method.

+dbExecute() with the param argument. +Use dbAppendTableArrow() to append data from an Arrow stream.

-
# S4 method for DatabaseConnectorConnection,character
+    
# S4 method for class 'DatabaseConnectorConnection,character'
 dbAppendTable(
   conn,
   name,
@@ -104,12 +96,14 @@ 

Insert rows into a table

Arguments

-
conn
-

A DBIConnection object, as returned by + + +

conn
+

A DBIConnection object, as returned by dbConnect().

-
name
+
name

The table name, passed on to dbQuoteIdentifier(). Options are:

  • a character string with the unquoted DBMS table name, e.g. "table_name",

  • a call to Id() with components to the fully qualified table name, @@ -119,42 +113,39 @@

    Arguments

-
value
-

A data frame of values. The column names must be consistent -with those in the target table in the database.

+
value
+

A data.frame (or coercible to data.frame).

-
databaseSchema
+
databaseSchema

The name of the database schema. See details for platform-specific details.

-
temporary
+
temporary

Should the table created as a temp table?

-
oracleTempSchema
+
oracleTempSchema

DEPRECATED: use tempEmulationSchema instead.

-
tempEmulationSchema
+
tempEmulationSchema

Some database platforms like Oracle and Impala do not truly support temp tables. To emulate temp tables, provide a schema with write privileges where temp tables can be created.

-
...
+
...

Other parameters passed on to methods.

-
row.names
+
row.names

Must be NULL.

Value

- - -

dbAppendTable() returns a +

dbAppendTable() returns a scalar numeric.

@@ -168,9 +159,11 @@

Details

@@ -203,15 +202,15 @@

See also

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/reference/dbClearResult-DatabaseConnectorDbiResult-method.html b/docs/reference/dbClearResult-DatabaseConnectorDbiResult-method.html index 0b119766..6967e5e3 100644 --- a/docs/reference/dbClearResult-DatabaseConnectorDbiResult-method.html +++ b/docs/reference/dbClearResult-DatabaseConnectorDbiResult-method.html @@ -1,11 +1,11 @@ -Clear a result set — dbClearResult,DatabaseConnectorDbiResult-method • DatabaseConnectorClear a result set — dbClearResult,DatabaseConnectorDbiResult-method • DatabaseConnector - +
@@ -30,7 +30,7 @@
- +
@@ -76,33 +76,32 @@

Clear a result set

-
# S4 method for DatabaseConnectorDbiResult
+    
# S4 method for class 'DatabaseConnectorDbiResult'
 dbClearResult(res, ...)

Arguments

-
res
-

An object inheriting from DBIResult.

-
...
+
res
+

An object inheriting from DBIResult.

+ + +
...

Other arguments passed on to methods.

Value

- - -

dbClearResult() returns TRUE, invisibly, for result sets obtained from -both dbSendQuery()

- - -

and dbSendStatement().

+

dbClearResult() returns TRUE, invisibly, for result sets obtained from +dbSendQuery(), +dbSendStatement(), +or dbSendQueryArrow(),

See also

-

Other DBIResult generics: +

Other DBIResult generics: DBIResult-class, dbBind(), dbColumnInfo(), @@ -114,10 +113,30 @@

See also

dbHasCompleted(), dbIsReadOnly(), dbIsValid(), -dbQuoteIdentifier(), dbQuoteLiteral(), -dbQuoteString(), -dbUnquoteIdentifier()

+dbQuoteString()

+

Other DBIResultArrow generics: +DBIResultArrow-class, +dbBind(), +dbFetchArrow(), +dbFetchArrowChunk(), +dbHasCompleted(), +dbIsValid()

+

Other data retrieval generics: +dbBind(), +dbFetch(), +dbFetchArrow(), +dbFetchArrowChunk(), +dbGetQuery(), +dbGetQueryArrow(), +dbHasCompleted(), +dbSendQuery(), +dbSendQueryArrow()

+

Other command execution generics: +dbBind(), +dbExecute(), +dbGetRowsAffected(), +dbSendStatement()

@@ -132,15 +151,15 @@

See also

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/reference/dbClearResult-DatabaseConnectorJdbcResult-method.html b/docs/reference/dbClearResult-DatabaseConnectorJdbcResult-method.html index 61a56e25..ae9296c8 100644 --- a/docs/reference/dbClearResult-DatabaseConnectorJdbcResult-method.html +++ b/docs/reference/dbClearResult-DatabaseConnectorJdbcResult-method.html @@ -1,11 +1,11 @@ -Clear a result set — dbClearResult,DatabaseConnectorJdbcResult-method • DatabaseConnectorClear a result set — dbClearResult,DatabaseConnectorJdbcResult-method • DatabaseConnector - +
@@ -30,7 +30,7 @@
- +
@@ -76,33 +76,32 @@

Clear a result set

-
# S4 method for DatabaseConnectorJdbcResult
+    
# S4 method for class 'DatabaseConnectorJdbcResult'
 dbClearResult(res, ...)

Arguments

-
res
-

An object inheriting from DBIResult.

-
...
+
res
+

An object inheriting from DBIResult.

+ + +
...

Other arguments passed on to methods.

Value

- - -

dbClearResult() returns TRUE, invisibly, for result sets obtained from -both dbSendQuery()

- - -

and dbSendStatement().

+

dbClearResult() returns TRUE, invisibly, for result sets obtained from +dbSendQuery(), +dbSendStatement(), +or dbSendQueryArrow(),

See also

-

Other DBIResult generics: +

Other DBIResult generics: DBIResult-class, dbBind(), dbColumnInfo(), @@ -114,10 +113,30 @@

See also

dbHasCompleted(), dbIsReadOnly(), dbIsValid(), -dbQuoteIdentifier(), dbQuoteLiteral(), -dbQuoteString(), -dbUnquoteIdentifier()

+dbQuoteString()

+

Other DBIResultArrow generics: +DBIResultArrow-class, +dbBind(), +dbFetchArrow(), +dbFetchArrowChunk(), +dbHasCompleted(), +dbIsValid()

+

Other data retrieval generics: +dbBind(), +dbFetch(), +dbFetchArrow(), +dbFetchArrowChunk(), +dbGetQuery(), +dbGetQueryArrow(), +dbHasCompleted(), +dbSendQuery(), +dbSendQueryArrow()

+

Other command execution generics: +dbBind(), +dbExecute(), +dbGetRowsAffected(), +dbSendStatement()

@@ -132,15 +151,15 @@

See also

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/reference/dbColumnInfo-DatabaseConnectorDbiResult-method.html b/docs/reference/dbColumnInfo-DatabaseConnectorDbiResult-method.html index b55f25db..4c5f8484 100644 --- a/docs/reference/dbColumnInfo-DatabaseConnectorDbiResult-method.html +++ b/docs/reference/dbColumnInfo-DatabaseConnectorDbiResult-method.html @@ -1,12 +1,12 @@ -Information about result types — dbColumnInfo,DatabaseConnectorDbiResult-method • DatabaseConnectorInformation about result types — dbColumnInfo,DatabaseConnectorDbiResult-method • DatabaseConnector - +
@@ -31,7 +31,7 @@
- +
@@ -78,41 +78,37 @@

Information about result types

-
# S4 method for DatabaseConnectorDbiResult
+    
# S4 method for class 'DatabaseConnectorDbiResult'
 dbColumnInfo(res, ...)

Arguments

-
res
-

An object inheriting from DBIResult.

-
...
+
res
+

An object inheriting from DBIResult.

+ + +
...

Other arguments passed on to methods.

Value

- - -

dbColumnInfo()

- - -

returns a data frame +

dbColumnInfo() +returns a data frame with at least two columns "name" and "type" (in that order) (and optional columns that start with a dot). The "name" and "type" columns contain the names and types of the R columns of the data frame that is returned from dbFetch(). The "type" column is of type character and only for information. -Do not compute on the "type" column, instead use dbFetch(res, n = 0)

- - -

to create a zero-row data frame initialized with the correct data types.

+Do not compute on the "type" column, instead use dbFetch(res, n = 0) +to create a zero-row data frame initialized with the correct data types.

See also

-

Other DBIResult generics: +

Other DBIResult generics: DBIResult-class, dbBind(), dbClearResult(), @@ -124,10 +120,8 @@

See also

dbHasCompleted(), dbIsReadOnly(), dbIsValid(), -dbQuoteIdentifier(), dbQuoteLiteral(), -dbQuoteString(), -dbUnquoteIdentifier()

+dbQuoteString()

@@ -142,15 +136,15 @@

See also

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/reference/dbColumnInfo-DatabaseConnectorJdbcResult-method.html b/docs/reference/dbColumnInfo-DatabaseConnectorJdbcResult-method.html index fec69ed9..bf2b79bc 100644 --- a/docs/reference/dbColumnInfo-DatabaseConnectorJdbcResult-method.html +++ b/docs/reference/dbColumnInfo-DatabaseConnectorJdbcResult-method.html @@ -1,12 +1,12 @@ -Information about result types — dbColumnInfo,DatabaseConnectorJdbcResult-method • DatabaseConnectorInformation about result types — dbColumnInfo,DatabaseConnectorJdbcResult-method • DatabaseConnector - +
@@ -31,7 +31,7 @@
- +
@@ -78,41 +78,37 @@

Information about result types

-
# S4 method for DatabaseConnectorJdbcResult
+    
# S4 method for class 'DatabaseConnectorJdbcResult'
 dbColumnInfo(res, ...)

Arguments

-
res
-

An object inheriting from DBIResult.

-
...
+
res
+

An object inheriting from DBIResult.

+ + +
...

Other arguments passed on to methods.

Value

- - -

dbColumnInfo()

- - -

returns a data frame +

dbColumnInfo() +returns a data frame with at least two columns "name" and "type" (in that order) (and optional columns that start with a dot). The "name" and "type" columns contain the names and types of the R columns of the data frame that is returned from dbFetch(). The "type" column is of type character and only for information. -Do not compute on the "type" column, instead use dbFetch(res, n = 0)

- - -

to create a zero-row data frame initialized with the correct data types.

+Do not compute on the "type" column, instead use dbFetch(res, n = 0) +to create a zero-row data frame initialized with the correct data types.

See also

-

Other DBIResult generics: +

Other DBIResult generics: DBIResult-class, dbBind(), dbClearResult(), @@ -124,10 +120,8 @@

See also

dbHasCompleted(), dbIsReadOnly(), dbIsValid(), -dbQuoteIdentifier(), dbQuoteLiteral(), -dbQuoteString(), -dbUnquoteIdentifier()

+dbQuoteString()

@@ -142,15 +136,15 @@

See also

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/reference/dbConnect-DatabaseConnectorDriver-method.html b/docs/reference/dbConnect-DatabaseConnectorDriver-method.html index 6a02be05..61ff7f34 100644 --- a/docs/reference/dbConnect-DatabaseConnectorDriver-method.html +++ b/docs/reference/dbConnect-DatabaseConnectorDriver-method.html @@ -1,10 +1,10 @@ -Create a connection to a DBMS — dbConnect,DatabaseConnectorDriver-method • DatabaseConnectorCreate a connection to a DBMS — dbConnect,DatabaseConnectorDriver-method • DatabaseConnector - +
@@ -29,7 +29,7 @@
- +
@@ -74,31 +74,31 @@

Create a connection to a DBMS

-
# S4 method for DatabaseConnectorDriver
+    
# S4 method for class 'DatabaseConnectorDriver'
 dbConnect(drv, ...)

Arguments

-
drv
+ + +
drv

The result of the DatabaseConnectorDriver() function

-
...
+
...

Other parameters. These are the same as expected by the connect() function.

Value

- - -

Returns a DatabaseConnectorConnection object that can be used with most of the other functions in +

Returns a DatabaseConnectorConnection object that can be used with most of the other functions in this package.

Examples

-
if (FALSE) {
+    
if (FALSE) { # \dontrun{
 conn <- dbConnect(DatabaseConnectorDriver(),
   dbms = "postgresql",
   server = "localhost/ohdsi",
@@ -107,7 +107,7 @@ 

Examples

) querySql(conn, "SELECT * FROM cdm_synpuf.person;") dbDisconnect(conn) -} +} # }
@@ -123,15 +123,15 @@

Examples

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/reference/dbCreateTable-DatabaseConnectorConnection-method.html b/docs/reference/dbCreateTable-DatabaseConnectorConnection-method.html index b123e6af..be3c71b7 100644 --- a/docs/reference/dbCreateTable-DatabaseConnectorConnection-method.html +++ b/docs/reference/dbCreateTable-DatabaseConnectorConnection-method.html @@ -1,14 +1,11 @@ -Create a table in the database — dbCreateTable,DatabaseConnectorConnection-method • DatabaseConnectorCreate a table in the database — dbCreateTable,DatabaseConnectorConnection-method • DatabaseConnector - +
@@ -33,7 +30,7 @@
- +
@@ -75,14 +72,11 @@

Create a table in the database

The default dbCreateTable() method calls sqlCreateTable() and dbExecute(). -Backends compliant to ANSI SQL 99 don't need to override it. -Backends with a different SQL syntax can override sqlCreateTable(), -backends with entirely different ways to create tables need to -override this method.

+Use dbCreateTableArrow() to create a table from an Arrow schema.

-
# S4 method for DatabaseConnectorConnection
+    
# S4 method for class 'DatabaseConnectorConnection'
 dbCreateTable(
   conn,
   name,
@@ -98,12 +92,14 @@ 

Create a table in the database

Arguments

-
conn
-

A DBIConnection object, as returned by + + +

conn
+

A DBIConnection object, as returned by dbConnect().

-
name
+
name

The table name, passed on to dbQuoteIdentifier(). Options are:

  • a character string with the unquoted DBMS table name, e.g. "table_name",

  • a call to Id() with components to the fully qualified table name, @@ -113,7 +109,7 @@

    Arguments

-
fields
+
fields

Either a character vector or a data frame.

A named character vector: Names are column names, values are types. Names are escaped with dbQuoteIdentifier(). @@ -122,37 +118,35 @@

Arguments

dbDataType().

-
databaseSchema
+
databaseSchema

The name of the database schema. See details for platform-specific details.

-
oracleTempSchema
+
oracleTempSchema

DEPRECATED: use tempEmulationSchema instead.

-
tempEmulationSchema
+
tempEmulationSchema

Some database platforms like Oracle and Impala do not truly support temp tables. To emulate temp tables, provide a schema with write privileges where temp tables can be created.

-
...
+
...

Other parameters passed on to methods.

-
row.names
+
row.names

Must be NULL.

-
temporary
+
temporary

Should the table created as a temp table?

Value

- - -

dbCreateTable() returns TRUE, invisibly.

+

dbCreateTable() returns TRUE, invisibly.

Details

@@ -164,9 +158,11 @@

Details

@@ -199,15 +201,15 @@

See also

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/reference/dbDisconnect-DatabaseConnectorConnection-method.html b/docs/reference/dbDisconnect-DatabaseConnectorConnection-method.html index d26915e9..cbb05d6f 100644 --- a/docs/reference/dbDisconnect-DatabaseConnectorConnection-method.html +++ b/docs/reference/dbDisconnect-DatabaseConnectorConnection-method.html @@ -1,10 +1,10 @@ -Disconnect (close) a connection — dbDisconnect,DatabaseConnectorConnection-method • DatabaseConnectorDisconnect (close) a connection — dbDisconnect,DatabaseConnectorConnection-method • DatabaseConnector - +
@@ -29,7 +29,7 @@
- +
@@ -74,46 +74,54 @@

Disconnect (close) a connection

-
# S4 method for DatabaseConnectorConnection
+    
# S4 method for class 'DatabaseConnectorConnection'
 dbDisconnect(conn)

Arguments

-
conn
-

A DBIConnection object, as returned by + + +

conn
+

A DBIConnection object, as returned by dbConnect().

Value

- - -

dbDisconnect() returns TRUE, invisibly.

+

dbDisconnect() returns TRUE, invisibly.

@@ -128,15 +136,15 @@

See also

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/reference/dbExecute-DatabaseConnectorConnection-character-method.html b/docs/reference/dbExecute-DatabaseConnectorConnection-character-method.html index ae0c4e7f..ef2fa5c6 100644 --- a/docs/reference/dbExecute-DatabaseConnectorConnection-character-method.html +++ b/docs/reference/dbExecute-DatabaseConnectorConnection-character-method.html @@ -1,15 +1,15 @@ -Execute an update statement, query number of rows affected, and then close result set — dbExecute,DatabaseConnectorConnection,character-method • DatabaseConnector - +
@@ -34,7 +34,7 @@
- +
@@ -78,40 +78,40 @@

Execute an update statement, query number of rows affected, and then close r dbExecute() comes with a default implementation (which should work with most backends) that calls dbSendStatement(), then dbGetRowsAffected(), ensuring that -the result is always free-d by dbClearResult(). +the result is always freed by dbClearResult(). For passing query parameters, see dbBind(), in particular the "The command execution flow" section.

-
# S4 method for DatabaseConnectorConnection,character
+    
# S4 method for class 'DatabaseConnectorConnection,character'
 dbExecute(conn, statement, translate = TRUE, ...)

Arguments

-
conn
-

A DBIConnection object, as returned by + + +

conn
+

A DBIConnection object, as returned by dbConnect().

-
statement
+
statement

a character string containing SQL.

-
translate
+
translate

Translate the query using SqlRender?

-
...
+
...

Other parameters passed on to methods.

Value

- - -

dbExecute() always returns a +

dbExecute() always returns a scalar numeric that specifies the number of rows affected @@ -128,27 +128,40 @@

Details

@@ -163,15 +176,15 @@

See also

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/reference/dbExistsTable-DatabaseConnectorConnection-character-method.html b/docs/reference/dbExistsTable-DatabaseConnectorConnection-character-method.html index 5fb91b7c..5aa7465a 100644 --- a/docs/reference/dbExistsTable-DatabaseConnectorConnection-character-method.html +++ b/docs/reference/dbExistsTable-DatabaseConnectorConnection-character-method.html @@ -1,9 +1,9 @@ -Does a table exist? — dbExistsTable,DatabaseConnectorConnection,character-method • DatabaseConnectorDoes a table exist? — dbExistsTable,DatabaseConnectorConnection,character-method • DatabaseConnector - +
@@ -28,7 +28,7 @@
- +
@@ -72,18 +72,20 @@

Does a table exist?

-
# S4 method for DatabaseConnectorConnection,character
+    
# S4 method for class 'DatabaseConnectorConnection,character'
 dbExistsTable(conn, name, databaseSchema = NULL, ...)

Arguments

-
conn
-

A DBIConnection object, as returned by + + +

conn
+

A DBIConnection object, as returned by dbConnect().

-
name
+
name

The table name, passed on to dbQuoteIdentifier(). Options are:

  • a character string with the unquoted DBMS table name, e.g. "table_name",

  • a call to Id() with components to the fully qualified table name, @@ -93,22 +95,18 @@

    Arguments

-
databaseSchema
+
databaseSchema

The name of the database schema. See details for platform-specific details.

-
...
+
...

Other parameters passed on to methods.

Value

- - -

dbExistsTable() returns a logical scalar, TRUE if the table or view +

dbExistsTable() returns a logical scalar, TRUE if the table or view specified by the name argument exists, FALSE otherwise.

- -

This includes temporary tables if supported by the database.

@@ -121,27 +119,35 @@

Details

@@ -156,15 +162,15 @@

See also

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/reference/dbFetch-DatabaseConnectorDbiResult-method.html b/docs/reference/dbFetch-DatabaseConnectorDbiResult-method.html index 1908fa7a..c58fec3c 100644 --- a/docs/reference/dbFetch-DatabaseConnectorDbiResult-method.html +++ b/docs/reference/dbFetch-DatabaseConnectorDbiResult-method.html @@ -1,10 +1,10 @@ -Fetch records from a previously executed query — dbFetch,DatabaseConnectorDbiResult-method • DatabaseConnectorFetch records from a previously executed query — dbFetch,DatabaseConnectorDbiResult-method • DatabaseConnector - +
@@ -29,7 +29,7 @@
- +
@@ -74,40 +74,40 @@

Fetch records from a previously executed query

-
# S4 method for DatabaseConnectorDbiResult
+    
# S4 method for class 'DatabaseConnectorDbiResult'
 dbFetch(res, n = -1, ...)

Arguments

-
res
-

An object inheriting from DBIResult, created by + + +

res
+

An object inheriting from DBIResult, created by dbSendQuery().

-
n
+
n

maximum number of records to retrieve per fetch. Use n = -1 or n = Inf to retrieve all pending records. Some implementations may recognize other special values.

-
...
+
...

Other arguments passed on to methods.

Value

- - -

dbFetch() always returns a data.frame

- - -

with as many rows as records were fetched and as many +

dbFetch() always returns a data.frame with +as many rows as records were fetched and as many columns as fields in the result set, even if the result is a single value or has one -or zero rows.

+or zero rows. +Passing n = NA is supported and returns an arbitrary number of rows (at least one) +as specified by the driver, but at most the remaining rows in the result set.

Details

@@ -120,7 +120,7 @@

Details

See also

Close the result set with dbClearResult() as soon as you finish retrieving the records you want.

-

Other DBIResult generics: +

Other DBIResult generics: DBIResult-class, dbBind(), dbClearResult(), @@ -132,10 +132,18 @@

See also

dbHasCompleted(), dbIsReadOnly(), dbIsValid(), -dbQuoteIdentifier(), dbQuoteLiteral(), -dbQuoteString(), -dbUnquoteIdentifier()

+dbQuoteString()

+

Other data retrieval generics: +dbBind(), +dbClearResult(), +dbFetchArrow(), +dbFetchArrowChunk(), +dbGetQuery(), +dbGetQueryArrow(), +dbHasCompleted(), +dbSendQuery(), +dbSendQueryArrow()

@@ -150,15 +158,15 @@

See also

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/reference/dbFetch-DatabaseConnectorJdbcResult-method.html b/docs/reference/dbFetch-DatabaseConnectorJdbcResult-method.html index 091794f5..7e1ab3f2 100644 --- a/docs/reference/dbFetch-DatabaseConnectorJdbcResult-method.html +++ b/docs/reference/dbFetch-DatabaseConnectorJdbcResult-method.html @@ -1,10 +1,10 @@ -Fetch records from a previously executed query — dbFetch,DatabaseConnectorJdbcResult-method • DatabaseConnectorFetch records from a previously executed query — dbFetch,DatabaseConnectorJdbcResult-method • DatabaseConnector - +
@@ -29,7 +29,7 @@
- +
@@ -74,40 +74,40 @@

Fetch records from a previously executed query

-
# S4 method for DatabaseConnectorJdbcResult
+    
# S4 method for class 'DatabaseConnectorJdbcResult'
 dbFetch(res, n = -1, ...)

Arguments

-
res
-

An object inheriting from DBIResult, created by + + +

res
+

An object inheriting from DBIResult, created by dbSendQuery().

-
n
+
n

maximum number of records to retrieve per fetch. Use n = -1 or n = Inf to retrieve all pending records. Some implementations may recognize other special values.

-
...
+
...

Other arguments passed on to methods.

Value

- - -

dbFetch() always returns a data.frame

- - -

with as many rows as records were fetched and as many +

dbFetch() always returns a data.frame with +as many rows as records were fetched and as many columns as fields in the result set, even if the result is a single value or has one -or zero rows.

+or zero rows. +Passing n = NA is supported and returns an arbitrary number of rows (at least one) +as specified by the driver, but at most the remaining rows in the result set.

Details

@@ -120,7 +120,7 @@

Details

See also

Close the result set with dbClearResult() as soon as you finish retrieving the records you want.

-

Other DBIResult generics: +

Other DBIResult generics: DBIResult-class, dbBind(), dbClearResult(), @@ -132,10 +132,18 @@

See also

dbHasCompleted(), dbIsReadOnly(), dbIsValid(), -dbQuoteIdentifier(), dbQuoteLiteral(), -dbQuoteString(), -dbUnquoteIdentifier()

+dbQuoteString()

+

Other data retrieval generics: +dbBind(), +dbClearResult(), +dbFetchArrow(), +dbFetchArrowChunk(), +dbGetQuery(), +dbGetQueryArrow(), +dbHasCompleted(), +dbSendQuery(), +dbSendQueryArrow()

@@ -150,15 +158,15 @@

See also

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/reference/dbGetInfo-DatabaseConnectorConnection-method.html b/docs/reference/dbGetInfo-DatabaseConnectorConnection-method.html index 7296f5c5..b0c8609b 100644 --- a/docs/reference/dbGetInfo-DatabaseConnectorConnection-method.html +++ b/docs/reference/dbGetInfo-DatabaseConnectorConnection-method.html @@ -1,10 +1,10 @@ -Get DBMS metadata — dbGetInfo,DatabaseConnectorConnection-method • DatabaseConnectorGet DBMS metadata — dbGetInfo,DatabaseConnectorConnection-method • DatabaseConnector - +
@@ -29,7 +29,7 @@
- +
@@ -69,41 +69,37 @@

Get DBMS metadata

-

Retrieves information on objects of class DBIDriver, -DBIConnection or DBIResult.

+

Retrieves information on objects of class DBIDriver, +DBIConnection or DBIResult.

-
# S4 method for DatabaseConnectorConnection
+    
# S4 method for class 'DatabaseConnectorConnection'
 dbGetInfo(dbObj, ...)

Arguments

-
dbObj
-

An object inheriting from DBIObject, -i.e. DBIDriver, DBIConnection, -or a DBIResult

-
...
+
dbObj
+

An object inheriting from DBIObject, +i.e. DBIDriver, DBIConnection, +or a DBIResult

+ + +
...

Other arguments to methods.

Value

- - -

For objects of class DBIDriver, dbGetInfo()

- - -

returns a named list +

For objects of class DBIDriver, dbGetInfo() +returns a named list that contains at least the following components:

  • driver.version: the package version of the DBI backend,

  • client.version: the version of the DBMS client library.

  • -

For objects of class DBIConnection, dbGetInfo()

- - -

returns a named list +

For objects of class DBIConnection, dbGetInfo() +returns a named list that contains at least the following components:

  • db.version: version of the database server,

  • dbname: database name,

  • username: username to connect to the database,

  • @@ -111,10 +107,8 @@

    Value

  • port: port on the database server. It must not contain a password component. Components that are not applicable should be set to NA.

  • -

For objects of class DBIResult, dbGetInfo()

- - -

returns a named list +

For objects of class DBIResult, dbGetInfo() +returns a named list that contains at least the following components:

See also

-

Other DBIDriver generics: +

+dbQuoteString()

@@ -187,15 +187,15 @@

See also

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/reference/dbGetInfo-DatabaseConnectorDriver-method.html b/docs/reference/dbGetInfo-DatabaseConnectorDriver-method.html index 81fe290d..a05a71fc 100644 --- a/docs/reference/dbGetInfo-DatabaseConnectorDriver-method.html +++ b/docs/reference/dbGetInfo-DatabaseConnectorDriver-method.html @@ -1,10 +1,10 @@ -Get DBMS metadata — dbGetInfo,DatabaseConnectorDriver-method • DatabaseConnectorGet DBMS metadata — dbGetInfo,DatabaseConnectorDriver-method • DatabaseConnector - +
@@ -29,7 +29,7 @@
- +
@@ -69,41 +69,37 @@

Get DBMS metadata

-

Retrieves information on objects of class DBIDriver, -DBIConnection or DBIResult.

+

Retrieves information on objects of class DBIDriver, +DBIConnection or DBIResult.

-
# S4 method for DatabaseConnectorDriver
+    
# S4 method for class 'DatabaseConnectorDriver'
 dbGetInfo(dbObj, ...)

Arguments

-
dbObj
-

An object inheriting from DBIObject, -i.e. DBIDriver, DBIConnection, -or a DBIResult

-
...
+
dbObj
+

An object inheriting from DBIObject, +i.e. DBIDriver, DBIConnection, +or a DBIResult

+ + +
...

Other arguments to methods.

Value

- - -

For objects of class DBIDriver, dbGetInfo()

- - -

returns a named list +

For objects of class DBIDriver, dbGetInfo() +returns a named list that contains at least the following components:

  • driver.version: the package version of the DBI backend,

  • client.version: the version of the DBMS client library.

  • -

For objects of class DBIConnection, dbGetInfo()

- - -

returns a named list +

For objects of class DBIConnection, dbGetInfo() +returns a named list that contains at least the following components:

  • db.version: version of the database server,

  • dbname: database name,

  • username: username to connect to the database,

  • @@ -111,10 +107,8 @@

    Value

  • port: port on the database server. It must not contain a password component. Components that are not applicable should be set to NA.

  • -

For objects of class DBIResult, dbGetInfo()

- - -

returns a named list +

For objects of class DBIResult, dbGetInfo() +returns a named list that contains at least the following components:

See also

-

Other DBIDriver generics: +

+dbQuoteString()

@@ -187,15 +187,15 @@

See also

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/reference/dbGetQuery-DatabaseConnectorConnection-character-method.html b/docs/reference/dbGetQuery-DatabaseConnectorConnection-character-method.html index 03fc054c..2efd2d46 100644 --- a/docs/reference/dbGetQuery-DatabaseConnectorConnection-character-method.html +++ b/docs/reference/dbGetQuery-DatabaseConnectorConnection-character-method.html @@ -1,15 +1,16 @@ -Send query, retrieve results and then clear result set — dbGetQuery,DatabaseConnectorConnection,character-method • DatabaseConnector - +
@@ -34,7 +35,7 @@
- +
@@ -78,43 +79,42 @@

Send query, retrieve results and then clear result set

dbGetQuery() comes with a default implementation (which should work with most backends) that calls dbSendQuery(), then dbFetch(), ensuring that -the result is always free-d by dbClearResult(). +the result is always freed by dbClearResult(). For retrieving chunked/paged results or for passing query parameters, -see dbSendQuery(), in particular the "The data retrieval flow" section.

+see dbSendQuery(), in particular the "The data retrieval flow" section. +For retrieving results as an Arrow object, see dbGetQueryArrow().

-
# S4 method for DatabaseConnectorConnection,character
+    
# S4 method for class 'DatabaseConnectorConnection,character'
 dbGetQuery(conn, statement, translate = TRUE, ...)

Arguments

-
conn
-

A DBIConnection object, as returned by + + +

conn
+

A DBIConnection object, as returned by dbConnect().

-
statement
+
statement

a character string containing SQL.

-
translate
+
translate

Translate the query using SqlRender?

-
...
+
...

Other parameters passed on to methods.

Value

- - -

dbGetQuery() always returns a data.frame

- - -

with as many rows as records were fetched and as many +

dbGetQuery() always returns a data.frame, with +as many rows as records were fetched and as many columns as fields in the result set, even if the result is a single value or has one @@ -124,7 +124,7 @@

Value

Details

This method is for SELECT queries only (incl. other SQL statements that return a SELECT-alike result, -e. g. execution of a stored procedure or data manipulation queries +e.g., execution of a stored procedure or data manipulation queries like INSERT INTO ... RETURNING ...). To execute a stored procedure that does not return a result set, use dbExecute().

@@ -136,27 +136,45 @@

Details

@@ -171,15 +189,15 @@

See also

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/reference/dbGetRowCount-DatabaseConnectorDbiResult-method.html b/docs/reference/dbGetRowCount-DatabaseConnectorDbiResult-method.html index fa674943..17e21d7f 100644 --- a/docs/reference/dbGetRowCount-DatabaseConnectorDbiResult-method.html +++ b/docs/reference/dbGetRowCount-DatabaseConnectorDbiResult-method.html @@ -1,10 +1,10 @@ -The number of rows fetched so far — dbGetRowCount,DatabaseConnectorDbiResult-method • DatabaseConnectorThe number of rows fetched so far — dbGetRowCount,DatabaseConnectorDbiResult-method • DatabaseConnector - +
@@ -29,7 +29,7 @@
- +
@@ -74,25 +74,25 @@

The number of rows fetched so far

-
# S4 method for DatabaseConnectorDbiResult
+    
# S4 method for class 'DatabaseConnectorDbiResult'
 dbGetRowCount(res, ...)

Arguments

-
res
-

An object inheriting from DBIResult.

-
...
+
res
+

An object inheriting from DBIResult.

+ + +
...

Other arguments passed on to methods.

Value

- - -

dbGetRowCount() returns a scalar number (integer or numeric), +

dbGetRowCount() returns a scalar number (integer or numeric), the number of rows fetched so far. After calling dbSendQuery(), the row count is initially zero. @@ -111,7 +111,7 @@

Value

See also

-

Other DBIResult generics: +

Other DBIResult generics: DBIResult-class, dbBind(), dbClearResult(), @@ -123,10 +123,8 @@

See also

dbHasCompleted(), dbIsReadOnly(), dbIsValid(), -dbQuoteIdentifier(), dbQuoteLiteral(), -dbQuoteString(), -dbUnquoteIdentifier()

+dbQuoteString()

@@ -141,15 +139,15 @@

See also

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/reference/dbGetRowCount-DatabaseConnectorJdbcResult-method.html b/docs/reference/dbGetRowCount-DatabaseConnectorJdbcResult-method.html index 824fc4b7..e4ebdff0 100644 --- a/docs/reference/dbGetRowCount-DatabaseConnectorJdbcResult-method.html +++ b/docs/reference/dbGetRowCount-DatabaseConnectorJdbcResult-method.html @@ -1,10 +1,10 @@ -The number of rows fetched so far — dbGetRowCount,DatabaseConnectorJdbcResult-method • DatabaseConnectorThe number of rows fetched so far — dbGetRowCount,DatabaseConnectorJdbcResult-method • DatabaseConnector - +
@@ -29,7 +29,7 @@
- +
@@ -74,25 +74,25 @@

The number of rows fetched so far

-
# S4 method for DatabaseConnectorJdbcResult
+    
# S4 method for class 'DatabaseConnectorJdbcResult'
 dbGetRowCount(res, ...)

Arguments

-
res
-

An object inheriting from DBIResult.

-
...
+
res
+

An object inheriting from DBIResult.

+ + +
...

Other arguments passed on to methods.

Value

- - -

dbGetRowCount() returns a scalar number (integer or numeric), +

dbGetRowCount() returns a scalar number (integer or numeric), the number of rows fetched so far. After calling dbSendQuery(), the row count is initially zero. @@ -111,7 +111,7 @@

Value

See also

-

Other DBIResult generics: +

Other DBIResult generics: DBIResult-class, dbBind(), dbClearResult(), @@ -123,10 +123,8 @@

See also

dbHasCompleted(), dbIsReadOnly(), dbIsValid(), -dbQuoteIdentifier(), dbQuoteLiteral(), -dbQuoteString(), -dbUnquoteIdentifier()

+dbQuoteString()

@@ -141,15 +139,15 @@

See also

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/reference/dbGetRowsAffected-DatabaseConnectorDbiResult-method.html b/docs/reference/dbGetRowsAffected-DatabaseConnectorDbiResult-method.html index ce6f2fe6..52e4c0e0 100644 --- a/docs/reference/dbGetRowsAffected-DatabaseConnectorDbiResult-method.html +++ b/docs/reference/dbGetRowsAffected-DatabaseConnectorDbiResult-method.html @@ -1,10 +1,10 @@ -The number of rows affected — dbGetRowsAffected,DatabaseConnectorDbiResult-method • DatabaseConnectorThe number of rows affected — dbGetRowsAffected,DatabaseConnectorDbiResult-method • DatabaseConnector - +
@@ -29,7 +29,7 @@
- +
@@ -74,36 +74,38 @@

The number of rows affected

-
# S4 method for DatabaseConnectorDbiResult
+    
# S4 method for class 'DatabaseConnectorDbiResult'
 dbGetRowsAffected(res, ...)

Arguments

-
res
-

An object inheriting from DBIResult.

-
...
+
res
+

An object inheriting from DBIResult.

+ + +
...

Other arguments passed on to methods.

Value

- - -

dbGetRowsAffected() returns a scalar number (integer or numeric), +

dbGetRowsAffected() returns a scalar number (integer or numeric), the number of rows affected by a data manipulation statement issued with dbSendStatement(). The value is available directly after the call and does not change after calling dbFetch(). -For queries issued with dbSendQuery(), +NA_integer_ or NA_numeric_ are allowed if the number of rows affected is not known.

+

For queries issued with dbSendQuery(), zero is returned before -and after the call to dbFetch().

+and after the call to dbFetch(). +NA values are not allowed.

See also

-

Other DBIResult generics: +

Other DBIResult generics: DBIResult-class, dbBind(), dbClearResult(), @@ -115,10 +117,13 @@

See also

dbHasCompleted(), dbIsReadOnly(), dbIsValid(), -dbQuoteIdentifier(), dbQuoteLiteral(), -dbQuoteString(), -dbUnquoteIdentifier()

+dbQuoteString()

+

Other command execution generics: +dbBind(), +dbClearResult(), +dbExecute(), +dbSendStatement()

@@ -133,15 +138,15 @@

See also

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/reference/dbGetRowsAffected-DatabaseConnectorJdbcResult-method.html b/docs/reference/dbGetRowsAffected-DatabaseConnectorJdbcResult-method.html index f188b7c5..66f806a5 100644 --- a/docs/reference/dbGetRowsAffected-DatabaseConnectorJdbcResult-method.html +++ b/docs/reference/dbGetRowsAffected-DatabaseConnectorJdbcResult-method.html @@ -1,10 +1,10 @@ -The number of rows affected — dbGetRowsAffected,DatabaseConnectorJdbcResult-method • DatabaseConnectorThe number of rows affected — dbGetRowsAffected,DatabaseConnectorJdbcResult-method • DatabaseConnector - +
@@ -29,7 +29,7 @@
- +
@@ -74,36 +74,38 @@

The number of rows affected

-
# S4 method for DatabaseConnectorJdbcResult
+    
# S4 method for class 'DatabaseConnectorJdbcResult'
 dbGetRowsAffected(res, ...)

Arguments

-
res
-

An object inheriting from DBIResult.

-
...
+
res
+

An object inheriting from DBIResult.

+ + +
...

Other arguments passed on to methods.

Value

- - -

dbGetRowsAffected() returns a scalar number (integer or numeric), +

dbGetRowsAffected() returns a scalar number (integer or numeric), the number of rows affected by a data manipulation statement issued with dbSendStatement(). The value is available directly after the call and does not change after calling dbFetch(). -For queries issued with dbSendQuery(), +NA_integer_ or NA_numeric_ are allowed if the number of rows affected is not known.

+

For queries issued with dbSendQuery(), zero is returned before -and after the call to dbFetch().

+and after the call to dbFetch(). +NA values are not allowed.

See also

-

Other DBIResult generics: +

Other DBIResult generics: DBIResult-class, dbBind(), dbClearResult(), @@ -115,10 +117,13 @@

See also

dbHasCompleted(), dbIsReadOnly(), dbIsValid(), -dbQuoteIdentifier(), dbQuoteLiteral(), -dbQuoteString(), -dbUnquoteIdentifier()

+dbQuoteString()

+

Other command execution generics: +dbBind(), +dbClearResult(), +dbExecute(), +dbSendStatement()

@@ -133,15 +138,15 @@

See also

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/reference/dbGetStatement-DatabaseConnectorDbiResult-method.html b/docs/reference/dbGetStatement-DatabaseConnectorDbiResult-method.html index fe3daf78..d10267b1 100644 --- a/docs/reference/dbGetStatement-DatabaseConnectorDbiResult-method.html +++ b/docs/reference/dbGetStatement-DatabaseConnectorDbiResult-method.html @@ -1,10 +1,10 @@ -Get the statement associated with a result set — dbGetStatement,DatabaseConnectorDbiResult-method • DatabaseConnectorGet the statement associated with a result set — dbGetStatement,DatabaseConnectorDbiResult-method • DatabaseConnector - +
@@ -29,7 +29,7 @@
- +
@@ -74,33 +74,31 @@

Get the statement associated with a result set

-
# S4 method for DatabaseConnectorDbiResult
+    
# S4 method for class 'DatabaseConnectorDbiResult'
 dbGetStatement(res, ...)

Arguments

-
res
-

An object inheriting from DBIResult.

-
...
+
res
+

An object inheriting from DBIResult.

+ + +
...

Other arguments passed on to methods.

Value

- - -

dbGetStatement() returns a string, the query used in -either dbSendQuery()

- - -

or dbSendStatement().

+

dbGetStatement() returns a string, the query used in +either dbSendQuery() or +dbSendStatement().

See also

-

Other DBIResult generics: +

Other DBIResult generics: DBIResult-class, dbBind(), dbClearResult(), @@ -112,10 +110,8 @@

See also

dbHasCompleted(), dbIsReadOnly(), dbIsValid(), -dbQuoteIdentifier(), dbQuoteLiteral(), -dbQuoteString(), -dbUnquoteIdentifier()

+dbQuoteString()

@@ -130,15 +126,15 @@

See also

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/reference/dbGetStatement-DatabaseConnectorJdbcResult-method.html b/docs/reference/dbGetStatement-DatabaseConnectorJdbcResult-method.html index 8fbc3b1c..16ff7759 100644 --- a/docs/reference/dbGetStatement-DatabaseConnectorJdbcResult-method.html +++ b/docs/reference/dbGetStatement-DatabaseConnectorJdbcResult-method.html @@ -1,10 +1,10 @@ -Get the statement associated with a result set — dbGetStatement,DatabaseConnectorJdbcResult-method • DatabaseConnectorGet the statement associated with a result set — dbGetStatement,DatabaseConnectorJdbcResult-method • DatabaseConnector - +
@@ -29,7 +29,7 @@
- +
@@ -74,33 +74,31 @@

Get the statement associated with a result set

-
# S4 method for DatabaseConnectorJdbcResult
+    
# S4 method for class 'DatabaseConnectorJdbcResult'
 dbGetStatement(res, ...)

Arguments

-
res
-

An object inheriting from DBIResult.

-
...
+
res
+

An object inheriting from DBIResult.

+ + +
...

Other arguments passed on to methods.

Value

- - -

dbGetStatement() returns a string, the query used in -either dbSendQuery()

- - -

or dbSendStatement().

+

dbGetStatement() returns a string, the query used in +either dbSendQuery() or +dbSendStatement().

See also

-

Other DBIResult generics: +

Other DBIResult generics: DBIResult-class, dbBind(), dbClearResult(), @@ -112,10 +110,8 @@

See also

dbHasCompleted(), dbIsReadOnly(), dbIsValid(), -dbQuoteIdentifier(), dbQuoteLiteral(), -dbQuoteString(), -dbUnquoteIdentifier()

+dbQuoteString()

@@ -130,15 +126,15 @@

See also

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/reference/dbHasCompleted-DatabaseConnectorDbiResult-method.html b/docs/reference/dbHasCompleted-DatabaseConnectorDbiResult-method.html index 87d94ada..713a8ddc 100644 --- a/docs/reference/dbHasCompleted-DatabaseConnectorDbiResult-method.html +++ b/docs/reference/dbHasCompleted-DatabaseConnectorDbiResult-method.html @@ -1,11 +1,11 @@ -Completion status — dbHasCompleted,DatabaseConnectorDbiResult-method • DatabaseConnectorCompletion status — dbHasCompleted,DatabaseConnectorDbiResult-method • DatabaseConnector - +
@@ -30,7 +30,7 @@
- +
@@ -76,25 +76,25 @@

Completion status

-
# S4 method for DatabaseConnectorDbiResult
+    
# S4 method for class 'DatabaseConnectorDbiResult'
 dbHasCompleted(res, ...)

Arguments

-
res
-

An object inheriting from DBIResult.

-
...
+
res
+

An object inheriting from DBIResult.

+ + +
...

Other arguments passed on to methods.

Value

- - -

dbHasCompleted() returns a logical scalar. +

dbHasCompleted() returns a logical scalar. For a query initiated by dbSendQuery() with non-empty result set, dbHasCompleted() returns FALSE initially and TRUE after calling dbFetch() without limit. @@ -103,7 +103,7 @@

Value

See also

-

Other DBIResult generics: +

Other DBIResult generics: DBIResult-class, dbBind(), dbClearResult(), @@ -115,10 +115,25 @@

See also

dbGetStatement(), dbIsReadOnly(), dbIsValid(), -dbQuoteIdentifier(), dbQuoteLiteral(), -dbQuoteString(), -dbUnquoteIdentifier()

+dbQuoteString()

+

Other DBIResultArrow generics: +DBIResultArrow-class, +dbBind(), +dbClearResult(), +dbFetchArrow(), +dbFetchArrowChunk(), +dbIsValid()

+

Other data retrieval generics: +dbBind(), +dbClearResult(), +dbFetch(), +dbFetchArrow(), +dbFetchArrowChunk(), +dbGetQuery(), +dbGetQueryArrow(), +dbSendQuery(), +dbSendQueryArrow()

@@ -133,15 +148,15 @@

See also

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/reference/dbHasCompleted-DatabaseConnectorJdbcResult-method.html b/docs/reference/dbHasCompleted-DatabaseConnectorJdbcResult-method.html index 656f0d53..7dbd5e9b 100644 --- a/docs/reference/dbHasCompleted-DatabaseConnectorJdbcResult-method.html +++ b/docs/reference/dbHasCompleted-DatabaseConnectorJdbcResult-method.html @@ -1,11 +1,11 @@ -Completion status — dbHasCompleted,DatabaseConnectorJdbcResult-method • DatabaseConnectorCompletion status — dbHasCompleted,DatabaseConnectorJdbcResult-method • DatabaseConnector - +
@@ -30,7 +30,7 @@
- +
@@ -76,25 +76,25 @@

Completion status

-
# S4 method for DatabaseConnectorJdbcResult
+    
# S4 method for class 'DatabaseConnectorJdbcResult'
 dbHasCompleted(res, ...)

Arguments

-
res
-

An object inheriting from DBIResult.

-
...
+
res
+

An object inheriting from DBIResult.

+ + +
...

Other arguments passed on to methods.

Value

- - -

dbHasCompleted() returns a logical scalar. +

dbHasCompleted() returns a logical scalar. For a query initiated by dbSendQuery() with non-empty result set, dbHasCompleted() returns FALSE initially and TRUE after calling dbFetch() without limit. @@ -103,7 +103,7 @@

Value

See also

-

Other DBIResult generics: +

Other DBIResult generics: DBIResult-class, dbBind(), dbClearResult(), @@ -115,10 +115,25 @@

See also

dbGetStatement(), dbIsReadOnly(), dbIsValid(), -dbQuoteIdentifier(), dbQuoteLiteral(), -dbQuoteString(), -dbUnquoteIdentifier()

+dbQuoteString()

+

Other DBIResultArrow generics: +DBIResultArrow-class, +dbBind(), +dbClearResult(), +dbFetchArrow(), +dbFetchArrowChunk(), +dbIsValid()

+

Other data retrieval generics: +dbBind(), +dbClearResult(), +dbFetch(), +dbFetchArrow(), +dbFetchArrowChunk(), +dbGetQuery(), +dbGetQueryArrow(), +dbSendQuery(), +dbSendQueryArrow()

@@ -133,15 +148,15 @@

See also

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/reference/dbIsValid-DatabaseConnectorDbiConnection-method.html b/docs/reference/dbIsValid-DatabaseConnectorDbiConnection-method.html index e96cfde2..7077423b 100644 --- a/docs/reference/dbIsValid-DatabaseConnectorDbiConnection-method.html +++ b/docs/reference/dbIsValid-DatabaseConnectorDbiConnection-method.html @@ -1,10 +1,10 @@ -Is this DBMS object still valid? — dbIsValid,DatabaseConnectorDbiConnection-method • DatabaseConnectorIs this DBMS object still valid? — dbIsValid,DatabaseConnectorDbiConnection-method • DatabaseConnector - +
@@ -29,7 +29,7 @@
- +
@@ -74,37 +74,37 @@

Is this DBMS object still valid?

-
# S4 method for DatabaseConnectorDbiConnection
+    
# S4 method for class 'DatabaseConnectorDbiConnection'
 dbIsValid(dbObj, ...)

Arguments

-
dbObj
-

An object inheriting from DBIObject, -i.e. DBIDriver, DBIConnection, -or a DBIResult

-
...
+
dbObj
+

An object inheriting from DBIObject, +i.e. DBIDriver, DBIConnection, +or a DBIResult

+ + +
...

Other arguments to methods.

Value

- - -

dbIsValid() returns a logical scalar, +

dbIsValid() returns a logical scalar, TRUE if the object specified by dbObj is valid, FALSE otherwise. -A DBIConnection object is initially valid, +A DBIConnection object is initially valid, and becomes invalid after disconnecting with dbDisconnect(). For an invalid connection object (e.g., for some drivers if the object is saved to a file and then restored), the method also returns FALSE. -A DBIResult object is valid after a call to dbSendQuery(), +A DBIResult object is valid after a call to dbSendQuery(), and stays valid even after all rows have been fetched; only clearing it with dbClearResult() invalidates it. -A DBIResult object is also valid after a call to dbSendStatement(), +A DBIResult object is also valid after a call to dbSendStatement(), and stays valid after querying the number of rows affected; only clearing it with dbClearResult() invalidates it. If the connection to the database system is dropped (e.g., due to @@ -113,7 +113,7 @@

Value

See also

-

Other DBIDriver generics: +

Other DBIDriver generics: DBIDriver-class, dbCanConnect(), dbConnect(), @@ -122,10 +122,12 @@

See also

dbGetInfo(), dbIsReadOnly(), dbListConnections()

-

Other DBIConnection generics: +

Other DBIConnection generics: DBIConnection-class, dbAppendTable(), +dbAppendTableArrow(), dbCreateTable(), +dbCreateTableArrow(), dbDataType(), dbDisconnect(), dbExecute(), @@ -133,17 +135,23 @@

See also

dbGetException(), dbGetInfo(), dbGetQuery(), +dbGetQueryArrow(), dbIsReadOnly(), dbListFields(), dbListObjects(), dbListResults(), dbListTables(), +dbQuoteIdentifier(), dbReadTable(), +dbReadTableArrow(), dbRemoveTable(), dbSendQuery(), +dbSendQueryArrow(), dbSendStatement(), -dbWriteTable()

-

Other DBIResult generics: +dbUnquoteIdentifier(), +dbWriteTable(), +dbWriteTableArrow()

+

Other DBIResult generics: DBIResult-class, dbBind(), dbClearResult(), @@ -155,10 +163,15 @@

See also

dbGetStatement(), dbHasCompleted(), dbIsReadOnly(), -dbQuoteIdentifier(), dbQuoteLiteral(), -dbQuoteString(), -dbUnquoteIdentifier()

+dbQuoteString()

+

Other DBIResultArrow generics: +DBIResultArrow-class, +dbBind(), +dbClearResult(), +dbFetchArrow(), +dbFetchArrowChunk(), +dbHasCompleted()

@@ -173,15 +186,15 @@

See also

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/reference/dbIsValid-DatabaseConnectorJdbcConnection-method.html b/docs/reference/dbIsValid-DatabaseConnectorJdbcConnection-method.html index 703afa8a..0c14226d 100644 --- a/docs/reference/dbIsValid-DatabaseConnectorJdbcConnection-method.html +++ b/docs/reference/dbIsValid-DatabaseConnectorJdbcConnection-method.html @@ -1,10 +1,10 @@ -Is this DBMS object still valid? — dbIsValid,DatabaseConnectorJdbcConnection-method • DatabaseConnectorIs this DBMS object still valid? — dbIsValid,DatabaseConnectorJdbcConnection-method • DatabaseConnector - +
@@ -29,7 +29,7 @@
- +
@@ -74,37 +74,37 @@

Is this DBMS object still valid?

-
# S4 method for DatabaseConnectorJdbcConnection
+    
# S4 method for class 'DatabaseConnectorJdbcConnection'
 dbIsValid(dbObj, ...)

Arguments

-
dbObj
-

An object inheriting from DBIObject, -i.e. DBIDriver, DBIConnection, -or a DBIResult

-
...
+
dbObj
+

An object inheriting from DBIObject, +i.e. DBIDriver, DBIConnection, +or a DBIResult

+ + +
...

Other arguments to methods.

Value

- - -

dbIsValid() returns a logical scalar, +

dbIsValid() returns a logical scalar, TRUE if the object specified by dbObj is valid, FALSE otherwise. -A DBIConnection object is initially valid, +A DBIConnection object is initially valid, and becomes invalid after disconnecting with dbDisconnect(). For an invalid connection object (e.g., for some drivers if the object is saved to a file and then restored), the method also returns FALSE. -A DBIResult object is valid after a call to dbSendQuery(), +A DBIResult object is valid after a call to dbSendQuery(), and stays valid even after all rows have been fetched; only clearing it with dbClearResult() invalidates it. -A DBIResult object is also valid after a call to dbSendStatement(), +A DBIResult object is also valid after a call to dbSendStatement(), and stays valid after querying the number of rows affected; only clearing it with dbClearResult() invalidates it. If the connection to the database system is dropped (e.g., due to @@ -113,7 +113,7 @@

Value

See also

-

Other DBIDriver generics: +

Other DBIDriver generics: DBIDriver-class, dbCanConnect(), dbConnect(), @@ -122,10 +122,12 @@

See also

dbGetInfo(), dbIsReadOnly(), dbListConnections()

-

Other DBIConnection generics: +

Other DBIConnection generics: DBIConnection-class, dbAppendTable(), +dbAppendTableArrow(), dbCreateTable(), +dbCreateTableArrow(), dbDataType(), dbDisconnect(), dbExecute(), @@ -133,17 +135,23 @@

See also

dbGetException(), dbGetInfo(), dbGetQuery(), +dbGetQueryArrow(), dbIsReadOnly(), dbListFields(), dbListObjects(), dbListResults(), dbListTables(), +dbQuoteIdentifier(), dbReadTable(), +dbReadTableArrow(), dbRemoveTable(), dbSendQuery(), +dbSendQueryArrow(), dbSendStatement(), -dbWriteTable()

-

Other DBIResult generics: +dbUnquoteIdentifier(), +dbWriteTable(), +dbWriteTableArrow()

+

Other DBIResult generics: DBIResult-class, dbBind(), dbClearResult(), @@ -155,10 +163,15 @@

See also

dbGetStatement(), dbHasCompleted(), dbIsReadOnly(), -dbQuoteIdentifier(), dbQuoteLiteral(), -dbQuoteString(), -dbUnquoteIdentifier()

+dbQuoteString()

+

Other DBIResultArrow generics: +DBIResultArrow-class, +dbBind(), +dbClearResult(), +dbFetchArrow(), +dbFetchArrowChunk(), +dbHasCompleted()

@@ -173,15 +186,15 @@

See also

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/reference/dbListFields-DatabaseConnectorConnection-character-method.html b/docs/reference/dbListFields-DatabaseConnectorConnection-character-method.html index d1e55f04..2f694cc5 100644 --- a/docs/reference/dbListFields-DatabaseConnectorConnection-character-method.html +++ b/docs/reference/dbListFields-DatabaseConnectorConnection-character-method.html @@ -1,9 +1,9 @@ -List field names of a remote table — dbListFields,DatabaseConnectorConnection,character-method • DatabaseConnectorList field names of a remote table — dbListFields,DatabaseConnectorConnection,character-method • DatabaseConnector - +
@@ -28,7 +28,7 @@
- +
@@ -72,18 +72,20 @@

List field names of a remote table

-
# S4 method for DatabaseConnectorConnection,character
+    
# S4 method for class 'DatabaseConnectorConnection,character'
 dbListFields(conn, name, databaseSchema = NULL, ...)

Arguments

-
conn
-

A DBIConnection object, as returned by + + +

conn
+

A DBIConnection object, as returned by dbConnect().

-
name
+
name

The table name, passed on to dbQuoteIdentifier(). Options are:

  • a character string with the unquoted DBMS table name, e.g. "table_name",

  • a call to Id() with components to the fully qualified table name, @@ -93,22 +95,18 @@

    Arguments

-
databaseSchema
+
databaseSchema

The name of the database schema. See details for platform-specific details.

-
...
+
...

Other parameters passed on to methods.

Value

- - -

dbListFields()

- - -

returns a character vector +

dbListFields() +returns a character vector that enumerates all fields in the table in the correct order. This also works for temporary tables if supported by the database. @@ -125,10 +123,12 @@

Details

@@ -160,15 +166,15 @@

See also

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/reference/dbListTables-DatabaseConnectorConnection-method.html b/docs/reference/dbListTables-DatabaseConnectorConnection-method.html index e7acd7eb..b0f9ea5f 100644 --- a/docs/reference/dbListTables-DatabaseConnectorConnection-method.html +++ b/docs/reference/dbListTables-DatabaseConnectorConnection-method.html @@ -1,12 +1,12 @@ -List remote tables — dbListTables,DatabaseConnectorConnection-method • DatabaseConnectorList remote tables — dbListTables,DatabaseConnectorConnection-method • DatabaseConnector - +
@@ -31,7 +31,7 @@
- +
@@ -78,47 +78,39 @@

List remote tables

-
# S4 method for DatabaseConnectorConnection
+    
# S4 method for class 'DatabaseConnectorConnection'
 dbListTables(conn, databaseSchema = NULL, ...)

Arguments

-
conn
-

A DBIConnection object, as returned by + + +

conn
+

A DBIConnection object, as returned by dbConnect().

-
databaseSchema
+
databaseSchema

The name of the database schema. See details for platform-specific details.

-
...
+
...

Not used

Value

- - -

dbListTables()

- - -

returns a character vector +

dbListTables() +returns a character vector that enumerates all tables and views in the database. -Tables added with dbWriteTable()

- - -

are part of the list. +Tables added with dbWriteTable() are +part of the list. As soon a table is removed from the database, it is also removed from the list of database tables.

- -

The same applies to temporary tables if supported by the database.

- -

The returned names are suitable for quoting with dbQuoteIdentifier().

@@ -131,10 +123,12 @@

Details

@@ -166,15 +166,15 @@

See also

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/reference/dbReadTable-DatabaseConnectorConnection-character-method.html b/docs/reference/dbReadTable-DatabaseConnectorConnection-character-method.html index 1845198c..b6a9877d 100644 --- a/docs/reference/dbReadTable-DatabaseConnectorConnection-character-method.html +++ b/docs/reference/dbReadTable-DatabaseConnectorConnection-character-method.html @@ -1,11 +1,12 @@ -Copy data frames from database tables — dbReadTable,DatabaseConnectorConnection,character-method • DatabaseConnectorRead database tables as data frames — dbReadTable,DatabaseConnectorConnection,character-method • DatabaseConnector - +
@@ -30,7 +31,7 @@
- +
@@ -72,11 +73,12 @@

Copy data frames from database tables

Reads a database table to a data frame, optionally converting a column to row names and converting the column names to valid -R identifiers.

+R identifiers. +Use dbReadTableArrow() instead to obtain an Arrow object.

-
# S4 method for DatabaseConnectorConnection,character
+    
# S4 method for class 'DatabaseConnectorConnection,character'
 dbReadTable(
   conn,
   name,
@@ -89,12 +91,14 @@ 

Copy data frames from database tables

Arguments

-
conn
-

A DBIConnection object, as returned by + + +

conn
+

A DBIConnection object, as returned by dbConnect().

-
name
+
name

The table name, passed on to dbQuoteIdentifier(). Options are:

  • a character string with the unquoted DBMS table name, e.g. "table_name",

  • a call to Id() with components to the fully qualified table name, @@ -104,38 +108,30 @@

    Arguments

-
databaseSchema
+
databaseSchema

The name of the database schema. See details for platform-specific details.

-
oracleTempSchema
+
oracleTempSchema

DEPRECATED: use tempEmulationSchema instead.

-
tempEmulationSchema
+
tempEmulationSchema

Some database platforms like Oracle and Impala do not truly support temp tables. To emulate temp tables, provide a schema with write privileges where temp tables can be created.

-
...
+
...

Other parameters passed on to methods.

Value

- - -

dbReadTable() returns a data frame that contains the complete data -from the remote table, effectively the result of calling dbGetQuery()

- - -

with SELECT * FROM <name>.

- - +

dbReadTable() returns a data frame that contains the complete data +from the remote table, effectively the result of calling dbGetQuery() with +SELECT * FROM <name>.

An empty table is returned as a data frame with zero rows.

- -

The presence of rownames depends on the row.names argument, see sqlColumnToRownames() for details:

  • If FALSE or NULL, the returned data frame doesn't have row names.

  • If TRUE, a column named "row_names" is converted to row names.

  • @@ -144,8 +140,6 @@

    Value

  • If a string, this specifies the name of the column in the remote table that contains the row names.

The default is row.names = FALSE.

- -

If the database supports identifiers with special characters, the columns in the returned data frame are converted to valid R identifiers @@ -162,10 +156,12 @@

Details

@@ -197,15 +199,15 @@

See also

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/reference/dbRemoveTable-DatabaseConnectorConnection-ANY-method.html b/docs/reference/dbRemoveTable-DatabaseConnectorConnection-ANY-method.html index 137271ba..c9a19eb4 100644 --- a/docs/reference/dbRemoveTable-DatabaseConnectorConnection-ANY-method.html +++ b/docs/reference/dbRemoveTable-DatabaseConnectorConnection-ANY-method.html @@ -1,10 +1,10 @@ -Remove a table from the database — dbRemoveTable,DatabaseConnectorConnection,ANY-method • DatabaseConnectorRemove a table from the database — dbRemoveTable,DatabaseConnectorConnection,ANY-method • DatabaseConnector - +
@@ -29,7 +29,7 @@
- +
@@ -74,7 +74,7 @@

Remove a table from the database

-
# S4 method for DatabaseConnectorConnection,ANY
+    
# S4 method for class 'DatabaseConnectorConnection,ANY'
 dbRemoveTable(
   conn,
   name,
@@ -87,12 +87,14 @@ 

Remove a table from the database

Arguments

-
conn
-

A DBIConnection object, as returned by + + +

conn
+

A DBIConnection object, as returned by dbConnect().

-
name
+
name

The table name, passed on to dbQuoteIdentifier(). Options are:

  • a character string with the unquoted DBMS table name, e.g. "table_name",

  • a call to Id() with components to the fully qualified table name, @@ -102,29 +104,27 @@

    Arguments

-
databaseSchema
+
databaseSchema

The name of the database schema. See details for platform-specific details.

-
oracleTempSchema
+
oracleTempSchema

DEPRECATED: use tempEmulationSchema instead.

-
tempEmulationSchema
+
tempEmulationSchema

Some database platforms like Oracle and Impala do not truly support temp tables. To emulate temp tables, provide a schema with write privileges where temp tables can be created.

-
...
+
...

Other parameters passed on to methods.

Value

- - -

dbRemoveTable() returns TRUE, invisibly.

+

dbRemoveTable() returns TRUE, invisibly.

Details

@@ -136,10 +136,12 @@

Details

@@ -171,15 +179,15 @@

See also

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/reference/dbSendQuery-DatabaseConnectorDbiConnection-character-method.html b/docs/reference/dbSendQuery-DatabaseConnectorDbiConnection-character-method.html index 52d908b4..91feba99 100644 --- a/docs/reference/dbSendQuery-DatabaseConnectorDbiConnection-character-method.html +++ b/docs/reference/dbSendQuery-DatabaseConnectorDbiConnection-character-method.html @@ -1,14 +1,16 @@ -Execute a query on a given database connection — dbSendQuery,DatabaseConnectorDbiConnection,character-method • DatabaseConnectorExecute a query on a given database connection — dbSendQuery,DatabaseConnectorDbiConnection,character-method • DatabaseConnector - +
@@ -33,7 +35,7 @@
- +
@@ -75,42 +77,44 @@

Execute a query on a given database connection

The dbSendQuery() method only submits and synchronously executes the SQL query to the database engine. It does not extract any -records --- for that you need to use the dbFetch() method, and +records — for that you need to use the dbFetch() method, and then you must call dbClearResult() when you finish fetching the -records you need. For interactive use, you should almost always prefer -dbGetQuery().

+records you need. +For interactive use, you should almost always prefer dbGetQuery(). +Use dbSendQueryArrow() or dbGetQueryArrow() instead to retrieve the results +as an Arrow object.

-
# S4 method for DatabaseConnectorDbiConnection,character
+    
# S4 method for class 'DatabaseConnectorDbiConnection,character'
 dbSendQuery(conn, statement, translate = TRUE, ...)

Arguments

-
conn
-

A DBIConnection object, as returned by + + +

conn
+

A DBIConnection object, as returned by dbConnect().

-
statement
+
statement

a character string containing SQL.

-
translate
+
translate

Translate the query using SqlRender?

-
...
+
...

Other parameters passed on to methods.

Value

- - -

dbSendQuery() returns -an S4 object that inherits from DBIResult. +

dbSendQuery() returns +an S4 object that inherits from DBIResult. The result set can be used with dbFetch() to extract records. Once you have finished using a result, make sure to clear it with dbClearResult().

@@ -125,16 +129,18 @@

Details

possibly generating vast amounts of data. Where these data live is driver-specific: some drivers may choose to leave the output on the server and transfer them piecemeal to R, others may transfer all the data to the -client -- but not necessarily to the memory that R manages. See individual +client – but not necessarily to the memory that R manages. See individual drivers' dbSendQuery() documentation for details.

@@ -166,15 +188,15 @@

See also

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/reference/dbSendQuery-DatabaseConnectorJdbcConnection-character-method.html b/docs/reference/dbSendQuery-DatabaseConnectorJdbcConnection-character-method.html index 090b90f9..617dfaba 100644 --- a/docs/reference/dbSendQuery-DatabaseConnectorJdbcConnection-character-method.html +++ b/docs/reference/dbSendQuery-DatabaseConnectorJdbcConnection-character-method.html @@ -1,14 +1,16 @@ -Execute a query on a given database connection — dbSendQuery,DatabaseConnectorJdbcConnection,character-method • DatabaseConnectorExecute a query on a given database connection — dbSendQuery,DatabaseConnectorJdbcConnection,character-method • DatabaseConnector - +
@@ -33,7 +35,7 @@
- +
@@ -75,42 +77,44 @@

Execute a query on a given database connection

The dbSendQuery() method only submits and synchronously executes the SQL query to the database engine. It does not extract any -records --- for that you need to use the dbFetch() method, and +records — for that you need to use the dbFetch() method, and then you must call dbClearResult() when you finish fetching the -records you need. For interactive use, you should almost always prefer -dbGetQuery().

+records you need. +For interactive use, you should almost always prefer dbGetQuery(). +Use dbSendQueryArrow() or dbGetQueryArrow() instead to retrieve the results +as an Arrow object.

-
# S4 method for DatabaseConnectorJdbcConnection,character
+    
# S4 method for class 'DatabaseConnectorJdbcConnection,character'
 dbSendQuery(conn, statement, translate = TRUE, ...)

Arguments

-
conn
-

A DBIConnection object, as returned by + + +

conn
+

A DBIConnection object, as returned by dbConnect().

-
statement
+
statement

a character string containing SQL.

-
translate
+
translate

Translate the query using SqlRender?

-
...
+
...

Other parameters passed on to methods.

Value

- - -

dbSendQuery() returns -an S4 object that inherits from DBIResult. +

dbSendQuery() returns +an S4 object that inherits from DBIResult. The result set can be used with dbFetch() to extract records. Once you have finished using a result, make sure to clear it with dbClearResult().

@@ -125,16 +129,18 @@

Details

possibly generating vast amounts of data. Where these data live is driver-specific: some drivers may choose to leave the output on the server and transfer them piecemeal to R, others may transfer all the data to the -client -- but not necessarily to the memory that R manages. See individual +client – but not necessarily to the memory that R manages. See individual drivers' dbSendQuery() documentation for details.

@@ -166,15 +188,15 @@

See also

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/reference/dbSendStatement-DatabaseConnectorConnection-character-method.html b/docs/reference/dbSendStatement-DatabaseConnectorConnection-character-method.html index fa125321..3e48966a 100644 --- a/docs/reference/dbSendStatement-DatabaseConnectorConnection-character-method.html +++ b/docs/reference/dbSendStatement-DatabaseConnectorConnection-character-method.html @@ -1,5 +1,5 @@ -Execute a data manipulation statement on a given database connection — dbSendStatement,DatabaseConnectorConnection,character-method • DatabaseConnectorExecute a data manipulation statement on a given database connection — dbSendStatement,DatabaseConnectorConnection,character-method • DatabaseConnector - +
@@ -34,7 +34,7 @@
- +
@@ -84,35 +84,35 @@

Execute a data manipulation statement on a given database connection

-
# S4 method for DatabaseConnectorConnection,character
+    
# S4 method for class 'DatabaseConnectorConnection,character'
 dbSendStatement(conn, statement, translate = TRUE, ...)

Arguments

-
conn
-

A DBIConnection object, as returned by + + +

conn
+

A DBIConnection object, as returned by dbConnect().

-
statement
+
statement

a character string containing SQL.

-
translate
+
translate

Translate the query using SqlRender?

-
...
+
...

Other parameters passed on to methods.

Value

- - -

dbSendStatement() returns -an S4 object that inherits from DBIResult. +

dbSendStatement() returns +an S4 object that inherits from DBIResult. The result set can be used with dbGetRowsAffected() to determine the number of rows affected by the query. Once you have finished using a result, make sure to clear it @@ -127,10 +127,12 @@

Details

@@ -162,15 +175,15 @@

See also

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/reference/dbUnloadDriver-DatabaseConnectorDriver-method.html b/docs/reference/dbUnloadDriver-DatabaseConnectorDriver-method.html index 3d0bc633..07683fa8 100644 --- a/docs/reference/dbUnloadDriver-DatabaseConnectorDriver-method.html +++ b/docs/reference/dbUnloadDriver-DatabaseConnectorDriver-method.html @@ -1,5 +1,5 @@ -Load and unload database drivers — dbUnloadDriver,DatabaseConnectorDriver-method • DatabaseConnectorLoad and unload database drivers — dbUnloadDriver,DatabaseConnectorDriver-method • DatabaseConnector - +
@@ -36,7 +36,7 @@
- +
@@ -88,30 +88,28 @@

Load and unload database drivers

-
# S4 method for DatabaseConnectorDriver
+    
# S4 method for class 'DatabaseConnectorDriver'
 dbUnloadDriver(drv, ...)

Arguments

-
drv
+ + +
drv

an object that inherits from DBIDriver as created by dbDriver.

-
...
+
...

any other arguments are passed to the driver drvName.

Value

- - -

In the case of dbDriver, an driver object whose class extends +

In the case of dbDriver, an driver object whose class extends DBIDriver. This object may be used to create connections to the actual DBMS engine.

- -

In the case of dbUnloadDriver, a logical indicating whether the operation succeeded or not.

@@ -124,7 +122,7 @@

Details

See also

-

Other DBIDriver generics: +

Other DBIDriver generics: DBIDriver-class, dbCanConnect(), dbConnect(), @@ -133,7 +131,7 @@

See also

dbIsReadOnly(), dbIsValid(), dbListConnections()

-

Other DBIDriver generics: +

Other DBIDriver generics: DBIDriver-class, dbCanConnect(), dbConnect(), @@ -156,15 +154,15 @@

See also

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/reference/dbWriteTable-DatabaseConnectorConnection-ANY-method.html b/docs/reference/dbWriteTable-DatabaseConnectorConnection-ANY-method.html index 75c57854..baf85be8 100644 --- a/docs/reference/dbWriteTable-DatabaseConnectorConnection-ANY-method.html +++ b/docs/reference/dbWriteTable-DatabaseConnectorConnection-ANY-method.html @@ -1,10 +1,10 @@ -Copy data frames to database tables — dbWriteTable,DatabaseConnectorConnection,ANY-method • DatabaseConnectorCopy data frames to database tables — dbWriteTable,DatabaseConnectorConnection,ANY-method • DatabaseConnector - +
@@ -29,7 +29,7 @@
- +
@@ -74,7 +74,7 @@

Copy data frames to database tables

-
# S4 method for DatabaseConnectorConnection,ANY
+    
# S4 method for class 'DatabaseConnectorConnection,ANY'
 dbWriteTable(
   conn,
   name,
@@ -91,12 +91,14 @@ 

Copy data frames to database tables

Arguments

-
conn
-

A DBIConnection object, as returned by + + +

conn
+

A DBIConnection object, as returned by dbConnect().

-
name
+
name

The table name, passed on to dbQuoteIdentifier(). Options are:

  • a character string with the unquoted DBMS table name, e.g. "table_name",

  • a call to Id() with components to the fully qualified table name, @@ -106,45 +108,43 @@

    Arguments

-
value
-

a data.frame (or coercible to data.frame).

+
value
+

A data.frame (or coercible to data.frame).

-
databaseSchema
+
databaseSchema

The name of the database schema. See details for platform-specific details.

-
overwrite
+
overwrite

Overwrite an existing table (if exists)?

-
append
+
append

Append to existing table?

-
temporary
+
temporary

Should the table created as a temp table?

-
oracleTempSchema
+
oracleTempSchema

DEPRECATED: use tempEmulationSchema instead.

-
tempEmulationSchema
+
tempEmulationSchema

Some database platforms like Oracle and Impala do not truly support temp tables. To emulate temp tables, provide a schema with write privileges where temp tables can be created.

-
...
+
...

Other parameters passed on to methods.

Value

- - -

dbWriteTable() returns TRUE, invisibly.

+

dbWriteTable() returns TRUE, invisibly.

Details

@@ -156,10 +156,12 @@

Details

@@ -191,15 +199,15 @@

See also

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/reference/dbms.html b/docs/reference/dbms.html index d30c8f77..98b2cac8 100644 --- a/docs/reference/dbms.html +++ b/docs/reference/dbms.html @@ -1,12 +1,12 @@ -Get the database platform from a connection — dbms • DatabaseConnectorGet the database platform from a connection — dbms • DatabaseConnector - +
@@ -31,7 +31,7 @@
- +
@@ -83,16 +83,16 @@

Get the database platform from a connection

Arguments

-
connection
+ + +
connection

The connection to the database server created using either -connect() or dbConnect().

+connect() or DBI::dbConnect().

Value

- - -

The name of the database (dbms) used by SqlRender

+

The name of the database (dbms) used by SqlRender

@@ -123,15 +123,15 @@

Examples

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/reference/disconnect.html b/docs/reference/disconnect.html index 71f72f87..a54e548b 100644 --- a/docs/reference/disconnect.html +++ b/docs/reference/disconnect.html @@ -1,9 +1,9 @@ -Disconnect from the server — disconnect • DatabaseConnectorDisconnect from the server — disconnect • DatabaseConnector - +
@@ -28,7 +28,7 @@
- +
@@ -77,15 +77,17 @@

Disconnect from the server

Arguments

-
connection
+ + +
connection

The connection to the database server created using either -connect() or dbConnect().

+connect() or DBI::dbConnect().

Examples

-
if (FALSE) {
+    
if (FALSE) { # \dontrun{
 connectionDetails <- createConnectionDetails(
   dbms = "postgresql",
   server = "localhost",
@@ -95,7 +97,7 @@ 

Examples

conn <- connect(connectionDetails) count <- querySql(conn, "SELECT COUNT(*) FROM person") disconnect(conn) -} +} # }
@@ -110,15 +112,15 @@

Examples

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/reference/downloadJdbcDrivers.html b/docs/reference/downloadJdbcDrivers.html index ee6ab9a5..15eb63eb 100644 --- a/docs/reference/downloadJdbcDrivers.html +++ b/docs/reference/downloadJdbcDrivers.html @@ -1,9 +1,9 @@ -Download DatabaseConnector JDBC Jar files — downloadJdbcDrivers • DatabaseConnectorDownload DatabaseConnector JDBC Jar files — downloadJdbcDrivers • DatabaseConnector - +
@@ -28,7 +28,7 @@
- +
@@ -82,7 +82,9 @@

Download DatabaseConnector JDBC Jar files

Arguments

-
dbms
+ + +
dbms

The type of DBMS to download Jar files for.

  • "postgresql" for PostgreSQL

  • "redshift" for Amazon Redshift

  • "sql server", "pdw" or "synapse" for Microsoft SQL Server

  • @@ -94,41 +96,39 @@

    Arguments

-
pathToDriver
+
pathToDriver

The full path to the folder where the JDBC driver .jar files should be downloaded to. By default the value of the environment variable "DATABASECONNECTOR_JAR_FOLDER" is used.

-
method
+
method

The method used for downloading files. See ?download.file for details and options.

-
...
+
...

Further arguments passed on to download.file.

Value

- - -

Invisibly returns the destination if the download was successful.

+

Invisibly returns the destination if the download was successful.

Details

-

The following versions of the JDBC drivers are currently used:

  • PostgreSQL: V42.2.18

  • +

    The following versions of the JDBC drivers are currently used:

    • PostgreSQL: V42.7.3

    • RedShift: V2.1.0.9

    • SQL Server: V9.2.0

    • Oracle: V19.8

    • -
    • Spark: V2.6.21

    • -
    • Snowflake: V3.13.22

    • +
    • Spark (Databricks): V2.6.36

    • +
    • Snowflake: V3.16.01

    • BigQuery: v1.3.2.1003

Examples

-
if (FALSE) {
+    
if (FALSE) { # \dontrun{
 downloadJdbcDrivers("redshift")
-}
+} # }
 
@@ -143,15 +143,15 @@

Examples

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/reference/dropEmulatedTempTables.html b/docs/reference/dropEmulatedTempTables.html index c693bead..132832fa 100644 --- a/docs/reference/dropEmulatedTempTables.html +++ b/docs/reference/dropEmulatedTempTables.html @@ -1,12 +1,12 @@ -Drop all emulated temp tables. — dropEmulatedTempTables • DatabaseConnectorDrop all emulated temp tables. — dropEmulatedTempTables • DatabaseConnector - +
@@ -31,7 +31,7 @@
- +
@@ -86,12 +86,14 @@

Drop all emulated temp tables.

Arguments

-
connection
+ + +
connection

The connection to the database server created using either -connect() or dbConnect().

+connect() or DBI::dbConnect().

-
tempEmulationSchema
+
tempEmulationSchema

Some database platforms like Oracle and Impala do not truly support temp tables. To emulate temp tables, provide a schema with write privileges where temp tables can be created.

@@ -99,9 +101,7 @@

Arguments

Value

- - -

Invisibly returns the list of deleted emulated temp tables.

+

Invisibly returns the list of deleted emulated temp tables.

@@ -116,15 +116,15 @@

Value

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/reference/eoMonth.html b/docs/reference/eoMonth.html index 6c8f55c4..73fd02ad 100644 --- a/docs/reference/eoMonth.html +++ b/docs/reference/eoMonth.html @@ -1,10 +1,10 @@ -Return the end of the month — eoMonth • DatabaseConnectorReturn the end of the month — eoMonth • DatabaseConnector - +
@@ -29,7 +29,7 @@
- +
@@ -79,15 +79,15 @@

Return the end of the month

Arguments

-
date
+ + +
date

A date in the month for which we need the end.

Value

- - -

The date of the last day of the month.

+

The date of the last day of the month.

@@ -109,15 +109,15 @@

Examples

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/reference/executeSql.html b/docs/reference/executeSql.html index 9d5ba5af..092ea994 100644 --- a/docs/reference/executeSql.html +++ b/docs/reference/executeSql.html @@ -1,9 +1,9 @@ -Execute SQL code — executeSql • DatabaseConnectorExecute SQL code — executeSql • DatabaseConnector - +
@@ -28,7 +28,7 @@
- +
@@ -85,36 +85,38 @@

Execute SQL code

Arguments

-
connection
+ + +
connection

The connection to the database server created using either -connect() or dbConnect().

+connect() or DBI::dbConnect().

-
sql
+
sql

The SQL to be executed

-
profile
+
profile

When true, each separate statement is written to file prior to sending to the server, and the time taken to execute a statement is displayed.

-
progressBar
+
progressBar

When true, a progress bar is shown based on the statements in the SQL code.

-
reportOverallTime
+
reportOverallTime

When true, the function will display the overall time taken to execute all statements.

-
errorReportFile
+
errorReportFile

The file where an error report will be written if an error occurs. Defaults to 'errorReportSql.txt' in the current working directory.

-
runAsBatch
+
runAsBatch

When true the SQL statements are sent to the server as a single batch, and executed there. This will be faster if you have many small SQL statements, but there will be no progress bar, and no per-statement error messages. If the @@ -133,7 +135,7 @@

Details

Examples

-
if (FALSE) {
+    
if (FALSE) { # \dontrun{
 connectionDetails <- createConnectionDetails(
   dbms = "postgresql",
   server = "localhost",
@@ -144,7 +146,7 @@ 

Examples

conn <- connect(connectionDetails) executeSql(conn, "CREATE TABLE x (k INT); CREATE TABLE y (k INT);") disconnect(conn) -} +} # }
@@ -159,15 +161,15 @@

Examples

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/reference/existsTable.html b/docs/reference/existsTable.html index 5cbe63c0..c1f57cc8 100644 --- a/docs/reference/existsTable.html +++ b/docs/reference/existsTable.html @@ -1,10 +1,10 @@ -Does the table exist? — existsTable • DatabaseConnectorDoes the table exist? — existsTable • DatabaseConnector - +
@@ -29,7 +29,7 @@
- +
@@ -79,24 +79,24 @@

Does the table exist?

Arguments

-
connection
+ + +
connection

The connection to the database server created using either -connect() or dbConnect().

+connect() or DBI::dbConnect().

-
databaseSchema
+
databaseSchema

The name of the database schema. See details for platform-specific details.

-
tableName
+
tableName

The name of the table to check.

Value

- - -

A logical value indicating whether the table exits.

+

A logical value indicating whether the table exits.

Details

@@ -119,15 +119,15 @@

Details

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/reference/extractQueryTimes.html b/docs/reference/extractQueryTimes.html index bf1326d4..abb41dc0 100644 --- a/docs/reference/extractQueryTimes.html +++ b/docs/reference/extractQueryTimes.html @@ -1,11 +1,11 @@ -Extract query times from a ParallelLogger log file — extractQueryTimes • DatabaseConnectorExtract query times from a ParallelLogger log file — extractQueryTimes • DatabaseConnector - +
@@ -30,7 +30,7 @@
- +
@@ -81,16 +81,16 @@

Extract query times from a ParallelLogger log file

Arguments

-
logFileName
+ + +
logFileName

Name of the ParallelLogger log file. Assumes the file was created using the default file logger.

Value

- - -

A data frame with queries and their run times in milliseconds.

+

A data frame with queries and their run times in milliseconds.

@@ -105,15 +105,15 @@

Examples

executeSql(connection, "CREATE TABLE test (x INT);") #> | | | 0% | |======================================================================| 100% -#> Executing SQL took 0.0121 secs +#> Executing SQL took 0.00391 secs querySql(connection, "SELECT * FROM test;") #> [1] X #> <0 rows> (or 0-length row.names) extractQueryTimes(logFile) #> query startTime milliseconds thread -#> 1 CREATE TABLE test (x INT) 2023-12-11 12:09:22 1 Main thread -#> 2 SELECT * FROM test 2023-12-11 12:09:22 1 Main thread +#> 1 CREATE TABLE test (x INT) 2025-01-15 06:59:37 0 Main thread +#> 2 SELECT * FROM test 2025-01-15 06:59:37 0 Main thread ParallelLogger::unregisterLogger("MY_LOGGER") #> [1] TRUE @@ -134,15 +134,15 @@

Examples

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/reference/getAvailableJavaHeapSpace.html b/docs/reference/getAvailableJavaHeapSpace.html index b315e12c..3c1e2993 100644 --- a/docs/reference/getAvailableJavaHeapSpace.html +++ b/docs/reference/getAvailableJavaHeapSpace.html @@ -1,9 +1,9 @@ -Get available Java heap space — getAvailableJavaHeapSpace • DatabaseConnectorGet available Java heap space — getAvailableJavaHeapSpace • DatabaseConnector - +
@@ -28,7 +28,7 @@
- +
@@ -77,9 +77,7 @@

Get available Java heap space

Value

- - -

The Java heap space (in bytes).

+

The Java heap space (in bytes).

@@ -94,15 +92,15 @@

Value

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/reference/getTableNames.html b/docs/reference/getTableNames.html index 1b581af8..444cf9b0 100644 --- a/docs/reference/getTableNames.html +++ b/docs/reference/getTableNames.html @@ -1,9 +1,9 @@ -List all tables in a database schema. — getTableNames • DatabaseConnectorList all tables in a database schema. — getTableNames • DatabaseConnector - +
@@ -28,7 +28,7 @@
- +
@@ -77,25 +77,25 @@

List all tables in a database schema.

Arguments

-
connection
+ + +
connection

The connection to the database server created using either -connect() or dbConnect().

+connect() or DBI::dbConnect().

-
databaseSchema
+
databaseSchema

The name of the database schema. See details for platform-specific details.

-
cast
+
cast

Should the table names be cast to uppercase or lowercase before being returned? Valid options are "upper" , "lower" (default), "none" (no casting is done)

Value

- - -

A character vector of table names.

+

A character vector of table names.

Details

@@ -118,15 +118,15 @@

Details

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/reference/inDatabaseSchema.html b/docs/reference/inDatabaseSchema.html index 7c0b9115..012a3f32 100644 --- a/docs/reference/inDatabaseSchema.html +++ b/docs/reference/inDatabaseSchema.html @@ -1,9 +1,9 @@ -Refer to a table in a database schema — inDatabaseSchema • DatabaseConnectorRefer to a table in a database schema — inDatabaseSchema • DatabaseConnector - +
@@ -28,7 +28,7 @@
- +
@@ -77,19 +77,19 @@

Refer to a table in a database schema

Arguments

-
databaseSchema
+ + +
databaseSchema

The name of the database schema. See details for platform-specific details.

-
table
+
table

The name of the table in the database schema.

Value

- - -

An object representing the table and database schema.

+

An object representing the table and database schema.

Details

@@ -112,15 +112,15 @@

Details

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/reference/index.html b/docs/reference/index.html index e4ad056e..e9ca44ea 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -1,9 +1,9 @@ -Function reference • DatabaseConnectorPackage index • DatabaseConnector - +
@@ -28,7 +28,7 @@
- +
@@ -148,7 +148,7 @@

All functions

dbExecute(<DatabaseConnectorConnection>,<character>)

-

Execute an update statement, query number of rows affected, and then close result set

+

Change database state

dbExistsTable(<DatabaseConnectorConnection>,<character>)

@@ -172,7 +172,7 @@

All functions

dbGetQuery(<DatabaseConnectorConnection>,<character>)

-

Send query, retrieve results and then clear result set

+

Retrieve results from a query

dbGetRowCount(<DatabaseConnectorDbiResult>)

@@ -224,7 +224,7 @@

All functions

dbReadTable(<DatabaseConnectorConnection>,<character>)

-

Copy data frames from database tables

+

Read database tables as data frames

dbRemoveTable(<DatabaseConnectorConnection>,<ANY>)

@@ -366,15 +366,15 @@

All functions
-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/reference/insertTable.html b/docs/reference/insertTable.html index 07defec8..51939e32 100644 --- a/docs/reference/insertTable.html +++ b/docs/reference/insertTable.html @@ -1,10 +1,10 @@ -Insert a table on the server — insertTable • DatabaseConnectorInsert a table on the server — insertTable • DatabaseConnector - +
@@ -29,7 +29,7 @@
- +
@@ -93,60 +93,62 @@

Insert a table on the server

Arguments

-
connection
+ + +
connection

The connection to the database server created using either -connect() or dbConnect().

+connect() or DBI::dbConnect().

-
databaseSchema
+
databaseSchema

The name of the database schema. See details for platform-specific details.

-
tableName
+
tableName

The name of the table where the data should be inserted.

-
data
+
data

The data frame containing the data to be inserted.

-
dropTableIfExists
+
dropTableIfExists

Drop the table if the table already exists before writing?

-
createTable
+
createTable

Create a new table? If false, will append to existing table.

-
tempTable
+
tempTable

Should the table created as a temp table?

-
oracleTempSchema
+
oracleTempSchema

DEPRECATED: use tempEmulationSchema instead.

-
tempEmulationSchema
+
tempEmulationSchema

Some database platforms like Oracle and Impala do not truly support temp tables. To emulate temp tables, provide a schema with write privileges where temp tables can be created.

-
bulkLoad
+
bulkLoad

If using Redshift, PDW, Hive or Postgres, use more performant bulk loading techniques. Does not work for temp tables (except for HIVE). See Details for requirements for the various platforms.

-
useMppBulkLoad
+
useMppBulkLoad

DEPRECATED. Use bulkLoad instead.

-
progressBar
+
progressBar

Show a progress bar when uploading?

-
camelCaseToSnakeCase
+
camelCaseToSnakeCase

If TRUE, the data frame column names are assumed to use camelCase and are converted to snake_case before uploading.

@@ -169,9 +171,9 @@

Details

"some_aws_region", "AWS_BUCKET_NAME" = "some_bucket_name", "AWS_OBJECT_KEY" = "some_object_key", "AWS_SSE_TYPE" = "server_side_encryption_type").

PDW: The MPP bulk loading relies upon the client -having a Windows OS and the DWLoader exe installed, and the following permissions granted: --Grant +having a Windows OS and the DWLoader exe installed, and the following permissions granted: –Grant BULK Load permissions - needed at a server level USE master; GRANT ADMINISTER BULK OPERATIONS TO -user; --Grant Staging database permissions - we will use the user db. USE scratch; EXEC +user; –Grant Staging database permissions - we will use the user db. USE scratch; EXEC sp_addrolemember 'db_ddladmin', user; Set the R environment variable DWLOADER_PATH to the location of the binary.

PostgreSQL: @@ -182,7 +184,7 @@

Details

Examples

-
if (FALSE) {
+    
if (FALSE) { # \dontrun{
 connectionDetails <- createConnectionDetails(
   dbms = "mysql",
   server = "localhost",
@@ -214,7 +216,7 @@ 

Examples

tempTable = FALSE, bulkLoad = TRUE ) # or, Sys.setenv("DATABASE_CONNECTOR_BULK_UPLOAD" = TRUE) -} +} # }
@@ -229,15 +231,15 @@

Examples

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/reference/isSqlReservedWord.html b/docs/reference/isSqlReservedWord.html index a2b4583c..3fb36a16 100644 --- a/docs/reference/isSqlReservedWord.html +++ b/docs/reference/isSqlReservedWord.html @@ -1,9 +1,9 @@ -Test a character vector of SQL names for SQL reserved words — isSqlReservedWord • DatabaseConnectorTest a character vector of SQL names for SQL reserved words — isSqlReservedWord • DatabaseConnector - +
@@ -28,7 +28,7 @@
- +
@@ -77,19 +77,19 @@

Test a character vector of SQL names for SQL reserved words

Arguments

-
sqlNames
+ + +
sqlNames

A character vector containing table or field names to check.

-
warn
+
warn

(logical) Should a warn be thrown if invalid SQL names are found?

Value

- - -

A logical vector with length equal to sqlNames that is TRUE for each name that is reserved and FALSE otherwise

+

A logical vector with length equal to sqlNames that is TRUE for each name that is reserved and FALSE otherwise

@@ -104,15 +104,15 @@

Value

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/reference/jdbcDrivers.html b/docs/reference/jdbcDrivers.html index 78a2d30e..47b75e09 100644 --- a/docs/reference/jdbcDrivers.html +++ b/docs/reference/jdbcDrivers.html @@ -1,12 +1,12 @@ -How to download and use JDBC drivers for the various data platforms. — jdbcDrivers • DatabaseConnectorHow to download and use JDBC drivers for the various data platforms. — jdbcDrivers • DatabaseConnector - +
@@ -31,7 +31,7 @@
- +
@@ -85,12 +85,12 @@

SQL Server, Oracle, PostgreSQL, PDW, Snowflake, Spark, RedShift, Azure Synap

Netezza

Read the instructions -here +here on how to obtain the Netezza JDBC driver.

Impala

-

Go to Cloudera's site, pick +

Go to Cloudera's site, pick your OS version, and click "GET IT NOW!'. Register, and you should be able to download the driver.

@@ -111,15 +111,15 @@

SQLite

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/reference/lowLevelExecuteSql.html b/docs/reference/lowLevelExecuteSql.html index fc2eb4a4..05112247 100644 --- a/docs/reference/lowLevelExecuteSql.html +++ b/docs/reference/lowLevelExecuteSql.html @@ -1,9 +1,9 @@ -Execute SQL code — lowLevelExecuteSql • DatabaseConnectorExecute SQL code — lowLevelExecuteSql • DatabaseConnector - +
@@ -28,7 +28,7 @@
- +
@@ -77,12 +77,14 @@

Execute SQL code

Arguments

-
connection
+ + +
connection

The connection to the database server created using either -connect() or dbConnect().

+connect() or DBI::dbConnect().

-
sql
+
sql

The SQL to be executed

@@ -99,15 +101,15 @@

Arguments

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/reference/lowLevelQuerySql.html b/docs/reference/lowLevelQuerySql.html index ed95d767..ea2dcf90 100644 --- a/docs/reference/lowLevelQuerySql.html +++ b/docs/reference/lowLevelQuerySql.html @@ -1,10 +1,10 @@ -Low level function for retrieving data to a data frame — lowLevelQuerySql • DatabaseConnectorLow level function for retrieving data to a data frame — lowLevelQuerySql • DatabaseConnector - +
@@ -29,7 +29,7 @@
- +
@@ -85,35 +85,35 @@

Low level function for retrieving data to a data frame

Arguments

-
connection
+ + +
connection

The connection to the database server created using either -connect() or dbConnect().

+connect() or DBI::dbConnect().

-
query
+
query

The SQL statement to retrieve the data

-
datesAsString
+
datesAsString

Logical: Should dates be imported as character vectors, our should they be converted to R's date format?

-
integerAsNumeric
+
integerAsNumeric

Logical: should 32-bit integers be converted to numeric (double) values? If FALSE 32-bit integers will be represented using R's native Integer class.

-
integer64AsNumeric
+
integer64AsNumeric

Logical: should 64-bit integers be converted to numeric (double) values? If FALSE 64-bit integers will be represented using bit64::integer64.

Value

- - -

A data frame containing the data retrieved from the server

+

A data frame containing the data retrieved from the server

Details

@@ -133,15 +133,15 @@

Details

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/reference/lowLevelQuerySqlToAndromeda.html b/docs/reference/lowLevelQuerySqlToAndromeda.html index bbb7e9b5..67f382e5 100644 --- a/docs/reference/lowLevelQuerySqlToAndromeda.html +++ b/docs/reference/lowLevelQuerySqlToAndromeda.html @@ -1,10 +1,10 @@ -Low level function for retrieving data to a local Andromeda object — lowLevelQuerySqlToAndromeda • DatabaseConnectorLow level function for retrieving data to a local Andromeda object — lowLevelQuerySqlToAndromeda • DatabaseConnector - +
@@ -29,7 +29,7 @@
- +
@@ -89,55 +89,55 @@

Low level function for retrieving data to a local Andromeda object

Arguments

-
connection
+ + +
connection

The connection to the database server created using either -connect() or dbConnect().

+connect() or DBI::dbConnect().

-
query
+
query

The SQL statement to retrieve the data

-
andromeda
+
andromeda

An open Andromeda object, for example as created using Andromeda::andromeda().

-
andromedaTableName
+
andromedaTableName

The name of the table in the local Andromeda object where the results of the query will be stored.

-
datesAsString
+
datesAsString

Should dates be imported as character vectors, our should they be converted to R's date format?

-
appendToTable
+
appendToTable

If FALSE, any existing table in the Andromeda with the same name will be replaced with the new data. If TRUE, data will be appended to an existing table, assuming it has the exact same structure.

-
snakeCaseToCamelCase
+
snakeCaseToCamelCase

If true, field names are assumed to use snake_case, and are converted to camelCase.

-
integerAsNumeric
+
integerAsNumeric

Logical: should 32-bit integers be converted to numeric (double) values? If FALSE 32-bit integers will be represented using R's native Integer class.

-
integer64AsNumeric
+
integer64AsNumeric

Logical: should 64-bit integers be converted to numeric (double) values? If FALSE 64-bit integers will be represented using bit64::integer64.

Value

- - -

Invisibly returns the andromeda. The Andromeda object will have a table added with the query +

Invisibly returns the andromeda. The Andromeda object will have a table added with the query results.

@@ -160,15 +160,15 @@

Details

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/reference/month.html b/docs/reference/month.html index adfd21e6..60b4c117 100644 --- a/docs/reference/month.html +++ b/docs/reference/month.html @@ -1,10 +1,10 @@ -Extract the month from a date — month • DatabaseConnectorExtract the month from a date — month • DatabaseConnector - +
@@ -29,7 +29,7 @@
- +
@@ -79,15 +79,15 @@

Extract the month from a date

Arguments

-
date
+ + +
date

The date.

Value

- - -

The month

+

The month

@@ -109,15 +109,15 @@

Examples

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/reference/querySql.html b/docs/reference/querySql.html index 86c81baf..337da09d 100644 --- a/docs/reference/querySql.html +++ b/docs/reference/querySql.html @@ -1,9 +1,9 @@ -Retrieve data to a data.frame — querySql • DatabaseConnectorRetrieve data to a data.frame — querySql • DatabaseConnector - +
@@ -28,7 +28,7 @@
- +
@@ -84,39 +84,39 @@

Retrieve data to a data.frame

Arguments

-
connection
+ + +
connection

The connection to the database server created using either -connect() or dbConnect().

+connect() or DBI::dbConnect().

-
sql
+
sql

The SQL to be send.

-
errorReportFile
+
errorReportFile

The file where an error report will be written if an error occurs. Defaults to 'errorReportSql.txt' in the current working directory.

-
snakeCaseToCamelCase
+
snakeCaseToCamelCase

If true, field names are assumed to use snake_case, and are converted to camelCase.

-
integerAsNumeric
+
integerAsNumeric

Logical: should 32-bit integers be converted to numeric (double) values? If FALSE 32-bit integers will be represented using R's native Integer class.

-
integer64AsNumeric
+
integer64AsNumeric

Logical: should 64-bit integers be converted to numeric (double) values? If FALSE 64-bit integers will be represented using bit64::integer64.

Value

- - -

A data frame.

+

A data frame.

Details

@@ -127,7 +127,7 @@

Details

Examples

-
if (FALSE) {
+    
if (FALSE) { # \dontrun{
 connectionDetails <- createConnectionDetails(
   dbms = "postgresql",
   server = "localhost",
@@ -138,7 +138,7 @@ 

Examples

conn <- connect(connectionDetails) count <- querySql(conn, "SELECT COUNT(*) FROM person") disconnect(conn) -} +} # }
@@ -153,15 +153,15 @@

Examples

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/reference/querySqlToAndromeda.html b/docs/reference/querySqlToAndromeda.html index ac010587..99240c09 100644 --- a/docs/reference/querySqlToAndromeda.html +++ b/docs/reference/querySqlToAndromeda.html @@ -1,9 +1,9 @@ -Retrieves data to a local Andromeda object — querySqlToAndromeda • DatabaseConnectorRetrieves data to a local Andromeda object — querySqlToAndromeda • DatabaseConnector - +
@@ -28,7 +28,7 @@
- +
@@ -87,55 +87,55 @@

Retrieves data to a local Andromeda object

Arguments

-
connection
+ + +
connection

The connection to the database server created using either -connect() or dbConnect().

+connect() or DBI::dbConnect().

-
sql
+
sql

The SQL to be sent.

-
andromeda
+
andromeda

An open Andromeda object, for example as created using Andromeda::andromeda().

-
andromedaTableName
+
andromedaTableName

The name of the table in the local Andromeda object where the results of the query will be stored.

-
errorReportFile
+
errorReportFile

The file where an error report will be written if an error occurs. Defaults to 'errorReportSql.txt' in the current working directory.

-
snakeCaseToCamelCase
+
snakeCaseToCamelCase

If true, field names are assumed to use snake_case, and are converted to camelCase.

-
appendToTable
+
appendToTable

If FALSE, any existing table in the Andromeda with the same name will be replaced with the new data. If TRUE, data will be appended to an existing table, assuming it has the exact same structure.

-
integerAsNumeric
+
integerAsNumeric

Logical: should 32-bit integers be converted to numeric (double) values? If FALSE 32-bit integers will be represented using R's native Integer class.

-
integer64AsNumeric
+
integer64AsNumeric

Logical: should 64-bit integers be converted to numeric (double) values? If FALSE 64-bit integers will be represented using bit64::integer64.

Value

- - -

Invisibly returns the andromeda. The Andromeda object will have a table added with the query +

Invisibly returns the andromeda. The Andromeda object will have a table added with the query results.

@@ -149,7 +149,7 @@

Details

Examples

-
if (FALSE) {
+    
if (FALSE) { # \dontrun{
 andromeda <- Andromeda::andromeda()
 connectionDetails <- createConnectionDetails(
   dbms = "postgresql",
@@ -168,7 +168,7 @@ 

Examples

disconnect(conn) andromeda$foo -} +} # }
@@ -183,15 +183,15 @@

Examples

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/reference/renderTranslateExecuteSql.html b/docs/reference/renderTranslateExecuteSql.html index 67b2310b..0ecf8434 100644 --- a/docs/reference/renderTranslateExecuteSql.html +++ b/docs/reference/renderTranslateExecuteSql.html @@ -1,9 +1,9 @@ -Render, translate, execute SQL code — renderTranslateExecuteSql • DatabaseConnectorRender, translate, execute SQL code — renderTranslateExecuteSql • DatabaseConnector - +
@@ -28,7 +28,7 @@
- +
@@ -88,36 +88,38 @@

Render, translate, execute SQL code

Arguments

-
connection
+ + +
connection

The connection to the database server created using either -connect() or dbConnect().

+connect() or DBI::dbConnect().

-
sql
+
sql

The SQL to be executed

-
profile
+
profile

When true, each separate statement is written to file prior to sending to the server, and the time taken to execute a statement is displayed.

-
progressBar
+
progressBar

When true, a progress bar is shown based on the statements in the SQL code.

-
reportOverallTime
+
reportOverallTime

When true, the function will display the overall time taken to execute all statements.

-
errorReportFile
+
errorReportFile

The file where an error report will be written if an error occurs. Defaults to 'errorReportSql.txt' in the current working directory.

-
runAsBatch
+
runAsBatch

When true the SQL statements are sent to the server as a single batch, and executed there. This will be faster if you have many small SQL statements, but there will be no progress bar, and no per-statement error messages. If the @@ -125,17 +127,17 @@

Arguments

ordinarily.

-
oracleTempSchema
+
oracleTempSchema

DEPRECATED: use tempEmulationSchema instead.

-
tempEmulationSchema
+
tempEmulationSchema

Some database platforms like Oracle and Impala do not truly support temp tables. To emulate temp tables, provide a schema with write privileges where temp tables can be created.

-
...
+
...

Parameters that will be used to render the SQL.

@@ -147,7 +149,7 @@

Details

Examples

-
if (FALSE) {
+    
if (FALSE) { # \dontrun{
 connectionDetails <- createConnectionDetails(
   dbms = "postgresql",
   server = "localhost",
@@ -161,7 +163,7 @@ 

Examples

schema = "cdm_synpuf" ) disconnect(conn) -} +} # }
@@ -176,15 +178,15 @@

Examples

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/reference/renderTranslateQueryApplyBatched.html b/docs/reference/renderTranslateQueryApplyBatched.html index 1f8a486f..83290de7 100644 --- a/docs/reference/renderTranslateQueryApplyBatched.html +++ b/docs/reference/renderTranslateQueryApplyBatched.html @@ -1,12 +1,12 @@ -Render, translate, and perform process to batches of data. — renderTranslateQueryApplyBatched • DatabaseConnectorRender, translate, and perform process to batches of data. — renderTranslateQueryApplyBatched • DatabaseConnector - +
@@ -31,7 +31,7 @@
- +
@@ -95,61 +95,61 @@

Render, translate, and perform process to batches of data.

Arguments

-
connection
+ + +
connection

The connection to the database server created using either -connect() or dbConnect().

+connect() or DBI::dbConnect().

-
sql
+
sql

The SQL to be send.

-
fun
+
fun

Function to apply to batch. Must take data.frame and integer position as parameters.

-
args
+
args

List of arguments to be passed to function call.

-
errorReportFile
+
errorReportFile

The file where an error report will be written if an error occurs. Defaults to 'errorReportSql.txt' in the current working directory.

-
snakeCaseToCamelCase
+
snakeCaseToCamelCase

If true, field names are assumed to use snake_case, and are converted to camelCase.

-
oracleTempSchema
+
oracleTempSchema

DEPRECATED: use tempEmulationSchema instead.

-
tempEmulationSchema
+
tempEmulationSchema

Some database platforms like Oracle and Impala do not truly support temp tables. To emulate temp tables, provide a schema with write privileges where temp tables can be created.

-
integerAsNumeric
+
integerAsNumeric

Logical: should 32-bit integers be converted to numeric (double) values? If FALSE 32-bit integers will be represented using R's native Integer class.

-
integer64AsNumeric
+
integer64AsNumeric

Logical: should 64-bit integers be converted to numeric (double) values? If FALSE 64-bit integers will be represented using bit64::integer64.

-
...
+
...

Parameters that will be used to render the SQL.

Value

- - -

Invisibly returns a list of outputs from each call to the provided function.

+

Invisibly returns a list of outputs from each call to the provided function.

Details

@@ -159,7 +159,7 @@

Details

Examples

-
if (FALSE) {
+    
if (FALSE) { # \dontrun{
 connectionDetails <- createConnectionDetails(
   dbms = "postgresql",
   server = "localhost",
@@ -202,7 +202,7 @@ 

Examples

) disconnect(connection) -} +} # }
@@ -218,15 +218,15 @@

Examples

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/reference/renderTranslateQuerySql.html b/docs/reference/renderTranslateQuerySql.html index d17e1e48..69fe0c86 100644 --- a/docs/reference/renderTranslateQuerySql.html +++ b/docs/reference/renderTranslateQuerySql.html @@ -1,9 +1,9 @@ -Render, translate, and query to data.frame — renderTranslateQuerySql • DatabaseConnectorRender, translate, and query to data.frame — renderTranslateQuerySql • DatabaseConnector - +
@@ -28,7 +28,7 @@
- +
@@ -87,53 +87,53 @@

Render, translate, and query to data.frame

Arguments

-
connection
+ + +
connection

The connection to the database server created using either -connect() or dbConnect().

+connect() or DBI::dbConnect().

-
sql
+
sql

The SQL to be send.

-
errorReportFile
+
errorReportFile

The file where an error report will be written if an error occurs. Defaults to 'errorReportSql.txt' in the current working directory.

-
snakeCaseToCamelCase
+
snakeCaseToCamelCase

If true, field names are assumed to use snake_case, and are converted to camelCase.

-
oracleTempSchema
+
oracleTempSchema

DEPRECATED: use tempEmulationSchema instead.

-
tempEmulationSchema
+
tempEmulationSchema

Some database platforms like Oracle and Impala do not truly support temp tables. To emulate temp tables, provide a schema with write privileges where temp tables can be created.

-
integerAsNumeric
+
integerAsNumeric

Logical: should 32-bit integers be converted to numeric (double) values? If FALSE 32-bit integers will be represented using R's native Integer class.

-
integer64AsNumeric
+
integer64AsNumeric

Logical: should 64-bit integers be converted to numeric (double) values? If FALSE 64-bit integers will be represented using bit64::integer64.

-
...
+
...

Parameters that will be used to render the SQL.

Value

- - -

A data frame.

+

A data frame.

Details

@@ -143,7 +143,7 @@

Details

Examples

-
if (FALSE) {
+    
if (FALSE) { # \dontrun{
 connectionDetails <- createConnectionDetails(
   dbms = "postgresql",
   server = "localhost",
@@ -157,7 +157,7 @@ 

Examples

schema = "cdm_synpuf" ) disconnect(conn) -} +} # }
@@ -172,15 +172,15 @@

Examples

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/reference/renderTranslateQuerySqlToAndromeda.html b/docs/reference/renderTranslateQuerySqlToAndromeda.html index 4b9007d5..8d061062 100644 --- a/docs/reference/renderTranslateQuerySqlToAndromeda.html +++ b/docs/reference/renderTranslateQuerySqlToAndromeda.html @@ -1,10 +1,10 @@ -Render, translate, and query to local Andromeda — renderTranslateQuerySqlToAndromeda • DatabaseConnectorRender, translate, and query to local Andromeda — renderTranslateQuerySqlToAndromeda • DatabaseConnector - +
@@ -29,7 +29,7 @@
- +
@@ -92,69 +92,69 @@

Render, translate, and query to local Andromeda

Arguments

-
connection
+ + +
connection

The connection to the database server created using either -connect() or dbConnect().

+connect() or DBI::dbConnect().

-
sql
+
sql

The SQL to be send.

-
andromeda
+
andromeda

An open Andromeda object, for example as created using Andromeda::andromeda().

-
andromedaTableName
+
andromedaTableName

The name of the table in the local Andromeda object where the results of the query will be stored.

-
errorReportFile
+
errorReportFile

The file where an error report will be written if an error occurs. Defaults to 'errorReportSql.txt' in the current working directory.

-
snakeCaseToCamelCase
+
snakeCaseToCamelCase

If true, field names are assumed to use snake_case, and are converted to camelCase.

-
appendToTable
+
appendToTable

If FALSE, any existing table in the Andromeda with the same name will be replaced with the new data. If TRUE, data will be appended to an existing table, assuming it has the exact same structure.

-
oracleTempSchema
+
oracleTempSchema

DEPRECATED: use tempEmulationSchema instead.

-
tempEmulationSchema
+
tempEmulationSchema

Some database platforms like Oracle and Impala do not truly support temp tables. To emulate temp tables, provide a schema with write privileges where temp tables can be created.

-
integerAsNumeric
+
integerAsNumeric

Logical: should 32-bit integers be converted to numeric (double) values? If FALSE 32-bit integers will be represented using R's native Integer class.

-
integer64AsNumeric
+
integer64AsNumeric

Logical: should 64-bit integers be converted to numeric (double) values? If FALSE 64-bit integers will be represented using bit64::integer64.

-
...
+
...

Parameters that will be used to render the SQL.

Value

- - -

Invisibly returns the andromeda. The Andromeda object will have a table added with the query +

Invisibly returns the andromeda. The Andromeda object will have a table added with the query results.

@@ -165,7 +165,7 @@

Details

Examples

-
if (FALSE) {
+    
if (FALSE) { # \dontrun{
 connectionDetails <- createConnectionDetails(
   dbms = "postgresql",
   server = "localhost",
@@ -183,7 +183,7 @@ 

Examples

disconnect(conn) andromeda$foo -} +} # }
@@ -198,15 +198,15 @@

Examples

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/reference/requiresTempEmulation.html b/docs/reference/requiresTempEmulation.html index cb5ef60d..58a3e9a9 100644 --- a/docs/reference/requiresTempEmulation.html +++ b/docs/reference/requiresTempEmulation.html @@ -1,9 +1,9 @@ -Does the DBMS require temp table emulation? — requiresTempEmulation • DatabaseConnectorDoes the DBMS require temp table emulation? — requiresTempEmulation • DatabaseConnector - +
@@ -28,7 +28,7 @@
- +
@@ -77,16 +77,16 @@

Does the DBMS require temp table emulation?

Arguments

-
dbms
+ + +
dbms

The type of DBMS running on the server. See connect() or createConnectionDetails() for valid values.

Value

- - -

TRUE if the DBMS requires temp table emulation, FALSE otherwise.

+

TRUE if the DBMS requires temp table emulation, FALSE otherwise.

@@ -110,15 +110,15 @@

Examples

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/reference/year.html b/docs/reference/year.html index e6921679..7a68131b 100644 --- a/docs/reference/year.html +++ b/docs/reference/year.html @@ -1,10 +1,10 @@ -Extract the year from a date — year • DatabaseConnectorExtract the year from a date — year • DatabaseConnector - +
@@ -29,7 +29,7 @@
- +
@@ -79,15 +79,15 @@

Extract the year from a date

Arguments

-
date
+ + +
date

The date.

Value

- - -

The year

+

The year

@@ -109,15 +109,15 @@

Examples

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/docs/sitemap.xml b/docs/sitemap.xml index 7612b12d..714d29c6 100644 --- a/docs/sitemap.xml +++ b/docs/sitemap.xml @@ -1,339 +1,114 @@ - - - - /404.html - - - /articles/Connecting.html - - - /articles/DbiAndDbplyr.html - - - /articles/Querying.html - - - /articles/UsingDatabaseConnector.html - - - /articles/index.html - - - /authors.html - - - /index.html - - - /news/index.html - - - /pull_request_template.html - - - /reference/DatabaseConnector-package.html - - - /reference/DatabaseConnector.html - - - /reference/DatabaseConnectorConnection-class.html - - - /reference/DatabaseConnectorDbiConnection-class.html - - - /reference/DatabaseConnectorDbiResult-class.html - - - /reference/DatabaseConnectorDriver-class.html - - - /reference/DatabaseConnectorDriver.html - - - /reference/DatabaseConnectorJdbcConnection-class.html - - - /reference/DatabaseConnectorJdbcResult-class.html - - - /reference/DatabaseConnectorResult-class.html - - - /reference/Microsoft-SQL-Server-class.html - - - /reference/assertTempEmulationSchemaSet.html - - - /reference/computeDataHash.html - - - /reference/connect.html - - - /reference/createConnectionDetails.html - - - /reference/createDbiConnectionDetails.html - - - /reference/createZipFile.html - - - /reference/dateAdd.html - - - /reference/dateDiff.html - - - /reference/dateFromParts.html - - - /reference/day.html - - - /reference/dbAppendTable-DatabaseConnectorConnection-character-data.frame-method.html - - - /reference/dbAppendTable-DatabaseConnectorConnection-character-method.html - - - /reference/dbClearResult-DatabaseConnectorDbiResult-method.html - - - /reference/dbClearResult-DatabaseConnectorJdbcResult-method.html - - - /reference/dbClearResult-DatabaseConnectorResult-method.html - - - /reference/dbColumnInfo-DatabaseConnectorDbiResult-method.html - - - /reference/dbColumnInfo-DatabaseConnectorJdbcResult-method.html - - - /reference/dbColumnInfo-DatabaseConnectorResult-method.html - - - /reference/dbConnect-DatabaseConnectorDriver-method.html - - - /reference/dbCreateTable-DatabaseConnectorConnection-character-data.frame-method.html - - - /reference/dbCreateTable-DatabaseConnectorConnection-method.html - - - /reference/dbDisconnect-DatabaseConnectorConnection-method.html - - - /reference/dbExecute-DatabaseConnectorConnection-character-method.html - - - /reference/dbExistsTable-DatabaseConnectorConnection-character-method.html - - - /reference/dbFetch-DatabaseConnectorDbiResult-method.html - - - /reference/dbFetch-DatabaseConnectorJdbcResult-method.html - - - /reference/dbFetch-DatabaseConnectorResult-method.html - - - /reference/dbGetInfo-DatabaseConnectorConnection-method.html - - - /reference/dbGetInfo-DatabaseConnectorDriver-method.html - - - /reference/dbGetQuery-DatabaseConnectorConnection-character-method.html - - - /reference/dbGetRowCount-DatabaseConnectorDbiResult-method.html - - - /reference/dbGetRowCount-DatabaseConnectorJdbcResult-method.html - - - /reference/dbGetRowCount-DatabaseConnectorResult-method.html - - - /reference/dbGetRowsAffected-DatabaseConnectorDbiResult-method.html - - - /reference/dbGetRowsAffected-DatabaseConnectorJdbcResult-method.html - - - /reference/dbGetRowsAffected-DatabaseConnectorResult-method.html - - - /reference/dbGetStatement-DatabaseConnectorDbiResult-method.html - - - /reference/dbGetStatement-DatabaseConnectorJdbcResult-method.html - - - /reference/dbGetStatement-DatabaseConnectorResult-method.html - - - /reference/dbHasCompleted-DatabaseConnectorDbiResult-method.html - - - /reference/dbHasCompleted-DatabaseConnectorJdbcResult-method.html - - - /reference/dbHasCompleted-DatabaseConnectorResult-method.html - - - /reference/dbIsValid-DatabaseConnectorConnection-method.html - - - /reference/dbIsValid-DatabaseConnectorDbiConnection-method.html - - - /reference/dbIsValid-DatabaseConnectorJdbcConnection-method.html - - - /reference/dbListFields-DatabaseConnectorConnection-character-method.html - - - /reference/dbListTables-DatabaseConnectorConnection-method.html - - - /reference/dbQuoteIdentifier-DatabaseConnectorConnection-character-method.html - - - /reference/dbQuoteString-DatabaseConnectorConnection-character-method.html - - - /reference/dbReadTable-DatabaseConnectorConnection-character-method.html - - - /reference/dbRemoveTable-DatabaseConnectorConnection-ANY-method.html - - - /reference/dbRemoveTable-DatabaseConnectorConnection-character-method.html - - - /reference/dbSendQuery-DatabaseConnectorConnection-character-method.html - - - /reference/dbSendQuery-DatabaseConnectorDbiConnection-character-method.html - - - /reference/dbSendQuery-DatabaseConnectorJdbcConnection-character-method.html - - - /reference/dbSendStatement-DatabaseConnectorConnection-character-method.html - - - /reference/dbUnloadDriver-DatabaseConnectorDriver-method.html - - - /reference/dbWriteTable-DatabaseConnectorConnection-ANY-method.html - - - /reference/dbWriteTable-DatabaseConnectorConnection-character-data.frame-method.html - - - /reference/dbms.html - - - /reference/disconnect.html - - - /reference/downloadJdbcDrivers.html - - - /reference/dropEmulatedTempTables.html - - - /reference/eoMonth.html - - - /reference/executeSql.html - - - /reference/existsTable.html - - - /reference/extractQueryTimes.html - - - /reference/getAvailableJavaHeapSpace.html - - - /reference/getTableNames.html - - - /reference/inDatabaseSchema.html - - - /reference/index.html - - - /reference/insertTable.html - - - /reference/isSqlReservedWord.html - - - /reference/jdbcDrivers.html - - - /reference/lowLevelExecuteSql.html - - - /reference/lowLevelQuerySql.ffdf.html - - - /reference/lowLevelQuerySql.html - - - /reference/lowLevelQuerySqlToAndromeda.html - - - /reference/month.html - - - /reference/querySql.ffdf.html - - - /reference/querySql.html - - - /reference/querySqlToAndromeda.html - - - /reference/renderTranslateExecuteSql.html - - - /reference/renderTranslateQueryApplyBatched.html - - - /reference/renderTranslateQuerySql.ffdf.html - - - /reference/renderTranslateQuerySql.html - - - /reference/renderTranslateQuerySqlToAndromeda.html - - - /reference/requiresTempEmulation.html - - - /reference/show-DatabaseConnectorConnection-method.html - - - /reference/show-DatabaseConnectorDriver-method.html - - - /reference/year.html - + +/404.html +/articles/Connecting.html +/articles/DbiAndDbplyr.html +/articles/Querying.html +/articles/UsingDatabaseConnector.html +/articles/index.html +/authors.html +/index.html +/news/index.html +/pull_request_template.html +/reference/DatabaseConnector-package.html +/reference/DatabaseConnectorConnection-class.html +/reference/DatabaseConnectorDbiConnection-class.html +/reference/DatabaseConnectorDbiResult-class.html +/reference/DatabaseConnectorDriver-class.html +/reference/DatabaseConnectorDriver.html +/reference/DatabaseConnectorJdbcConnection-class.html +/reference/DatabaseConnectorJdbcResult-class.html +/reference/DatabaseConnectorResult-class.html +/reference/Microsoft-SQL-Server-class.html +/reference/assertTempEmulationSchemaSet.html +/reference/computeDataHash.html +/reference/connect.html +/reference/createConnectionDetails.html +/reference/createDbiConnectionDetails.html +/reference/createZipFile.html +/reference/dateAdd.html +/reference/dateDiff.html +/reference/dateFromParts.html +/reference/day.html +/reference/dbAppendTable-DatabaseConnectorConnection-character-data.frame-method.html +/reference/dbAppendTable-DatabaseConnectorConnection-character-method.html +/reference/dbClearResult-DatabaseConnectorDbiResult-method.html +/reference/dbClearResult-DatabaseConnectorJdbcResult-method.html +/reference/dbClearResult-DatabaseConnectorResult-method.html +/reference/dbColumnInfo-DatabaseConnectorDbiResult-method.html +/reference/dbColumnInfo-DatabaseConnectorJdbcResult-method.html +/reference/dbColumnInfo-DatabaseConnectorResult-method.html +/reference/dbConnect-DatabaseConnectorDriver-method.html +/reference/dbCreateTable-DatabaseConnectorConnection-character-data.frame-method.html +/reference/dbCreateTable-DatabaseConnectorConnection-method.html +/reference/dbDisconnect-DatabaseConnectorConnection-method.html +/reference/dbExecute-DatabaseConnectorConnection-character-method.html +/reference/dbExistsTable-DatabaseConnectorConnection-character-method.html +/reference/dbFetch-DatabaseConnectorDbiResult-method.html +/reference/dbFetch-DatabaseConnectorJdbcResult-method.html +/reference/dbFetch-DatabaseConnectorResult-method.html +/reference/dbGetInfo-DatabaseConnectorConnection-method.html +/reference/dbGetInfo-DatabaseConnectorDriver-method.html +/reference/dbGetQuery-DatabaseConnectorConnection-character-method.html +/reference/dbGetRowCount-DatabaseConnectorDbiResult-method.html +/reference/dbGetRowCount-DatabaseConnectorJdbcResult-method.html +/reference/dbGetRowCount-DatabaseConnectorResult-method.html +/reference/dbGetRowsAffected-DatabaseConnectorDbiResult-method.html +/reference/dbGetRowsAffected-DatabaseConnectorJdbcResult-method.html +/reference/dbGetRowsAffected-DatabaseConnectorResult-method.html +/reference/dbGetStatement-DatabaseConnectorDbiResult-method.html +/reference/dbGetStatement-DatabaseConnectorJdbcResult-method.html +/reference/dbGetStatement-DatabaseConnectorResult-method.html +/reference/dbHasCompleted-DatabaseConnectorDbiResult-method.html +/reference/dbHasCompleted-DatabaseConnectorJdbcResult-method.html +/reference/dbHasCompleted-DatabaseConnectorResult-method.html +/reference/dbIsValid-DatabaseConnectorConnection-method.html +/reference/dbIsValid-DatabaseConnectorDbiConnection-method.html +/reference/dbIsValid-DatabaseConnectorJdbcConnection-method.html +/reference/dbListFields-DatabaseConnectorConnection-character-method.html +/reference/dbListTables-DatabaseConnectorConnection-method.html +/reference/dbQuoteIdentifier-DatabaseConnectorConnection-character-method.html +/reference/dbQuoteString-DatabaseConnectorConnection-character-method.html +/reference/dbReadTable-DatabaseConnectorConnection-character-method.html +/reference/dbRemoveTable-DatabaseConnectorConnection-ANY-method.html +/reference/dbRemoveTable-DatabaseConnectorConnection-character-method.html +/reference/dbSendQuery-DatabaseConnectorConnection-character-method.html +/reference/dbSendQuery-DatabaseConnectorDbiConnection-character-method.html +/reference/dbSendQuery-DatabaseConnectorJdbcConnection-character-method.html +/reference/dbSendStatement-DatabaseConnectorConnection-character-method.html +/reference/dbUnloadDriver-DatabaseConnectorDriver-method.html +/reference/dbWriteTable-DatabaseConnectorConnection-ANY-method.html +/reference/dbWriteTable-DatabaseConnectorConnection-character-data.frame-method.html +/reference/dbms.html +/reference/disconnect.html +/reference/downloadJdbcDrivers.html +/reference/dropEmulatedTempTables.html +/reference/eoMonth.html +/reference/executeSql.html +/reference/existsTable.html +/reference/extractQueryTimes.html +/reference/getAvailableJavaHeapSpace.html +/reference/getTableNames.html +/reference/inDatabaseSchema.html +/reference/index.html +/reference/insertTable.html +/reference/isSqlReservedWord.html +/reference/jdbcDrivers.html +/reference/lowLevelExecuteSql.html +/reference/lowLevelQuerySql.ffdf.html +/reference/lowLevelQuerySql.html +/reference/lowLevelQuerySqlToAndromeda.html +/reference/month.html +/reference/querySql.ffdf.html +/reference/querySql.html +/reference/querySqlToAndromeda.html +/reference/renderTranslateExecuteSql.html +/reference/renderTranslateQueryApplyBatched.html +/reference/renderTranslateQuerySql.ffdf.html +/reference/renderTranslateQuerySql.html +/reference/renderTranslateQuerySqlToAndromeda.html +/reference/requiresTempEmulation.html +/reference/show-DatabaseConnectorConnection-method.html +/reference/show-DatabaseConnectorDriver-method.html +/reference/year.html + diff --git a/extras/DatabaseConnector.pdf b/extras/DatabaseConnector.pdf index 4676fe48..1867050a 100644 Binary files a/extras/DatabaseConnector.pdf and b/extras/DatabaseConnector.pdf differ diff --git a/extras/PackageMaintenance.R b/extras/PackageMaintenance.R index c560b21f..7e915cf1 100644 --- a/extras/PackageMaintenance.R +++ b/extras/PackageMaintenance.R @@ -1,4 +1,4 @@ -# Copyright 2023 Observational Health Data Sciences and Informatics +# Copyright 2025 Observational Health Data Sciences and Informatics # # This file is part of DatabaseConnector # @@ -29,8 +29,19 @@ OhdsiRTools::checkUsagePackage("DatabaseConnector") OhdsiRTools::updateCopyrightYearFolder() devtools::spell_check() - # Create manual ---------------------------------------------------------------- +# Remove Sexpr that breaks pkgdown +# Fix links broken by roxygen (when inheriting from DBI) +fixRdFile <- function(fileName) { + page <- SqlRender::readSql(fileName) + page <- gsub("\\\\Sexpr[^\n]*\n", "", page) + page <- gsub("\\linkS4class\\{(DBI[a-zA-Z]*)\\}", "\\link[DBI:\\1-class]{\\1}", page) + SqlRender::writeSql(page, fileName) +} +for (file in list.files("man", ".*.Rd")) { + fixRdFile(file.path("man", file)) +} + unlink("extras/DatabaseConnector.pdf") system("R CMD Rd2pdf ./ --output=extras/DatabaseConnector.pdf") @@ -53,15 +64,6 @@ rmarkdown::render("vignettes/DbiAndDbplyr.Rmd", toc = TRUE, number_sections = TRUE)) -# May need to delete Sexpr expressions from description sections to avoid purr error: -fixRdFile <- function(fileName) { - page <- SqlRender::readSql(fileName) - page <- gsub("\\\\Sexpr[^\n]*\n", "", page) - SqlRender::writeSql(page, fileName) -} -for (file in list.files("man", ".*.Rd")) { - fixRdFile(file.path("man", file)) -} pkgdown::build_site() OhdsiRTools::fixHadesLogo() @@ -151,6 +153,6 @@ unlink("reverseDependencies.rds") # Release package -------------------------------------------------------------- devtools::check_win_devel() -devtools::check_rhub() +rhub::rc_submit(platforms = "atlas") devtools::release() diff --git a/extras/TestCode.R b/extras/TestCode.R index 531c1958..87eb0637 100644 --- a/extras/TestCode.R +++ b/extras/TestCode.R @@ -455,3 +455,66 @@ querySql.sqlite(connection = connection, disconnect(connection) DBI::dbGetQuery(sqliteConnection, "SELECT COUNT(*) FROM test;") + + +# Test insert table performance on DataBricks ----------------------------- +library(DatabaseConnector) +connectionDetails <- createConnectionDetails( + dbms = "spark", + connectionString = keyring::key_get("databricksConnectionString"), + user = "token", + password = keyring::key_get("databricksToken") +) +options(sqlRenderTempEmulationSchema = "scratch.scratch_mschuemi") + +conn <- connect(connectionDetails) +set.seed(1) +day.start <- "1900/01/01" +day.end <- "2012/12/31" +dayseq <- seq.Date(as.Date(day.start), as.Date(day.end), by = "day") +makeRandomStrings <- function(n = 1, lenght = 12) { + randomString <- c(1:n) + for (i in 1:n) randomString[i] <- paste(sample(c(0:9, letters, LETTERS), lenght, replace = TRUE), + collapse = "") + return(randomString) +} +data <- data.frame(start_date = dayseq, + person_id = as.integer(round(runif(length(dayseq), 1, 1e+07))), + value = runif(length(dayseq)), + id = makeRandomStrings(length(dayseq))) + +data$start_date[4] <- NA +data$person_id[5] <- NA +data$value[2] <- NA +data$id[3] <- NA + +# data <- data[1:100, c("value", "id")] +system.time( + insertTable(connection = conn, + tableName = "scratch.scratch_mschuemi.insert_test", + data = data, + dropTableIfExists = TRUE, + createTable = TRUE, + tempTable = FALSE, + progressBar = TRUE, + bulkLoad = FALSE) +) +# Using default inserts with parameterized queries: +# user system elapsed +# 2.87 1.67 212.97 + +# USing CTAS hack: +# user system elapsed +# 0.54 0.03 11.19 + +system.time({ +sql <- "DROP TABLE IF EXISTS scratch.scratch_mschuemi.insert_test;" +executeSql(conn, sql) +sql <- "CREATE TABLE scratch.scratch_mschuemi.insert_test (value FLOAT, id STRING);" +executeSql(conn, sql) +sql <- sprintf("INSERT INTO scratch.scratch_mschuemi.insert_test (value, id) VALUES %s;", paste(sprintf("(%s, '%s')", data$value, data$id), collapse = ",")) +sql <- gsub("NA", "NULL", gsub("'NA'", "NULL", sql)) +executeSql(conn, sql) +}) +# user system elapsed +# 0.16 0.07 7.07 diff --git a/inst/doc/Connecting.pdf b/inst/doc/Connecting.pdf index 6bd10055..e69022bf 100644 Binary files a/inst/doc/Connecting.pdf and b/inst/doc/Connecting.pdf differ diff --git a/inst/doc/DbiAndDbplyr.pdf b/inst/doc/DbiAndDbplyr.pdf index 6617f911..60670d2f 100644 Binary files a/inst/doc/DbiAndDbplyr.pdf and b/inst/doc/DbiAndDbplyr.pdf differ diff --git a/inst/doc/Querying.pdf b/inst/doc/Querying.pdf index cf23e7fd..16ce5d93 100644 Binary files a/inst/doc/Querying.pdf and b/inst/doc/Querying.pdf differ diff --git a/man-roxygen/Connection.R b/man-roxygen/Connection.R index 00d1b3c5..658e020f 100644 --- a/man-roxygen/Connection.R +++ b/man-roxygen/Connection.R @@ -1,2 +1,2 @@ #' @param connection The connection to the database server created using either -#' [connect()] or [dbConnect()]. +#' [connect()] or [DBI::dbConnect()]. diff --git a/man-roxygen/DefaultConnectionDetails.R b/man-roxygen/DefaultConnectionDetails.R index 9e7d4552..bf04e73e 100644 --- a/man-roxygen/DefaultConnectionDetails.R +++ b/man-roxygen/DefaultConnectionDetails.R @@ -6,7 +6,7 @@ #' provider to configure things as security for SSL. For connections using #' JDBC these will be appended to end of the connection string. For #' connections using DBI, these settings will additionally be used to call -#' [dbConnect()]. +#' [DBI::dbConnect()]. #' @param oracleDriver Specify which Oracle drive you want to use. Choose between `"thin"` #' or `"oci"`. #' @param connectionString The JDBC connection string. If specified, the `server`, `port`, diff --git a/man/computeDataHash.Rd b/man/computeDataHash.Rd index 94f6bc56..6b230938 100644 --- a/man/computeDataHash.Rd +++ b/man/computeDataHash.Rd @@ -8,7 +8,7 @@ computeDataHash(connection, databaseSchema, tables = NULL, progressBar = TRUE) } \arguments{ \item{connection}{The connection to the database server created using either -\code{\link[=connect]{connect()}} or \code{\link[=dbConnect]{dbConnect()}}.} +\code{\link[=connect]{connect()}} or \code{\link[DBI:dbConnect]{DBI::dbConnect()}}.} \item{databaseSchema}{The name of the database schema. See details for platform-specific details.} diff --git a/man/connect.Rd b/man/connect.Rd index fb14da39..b392894c 100644 --- a/man/connect.Rd +++ b/man/connect.Rd @@ -35,7 +35,7 @@ provider to configure things as security for SSL. For connections using JDBC these will be appended to end of the connection string. For connections using DBI, these settings will additionally be used to call -\code{\link[=dbConnect]{dbConnect()}}.} +\code{\link[DBI:dbConnect]{DBI::dbConnect()}}.} \item{oracleDriver}{Specify which Oracle drive you want to use. Choose between \code{"thin"} or \code{"oci"}.} diff --git a/man/createConnectionDetails.Rd b/man/createConnectionDetails.Rd index b3840a7e..2d71df85 100644 --- a/man/createConnectionDetails.Rd +++ b/man/createConnectionDetails.Rd @@ -32,7 +32,7 @@ provider to configure things as security for SSL. For connections using JDBC these will be appended to end of the connection string. For connections using DBI, these settings will additionally be used to call -\code{\link[=dbConnect]{dbConnect()}}.} +\code{\link[DBI:dbConnect]{DBI::dbConnect()}}.} \item{oracleDriver}{Specify which Oracle drive you want to use. Choose between \code{"thin"} or \code{"oci"}.} diff --git a/man/dbAppendTable-DatabaseConnectorConnection-character-method.Rd b/man/dbAppendTable-DatabaseConnectorConnection-character-method.Rd index 3c0d95e7..45646899 100644 --- a/man/dbAppendTable-DatabaseConnectorConnection-character-method.Rd +++ b/man/dbAppendTable-DatabaseConnectorConnection-character-method.Rd @@ -17,7 +17,7 @@ ) } \arguments{ -\item{conn}{A \linkS4class{DBIConnection} object, as returned by +\item{conn}{A \link[DBI:DBIConnection-class]{DBIConnection} object, as returned by \code{\link[DBI:dbConnect]{dbConnect()}}.} \item{name}{The table name, passed on to \code{\link[DBI:dbQuoteIdentifier]{dbQuoteIdentifier()}}. Options are: @@ -58,7 +58,6 @@ The default implementation calls \code{\link[DBI:sqlAppendTableTemplate]{sqlAppe \code{\link[DBI:dbExecute]{dbExecute()}} with the \code{param} argument. Use \code{\link[DBI:dbAppendTableArrow]{dbAppendTableArrow()}} to append data from an Arrow stream. -\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 61592f29..46ecb85e 100644 --- a/man/dbClearResult-DatabaseConnectorDbiResult-method.Rd +++ b/man/dbClearResult-DatabaseConnectorDbiResult-method.Rd @@ -7,7 +7,7 @@ \S4method{dbClearResult}{DatabaseConnectorDbiResult}(res, ...) } \arguments{ -\item{res}{An object inheriting from \linkS4class{DBIResult}.} +\item{res}{An object inheriting from \link[DBI:DBIResult-class]{DBIResult}.} \item{...}{Other arguments passed on to methods.} } @@ -22,7 +22,6 @@ 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 3c78a432..c84ba858 100644 --- a/man/dbClearResult-DatabaseConnectorJdbcResult-method.Rd +++ b/man/dbClearResult-DatabaseConnectorJdbcResult-method.Rd @@ -7,7 +7,7 @@ \S4method{dbClearResult}{DatabaseConnectorJdbcResult}(res, ...) } \arguments{ -\item{res}{An object inheriting from \linkS4class{DBIResult}.} +\item{res}{An object inheriting from \link[DBI:DBIResult-class]{DBIResult}.} \item{...}{Other arguments passed on to methods.} } @@ -22,7 +22,6 @@ 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 2a16fe37..424e9aba 100644 --- a/man/dbColumnInfo-DatabaseConnectorDbiResult-method.Rd +++ b/man/dbColumnInfo-DatabaseConnectorDbiResult-method.Rd @@ -7,7 +7,7 @@ \S4method{dbColumnInfo}{DatabaseConnectorDbiResult}(res, ...) } \arguments{ -\item{res}{An object inheriting from \linkS4class{DBIResult}.} +\item{res}{An object inheriting from \link[DBI:DBIResult-class]{DBIResult}.} \item{...}{Other arguments passed on to methods.} } @@ -28,7 +28,6 @@ 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 efca1adb..38129110 100644 --- a/man/dbColumnInfo-DatabaseConnectorJdbcResult-method.Rd +++ b/man/dbColumnInfo-DatabaseConnectorJdbcResult-method.Rd @@ -7,7 +7,7 @@ \S4method{dbColumnInfo}{DatabaseConnectorJdbcResult}(res, ...) } \arguments{ -\item{res}{An object inheriting from \linkS4class{DBIResult}.} +\item{res}{An object inheriting from \link[DBI:DBIResult-class]{DBIResult}.} \item{...}{Other arguments passed on to methods.} } @@ -28,7 +28,6 @@ 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 63ba0927..55b79c58 100644 --- a/man/dbCreateTable-DatabaseConnectorConnection-method.Rd +++ b/man/dbCreateTable-DatabaseConnectorConnection-method.Rd @@ -17,7 +17,7 @@ ) } \arguments{ -\item{conn}{A \linkS4class{DBIConnection} object, as returned by +\item{conn}{A \link[DBI:DBIConnection-class]{DBIConnection} object, as returned by \code{\link[DBI:dbConnect]{dbConnect()}}.} \item{name}{The table name, passed on to \code{\link[DBI:dbQuoteIdentifier]{dbQuoteIdentifier()}}. Options are: @@ -61,7 +61,6 @@ The default \code{dbCreateTable()} method calls \code{\link[DBI:sqlCreateTable]{ \code{\link[DBI:dbExecute]{dbExecute()}}. Use \code{\link[DBI:dbCreateTableArrow]{dbCreateTableArrow()}} to create a table from an Arrow schema. -\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 f60a3cbb..e66ae8ed 100644 --- a/man/dbDisconnect-DatabaseConnectorConnection-method.Rd +++ b/man/dbDisconnect-DatabaseConnectorConnection-method.Rd @@ -7,7 +7,7 @@ \S4method{dbDisconnect}{DatabaseConnectorConnection}(conn) } \arguments{ -\item{conn}{A \linkS4class{DBIConnection} object, as returned by +\item{conn}{A \link[DBI:DBIConnection-class]{DBIConnection} object, as returned by \code{\link[DBI:dbConnect]{dbConnect()}}.} } \value{ @@ -17,7 +17,6 @@ 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 30c64d04..fd8c0dc6 100644 --- a/man/dbExecute-DatabaseConnectorConnection-character-method.Rd +++ b/man/dbExecute-DatabaseConnectorConnection-character-method.Rd @@ -7,7 +7,7 @@ \S4method{dbExecute}{DatabaseConnectorConnection,character}(conn, statement, translate = TRUE, ...) } \arguments{ -\item{conn}{A \linkS4class{DBIConnection} object, as returned by +\item{conn}{A \link[DBI:DBIConnection-class]{DBIConnection} object, as returned by \code{\link[DBI:dbConnect]{dbConnect()}}.} \item{statement}{a character string containing SQL.} @@ -32,7 +32,6 @@ the result is always freed 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 ca864ae9..663b81df 100644 --- a/man/dbExistsTable-DatabaseConnectorConnection-character-method.Rd +++ b/man/dbExistsTable-DatabaseConnectorConnection-character-method.Rd @@ -7,7 +7,7 @@ \S4method{dbExistsTable}{DatabaseConnectorConnection,character}(conn, name, databaseSchema = NULL, ...) } \arguments{ -\item{conn}{A \linkS4class{DBIConnection} object, as returned by +\item{conn}{A \link[DBI:DBIConnection-class]{DBIConnection} object, as returned by \code{\link[DBI:dbConnect]{dbConnect()}}.} \item{name}{The table name, passed on to \code{\link[DBI:dbQuoteIdentifier]{dbQuoteIdentifier()}}. Options are: @@ -33,7 +33,6 @@ 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 d5c5c13a..d0228c14 100644 --- a/man/dbFetch-DatabaseConnectorDbiResult-method.Rd +++ b/man/dbFetch-DatabaseConnectorDbiResult-method.Rd @@ -7,7 +7,7 @@ \S4method{dbFetch}{DatabaseConnectorDbiResult}(res, n = -1, ...) } \arguments{ -\item{res}{An object inheriting from \linkS4class{DBIResult}, created by +\item{res}{An object inheriting from \link[DBI:DBIResult-class]{DBIResult}, created by \code{\link[DBI:dbSendQuery]{dbSendQuery()}}.} \item{n}{maximum number of records to retrieve per fetch. Use \code{n = -1} @@ -31,7 +31,6 @@ as specified by the driver, but at most the remaining rows in the result set. 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 a7d003ca..1863a0c5 100644 --- a/man/dbFetch-DatabaseConnectorJdbcResult-method.Rd +++ b/man/dbFetch-DatabaseConnectorJdbcResult-method.Rd @@ -7,7 +7,7 @@ \S4method{dbFetch}{DatabaseConnectorJdbcResult}(res, n = -1, ...) } \arguments{ -\item{res}{An object inheriting from \linkS4class{DBIResult}, created by +\item{res}{An object inheriting from \link[DBI:DBIResult-class]{DBIResult}, created by \code{\link[DBI:dbSendQuery]{dbSendQuery()}}.} \item{n}{maximum number of records to retrieve per fetch. Use \code{n = -1} @@ -31,7 +31,6 @@ as specified by the driver, but at most the remaining rows in the result set. 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 2546173d..98f0aa60 100644 --- a/man/dbGetInfo-DatabaseConnectorConnection-method.Rd +++ b/man/dbGetInfo-DatabaseConnectorConnection-method.Rd @@ -7,14 +7,14 @@ \S4method{dbGetInfo}{DatabaseConnectorConnection}(dbObj, ...) } \arguments{ -\item{dbObj}{An object inheriting from \linkS4class{DBIObject}, -i.e. \linkS4class{DBIDriver}, \linkS4class{DBIConnection}, -or a \linkS4class{DBIResult}} +\item{dbObj}{An object inheriting from \link[DBI:DBIObject-class]{DBIObject}, +i.e. \link[DBI:DBIDriver-class]{DBIDriver}, \link[DBI:DBIConnection-class]{DBIConnection}, +or a \link[DBI:DBIResult-class]{DBIResult}} \item{...}{Other arguments to methods.} } \value{ -For objects of class \linkS4class{DBIDriver}, \code{dbGetInfo()} +For objects of class \link[DBI:DBIDriver-class]{DBIDriver}, \code{dbGetInfo()} returns a named list that contains at least the following components: \itemize{ @@ -22,7 +22,7 @@ that contains at least the following components: \item \code{client.version}: the version of the DBMS client library. } -For objects of class \linkS4class{DBIConnection}, \code{dbGetInfo()} +For objects of class \link[DBI:DBIConnection-class]{DBIConnection}, \code{dbGetInfo()} returns a named list that contains at least the following components: \itemize{ @@ -35,7 +35,7 @@ It must not contain a \code{password} component. Components that are not applicable should be set to \code{NA}. } -For objects of class \linkS4class{DBIResult}, \code{dbGetInfo()} +For objects of class \link[DBI:DBIResult-class]{DBIResult}, \code{dbGetInfo()} returns a named list that contains at least the following components: \itemize{ @@ -51,10 +51,9 @@ as returned by \code{\link[DBI:dbHasCompleted]{dbHasCompleted()}}. } } \description{ -Retrieves information on objects of class \linkS4class{DBIDriver}, -\linkS4class{DBIConnection} or \linkS4class{DBIResult}. +Retrieves information on objects of class \link[DBI:DBIDriver-class]{DBIDriver}, +\link[DBI:DBIConnection-class]{DBIConnection} or \link[DBI:DBIResult-class]{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 f16a2c4c..31c30896 100644 --- a/man/dbGetInfo-DatabaseConnectorDriver-method.Rd +++ b/man/dbGetInfo-DatabaseConnectorDriver-method.Rd @@ -7,14 +7,14 @@ \S4method{dbGetInfo}{DatabaseConnectorDriver}(dbObj, ...) } \arguments{ -\item{dbObj}{An object inheriting from \linkS4class{DBIObject}, -i.e. \linkS4class{DBIDriver}, \linkS4class{DBIConnection}, -or a \linkS4class{DBIResult}} +\item{dbObj}{An object inheriting from \link[DBI:DBIObject-class]{DBIObject}, +i.e. \link[DBI:DBIDriver-class]{DBIDriver}, \link[DBI:DBIConnection-class]{DBIConnection}, +or a \link[DBI:DBIResult-class]{DBIResult}} \item{...}{Other arguments to methods.} } \value{ -For objects of class \linkS4class{DBIDriver}, \code{dbGetInfo()} +For objects of class \link[DBI:DBIDriver-class]{DBIDriver}, \code{dbGetInfo()} returns a named list that contains at least the following components: \itemize{ @@ -22,7 +22,7 @@ that contains at least the following components: \item \code{client.version}: the version of the DBMS client library. } -For objects of class \linkS4class{DBIConnection}, \code{dbGetInfo()} +For objects of class \link[DBI:DBIConnection-class]{DBIConnection}, \code{dbGetInfo()} returns a named list that contains at least the following components: \itemize{ @@ -35,7 +35,7 @@ It must not contain a \code{password} component. Components that are not applicable should be set to \code{NA}. } -For objects of class \linkS4class{DBIResult}, \code{dbGetInfo()} +For objects of class \link[DBI:DBIResult-class]{DBIResult}, \code{dbGetInfo()} returns a named list that contains at least the following components: \itemize{ @@ -51,10 +51,9 @@ as returned by \code{\link[DBI:dbHasCompleted]{dbHasCompleted()}}. } } \description{ -Retrieves information on objects of class \linkS4class{DBIDriver}, -\linkS4class{DBIConnection} or \linkS4class{DBIResult}. +Retrieves information on objects of class \link[DBI:DBIDriver-class]{DBIDriver}, +\link[DBI:DBIConnection-class]{DBIConnection} or \link[DBI:DBIResult-class]{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 5c24a0d2..9e7936fd 100644 --- a/man/dbGetQuery-DatabaseConnectorConnection-character-method.Rd +++ b/man/dbGetQuery-DatabaseConnectorConnection-character-method.Rd @@ -7,7 +7,7 @@ \S4method{dbGetQuery}{DatabaseConnectorConnection,character}(conn, statement, translate = TRUE, ...) } \arguments{ -\item{conn}{A \linkS4class{DBIConnection} object, as returned by +\item{conn}{A \link[DBI:DBIConnection-class]{DBIConnection} object, as returned by \code{\link[DBI:dbConnect]{dbConnect()}}.} \item{statement}{a character string containing SQL.} @@ -34,7 +34,6 @@ For retrieving chunked/paged results or for passing query parameters, see \code{\link[DBI:dbSendQuery]{dbSendQuery()}}, in particular the "The data retrieval flow" section. For retrieving results as an Arrow object, see \code{\link[DBI:dbGetQueryArrow]{dbGetQueryArrow()}}. -\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 d6c5b4c8..325f67e7 100644 --- a/man/dbGetRowCount-DatabaseConnectorDbiResult-method.Rd +++ b/man/dbGetRowCount-DatabaseConnectorDbiResult-method.Rd @@ -7,7 +7,7 @@ \S4method{dbGetRowCount}{DatabaseConnectorDbiResult}(res, ...) } \arguments{ -\item{res}{An object inheriting from \linkS4class{DBIResult}.} +\item{res}{An object inheriting from \link[DBI:DBIResult-class]{DBIResult}.} \item{...}{Other arguments passed on to methods.} } @@ -33,7 +33,6 @@ 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 2132cd14..ece3f12e 100644 --- a/man/dbGetRowCount-DatabaseConnectorJdbcResult-method.Rd +++ b/man/dbGetRowCount-DatabaseConnectorJdbcResult-method.Rd @@ -7,7 +7,7 @@ \S4method{dbGetRowCount}{DatabaseConnectorJdbcResult}(res, ...) } \arguments{ -\item{res}{An object inheriting from \linkS4class{DBIResult}.} +\item{res}{An object inheriting from \link[DBI:DBIResult-class]{DBIResult}.} \item{...}{Other arguments passed on to methods.} } @@ -33,7 +33,6 @@ 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 8d78f320..0677cd1e 100644 --- a/man/dbGetRowsAffected-DatabaseConnectorDbiResult-method.Rd +++ b/man/dbGetRowsAffected-DatabaseConnectorDbiResult-method.Rd @@ -7,7 +7,7 @@ \S4method{dbGetRowsAffected}{DatabaseConnectorDbiResult}(res, ...) } \arguments{ -\item{res}{An object inheriting from \linkS4class{DBIResult}.} +\item{res}{An object inheriting from \link[DBI:DBIResult-class]{DBIResult}.} \item{...}{Other arguments passed on to methods.} } @@ -28,7 +28,6 @@ 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 7b976480..bf978d4e 100644 --- a/man/dbGetRowsAffected-DatabaseConnectorJdbcResult-method.Rd +++ b/man/dbGetRowsAffected-DatabaseConnectorJdbcResult-method.Rd @@ -7,7 +7,7 @@ \S4method{dbGetRowsAffected}{DatabaseConnectorJdbcResult}(res, ...) } \arguments{ -\item{res}{An object inheriting from \linkS4class{DBIResult}.} +\item{res}{An object inheriting from \link[DBI:DBIResult-class]{DBIResult}.} \item{...}{Other arguments passed on to methods.} } @@ -28,7 +28,6 @@ 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 79745b41..2d91c763 100644 --- a/man/dbGetStatement-DatabaseConnectorDbiResult-method.Rd +++ b/man/dbGetStatement-DatabaseConnectorDbiResult-method.Rd @@ -7,7 +7,7 @@ \S4method{dbGetStatement}{DatabaseConnectorDbiResult}(res, ...) } \arguments{ -\item{res}{An object inheriting from \linkS4class{DBIResult}.} +\item{res}{An object inheriting from \link[DBI:DBIResult-class]{DBIResult}.} \item{...}{Other arguments passed on to methods.} } @@ -20,7 +20,6 @@ either \code{\link[DBI:dbSendQuery]{dbSendQuery()}} or 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 116027d9..a464f11e 100644 --- a/man/dbGetStatement-DatabaseConnectorJdbcResult-method.Rd +++ b/man/dbGetStatement-DatabaseConnectorJdbcResult-method.Rd @@ -7,7 +7,7 @@ \S4method{dbGetStatement}{DatabaseConnectorJdbcResult}(res, ...) } \arguments{ -\item{res}{An object inheriting from \linkS4class{DBIResult}.} +\item{res}{An object inheriting from \link[DBI:DBIResult-class]{DBIResult}.} \item{...}{Other arguments passed on to methods.} } @@ -20,7 +20,6 @@ either \code{\link[DBI:dbSendQuery]{dbSendQuery()}} or 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 f4e2a050..5f1fb095 100644 --- a/man/dbHasCompleted-DatabaseConnectorDbiResult-method.Rd +++ b/man/dbHasCompleted-DatabaseConnectorDbiResult-method.Rd @@ -7,7 +7,7 @@ \S4method{dbHasCompleted}{DatabaseConnectorDbiResult}(res, ...) } \arguments{ -\item{res}{An object inheriting from \linkS4class{DBIResult}.} +\item{res}{An object inheriting from \link[DBI:DBIResult-class]{DBIResult}.} \item{...}{Other arguments passed on to methods.} } @@ -24,7 +24,6 @@ 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 e51aacda..d5de8d59 100644 --- a/man/dbHasCompleted-DatabaseConnectorJdbcResult-method.Rd +++ b/man/dbHasCompleted-DatabaseConnectorJdbcResult-method.Rd @@ -7,7 +7,7 @@ \S4method{dbHasCompleted}{DatabaseConnectorJdbcResult}(res, ...) } \arguments{ -\item{res}{An object inheriting from \linkS4class{DBIResult}.} +\item{res}{An object inheriting from \link[DBI:DBIResult-class]{DBIResult}.} \item{...}{Other arguments passed on to methods.} } @@ -24,7 +24,6 @@ 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 38a0d863..a4bce0af 100644 --- a/man/dbIsValid-DatabaseConnectorDbiConnection-method.Rd +++ b/man/dbIsValid-DatabaseConnectorDbiConnection-method.Rd @@ -7,9 +7,9 @@ \S4method{dbIsValid}{DatabaseConnectorDbiConnection}(dbObj, ...) } \arguments{ -\item{dbObj}{An object inheriting from \linkS4class{DBIObject}, -i.e. \linkS4class{DBIDriver}, \linkS4class{DBIConnection}, -or a \linkS4class{DBIResult}} +\item{dbObj}{An object inheriting from \link[DBI:DBIObject-class]{DBIObject}, +i.e. \link[DBI:DBIDriver-class]{DBIDriver}, \link[DBI:DBIConnection-class]{DBIConnection}, +or a \link[DBI:DBIResult-class]{DBIResult}} \item{...}{Other arguments to methods.} } @@ -17,14 +17,14 @@ or a \linkS4class{DBIResult}} \code{dbIsValid()} returns a logical scalar, \code{TRUE} if the object specified by \code{dbObj} is valid, \code{FALSE} otherwise. -A \linkS4class{DBIConnection} object is initially valid, +A \link[DBI:DBIConnection-class]{DBIConnection} object is initially valid, and becomes invalid after disconnecting with \code{\link[DBI:dbDisconnect]{dbDisconnect()}}. For an invalid connection object (e.g., for some drivers if the object is saved to a file and then restored), the method also returns \code{FALSE}. -A \linkS4class{DBIResult} object is valid after a call to \code{\link[DBI:dbSendQuery]{dbSendQuery()}}, +A \link[DBI:DBIResult-class]{DBIResult} object is valid after a call to \code{\link[DBI:dbSendQuery]{dbSendQuery()}}, and stays valid even after all rows have been fetched; only clearing it with \code{\link[DBI:dbClearResult]{dbClearResult()}} invalidates it. -A \linkS4class{DBIResult} object is also valid after a call to \code{\link[DBI:dbSendStatement]{dbSendStatement()}}, +A \link[DBI:DBIResult-class]{DBIResult} object is also valid after a call to \code{\link[DBI:dbSendStatement]{dbSendStatement()}}, and stays valid after querying the number of rows affected; only clearing it with \code{\link[DBI:dbClearResult]{dbClearResult()}} invalidates it. If the connection to the database system is dropped (e.g., due to @@ -35,7 +35,6 @@ 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 63f50661..46170627 100644 --- a/man/dbIsValid-DatabaseConnectorJdbcConnection-method.Rd +++ b/man/dbIsValid-DatabaseConnectorJdbcConnection-method.Rd @@ -7,9 +7,9 @@ \S4method{dbIsValid}{DatabaseConnectorJdbcConnection}(dbObj, ...) } \arguments{ -\item{dbObj}{An object inheriting from \linkS4class{DBIObject}, -i.e. \linkS4class{DBIDriver}, \linkS4class{DBIConnection}, -or a \linkS4class{DBIResult}} +\item{dbObj}{An object inheriting from \link[DBI:DBIObject-class]{DBIObject}, +i.e. \link[DBI:DBIDriver-class]{DBIDriver}, \link[DBI:DBIConnection-class]{DBIConnection}, +or a \link[DBI:DBIResult-class]{DBIResult}} \item{...}{Other arguments to methods.} } @@ -17,14 +17,14 @@ or a \linkS4class{DBIResult}} \code{dbIsValid()} returns a logical scalar, \code{TRUE} if the object specified by \code{dbObj} is valid, \code{FALSE} otherwise. -A \linkS4class{DBIConnection} object is initially valid, +A \link[DBI:DBIConnection-class]{DBIConnection} object is initially valid, and becomes invalid after disconnecting with \code{\link[DBI:dbDisconnect]{dbDisconnect()}}. For an invalid connection object (e.g., for some drivers if the object is saved to a file and then restored), the method also returns \code{FALSE}. -A \linkS4class{DBIResult} object is valid after a call to \code{\link[DBI:dbSendQuery]{dbSendQuery()}}, +A \link[DBI:DBIResult-class]{DBIResult} object is valid after a call to \code{\link[DBI:dbSendQuery]{dbSendQuery()}}, and stays valid even after all rows have been fetched; only clearing it with \code{\link[DBI:dbClearResult]{dbClearResult()}} invalidates it. -A \linkS4class{DBIResult} object is also valid after a call to \code{\link[DBI:dbSendStatement]{dbSendStatement()}}, +A \link[DBI:DBIResult-class]{DBIResult} object is also valid after a call to \code{\link[DBI:dbSendStatement]{dbSendStatement()}}, and stays valid after querying the number of rows affected; only clearing it with \code{\link[DBI:dbClearResult]{dbClearResult()}} invalidates it. If the connection to the database system is dropped (e.g., due to @@ -35,7 +35,6 @@ 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 aefe307e..9aa1cc58 100644 --- a/man/dbListFields-DatabaseConnectorConnection-character-method.Rd +++ b/man/dbListFields-DatabaseConnectorConnection-character-method.Rd @@ -7,7 +7,7 @@ \S4method{dbListFields}{DatabaseConnectorConnection,character}(conn, name, databaseSchema = NULL, ...) } \arguments{ -\item{conn}{A \linkS4class{DBIConnection} object, as returned by +\item{conn}{A \link[DBI:DBIConnection-class]{DBIConnection} object, as returned by \code{\link[DBI:dbConnect]{dbConnect()}}.} \item{name}{The table name, passed on to \code{\link[DBI:dbQuoteIdentifier]{dbQuoteIdentifier()}}. Options are: @@ -35,7 +35,6 @@ 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 2a4b54aa..5aae0f73 100644 --- a/man/dbListTables-DatabaseConnectorConnection-method.Rd +++ b/man/dbListTables-DatabaseConnectorConnection-method.Rd @@ -7,7 +7,7 @@ \S4method{dbListTables}{DatabaseConnectorConnection}(conn, databaseSchema = NULL, ...) } \arguments{ -\item{conn}{A \linkS4class{DBIConnection} object, as returned by +\item{conn}{A \link[DBI:DBIConnection-class]{DBIConnection} object, as returned by \code{\link[DBI:dbConnect]{dbConnect()}}.} \item{databaseSchema}{The name of the database schema. See details for platform-specific details.} @@ -35,7 +35,6 @@ 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 9a6c2e7c..2c69a1c2 100644 --- a/man/dbReadTable-DatabaseConnectorConnection-character-method.Rd +++ b/man/dbReadTable-DatabaseConnectorConnection-character-method.Rd @@ -14,7 +14,7 @@ ) } \arguments{ -\item{conn}{A \linkS4class{DBIConnection} object, as returned by +\item{conn}{A \link[DBI:DBIConnection-class]{DBIConnection} object, as returned by \code{\link[DBI:dbConnect]{dbConnect()}}.} \item{name}{The table name, passed on to \code{\link[DBI:dbQuoteIdentifier]{dbQuoteIdentifier()}}. Options are: @@ -72,7 +72,6 @@ a column to row names and converting the column names to valid R identifiers. Use \code{\link[DBI:dbReadTableArrow]{dbReadTableArrow()}} instead to obtain an Arrow object. -\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 528d76fd..f88ce34b 100644 --- a/man/dbRemoveTable-DatabaseConnectorConnection-ANY-method.Rd +++ b/man/dbRemoveTable-DatabaseConnectorConnection-ANY-method.Rd @@ -14,7 +14,7 @@ ) } \arguments{ -\item{conn}{A \linkS4class{DBIConnection} object, as returned by +\item{conn}{A \link[DBI:DBIConnection-class]{DBIConnection} object, as returned by \code{\link[DBI:dbConnect]{dbConnect()}}.} \item{name}{The table name, passed on to \code{\link[DBI:dbQuoteIdentifier]{dbQuoteIdentifier()}}. Options are: @@ -44,7 +44,6 @@ 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 67306fae..fdf5766d 100644 --- a/man/dbSendQuery-DatabaseConnectorDbiConnection-character-method.Rd +++ b/man/dbSendQuery-DatabaseConnectorDbiConnection-character-method.Rd @@ -7,7 +7,7 @@ \S4method{dbSendQuery}{DatabaseConnectorDbiConnection,character}(conn, statement, translate = TRUE, ...) } \arguments{ -\item{conn}{A \linkS4class{DBIConnection} object, as returned by +\item{conn}{A \link[DBI:DBIConnection-class]{DBIConnection} object, as returned by \code{\link[DBI:dbConnect]{dbConnect()}}.} \item{statement}{a character string containing SQL.} @@ -18,7 +18,7 @@ } \value{ \code{dbSendQuery()} returns -an S4 object that inherits from \linkS4class{DBIResult}. +an S4 object that inherits from \link[DBI:DBIResult-class]{DBIResult}. The result set can be used with \code{\link[DBI:dbFetch]{dbFetch()}} to extract records. Once you have finished using a result, make sure to clear it with \code{\link[DBI:dbClearResult]{dbClearResult()}}. @@ -33,7 +33,6 @@ For interactive use, you should almost always prefer \code{\link[DBI:dbGetQuery] Use \code{\link[DBI:dbSendQueryArrow]{dbSendQueryArrow()}} or \code{\link[DBI:dbGetQueryArrow]{dbGetQueryArrow()}} instead to retrieve the results as an Arrow object. -\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 d3a85bea..95d07312 100644 --- a/man/dbSendQuery-DatabaseConnectorJdbcConnection-character-method.Rd +++ b/man/dbSendQuery-DatabaseConnectorJdbcConnection-character-method.Rd @@ -7,7 +7,7 @@ \S4method{dbSendQuery}{DatabaseConnectorJdbcConnection,character}(conn, statement, translate = TRUE, ...) } \arguments{ -\item{conn}{A \linkS4class{DBIConnection} object, as returned by +\item{conn}{A \link[DBI:DBIConnection-class]{DBIConnection} object, as returned by \code{\link[DBI:dbConnect]{dbConnect()}}.} \item{statement}{a character string containing SQL.} @@ -18,7 +18,7 @@ } \value{ \code{dbSendQuery()} returns -an S4 object that inherits from \linkS4class{DBIResult}. +an S4 object that inherits from \link[DBI:DBIResult-class]{DBIResult}. The result set can be used with \code{\link[DBI:dbFetch]{dbFetch()}} to extract records. Once you have finished using a result, make sure to clear it with \code{\link[DBI:dbClearResult]{dbClearResult()}}. @@ -33,7 +33,6 @@ For interactive use, you should almost always prefer \code{\link[DBI:dbGetQuery] Use \code{\link[DBI:dbSendQueryArrow]{dbSendQueryArrow()}} or \code{\link[DBI:dbGetQueryArrow]{dbGetQueryArrow()}} instead to retrieve the results as an Arrow object. -\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 e0b6a9b9..0f0200ea 100644 --- a/man/dbSendStatement-DatabaseConnectorConnection-character-method.Rd +++ b/man/dbSendStatement-DatabaseConnectorConnection-character-method.Rd @@ -7,7 +7,7 @@ \S4method{dbSendStatement}{DatabaseConnectorConnection,character}(conn, statement, translate = TRUE, ...) } \arguments{ -\item{conn}{A \linkS4class{DBIConnection} object, as returned by +\item{conn}{A \link[DBI:DBIConnection-class]{DBIConnection} object, as returned by \code{\link[DBI:dbConnect]{dbConnect()}}.} \item{statement}{a character string containing SQL.} @@ -18,7 +18,7 @@ } \value{ \code{dbSendStatement()} returns -an S4 object that inherits from \linkS4class{DBIResult}. +an S4 object that inherits from \link[DBI:DBIResult-class]{DBIResult}. The result set can be used with \code{\link[DBI:dbGetRowsAffected]{dbGetRowsAffected()}} to determine the number of rows affected by the query. Once you have finished using a result, make sure to clear it @@ -33,7 +33,6 @@ 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-ANY-method.Rd index 04d6d5be..e9b01bc4 100644 --- a/man/dbWriteTable-DatabaseConnectorConnection-ANY-method.Rd +++ b/man/dbWriteTable-DatabaseConnectorConnection-ANY-method.Rd @@ -18,7 +18,7 @@ ) } \arguments{ -\item{conn}{A \linkS4class{DBIConnection} object, as returned by +\item{conn}{A \link[DBI:DBIConnection-class]{DBIConnection} object, as returned by \code{\link[DBI:dbConnect]{dbConnect()}}.} \item{name}{The table name, passed on to \code{\link[DBI:dbQuoteIdentifier]{dbQuoteIdentifier()}}. Options are: @@ -56,7 +56,6 @@ 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/man/dbms.Rd b/man/dbms.Rd index 7eb1ae2e..93f36e31 100644 --- a/man/dbms.Rd +++ b/man/dbms.Rd @@ -8,7 +8,7 @@ dbms(connection) } \arguments{ \item{connection}{The connection to the database server created using either -\code{\link[=connect]{connect()}} or \code{\link[=dbConnect]{dbConnect()}}.} +\code{\link[=connect]{connect()}} or \code{\link[DBI:dbConnect]{DBI::dbConnect()}}.} } \value{ The name of the database (dbms) used by SqlRender diff --git a/man/disconnect.Rd b/man/disconnect.Rd index ba2b80e6..6bf8638a 100644 --- a/man/disconnect.Rd +++ b/man/disconnect.Rd @@ -8,7 +8,7 @@ disconnect(connection) } \arguments{ \item{connection}{The connection to the database server created using either -\code{\link[=connect]{connect()}} or \code{\link[=dbConnect]{dbConnect()}}.} +\code{\link[=connect]{connect()}} or \code{\link[DBI:dbConnect]{DBI::dbConnect()}}.} } \description{ Close the connection to the server. diff --git a/man/dropEmulatedTempTables.Rd b/man/dropEmulatedTempTables.Rd index 27c38494..3b99bf6c 100644 --- a/man/dropEmulatedTempTables.Rd +++ b/man/dropEmulatedTempTables.Rd @@ -11,7 +11,7 @@ dropEmulatedTempTables( } \arguments{ \item{connection}{The connection to the database server created using either -\code{\link[=connect]{connect()}} or \code{\link[=dbConnect]{dbConnect()}}.} +\code{\link[=connect]{connect()}} or \code{\link[DBI:dbConnect]{DBI::dbConnect()}}.} \item{tempEmulationSchema}{Some database platforms like Oracle and Impala do not truly support temp tables. To emulate temp tables, provide a schema with write privileges where temp tables diff --git a/man/executeSql.Rd b/man/executeSql.Rd index 4fd264ad..493868e0 100644 --- a/man/executeSql.Rd +++ b/man/executeSql.Rd @@ -16,7 +16,7 @@ executeSql( } \arguments{ \item{connection}{The connection to the database server created using either -\code{\link[=connect]{connect()}} or \code{\link[=dbConnect]{dbConnect()}}.} +\code{\link[=connect]{connect()}} or \code{\link[DBI:dbConnect]{DBI::dbConnect()}}.} \item{sql}{The SQL to be executed} diff --git a/man/existsTable.Rd b/man/existsTable.Rd index e5db7315..7060cbd6 100644 --- a/man/existsTable.Rd +++ b/man/existsTable.Rd @@ -8,7 +8,7 @@ existsTable(connection, databaseSchema, tableName) } \arguments{ \item{connection}{The connection to the database server created using either -\code{\link[=connect]{connect()}} or \code{\link[=dbConnect]{dbConnect()}}.} +\code{\link[=connect]{connect()}} or \code{\link[DBI:dbConnect]{DBI::dbConnect()}}.} \item{databaseSchema}{The name of the database schema. See details for platform-specific details.} diff --git a/man/getTableNames.Rd b/man/getTableNames.Rd index 448526a6..c5e5061c 100644 --- a/man/getTableNames.Rd +++ b/man/getTableNames.Rd @@ -8,7 +8,7 @@ getTableNames(connection, databaseSchema = NULL, cast = "lower") } \arguments{ \item{connection}{The connection to the database server created using either -\code{\link[=connect]{connect()}} or \code{\link[=dbConnect]{dbConnect()}}.} +\code{\link[=connect]{connect()}} or \code{\link[DBI:dbConnect]{DBI::dbConnect()}}.} \item{databaseSchema}{The name of the database schema. See details for platform-specific details.} diff --git a/man/insertTable.Rd b/man/insertTable.Rd index 0b0ce640..637243b7 100644 --- a/man/insertTable.Rd +++ b/man/insertTable.Rd @@ -22,7 +22,7 @@ insertTable( } \arguments{ \item{connection}{The connection to the database server created using either -\code{\link[=connect]{connect()}} or \code{\link[=dbConnect]{dbConnect()}}.} +\code{\link[=connect]{connect()}} or \code{\link[DBI:dbConnect]{DBI::dbConnect()}}.} \item{databaseSchema}{The name of the database schema. See details for platform-specific details.} diff --git a/man/jdbcDrivers.Rd b/man/jdbcDrivers.Rd index fdb0e202..272701d2 100644 --- a/man/jdbcDrivers.Rd +++ b/man/jdbcDrivers.Rd @@ -15,12 +15,12 @@ Use the \code{\link[=downloadJdbcDrivers]{downloadJdbcDrivers()}} function to do \section{Netezza}{ Read the instructions -\href{https://www.ibm.com/docs/en/SSULQD_7.2.1/com.ibm.nz.datacon.doc/t_datacon_setup_JDBC.html}{here} +\href{https://www.ibm.com/docs/en/netezza?topic=dls-installing-configuring-jdbc}{here} on how to obtain the Netezza JDBC driver. } \section{Impala}{ -Go to \href{https://www.cloudera.com/downloads/connectors/impala/jdbc/2-5-5.html}{Cloudera's site}, pick +Go to \href{https://www.cloudera.com/downloads/connectors/impala/jdbc.html}{Cloudera's site}, pick your OS version, and click "GET IT NOW!'. Register, and you should be able to download the driver. } diff --git a/man/lowLevelExecuteSql.Rd b/man/lowLevelExecuteSql.Rd index 4a843cc4..72e8e96c 100644 --- a/man/lowLevelExecuteSql.Rd +++ b/man/lowLevelExecuteSql.Rd @@ -8,7 +8,7 @@ lowLevelExecuteSql(connection, sql) } \arguments{ \item{connection}{The connection to the database server created using either -\code{\link[=connect]{connect()}} or \code{\link[=dbConnect]{dbConnect()}}.} +\code{\link[=connect]{connect()}} or \code{\link[DBI:dbConnect]{DBI::dbConnect()}}.} \item{sql}{The SQL to be executed} } diff --git a/man/lowLevelQuerySql.Rd b/man/lowLevelQuerySql.Rd index b2506c91..8e1b33ba 100644 --- a/man/lowLevelQuerySql.Rd +++ b/man/lowLevelQuerySql.Rd @@ -14,7 +14,7 @@ lowLevelQuerySql( } \arguments{ \item{connection}{The connection to the database server created using either -\code{\link[=connect]{connect()}} or \code{\link[=dbConnect]{dbConnect()}}.} +\code{\link[=connect]{connect()}} or \code{\link[DBI:dbConnect]{DBI::dbConnect()}}.} \item{query}{The SQL statement to retrieve the data} diff --git a/man/lowLevelQuerySqlToAndromeda.Rd b/man/lowLevelQuerySqlToAndromeda.Rd index 886087b5..3260590a 100644 --- a/man/lowLevelQuerySqlToAndromeda.Rd +++ b/man/lowLevelQuerySqlToAndromeda.Rd @@ -18,7 +18,7 @@ lowLevelQuerySqlToAndromeda( } \arguments{ \item{connection}{The connection to the database server created using either -\code{\link[=connect]{connect()}} or \code{\link[=dbConnect]{dbConnect()}}.} +\code{\link[=connect]{connect()}} or \code{\link[DBI:dbConnect]{DBI::dbConnect()}}.} \item{query}{The SQL statement to retrieve the data} diff --git a/man/querySql.Rd b/man/querySql.Rd index a43f698d..b2ae0d67 100644 --- a/man/querySql.Rd +++ b/man/querySql.Rd @@ -15,7 +15,7 @@ querySql( } \arguments{ \item{connection}{The connection to the database server created using either -\code{\link[=connect]{connect()}} or \code{\link[=dbConnect]{dbConnect()}}.} +\code{\link[=connect]{connect()}} or \code{\link[DBI:dbConnect]{DBI::dbConnect()}}.} \item{sql}{The SQL to be send.} diff --git a/man/querySqlToAndromeda.Rd b/man/querySqlToAndromeda.Rd index 94541488..2a806601 100644 --- a/man/querySqlToAndromeda.Rd +++ b/man/querySqlToAndromeda.Rd @@ -18,7 +18,7 @@ querySqlToAndromeda( } \arguments{ \item{connection}{The connection to the database server created using either -\code{\link[=connect]{connect()}} or \code{\link[=dbConnect]{dbConnect()}}.} +\code{\link[=connect]{connect()}} or \code{\link[DBI:dbConnect]{DBI::dbConnect()}}.} \item{sql}{The SQL to be sent.} diff --git a/man/renderTranslateExecuteSql.Rd b/man/renderTranslateExecuteSql.Rd index 5524c66f..01f51f2a 100644 --- a/man/renderTranslateExecuteSql.Rd +++ b/man/renderTranslateExecuteSql.Rd @@ -19,7 +19,7 @@ renderTranslateExecuteSql( } \arguments{ \item{connection}{The connection to the database server created using either -\code{\link[=connect]{connect()}} or \code{\link[=dbConnect]{dbConnect()}}.} +\code{\link[=connect]{connect()}} or \code{\link[DBI:dbConnect]{DBI::dbConnect()}}.} \item{sql}{The SQL to be executed} diff --git a/man/renderTranslateQueryApplyBatched.Rd b/man/renderTranslateQueryApplyBatched.Rd index e7f7fe5a..94c4cc57 100644 --- a/man/renderTranslateQueryApplyBatched.Rd +++ b/man/renderTranslateQueryApplyBatched.Rd @@ -20,7 +20,7 @@ renderTranslateQueryApplyBatched( } \arguments{ \item{connection}{The connection to the database server created using either -\code{\link[=connect]{connect()}} or \code{\link[=dbConnect]{dbConnect()}}.} +\code{\link[=connect]{connect()}} or \code{\link[DBI:dbConnect]{DBI::dbConnect()}}.} \item{sql}{The SQL to be send.} diff --git a/man/renderTranslateQuerySql.Rd b/man/renderTranslateQuerySql.Rd index 1fc6712a..88f0e284 100644 --- a/man/renderTranslateQuerySql.Rd +++ b/man/renderTranslateQuerySql.Rd @@ -18,7 +18,7 @@ renderTranslateQuerySql( } \arguments{ \item{connection}{The connection to the database server created using either -\code{\link[=connect]{connect()}} or \code{\link[=dbConnect]{dbConnect()}}.} +\code{\link[=connect]{connect()}} or \code{\link[DBI:dbConnect]{DBI::dbConnect()}}.} \item{sql}{The SQL to be send.} diff --git a/man/renderTranslateQuerySqlToAndromeda.Rd b/man/renderTranslateQuerySqlToAndromeda.Rd index 6d0aa7a7..bb55a754 100644 --- a/man/renderTranslateQuerySqlToAndromeda.Rd +++ b/man/renderTranslateQuerySqlToAndromeda.Rd @@ -21,7 +21,7 @@ renderTranslateQuerySqlToAndromeda( } \arguments{ \item{connection}{The connection to the database server created using either -\code{\link[=connect]{connect()}} or \code{\link[=dbConnect]{dbConnect()}}.} +\code{\link[=connect]{connect()}} or \code{\link[DBI:dbConnect]{DBI::dbConnect()}}.} \item{sql}{The SQL to be send.} diff --git a/tests/testthat/test-sendUpdates.R b/tests/testthat/test-sendUpdates.R index 29109aa6..52b88d8c 100644 --- a/tests/testthat/test-sendUpdates.R +++ b/tests/testthat/test-sendUpdates.R @@ -1,8 +1,9 @@ library(testthat) -sql <- "IF OBJECT_ID('tempdb..#temp', 'U') IS NOT NULL DROP TABLE #temp; - CREATE TABLE #temp (x INT); - INSERT INTO #temp (x) SELECT 123; +# Treating create temp table as separate statement because number of rows affected depends on +# whether we're using temp table emulation: +createSql <- "CREATE TABLE #temp (x INT);" +sql <- "INSERT INTO #temp (x) SELECT 123; DELETE FROM #temp WHERE x = 123; DROP TABLE #temp;" @@ -12,10 +13,16 @@ for (testServer in testServers) { options(sqlRenderTempEmulationSchema = testServer$tempEmulationSchema) on.exit(dropEmulatedTempTables(connection)) on.exit(disconnect(connection), add = TRUE) - expect_equal(renderTranslateExecuteSql(connection, sql), c(0, 0, 1, 1, 0)) - expect_equal(renderTranslateExecuteSql(connection, sql, runAsBatch = TRUE), c(0, 0, 1, 1, 0)) - rowsAffected <- dbSendStatement(connection, sql) - expect_equal(dbGetRowsAffected(rowsAffected), 2) - dbClearResult(rowsAffected) + renderTranslateExecuteSql(connection, createSql) + expect_equal(renderTranslateExecuteSql(connection, sql), c(1, 1, 0)) + if (testServer$connectionDetails$dbms != "bigquery") { + # Avoid rate limit error on BigQuery + renderTranslateExecuteSql(connection, createSql) + expect_equal(renderTranslateExecuteSql(connection, sql, runAsBatch = TRUE), c(1, 1, 0)) + renderTranslateExecuteSql(connection, createSql) + rowsAffected <- dbSendStatement(connection, sql) + expect_equal(dbGetRowsAffected(rowsAffected), 2) + dbClearResult(rowsAffected) + } }) }