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

Batch updates #646

Merged
merged 15 commits into from
Nov 9, 2019
Merged

Batch updates #646

merged 15 commits into from
Nov 9, 2019

Conversation

groue
Copy link
Owner

@groue groue commented Nov 7, 2019

This pull request brings batch updates to the query interface:

// UPDATE player SET score = 0
try Player.updateAll(db, Column("score") <- 0)

// UPDATE player SET score = score + 10 WHERE team = 'red'
try Player
    .filter(Column("team") == "red")
    .updateAll(db, Column("score") += 10)

This change is directly inspired from stephencelis/SQLite.swift. Thank you!

@groue groue merged commit 65d0f1e into development Nov 9, 2019
@groue groue deleted the dev/batch-update branch November 9, 2019 07:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant