Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
# Conflicts:
#	inst/doc/DbiAndDbplyr.pdf
  • Loading branch information
Schuemie authored and Schuemie committed Jan 30, 2023
2 parents 3144d21 + d2e0c89 commit 5176e98
Show file tree
Hide file tree
Showing 165 changed files with 8,368 additions and 2,112 deletions.
2 changes: 2 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ compare_versions
_pkgdown.yml
docs
.github
errorReportSql.txt
^CRAN-SUBMISSION$
4 changes: 2 additions & 2 deletions .github/workflows/R_CMD_check_Hades.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
CDM5_SPARK_CONNECTION_STRING: ${{ secrets.CDM5_SPARK_CONNECTION_STRING }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: r-lib/actions/setup-r@v2
with:
Expand Down Expand Up @@ -114,7 +114,7 @@ jobs:

steps:

- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
on:
schedule:
- cron: '0 8 * * 2' # every Tuesday at 8 am UTC
- cron: '0 3 * * 0' # every Sunday at 3am UTC

name: 'R check main'
name: 'R check'

jobs:
R-CMD-check-main:
Expand Down Expand Up @@ -45,7 +45,7 @@ jobs:
CDM5_SPARK_CONNECTION_STRING: ${{ secrets.CDM5_SPARK_CONNECTION_STRING }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: r-lib/actions/setup-r@v2
with:
Expand Down
3 changes: 3 additions & 0 deletions CRAN-SUBMISSION
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Version: 6.0.0
Date: 2023-01-30 10:59:45 UTC
SHA: 352a46f3b48247aaf2c39336f719015996b05b42
25 changes: 17 additions & 8 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: DatabaseConnector
Type: Package
Title: Connecting to Various Database Platforms
Version: 5.1.0
Date: 2022-09-23
Version: 6.0.0
Date: 2023-01-30
Authors@R: c(
person("Martijn", "Schuemie", email = "[email protected]", role = c("aut", "cre")),
person("Marc", "Suchard", role = c("aut")),
Expand All @@ -14,21 +14,24 @@ Authors@R: c(
)
Description: An R 'DataBase Interface' ('DBI') compatible interface to various database platforms ('PostgreSQL', 'Oracle', 'Microsoft SQL Server',
'Amazon Redshift', 'Microsoft Parallel Database Warehouse', 'IBM Netezza', 'Apache Impala', 'Google BigQuery', 'Snowflake', 'Spark', and 'SQLite'). Also includes support for
fetching data as 'Andromeda' objects. Uses 'Java Database Connectivity' ('JDBC') to connect to databases (except SQLite).
fetching data as 'Andromeda' objects. Uses either 'Java Database Connectivity' ('JDBC') or other DB I drivers to connect to databases.
SystemRequirements: Java version 8 or higher (https://www.java.com/)
Depends:
R (>= 2.10)
R (>= 4.0.0)
Imports:
rJava,
SqlRender (>= 1.8.3),
SqlRender (>= 1.12.0),
methods,
stringr,
readr,
rlang,
utils,
DBI (>= 1.0.0),
urltools,
bit64
bit64,
checkmate,
digest,
dbplyr (>= 2.3.0)
Suggests:
aws.s3,
R.utils,
Expand All @@ -40,11 +43,17 @@ Suggests:
RSQLite,
ssh,
Andromeda,
dplyr
dplyr,
RPostgres,
odbc,
duckdb,
pool,
ParallelLogger
License: Apache License
VignetteBuilder: knitr
URL: https://ohdsi.github.io/DatabaseConnector/, https://github.com/OHDSI/DatabaseConnector
BugReports: https://github.com/OHDSI/DatabaseConnector/issues
Copyright: See file COPYRIGHTS
RoxygenNote: 7.2.1
RoxygenNote: 7.2.3
Roxygen: list(markdown = TRUE)
Encoding: UTF-8
18 changes: 17 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -13,33 +13,48 @@ S3method(lowLevelQuerySqlToAndromeda,default)
S3method(renderTranslateQueryApplyBatched,DatabaseConnectorDbiConnection)
S3method(renderTranslateQueryApplyBatched,default)
export(DatabaseConnectorDriver)
export(assertTempEmulationSchemaSet)
export(computeDataHash)
export(connect)
export(createConnectionDetails)
export(createDbiConnectionDetails)
export(createZipFile)
export(dateAdd)
export(dateDiff)
export(dateFromParts)
export(day)
export(dbms)
export(disconnect)
export(downloadJdbcDrivers)
export(dropEmulatedTempTables)
export(eoMonth)
export(executeSql)
export(existsTable)
export(extractQueryTimes)
export(getAvailableJavaHeapSpace)
export(getTableNames)
export(inDatabaseSchema)
export(insertTable)
export(isSqlReservedWord)
export(lowLevelExecuteSql)
export(lowLevelQuerySql)
export(lowLevelQuerySqlToAndromeda)
export(month)
export(querySql)
export(querySqlToAndromeda)
export(renderTranslateExecuteSql)
export(renderTranslateQueryApplyBatched)
export(renderTranslateQuerySql)
export(renderTranslateQuerySqlToAndromeda)
export(requiresTempEmulation)
export(year)
exportClasses("Microsoft SQL Server")
exportClasses(DatabaseConnectorConnection)
exportClasses(DatabaseConnectorDbiConnection)
exportClasses(DatabaseConnectorDbiResult)
exportClasses(DatabaseConnectorDriver)
exportClasses(DatabaseConnectorJdbcConnection)
exportClasses(DatabaseConnectorResult)
exportClasses(DatabaseConnectorJdbcResult)
exportMethods(dbAppendTable)
exportMethods(dbCanConnect)
exportMethods(dbClearResult)
Expand All @@ -50,6 +65,7 @@ exportMethods(dbDisconnect)
exportMethods(dbExecute)
exportMethods(dbExistsTable)
exportMethods(dbFetch)
exportMethods(dbGetInfo)
exportMethods(dbGetQuery)
exportMethods(dbGetRowCount)
exportMethods(dbGetRowsAffected)
Expand Down
38 changes: 38 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,41 @@
DatabaseConnector 6.0.0
=======================

Changes:

1. Complete overhaul of DBI interface. DBI functions now apply translation to all incoming SQL, thus making the DatabaseConnector DBI interface an interface to a virtual database platform speaking OHDSISql as defined in `SqlRender`. This should aid write once - execute everywhere code development. It also allows using `dbplyr` with `DatabaseConnector`.

2. Adding `requiresTempEmulation()` and `assertTempEmulationSchemaSet()` functions.

3. The `dropEmulatedTempTables()` function can be called on all platforms (it doesn't do anything on platforms not requiring temp table emulation).

4. Ensuring `dbms()`, `insertTable()`, `renderTranslateExecuteSql()`, `renderTranslateQuerySql()`, and `renderTranslateQuerySqlToAndromeda()` functions work with connection pool objects.

5. Adding logging at 'TRACE' level for performance profiling using the `ParallelLogger` package. Use `options(LOG_DATABASECONNECTOR_SQL = TRUE)` to enable. The query times can be automatically extracted using the new `extractQueryTimes()` function.

6. Adding the `computeDataHash()` function.

7. The `inserTable()` function now converts logical fields to integer fields (and throws a warning if it does so).

8. The `dbListTables()` and `getTableNames()` functions return results in lowercase instead of uppercase for consistency with DBI functions.

9. Throwing informative error if user calls `createConnectionDetails()` with credential arguments that cannot be evaluated in a multi-threading setting.

10. Supporting external tables on RedShift.

11. Adding support for ODBC connections to Spark.

12. Querying to Andromeda when using a DBI driver (instead of a JDBC driver) now also uses batching to avoid running out of memory.

13. Adding `appendToTable` argument to `querySqlToAndromeda()`, `renderTranslateQuerySqlToAndromeda()`, and `lowLevelQuerySqlToAndromeda()`.



Bugfixes:

1. Fix error when calling `insertTable()` and all column names require quotes.


DatabaseConnector 5.1.0
=======================

Expand Down
Loading

0 comments on commit 5176e98

Please sign in to comment.