[sqlalchemy] update_or_insert

2010-03-07 Thread Manlio Perillo
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi. I have the following use case: a table that contains the layout info of some elements in a web page. The layout is fixed, that is, the number and the positions of the elements that can be displayed is fixed. This means that in order to change

[sqlalchemy] How do you do an update with a session?

2010-03-07 Thread TheShadow
version: 0.6beta1 I'm just trying to update a row in a table but can't figure out what the heck is the problem. I'm attempting the following: session.execute( warehouse.session().query(WarehouseFile)\ .filter(WarehouseFile.warehouse_file_id == file_id)\

[sqlalchemy] Cannot delete SQLite '.db' using os.remove

2010-03-07 Thread Lynton Grice
Hi there, I am using SQLAlchemy to build a custom based queue implementation. As part of the methods exposed I have a deletequeue that is meant to physically delete the SQLite database from the file system. But whenever I try delete it I get the following error: WindowsError: (32, 'The process

Re: [sqlalchemy] How do you do an update with a session?

2010-03-07 Thread anusha kadambala
hai, We used the session for update like this result = Session.query(User).filter(User.id == '1').first() if result != None: result.name = 'Shadow' result.address = 'foo' Session.commit() Where id,name and address are columns of my class and table. I hope this solution will help u out.