Add "effected rows" count to update query
See original GitHub issueHi,
Thanks for lovely ORM. it would be nice if the update method return the number of the effected rows after update query
for example:
result = return await Users.filter(user_id=user_id).update(is_active=False)
# result value is None
to verify the update query succeeded i need to query the user again and retrieve the data
Thanks in advanced!
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Working with SQL Server ROWCOUNT
The rows affecting statement can be any INSERT, UPDATE, DELETE or SELECT statement that is executed directly before the @@ROWCOUNT execution ...
Read more >sql - Return number of rows affected by UPDATE statements
INSERTED reflect the value after the UPDATE, INSERT, or MERGE statement is ... JUL 09' -- now get the count of affected records...
Read more >number of rows affected - MSDN - Microsoft
In asp.net, when you call these operations using executenonquery() method, the return value of this method is the no of rows affected. In...
Read more >How to use @@ROWCOUNT in SQL Server
The statement can be anything that affects rows: SELECT, INSERT, UPDATE, DELETE and so on. It's important that @@ROWCOUNT is called in the ......
Read more >How can I getting total affected row in advanced "UPDATE" ...
Use Select @@RowCount and an Output parameter of data type int. Use an input parameter RowCount of data type text and set it...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
works perfect, thanks a ton!
Nope, the drivers all do something different. Remember DB-API covers sync, not async.
But it’s done 😃