session imported from Meta ? If use Meta.Session.execute it's returns
RowProxy, which has no lastrowid parameter.
On 16 сен, 02:59, Michael Bayer mike...@zzzcomputing.com wrote:
no its not a column on a row, its on the ResultProxy:
result = session.execute('...')
id = result.lastrowid
On 16/09/2010 11:49, phasma wrote:
session imported from Meta ? If use Meta.Session.execute it's returns
RowProxy, which has no lastrowid parameter.
Try this:
with meta.Session:
result = meta.Session.execute(INSERT statement)
print result.lastrowid
cheers,
Chris
--
Simplistix -
On Sep 16, 2010, at 6:49 AM, phasma wrote:
session imported from Meta ? If use Meta.Session.execute it's returns
RowProxy, which has no lastrowid parameter.
execute() does not return a RowProxy. All execute() methods return a
ResultProxy which consists of metadata about a result as well as
I've found a solution. meta.Session.execute returns RowProxy instead
of ResultProxy.
Example:
query = meta.engine.text(INSERT [...] VALUES(:text, :text1))
result = query.execute(text=123, text1=123)
print result.lastrowid
On 16 сен, 16:18, Chris Withers ch...@simplistix.co.uk wrote:
On
On Sep 16, 2010, at 11:15 AM, Michael Bayer wrote:
On Sep 16, 2010, at 10:47 AM, Chris Withers wrote:
On 16/09/2010 14:32, Michael Bayer wrote:
session imported from Meta ? If use Meta.Session.execute it's returns
RowProxy, which has no lastrowid parameter.
execute() does not return
Hello again,
I published an updated version of acts_as_localized on
http://code.google.com/p/elixirlocalized/
It is an Elixir's Entity builder that will manage several translations
for DB contents
If anyone cares to review or use it.
NiL
--
You received this message because you are
How can I use a list , tuple or any iterable in an in clause using the
plain sql expression and bindparams.
e.g.
engine.execute(sql.expression.text('''
select * from users where id in :ids
'''), ids=[1,2,3,4])
what do I need to change to make this work.
I tried this, and it generates not sql:
Hi All,
As part of looking into #1919, I see that if a table of the same name as
the one passed to tometadata already exists in the destination metadata,
then the table object passed in is ignored and the one already there is
returned.
That feels wrong to me. In the event there's already a
On Sep 16, 2010, at 2:56 PM, Chris Withers wrote:
Hi All,
As part of looking into #1919, I see that if a table of the same name as the
one passed to tometadata already exists in the destination metadata, then the
table object passed in is ignored and the one already there is returned.
On 16/09/2010 20:26, Michael Bayer wrote:
As such, I'd expect an exception to be raised rather than the other table
object being returned. What do people feel about this?
Im fine with tometadata raising for 0.7. a warning for 0.6 perhaps.
Cool, done for 0.6. Where should I make the
It seems it is not possible to do this with bindparams, my workaround
was as follows
On Sep 16, 2:01 pm, Pykler hnass...@gmail.com wrote:
engine.execute(sql.expression.text('''
select * from users where id in %s
'''% SqlTuple([1,2,3,4]))
Where SqlTuple is a tuple with a custom repr method to
On 09/16/2010 04:28 PM, Pykler wrote:
It seems it is not possible to do this with bindparams, my workaround
was as follows
On Sep 16, 2:01 pm, Pykler hnass...@gmail.com wrote:
engine.execute(sql.expression.text('''
select * from users where id in %s
'''% SqlTuple([1,2,3,4]))
I had misunderstood the documentation on relationships and then tied
myself in a knot, I thought that relationship() defined a strictly
parent to child relationship and that all the other parameters were
from the parents point of view.
My runs and is a lot cleaner!
Thank you for helping me,
BEN
13 matches
Mail list logo