Skip to content
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 support for upsert operation through update semantics #49

Closed
wants to merge 1 commit into from

Conversation

scheca
Copy link
Contributor

@scheca scheca commented Sep 14, 2020

No description provided.

@scheca
Copy link
Contributor Author

scheca commented Sep 16, 2020

To give a bit of context, some differences between REPLACE and INSERT ... ON DUPLICATE KEY UPDATE are listed in this StackOverflow post.

@huandu
Copy link
Owner

huandu commented Sep 21, 2020

"Upsert" is a MySQL only feature. I don't think it's a good design to add DBMS-specific SQL syntax into core API of builders.

Regarding to this issue and #48, I'm thinking of a new design to let package users extend builders as expected. I will release a new version for the new design by the end of Sep. Please looking forward to it. 😄

Before the new design is released, feel free to use your own forked version to replace current package.

@scheca
Copy link
Contributor Author

scheca commented Sep 21, 2020

Cool, alright then, looking forward to the new extensible API 👍

@huandu huandu closed this Feb 3, 2021
huandu added a commit that referenced this pull request Feb 3, 2021
All builders add a new method called SQL to enable us to add any
arbitrary SQL when building. It's quite useful when we are using some
kinds of extension syntax or add special comments in SQL.
huandu added a commit that referenced this pull request Feb 3, 2021
Fix #48 #49 #53: Add new method SQL in all builders
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants