[sqlalchemy] Re: confused on optimal use of engine vs connection

2016-06-02 Thread Jonathan Vanasco
as the docs state, `engine.execute(foo)` is shorthand for "connection = engine.connect()" + "connection.execute(foo)". you can verify this in the source. for what you describe, it's usually best to grab an explicit connection and re-use it. -- You received this message because you are

[sqlalchemy] confused on optimal use of engine vs connection

2016-06-02 Thread Krishnakant
Dear all, I am currently reading and one thing is confusing, rather not clearly mentioned, unless I missed it. Which is a better thing to do, specially when executing raw sql queries? engine.execute or con = engine.connect() and then