For testing purposes it would be great to have something like a "virtual" connection. That is, a connection that can be created without actually connecting to a database. This connection could then be used in functions like DBI::dbQuoteLiteral() that don't need a live connection.
The dbplyr package has something like this with the simulate_*() functions. This can be useful for testing when one cannot connect locally to a specific database.
I also think/hope one could then get rid of some code duplication between dbplyr and the DBI packages, for example quoting literals is also defined in dbplyr.
For testing purposes it would be great to have something like a "virtual" connection. That is, a connection that can be created without actually connecting to a database. This connection could then be used in functions like
DBI::dbQuoteLiteral()that don't need a live connection.The
dbplyrpackage has something like this with thesimulate_*()functions. This can be useful for testing when one cannot connect locally to a specific database.I also think/hope one could then get rid of some code duplication between
dbplyrand the DBI packages, for example quoting literals is also defined indbplyr.