{"id":16820496,"url":"https://github.com/dvandersluis/activerecord_upsert","last_synced_at":"2025-03-09T00:31:50.644Z","repository":{"id":62552903,"uuid":"218363274","full_name":"dvandersluis/activerecord_upsert","owner":"dvandersluis","description":"Support MySQL ON DUPLICATE KEY UPDATE in activerecord","archived":false,"fork":false,"pushed_at":"2020-03-18T20:41:21.000Z","size":22,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-05-01T23:14:11.240Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dvandersluis.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-10-29T19:07:42.000Z","updated_at":"2023-01-04T03:15:52.000Z","dependencies_parsed_at":"2022-11-03T04:15:19.055Z","dependency_job_id":null,"html_url":"https://github.com/dvandersluis/activerecord_upsert","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dvandersluis%2Factiverecord_upsert","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dvandersluis%2Factiverecord_upsert/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dvandersluis%2Factiverecord_upsert/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dvandersluis%2Factiverecord_upsert/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dvandersluis","download_url":"https://codeload.github.com/dvandersluis/activerecord_upsert/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221101525,"owners_count":16756339,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T10:57:00.915Z","updated_at":"2024-10-22T13:12:49.202Z","avatar_url":"https://github.com/dvandersluis.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ActiveRecord Upsert\n\n[![Build Status](https://travis-ci.org/dvandersluis/activerecord_upsert.svg?branch=master)](https://travis-ci.org/dvandersluis/activerecord_upsert)\n[![Gem Version](https://badge.fury.io/rb/activerecord_upsert.svg)](https://badge.fury.io/rb/activerecord_upsert)\n\nAdds the ability to use MySQL's `ON DUPLICATE KEY UPDATE` with arbitrary values in order to upsert records in ActiveRecord.\n\nSupports Rails 5.2 and 6, and should not conflict with Rails 6's `Model.upsert` or `Model.upsert_all`, because this gem adds `upsert` to `ActiveRecord::Relation`.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'activerecord_upsert'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install activerecord_upsert\n\n## Usage\n\n```ruby\nModel.where(foo: :bar).upsert(count: 'count + 1')\n```\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/activerecord_upsert.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdvandersluis%2Factiverecord_upsert","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdvandersluis%2Factiverecord_upsert","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdvandersluis%2Factiverecord_upsert/lists"}