-
Notifications
You must be signed in to change notification settings - Fork 178
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
Add rows_*()
verbs
#748
Add rows_*()
verbs
#748
Conversation
Are we keeping the I saw that the default for Regarding integration with dm, I think we can release dbplyr first and then adapt dm -- the dbplyr update doesn't break dm's tests, because the latter still overwrites the methods. Should dbplyr give a warning mentioning that the It looks like the SQL Server implementation needs more work, I'll propose something today. Postgres looks fine. |
MSSQL seems good now. |
I'm okay with both. Do you have a preference?
Yes, I don't see a need to give a message.
Feel free to add a message though it will probably affect only few users.
Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Looks good to me, with cynkra/dm#988 we get the new behavior also for the legacy code in dm. I can release dm before or shortly after dbplyr, doesn't really matter.
So, let's keep the |
Closes #736.
returning
: This argument is still experimental and not (yet?) in the generic.To support(Edit: not necessary anymore aftertidyselect
and not trigger a warning byrlang::check_dots_used()
(in the generic) the user has to quote it manually (see tidyverse/dplyr#5985).check_dots_used()
was removed in the generic).Theoretically, one could execute arbitrary SQL in the
RETURNING
clause but I'm not sure whether there are sufficient use cases to support this.nonexistent
: The current implementation isnonexistent = "ignore"
. To supportnonexistent = "error"
one could use a foreign key constraint ony
. I'll tackle this in another PR. (Update: renamed tounmatched
and "error" is not supported for now)rows_upsert()
: This is the most tricky and needs different methods:MERGE INTO ... WHEN (NOT) MATCHED
INSERT ... ON CONFLICT DO UPDATE/NOTHING
It might make sense to add an argument so that the user can choose whether a unique constraint exists or not. See
cynkra/dm#616 (comment) for some more information on the Pros/Cons. I will do this in another PR.