-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dbReadTable with Id schema and table #120
Labels
feature
a feature request or enhancement
Comments
Minimal reprex: library(pool)
pool <- dbPool(RSQLite::SQLite())
DBI::dbWriteTable(pool, DBI::Id(table = "mtcars"), mtcars)
DBI::dbReadTable(pool, DBI::Id(table = "mtcars"))
#> Error in (function (classes, fdef, mtable) : unable to find an inherited method for function 'dbReadTable' for signature '"Pool", "Id"' Created on 2023-01-05 with reprex v2.0.2 Just need to add the missing method (and check for other methods that might be absent). |
hadley
added a commit
that referenced
this issue
Jan 6, 2023
I think this is correct because Pool doesn't involve itself in any of the arugments; it just checks out the object then re-dispatches. This is potentially a breaking change because it could introduce new method dispatch ambiguities, but I don't think that's a concern here because Pool has neither superclasses or subclasses. Fixes #120
hadley
added a commit
that referenced
this issue
Jan 28, 2023
* All wrappers are generated with code, ensuring that each method has exactly the same syntax (see the snapshot test for what the generated methods look like). I've also rearranged the method registration to put all of the wrappers in one place and all of the customised methods in another. Along with a few other minor tweaks, this makes it possible to remove all the `@include` directives and hence the `Collate` field in the `DESCRIPTION`. * Methods are now only ever registered for the first argument. I think this is correct because Pool doesn't involve itself in any of the arugments; it just checks out the object then re-dispatches. This is potentially a breaking change because it could introduce new method dispatch ambiguities, but I don't think that's a concern here because Pool has neither superclasses or subclasses. This fixes #120. * Restore (and correct) test that ensures that pool provides methods for the correct DBI generics. That showed that we needed a `dbDisconnect` method, and suggested a number of methods that could be dropped since the generics have been deprecated.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm getting an error when I try to use the pool connection to use the DBI:Id() to select schema and table.
Error in (function (classes, fdef, mtable) : unable to find an inherited method for function 'dbReadTable' for signature '"Pool", "Id"'
This works with DBI, is this just not currently supported with Pool ?
`
Created on 2021-01-22 by the reprex package (v0.3.0)
`
The text was updated successfully, but these errors were encountered: