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

Add upsert_keys and upsert_options as opts #93

Merged
merged 1 commit into from
Jan 15, 2020

Conversation

hahuang65
Copy link
Contributor

@hahuang65 hahuang65 commented Apr 29, 2019

This allows setting of upsert_keys and upsert_options directly when
calling #upsert or .upsert. This will overwrite the default
upsert_keys and upsert_options set in the model.

Resolves #74

@hahuang65 hahuang65 force-pushed the master branch 2 times, most recently from dd40a48 to 9dbcabf Compare May 1, 2019 21:33
@hahuang65 hahuang65 changed the title Add upsert_keys as an option for #upsert Add upsert_keys and upsert_options as opts May 1, 2019
@hahuang65
Copy link
Contributor Author

I can't seem to figure out why these tests are failing for Rails 5.1 and 5.0. The index looks to be in place from those Travis logs...

@hahuang65
Copy link
Contributor Author

Never mind, figured it out. There was a change I needed to make in the compatibility layer.

This allows setting of `upsert_keys` and `upsert_options` directly when
calling `#upsert` or `.upsert`. This will overwrite the default
`upsert_keys` and `upsert_options` set in the model.
@perezpaya
Copy link

perezpaya commented May 8, 2019

+1 That will be really helpful

@hahuang65
Copy link
Contributor Author

Any chance we can get this in?

Copy link
Collaborator

@olleolleolle olleolleolle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to do the thing beautifully.

Let's have it in, and as it is on master, could you test-drive from there before we cut a release?

@olleolleolle olleolleolle merged commit 2c67878 into jesjos:master Jan 15, 2020
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

Successfully merging this pull request may close these issues.

Custom upsert_keys per call to upsert
3 participants