[SQLObject] Question about multiple deletes
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: David M. <da...@re...> - 2004-02-07 14:36:26
|
Hi, What's the best way, within SQLObject, to delete an entire results set from a table? In other words, the equivalent of an SQL query like: DELETE FROM mytable WHERE last_name = 'Jones' AND age > 50 I know I can iterate through an SQLObject result set and invoke .destroySelf() on every element, but this feels painfully inefficient. Can someone please advise me of the fast, SQLOBject-esque way of doing it? Also, what's the best way of pumping a raw query? I know conn.getConnection().cursor().execute(query) works, but is there a better way, and hopefully one which won't cause any problems within the SQLObject data structures? -- Kind regards David -- leave this line intact so your email gets through my junk mail filter |