Michael Bayer wrote:
Are the innards of in_ exposed anywhere for public consumption or should
I avoid?
from sqlalchemy.sql import column
column(anything_you_want).in_(['a', 'b', 'c'])
Thanks, that's exactly what I was looking for...
Chris
--
You received this message because you are
Chris Withers wrote:
Michael Bayer wrote:
we have the in_() construct. It should be in the ORM and SQL expression
tutorials:
t1 = Table('mytable', metadata, Column('foo', String))
select([t1]).where(t1.c.foo.in_(['a', 'b', 'c']))
However, that requires table/column objects which I don't
Michael Bayer wrote:
we have the in_() construct. It should be in the ORM and SQL expression
tutorials:
t1 = Table('mytable', metadata, Column('foo', String))
select([t1]).where(t1.c.foo.in_(['a', 'b', 'c']))
However, that requires table/column objects which I don't have.
Are the innards
Michael Bayer wrote:
Any serious ideas or should I just go sulk in the corner?
you have to use IN, and you have to generate the SQL every time based on the
number of values you'd like to put into the IN.
Does SA have any helper code anywhere for this?
Chris
--
You received this message
Chris Withers wrote:
Michael Bayer wrote:
Any serious ideas or should I just go sulk in the corner?
you have to use IN, and you have to generate the SQL every time based on
the number of values you'd like to put into the IN.
Does SA have any helper code anywhere for this?
we have the in_()
I can't reconcile your comment with mine...
...I want to limit the results returned to those matching a set of ids.
This isn't about storing schemaless content ;-)
Any serious ideas or should I just go sulk in the corner?
Chris
Michael Bayer wrote:
yeah man , this is why we're all moving to
Hi All,
I have a big set of queries provided as raw sql like:
SELECT somestuff FROM somewhere
WHERE some_date = :from_date AND some_date = :to_date
That's fine, I just blat it at session.execute and provide from_date and
to_date in the params dict.
However, they now wany to supply
you have to rewrite your SQL to support the number of values in the IN clause
for each parameter set.
On Apr 15, 2010, at 9:54 AM, Chris Withers wrote:
Hi All,
I have a big set of queries provided as raw sql like:
SELECT somestuff FROM somewhere
WHERE some_date = :from_date AND
Michael Bayer wrote:
you have to rewrite your SQL to support the number of values in the IN clause
for each parameter set.
Hmm :'(
While my code knows the number of values, they don't, and it may vary
from when they write the SQL to when that SQL gets executed by my code...
Chris
--
You
yeah man , this is why we're all moving to mongodb :)
On Apr 15, 2010, at 10:46 AM, Chris Withers wrote:
Michael Bayer wrote:
you have to rewrite your SQL to support the number of values in the IN
clause for each parameter set.
Hmm :'(
While my code knows the number of values,
Excerpts from Chris Withers's message of Thu Apr 15 11:46:05 -0300 2010:
Michael Bayer wrote:
you have to rewrite your SQL to support the number of values in the IN
clause for each parameter set.
Hmm :'(
While my code knows the number of values, they don't, and it may vary
from when
-Original Message-
From: sqlalchemy@googlegroups.com
[mailto:sqlalch...@googlegroups.com] On Behalf Of Mariano Mara
Sent: 15 April 2010 16:20
To: sqlalchemy
Subject: Re: [sqlalchemy] further restricting a query
provided as raw sql
Excerpts from Chris Withers's message of Thu
12 matches
Mail list logo