Make it easy to upsert on traditional RDBMS like MySQL, PostgreSQL, and SQLite3—hey look NoSQL!. Transparently creates (and re-uses) stored procedures/functions when necessary.

You pass it a bare-metal connection to the database like Mysql2::Client (from mysql2 gem on MRI) or Java::OrgPostgresqlJdbc4::Jdbc4Connection (from jdbc-postgres on Jruby).

As databases start to natively support SQL MERGE (which is basically upsert), this library will take advantage (but you won't have to change your code).

Does not depend on ActiveRecord.

Does not use INSERT ON DUPLICATE KEY UPDATE on MySQL as this only works if you are very careful about creating unique indexes.

70–90%+ faster than emulating upsert with ActiveRecord.

Supports MRI and JRuby.

Code Quality Rank: L5
Monthly Downloads: 4,719
Programming language: Ruby
Tags: Database Tools     Projects    

Upsert alternatives and related gems

Based on the "Database Tools" category

Do you think we are missing an alternative of Upsert or a related project?

Add another 'Database Tools' Gem

Upsert Recommendations

There are no recommendations yet. Be the first to promote Upsert!

Have you used Upsert? Share your experience. Write a short recommendation and Upsert, you and your project will be promoted on Awesome Ruby.
Recommend Upsert

Recently added Upsert resources

Do you know of a usefull tutorial, book or news relevant to Upsert?
Be the first to add one!