Skip to content

Commit

Permalink
Merge pull request #1160 from IndrajeetPatil/414_inform
Browse files Browse the repository at this point in the history
docs: better inform message for dm rows
  • Loading branch information
krlmlr authored Jul 5, 2022
2 parents a30bf3b + b1fac90 commit 6f17152
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion R/rows-dm.R
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ dm_rows <- function(x, y, operation_name, top_down, in_place, require_keys, prog
dm_rows_check(x, y)

if (is_null(in_place)) {
message("Not persisting, use `in_place = FALSE` to turn off this message.")
inform("Result is returned as a dm object with lazy tables. Use `in_place = FALSE` to mute this message, or `in_place = TRUE` to write to the underlying tables.")
in_place <- FALSE
}

Expand Down
6 changes: 3 additions & 3 deletions tests/testthat/_snaps/rows-dm.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
flights_hour10_sqlite <- copy_dm_to(sqlite, flights_hour10)
out <- dm_rows_append(flights_sqlite, flights_hour10_sqlite)
Message
Not persisting, use `in_place = FALSE` to turn off this message.
Result is returned as a dm object with lazy tables. Use `in_place = FALSE` to mute this message, or `in_place = TRUE` to write to the underlying tables.
Code
print(dm_nrow(flights_sqlite))
Output
Expand Down Expand Up @@ -94,7 +94,7 @@
Code
dm_copy %>% dm_rows_update(dm_update_copy) %>% pull_tbl(tf_2) %>% arrange_all()
Message
Not persisting, use `in_place = FALSE` to turn off this message.
Result is returned as a dm object with lazy tables. Use `in_place = FALSE` to mute this message, or `in_place = TRUE` to write to the underlying tables.
Output
d c e e1
<int> <chr> <chr> <int>
Expand Down Expand Up @@ -285,7 +285,7 @@
dm_copy %>% dm_rows_truncate(dm_truncate_copy) %>% pull_tbl(tf_2) %>%
arrange_all()
Message
Not persisting, use `in_place = FALSE` to turn off this message.
Result is returned as a dm object with lazy tables. Use `in_place = FALSE` to mute this message, or `in_place = TRUE` to write to the underlying tables.
Output
# ... with 4 variables: c <chr>, d <int>, e <chr>, e1 <int>
Code
Expand Down

0 comments on commit 6f17152

Please sign in to comment.