New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix delete_layer
default in write_sf.DBIObject
#1600
Conversation
I'll have a look at the failures later today |
d5f7177
to
a603d39
Compare
regenerate docs. |
Looks good now. |
Thanks! Could you please double check this is still consistent with the current documentation?
|
Good point Edzer. I'll see what I can do to use |
ef7ad1a
to
caa3a3f
Compare
I'll need to look at this more closely because I'm not sure what would make the most sense from a user perspective. In the Lines 477 to 485 in 61efbda
However, what seems to be the agreement in #1266 (comment) is:
Also As you mentioned: Lines 329 to 337 in 61efbda
|
Sorry for the hesitation. I would like your approval on this @edzer. I went back to original
The default is If we decide to follow this behaviour for #' @param append logical; should we append to an existing layer, or replace it?
#' if \code{TRUE} append, if \code{FALSE} replace.
#' The default for \code{st_write} is \code{NA} which raises an error if the layer exists.
#' The default for \code{write_sf} is \code{FASE}, which overwrites by default.
#' See also next two arguments for more control on overwrite behavior. Meanwhile I'll go with this version for the PR so you can merge it, but let me know if you would prefer another behaviour. |
- The default is `append = FALSE` and `delete_layer = TRUE` to overwrite a table - Using `append = TRUE` will append to an existing table or create one - Using `append = FALSE` or `delete_layer = TRUE` will raise an error - Using `overwrite` rather than `delete_layer` will raise an error with a suggestion for a fix. - Make documentation consistent with behavior; split `dbWriteTable` functions because they have a slightly different behavior. fix r-spatial#1599 related r-spatial#1266
caa3a3f
to
4ca1759
Compare
@edzer, let me know if there's anything missing to merge |
Thanks a lot, Etienne! |
append = FALSE
)append = TRUE
will setdelete_layer = FALSE
and append to an existing table or create oneappend = TRUE
anddelete_layer = TRUE
will raise an error usingdelete_layer
rather thanoverwrite
fix #1599
related #1266