moj-analytical-services / Rdbtools

Accessing Athena on the Analytical Platform
Other
4 stars 0 forks source link

adds dbDisconnect #20

Closed pjrh-moj closed 1 year ago

pjrh-moj commented 1 year ago

Hi Mike,

I think this is the way to do it - just a re-export of the dbDisconnect function put at the top of the db_commands.R

The usethis method creates a new file Rdbtools-package.R which is trying to do the same things as the current Rdbtools.R. In principle I shouldn't be using that to import the whole of the DBI and noctua packages into the function, but whenever I try to avoid this I run into issues with extending the DBI/noctua methods (I'm not sure I understand fully about declaring the generic function when I'm using a DBI generic, but extending the noctua version of it - I've exhausted my ability to understand the weird world of object-oriented programming in R).

Can you check this on an app before we merge?

Peter

mratford commented 1 year ago

Yes, all working when installing from this branch - thanks for working through this!