activerecord-jdbc-adapter icon indicating copy to clipboard operation
activerecord-jdbc-adapter copied to clipboard

Doesn't support supports_insert_on_conflict?

Open Louis-7 opened this issue 4 years ago • 0 comments

I'm using this lib with activerecord-import. But it seems like the MySQL adapter in this gem is not implement supports_on_duplicate_key_update? related methods. activerecod-import can't add ON DUPLICATE KEY UPDATE to the sql statement because of mysql adapter tells it the DB is not supported ON DUPLICATE KEY UPDATE. But I'm sure MySQL supports it, read this ->How to INSERT If Row Does Not Exist (UPSERT) in MySQL.

Actually, activerecord-import already implement it, I copy/paste it into arjdbc/mysql/adapter.rb and it's working. I'm wondering if I can create a PR to fix it?

Louis-7 avatar Jun 21 '21 07:06 Louis-7