On Wed, 17 Jan 2007, Oleg Broytmann wrote:

>> What I would like to do is pass an sresult directly:
>> sqlobject.Delete(Klass.selectBy(otherKlassID = 10))
>
>   SQLObject doesn't do that. But that's an interesting idea. I will think
> of it.
>
>> or even
>> Klass.selectBy(otherKlassID = 10).destroy()
>
> for row in Klass.selectBy(otherKlassID = 10):
>   row.destroySelf()
>
> But than... speed!

What about a "deleteBy" method and "delete" method, both similar to what 
the select methods do, but they delete?

Klass.deleteBy(otherKlassID = 10)
Klass.delete(AND(IN(Klass.q.id, [1,2,3])))

--
Rick

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
sqlobject-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to