OHDSI / DatabaseConnector

An R package for connecting to databases using JDBC.
http://ohdsi.github.io/DatabaseConnector/
54 stars 80 forks source link

Adopt DBI's approach for catalog & schema, deprecate databaseSchema. #283

Open schuemie opened 2 months ago

schuemie commented 2 months ago

These are two solutions to the same problem, but the DBI approach keeps the two separate, for example making it easier to add quotes.

From discussion https://github.com/OHDSI/DatabaseConnector/discussions/275

schuemie commented 2 months ago

Not yet sure if that means DBI::Id() or R's native I() function.

E.g. this should work:

getTableNames(connection, DBI::Id(catalog = "cdm", schema = "dbo"))

Also make sure all DBI functions support DBI::Id(). From the DBI documentation, name should be character string, DBI::Id(), or SQL().