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

No support for MySQL INSERT IGNORE. #7

Open
patrickt opened this issue Mar 1, 2019 · 1 comment
Open

No support for MySQL INSERT IGNORE. #7

patrickt opened this issue Mar 1, 2019 · 1 comment

Comments

@patrickt
Copy link

patrickt commented Mar 1, 2019

The idiomatic way to insert a record, falling back to a noop if the record is a duplicate, is to prepend the INSERT statement with IGNORE. I’m happy to take a shot at implementing this, though I might need a degree of guidance regarding the internals.

cc @tclem, who ran into this.

@tclem
Copy link

tclem commented Mar 1, 2019

There are a couple of permutations of this. As an alternative to INSERT IGNORE you can also use REPLACE. It's also possible to define what to do on duplicate key with INSERT INTO .. VALUES .. ON DUPLICATE KEY UPDATE ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants