OHDSI / ResultModelManager

RMM is an R package designed to handle common ohdsi results data management functions by providing a common API for data model migrations and definitions
https://ohdsi.github.io/ResultModelManager/
Apache License 2.0
3 stars 3 forks source link

connectionHandler$tbl() compatible with DatabaseConnector dbplyr #32

Closed javier-gracia-tabuenca-tuni closed 7 months ago

javier-gracia-tabuenca-tuni commented 1 year ago

Should ConnectionHandler create dbplyr tables in the same way that DatabaseConnector Replacing https://github.com/OHDSI/ResultModelManager/blob/e513ba2d9bc4dbe6460b2f793628379cecd782ed/R/ConnectionHandler.R#L67

with

table <- DatabaseConnector::inDatabaseSchema(databaseSchema, table)
javier-gracia-tabuenca-tuni commented 1 year ago

Also, wouldn't it make more sense to have connectionHandler object in DatabaseConnector ??? i think connectionHandler is very handy

azimov commented 1 year ago

Thanks Javier - yes the table could use the DatabaseConnector functionality. Note that these classes actually pre-date the DatabaseConnector dbplyr support and so some code will look like this. I would gladly accept a PR if someone wished to write one ;) to change something like this to use the DatabaseConnector standard.

In terms of the use of connectionHandelers in DatabaseConnector, this is really up to Martijn who maintains that package. Though I imagine that they could be useful they are still quite immature and the main principle of DatabaseConnector is to maintain stability and interoperability first. Whereas this package is may change more frequently. Though I don't intend to break the API a lot of the stuff included in here are utilities for shiny apps and markdown reports I have worked on, rather than analytics packages that we need to send to sites to run.

As these utilities mature we can look at moving them into DatabaseConnector.