Groups
Groups
Sign in
Groups
Groups
sqlalchemy
Conversations
About
Send feedback
Help
Number of row updated or deleted
3,399 views
Skip to first unread message
Joojle
unread,
Sep 28, 2009, 11:39:12 PM
9/28/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sqlalchemy
Can I know How many rows affected on update or detete on
connect.execute()
Laurent Rahuel
unread,
Sep 29, 2009, 5:09:09 AM
9/29/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sqlal...@googlegroups.com
Hi,
You should take a look at session.dirty (which contains rows to update)
and session.delete (which contains rows to delete)
Regards,
Laurent
Mike Conley
unread,
Sep 29, 2009, 8:13:33 AM
9/29/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sqlal...@googlegroups.com
Use rowcount property of the ResultProxy returned from delete/update
result = conn.execute(tbl.delete())
count = result.rowcount
Note that the quality of the number will depend on the underlying database and Python dbapi.
Reply all
Reply to author
Forward
0 new messages