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

Ignore insert need #287

Open
gmlexx opened this issue Dec 26, 2013 · 0 comments
Open

Ignore insert need #287

gmlexx opened this issue Dec 26, 2013 · 0 comments

Comments

@gmlexx
Copy link
Contributor

gmlexx commented Dec 26, 2013

Hello, Igor

Can you add extension (or parameter for insert extension) to build "INSERT IGNORE INTO" sql statement, please?

This would be extremely useful for concurrent inserts into one table like this http://stackoverflow.com/a/4475904

I've just tried a workaround with InsertOrUpdate, but mysql driver is a little buggy and ExecuteNonQuery with "INSERT .. ON DUPLICATE KEY UPDATE ..." always return 1 rows affected instead 1 or 0.

"INSERT IGNORE" works fine and return 0 or 1.

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

1 participant