[sqlalchemy] print query _mapper_zero_or_none()

2015-06-24 Thread Rick Otten
I've been using the literalquery function as described in the top answer on this Stackoverflow page for the past year or so: http://stackoverflow.com/questions/5631078/sqlalchemy-print-the-actual-query I found it very easy to add extra types to it. It has been really handy. I use it in

[sqlalchemy] Modified instances from flushed session

2015-06-24 Thread Mattias Lagergren
Hi guys, I'm trying to retrieve modified (new, deleted and dirty) instances from the session, before commit but after a flush. Example: # Update and create objects. ... # This is fine and I have my dirty instances: print session.dirty, session.new, session.deleted session.flush() # At

Re: [sqlalchemy] print query _mapper_zero_or_none()

2015-06-24 Thread Mike Bayer
On 6/24/15 10:25 AM, Rick Otten wrote: I've been using the literalquery function as described in the top answer on this Stackoverflow page for the past year or so: http://stackoverflow.com/questions/5631078/sqlalchemy-print-the-actual-query I found it very easy to add extra types to it.

Re: [sqlalchemy] Modified instances from flushed session

2015-06-24 Thread Mike Bayer
On 6/24/15 10:03 AM, Mattias Lagergren wrote: Hi guys, I'm trying to retrieve modified (new, deleted and dirty) instances from the session, before commit but after a flush. Example: | # Update and create objects. ... |# This is fine and I have my dirty instances: