[storm] Re. Dropping all rows of a given matching field or id SOLVED

akira nhytro-python at web.de
Tue Oct 2 02:35:02 BST 2007


used trial an error, I always forget the "commit" :-)

from storm.locals import *


class Profile(object):
    __storm_table__ = "table_profile"
    id = Int(primary=True)
    field1= Unicode()
    field2= Unicode()
    field3= Unicode()
    field4= Unicode() 

store = Store(database)

resultset = store.find(Profile, Profile.field1 == u"man").remove()
#store.execute("DELETE FROM table_profile")
store.commit()




More information about the storm mailing list