[storm] how to delete

Christopher Armstrong radix at twistedmatrix.com
Sun Jul 29 00:52:46 BST 2007


On 7/28/07, shawn bright <nephish at gmail.com> wrote:
> this one is basic enough,
> how do i delete a row from a database ?
>
> like this, if i have :
>
> s = store.get(Customer, 14)
>
> how to i not only get rid of s, but delete it from the database ?

There are two common ways to delete stuff.

store.remove(o), where o is the object representing the row you want to remove

store.find(Foo, Foo.x == y).remove(), which deletes all rows matching
the specified  query.

-- 
Christopher Armstrong
International Man of Twistery
http://radix.twistedmatrix.com/
http://twistedmatrix.com/
http://canonical.com/



More information about the storm mailing list