On May 10, 2008, at 10:22 AM, Yannick Gingras wrote:
>>> I attach a test case. In here, it prints: > > ------------------------------ > ** q[:0] > SELECT users.id AS users_id, users.name AS users_name > FROM users ORDER BY users.id > > > ** q[0:0] > SELECT users.id AS users_id, users.name AS users_name > FROM users ORDER BY users.id > > > ** q[1:1] > SELECT users.id AS users_id, users.name AS users_name > FROM users ORDER BY users.id > LIMIT 0 OFFSET 1 > > > ** q[0:10] > SELECT users.id AS users_id, users.name AS users_name > FROM users ORDER BY users.id > LIMIT 10 OFFSET 0 > ------------------------------ > > Shouldn't the first two feature " LIMIT 0 OFFSET 1"? yes. but the question was, "limit is ignored when offset is zero", which is not the issue. LIMIT is ignored when its zero, period (it evaluates to false). the decision to be made is, should Query circumvent querying altogether when limit is zero. this will be easy to fix in 0.5 since slices will no longer be generative, so we'll just return an empty iterator. ticket 1035 in trac. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---