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

Allow update with Queryable #322

Closed
paulcsmith opened this issue Mar 16, 2020 · 1 comment · Fixed by #329
Closed

Allow update with Queryable #322

paulcsmith opened this issue Mar 16, 2020 · 1 comment · Fixed by #329
Labels
feature request A new requested feature / option
Milestone

Comments

@paulcsmith
Copy link
Member

Still debating the exact API but something like this:

UserQuery.new.age.gte(18).update(adult: true)
@paulcsmith paulcsmith added the feature request A new requested feature / option label Mar 16, 2020
@paulcsmith paulcsmith changed the title Allow update to Queryable Allow update with Queryable Mar 16, 2020
@paulcsmith paulcsmith added this to the Avram next milestone Mar 16, 2020
@jkthorne
Copy link
Contributor

It might be nice to pass in an operation as well.

UserQuery.new.age.gte(18).apply(UpdateUser.update!(adult: true))

would be:

UpdateUser.update!(UserQuery.new.age.gte(18), adult: true)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request A new requested feature / option
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants