Closed psimm closed 3 years ago
Thanks for another great report! You're right that this is some more missing methods, though it turns out that this is a bit more complicated than the first one. I have a branch with_transaction that is mostly working for RPostgres (though there is at least one really bad hack that needs to be addressed before I'll be able to merge it), (second) though it doesn't quite work with RMariaDB, so I need to investigate more there.
You might try using that and seeing if it resolves your issue (please let me know either way, so I know if I'm on the right track). If you run into another issue after this one, feel free to submit an issue now too — I might be able to fold them into the same PR
That works with the reprex and with the query I was originally working on. Awesome!
I'll use the branch to write my tests and update once you merge the PR. The query I was working with takes about 5 minutes to run and now thanks to dittodb it can be tested in a second - massive improvement! Thanks.
I opened another issue here: https://github.com/ropensci/dittodb/issues/150
Brief description of the problem
I'm testing a query that uses
dplyr::left_join(copy = TRUE)
. When I mock the query, I get the error "Invalid connection" which is raised byRPostgres:::connection_is_transacting(conn@ptr)
.This issue is similar to #144. I'm using the latest dittodb version from Github. The problem here is related to the copy argument which then causes dbplyr to start a transaction. Perhaps a method for handling it is missing?
The kind of database backend you are trying to test
PostgresSQL 13.3 with package RPostgres
Reprex
Backtrace:
sessionInfo()