Skip to content

Commit

Permalink
Add sql_expr_matches method for Redshift connection.
Browse files Browse the repository at this point in the history
  • Loading branch information
krystian8207 committed Jun 20, 2024
1 parent 860bd6a commit a02974c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: dbplyr
Title: A 'dplyr' Back End for Databases
Version: 2.5.0.9000
Version: 2.5.0.9001
Authors@R: c(
person("Hadley", "Wickham", , "[email protected]", role = c("aut", "cre")),
person("Maximilian", "Girlich", role = "aut"),
Expand Down
2 changes: 2 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,8 @@ S3method(sql_expr_matches,Oracle)
S3method(sql_expr_matches,PostgreSQL)
S3method(sql_expr_matches,PostgreSQLConnection)
S3method(sql_expr_matches,PqConnection)
S3method(sql_expr_matches,Redshift)
S3method(sql_expr_matches,RedshiftConnection)
S3method(sql_expr_matches,SQLiteConnection)
S3method(sql_join,DBIConnection)
S3method(sql_join_suffix,DBIConnection)
Expand Down
6 changes: 6 additions & 0 deletions R/backend-redshift.R
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ redshift_round <- function(x, digits = 0L) {
sql_expr(round(((!!x)) %::% float, !!digits))
}

#' @export
sql_expr_matches.RedshiftConnection <- sql_expr_matches.DBIConnection

#' @export
sql_expr_matches.Redshift <- sql_expr_matches.RedshiftConnection

#' @export
sql_translation.RedshiftConnection <- function(con) {
postgres <- sql_translation.PostgreSQL(con)
Expand Down

0 comments on commit a02974c

Please sign in to comment.