Affect row count from insert, update and delete

Open
#155 2 comments 0 reactions 1 assignee View on GitHub

@gwynne is already working on this.

Since Apr 17, 2024.

Assessment

This issue has not been assessed yet.

Description

Is your feature request related to a problem? Please describe.
Some time I'd like to know how many rows changed after UPDATE statement executed, to control parallel access.
e.g.
SELECT id,update_time FROM TableA
UPDATE TableA SET SOMETHING WHERE id=? AND update_time=?
If no rows affected, the progress may retry.

Describe the solution you'd like
I was used go-pg for golang, each execute function (Update, Insert, Delete) may return orm.Result, I can call RowsAffected() from it.

If I missed something, please let me know, thanks.

Dominant language
Swift
Stars
292
Forks
59
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from vapor/sql-kit

All issues in vapor/sql-kit

Similar issues

More Swift issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.