Skip to content

Commit

Permalink
docs(db_joins): Update example with dplyr::join_by
Browse files Browse the repository at this point in the history
  • Loading branch information
RasmusSkytte committed Oct 15, 2024
1 parent 1374723 commit 2c178ed
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions R/db_joins.R
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@
#' # But you can activate R's usual behaviour with the na_matches argument
#' left_join(db, label, by = "x", na_matches = "na")
#'
#' # By default, joins are equijoins, but you can use `sql_on` to
#' # By default, joins are equijoins, but you can use `dplyr::join_by()` to
#' # express richer relationships
#' db1 <- memdb_frame(x = 1:5)
#' db2 <- memdb_frame(x = 1:3, y = letters[1:3])
#' db1 <- memdb_frame(id = 1:5)
#' db2 <- memdb_frame(id = 1:3, y = letters[1:3])
#'
#' left_join(db1, db2) |> show_query()
#' left_join(db1, db2, sql_on = "LHS.x < RHS.x") |> show_query()
#' left_join(db1, db2, by = join_by(x$id < y$id)) |> show_query()
#' @seealso [dplyr::mutate-joins] which this function wraps.
#' @seealso [dbplyr::join.tbl_sql] which this function wraps.
#' @seealso [dplyr::show_query]
Expand Down
8 changes: 4 additions & 4 deletions man/joins.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2c178ed

Please sign in to comment.