Skip to content

Commit

Permalink
Create src_ classes from multiple DBI inheritance
Browse files Browse the repository at this point in the history
  • Loading branch information
Noam Ross committed Jun 20, 2022
1 parent 34b2528 commit 906cabf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion R/src_dbi.R
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,9 @@ src_dbi <- function(con, auto_disconnect = FALSE) {
disco <- db_disconnector(con, quiet = is_true(auto_disconnect)) # nocov
}

subclass <- paste0("src_", class(con)[[1]])
con_classes <- extends(class(con))[
grepl("(?<!DBI)Connection$", extends(class(con)), perl = TRUE)]
subclass <- paste0("src_", con_classes)

structure(
list(
Expand Down

0 comments on commit 906cabf

Please sign in to comment.