[sqlalchemy] Getting quater wise result using date_part

2007-11-22 Thread Ash
Hi to everyone I am using date_part to get data from PostgresSQL and i want to fetch data quarter wise (Q!,Q2,Q3,Q4) The query date_part('month', field name) in (1,2,3) works well in postgres and fetch for first 3 months but how to put it in sqlalchemy ... I hope u got what i am asking for .

[sqlalchemy] concurent modification

2007-11-22 Thread imgrey
Does someone have an idea how to fix the problem that cause this traceback : Exception in thread Thread-5: Traceback (most recent call last): File threading.py, line 442, in __bootstrap self.run() File ./camper.py, line 138, in run walk(session, theone, root) File ./camper.py,

[sqlalchemy] Re: deleting

2007-11-22 Thread imgrey
You must istantiate an istance of the obj to be deleted. This is an Object Manager, so all operation is available on object. or you can execute a plain string-sql direclty from engine connection = engine.connect() connection.execute(DELETE FROM a WHERE b = c) or I can do this :

[sqlalchemy] Re: merge with dont_load=True and lazy relations

2007-11-22 Thread Michael Bayer
Hi there - there are actually two bugs here, the second one is revealed after repairing the first. The first bug is that the merge() dont_load operation was not completing all the necessary housekeeping on the newly generated copy of the instance, such that the lazy loader for zone (or

[sqlalchemy] merge with dont_load=True and lazy relations

2007-11-22 Thread [EMAIL PROTECTED]
Hi, I'm using SQLAlchemy 0.4.1. Th eproblem is reproducible with the following code: http://pastie.caboo.se/121057 As you can see, when merging an object with a lazy relation (here 'zone'), the 'zone' property is replaced with a fixed None value in the merge

[sqlalchemy] Re: concurent modification

2007-11-22 Thread Sanjay
I think all one can do is just forget and start over again, when concurrent modifications error occurs. That means, catchig the exception and just showing some failure message to the user is all one can do. Sanjay --~--~-~--~~~---~--~~ You received this message