Skip to content
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

Add method db_copy_to.Pool() #172

Closed
mgirlich opened this issue Aug 8, 2023 · 1 comment · Fixed by #175
Closed

Add method db_copy_to.Pool() #172

mgirlich opened this issue Aug 8, 2023 · 1 comment · Fixed by #175

Comments

@mgirlich
Copy link

mgirlich commented Aug 8, 2023

library(pool)
library(dplyr, warn.conflicts = FALSE)
library(dbplyr, warn.conflicts = FALSE)

conn <- dbPool(RSQLite::SQLite())
mt <- copy_to(conn, mtcars, "mtcars", temporary = FALSE)
auto_copy(mt, tibble(cyl = 3), copy = TRUE)
#> Error in UseMethod("db_copy_to"): no applicable method for 'db_copy_to' applied to an object of class "c('Pool', 'R6')"

Created on 2023-08-08 with reprex v2.0.2

@hadley
Copy link
Member

hadley commented Jan 11, 2024

I've "fixed" this but it's not super satisfying because auto_copy() defaults to create temporary tables, which Pool doesn't support.

hadley added a commit that referenced this issue Jan 11, 2024
hadley added a commit that referenced this issue Jan 11, 2024
Fixes #171. Fixes #172.

And wrap `sql_query_fields` to simplify `tbl.pool`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants