diff --git a/R/db_joins.R b/R/db_joins.R index 87d8d47b..11f52335 100644 --- a/R/db_joins.R +++ b/R/db_joins.R @@ -253,30 +253,6 @@ right_join.tbl_sql <- function(x, y, by = NULL, ...) { return(join_result) } -#' dbplyr and SQLite does not work right now for right_joins it seems -#' so we "fix" it by doing a left join on SQLiteConnections -#' @inheritParams dbplyr::join.tbl_sql -#' @inherit dbplyr::join.tbl_sql return -#' @param renamer named list generated by select_na_sql -#' @noRd -scdb_right_join <- function(x, y, sql_on, suffix = c(".x", ".y"), renamer, ...) { - UseMethod("scdb_right_join") -} - -#' @inheritParams scdb_right_join -scdb_right_join.tbl_dbi <- function(x, y, sql_on, renamer, ...) { - dplyr::right_join(x, y, suffix = c(".y", ".x"), sql_on = sql_on, ...) |> - dplyr::rename(!!renamer) |> - dplyr::select(tidyselect::all_of(names(renamer))) -} - -#' @inheritParams scdb_right_join -scdb_right_join.tbl_SQLiteConnection <- function(x, y, sql_on, renamer, ...) { - dplyr::left_join(y, x, suffix = c(".y", ".x"), sql_on = sql_on, ...) |> - dplyr::rename(!!renamer) |> - dplyr::select(tidyselect::all_of(names(renamer))) -} - #' @rdname joins #' @exportS3Method dplyr::full_join