On 13/02/12 02:19, Michael Bayer wrote:
Transaction is a SQLAlchemy object that represents the scope of the
"transaction" within the DBAPI. The DBAPI always presents a transaction,
that's why the pure DBAPI version calls conn.commit() at the end.
So does that mean I will have to use a conne
Transaction is a SQLAlchemy object that represents the scope of the
"transaction" within the DBAPI. The DBAPI always presents a transaction,
that's why the pure DBAPI version calls conn.commit() at the end.
You could also say conn = engine.connect().execution_options(autocommit=True).
On Fe
Hi Michael,
Excelent work, you are a real artist.
Just wished to know what is the trans object, and do i need to use a
connection object for the thing to work?
I mean, do I need the conn = engine.connect() line?
I already have a set of live engines so I never make an extra connection
in my exec
Here's another one that is without the SQL expression stuff, perhaps it is
easier to understand:
def execproc(procname, engine, queryParams=[]):
conn = engine.connect()
try:
trans = conn.begin()
result = conn.execute(
"SELECT * FROM %s(%s)" % (
Hi again,
Mikeal, I am sorry, I was half asleep when I went through the code,
This week long sprint on our project has tired me out.
I think its pritty clear now.
(unless you would love to explain the last 2 llines for clearity sake ).
Happy hacking.
Krishnakant.
On 12/02/12 22:01, Michael Bayer
On 12/02/12 22:01, Michael Bayer wrote:
On Feb 12, 2012, at 5:22 AM, Krishnakant Mane wrote:
On 11/02/12 21:10, Michael Bayer wrote:
def execproc(procname, engine, queryParams=[]):
function = getattr(func, procname)
function_with_params = function(*queryParams)
return
engine.ex
On Feb 12, 2012, at 5:22 AM, Krishnakant Mane wrote:
> On 11/02/12 21:10, Michael Bayer wrote:
>> def execproc(procname, engine, queryParams=[]):
>> function = getattr(func, procname)
>> function_with_params = function(*queryParams)
>> return
>> engine.execute(function_with_params.ex
On 11/02/12 21:10, Michael Bayer wrote:
def execproc(procname, engine, queryParams=[]):
function = getattr(func, procname)
function_with_params = function(*queryParams)
return
engine.execute(function_with_params.execution_options(autocommit=True))
Hi Michael,
I tryed this code
Thanks Michael,
I will see if this works perfectly with postgresql.
I had tryed func before but did not get any success.
May be this time it will work.
Happy hacking.
Krishnakant.
On 11/02/12 21:10, Michael Bayer wrote:
On Feb 11, 2012, at 8:02 AM, Krishnakant Mane wrote:
Hello all,
I have an
On Feb 11, 2012, at 8:02 AM, Krishnakant Mane wrote:
> Hello all,
> I have an interesting problem for which I am sure some simple solution must
> be existing.
> I have made a Python function which I will paist below.
> Basically what the function does is that it takes 3 parameters, namely the
>
10 matches
Mail list logo