Skip to content

Commit

Permalink
Switch methods to default, not DBIConnection (#1467)
Browse files Browse the repository at this point in the history
This makes dbplyr work with pool, and I think it's the right decision as these methods are primarily wrappers around DBI methods, so we should fall back to its defaults.
  • Loading branch information
hadley authored Feb 28, 2024
1 parent edbb874 commit cce7c00
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -258,16 +258,16 @@ S3method(sql_escape_datetime,DBIConnection)
S3method(sql_escape_datetime,MariaDBConnection)
S3method(sql_escape_datetime,MySQL)
S3method(sql_escape_datetime,MySQLConnection)
S3method(sql_escape_ident,DBIConnection)
S3method(sql_escape_ident,TestConnection)
S3method(sql_escape_ident,default)
S3method(sql_escape_logical,"Microsoft SQL Server")
S3method(sql_escape_logical,ACCESS)
S3method(sql_escape_logical,DBIConnection)
S3method(sql_escape_logical,SQLiteConnection)
S3method(sql_escape_raw,"Microsoft SQL Server")
S3method(sql_escape_raw,DBIConnection)
S3method(sql_escape_string,DBIConnection)
S3method(sql_escape_string,TestConnection)
S3method(sql_escape_string,default)
S3method(sql_expr_matches,DBIConnection)
S3method(sql_expr_matches,MariaDBConnection)
S3method(sql_expr_matches,MySQL)
Expand Down Expand Up @@ -419,7 +419,7 @@ S3method(supports_window_clause,PqConnection)
S3method(supports_window_clause,Redshift)
S3method(supports_window_clause,RedshiftConnection)
S3method(supports_window_clause,SQLiteConnection)
S3method(table_path_components,DBIConnection)
S3method(table_path_components,default)
S3method(tail,tbl_lazy)
S3method(tally,tbl_lazy)
S3method(tbl,src_dbi)
Expand Down
4 changes: 2 additions & 2 deletions R/simulate.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ sql_escape_ident <- function(con, x) {
UseMethod("sql_escape_ident")
}
#' @export
sql_escape_ident.DBIConnection <- function(con, x) {
sql_escape_ident.default <- function(con, x) {
dbQuoteIdentifier(con, x)
}
#' @export
Expand All @@ -43,7 +43,7 @@ sql_escape_string <- function(con, x) {
UseMethod("sql_escape_string")
}
#' @export
sql_escape_string.DBIConnection <- function(con, x) {
sql_escape_string.default <- function(con, x) {
dbQuoteString(con, x)
}
#' @export
Expand Down
2 changes: 1 addition & 1 deletion R/table-name.R
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ table_path_components <- function(x, con) {
}

#' @export
table_path_components.DBIConnection <- function(x, con) {
table_path_components.default <- function(x, con) {
quote_char <- substr(sql_escape_ident(con, ""), 1, 1)

lapply(x, function(x) {
Expand Down

0 comments on commit cce7c00

Please sign in to comment.