Re: [web2py] Re: limitby question

2017-03-07 Thread Richard Vézina
Thanks for exploring this Anthony, Yes, I guess having .limit() and .offset() would make it easier to use constant limit value like 10 records and just manipulate the offset... I was just at first thinking that limitby=(limit, offset) or limitby=(offset, limit), I mean I intuitivelly want it to b

Re: [web2py] Re: limitby question

2017-03-07 Thread Anthony
For what it's worth, the Django ORM uses Python array slicing syntax (i.e., [start:stop]) to implement limit/offset, and SQLAlchemy uses .slice(start, stop) (though it also offers separate .limit() and .offset() methods). I don't think it is common to have a single argument of the form (limit,

Re: [web2py] Re: limitby question

2017-03-07 Thread Anthony
On Tuesday, March 7, 2017 at 9:20:53 AM UTC-5, Richard wrote: > > Yes sorry it was more of a complaint than a question > > :) > > I was disturbed by the fact that I can't leave the limit constant, like 10 > rows, and only manipulate the offset as I would do in sql... > It sounds like you want som

Re: [web2py] Re: limitby question

2017-03-07 Thread Richard Vézina
Yes sorry it was more of a complaint than a question :) I was disturbed by the fact that I can't leave the limit constant, like 10 rows, and only manipulate the offset as I would do in sql... Then I reread the book and understand min, max, but I am not sure I see the advantage... And I found conf

[web2py] Re: limitby question

2017-03-06 Thread Dave S
On Monday, March 6, 2017 at 5:50:05 PM UTC-8, Anthony wrote: > > What is your question? If you want to do an offset, you need two numbers > -- either the two endpoints of the interval or one endpoint plus the size > of the interval. Whichever pair of numbers you have, it is a single > arithmet

[web2py] Re: limitby question

2017-03-06 Thread Anthony
What is your question? If you want to do an offset, you need two numbers -- either the two endpoints of the interval or one endpoint plus the size of the interval. Whichever pair of numbers you have, it is a single arithmetic operation to get the alternative pair. It might help if you explain wh