This can be done only for Oracle and only if the number of expressions is higher than 1000 (which would otherwise produce an exception) Regarding complex queries, I guess the several or_'s fix should work: or_(x.in_(1...1000), x.in_(1001...2000))
How can this be done locally? (override in_ operator only for Oracle) Thanks, Ofir On Tuesday, June 17, 2014 4:18:11 PM UTC+3, Michael Bayer wrote: > > > On 6/17/14, 4:32 AM, Ofir Herzas wrote: > > ORA-01795: maximum number of expressions in a list is 1000 > > > > As I understand, there are several options to fix this issue > > (e.g. > > > https://groups.google.com/forum/#!searchin/sqlalchemy/maximum$20number$20of$20expressions/sqlalchemy/Oa6YWNE0-IQ/6GVmy27B-FAJ > > > or split in_ to several or_) > > > > Why not incorporate this fix into sqlalchemy? > SQLAlchemy's core SQL model is one-to-one with SQL. Taking a single > statement and magically executing ten statements within the scope of an > execute() due to a particular operator being present would be very > inappropriate and surprising, and also wouldn't work for any queries > that are more complex than a simple "WHERE x IN y". > > > > -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To post to this group, send email to sqlalchemy@googlegroups.com. Visit this group at http://groups.google.com/group/sqlalchemy. For more options, visit https://groups.google.com/d/optout.