getwilds/rls

For docs: update/insert/delete SQL operations - try to do with dbplyr?

Closed this issue · 1 comments

So far I'm not sure it's worth going this route for docs but I've only just started playing with it

# As user admin

# DBI, works fine
dbExecute(con, "UPDATE passwd SET real_name = 'Pink Dragon' WHERE user_name = 'admin'")

# dbplyr
rows_update(
  x = tbl(con, "passwd"),
  y = copy_inline(con, data.frame(user_name = "admin", real_name = "Pink Dragon")),
  in_place = TRUE,
  unmatched = "ignore"
)

with dbplyr there is a lot more code. and function calls too. in_place and unmatched have to be set in rows_update because they are not the defaults - making it pretty verbose.

doing this now, closing