Closed pbchase closed 2 years ago
My new commit addresses the flaws in my initial PR.
My work does not include the new functions you propose. I'm not excited about making new versions of every DBI function just so I don't have to store and pass conn
. My thought was to use the stored object to allow our novel functions that need a connection to the REDCap DB to not have to rely on the passed value for the connection.
For clarity's sake, I wasn't proposing those, just using them as proof of concept.
This schism actually works in my favor in the case of multi-instance juggling.
With the changes proposed to get the function working, I noticed that the returned
conn
object and the package-scopedconn
object are distinct entities. Notably, closing the returned object does not close the package-scoped object.Additional functions provided to
redcap.R
Script used to discover this issue: