[sqlalchemy] query.filter AND ( ... OR ... OR ) how to?

2013-01-23 Thread Jose Soares
Hi all, I'm trying to compile a query to avoid Oracle limit of 1000 in IN(): def chunks(l, n): Yield successive n-sized chunks from l. for i in xrange(0, len(l), n): yield l[i:i+n] qry=session.query(Azienda).fiter(Azienda.c.cap=='') val=[1,3,3,4,3,23,2,4,5,6,7,8,9,90,34,2]

Re: [sqlalchemy] query.filter AND ( ... OR ... OR ) how to?

2013-01-23 Thread Simon King
On Wed, Jan 23, 2013 at 11:30 AM, Jose Soares jose.soa...@sferacarta.com wrote: Hi all, I'm trying to compile a query to avoid Oracle limit of 1000 in IN(): def chunks(l, n): Yield successive n-sized chunks from l. for i in xrange(0, len(l), n): yield l[i:i+n]

Re: [sqlalchemy] query.filter AND ( ... OR ... OR ) how to?

2013-01-23 Thread Jose Soares
It works, thanks Simon. j On 01/23/2013 12:53 PM, Simon King wrote: On Wed, Jan 23, 2013 at 11:30 AM, Jose Soares jose.soa...@sferacarta.com wrote: Hi all, I'm trying to compile a query to avoid Oracle limit of 1000 in IN(): def chunks(l, n): Yield successive n-sized chunks from l.