These are lines 4105-4108 of dal.py in trunk
if attributes.get('limitby', None):
(lmin, lmax) = attributes['limitby']
(limit, offset) = (lmax - lmin, lmin)
items = items.fetch(limit, offset=offset)
The values parsed from limitby are converter to limit and offset and passed
to the fetch function which is a GAE API.
What this function does with it is beyond web2py control.
Masssimo
On Thursday, 24 May 2012 16:10:25 UTC-5, Alex Benfica wrote:
>
> Hi!
>
> Massimo... does it really limits the number of entities queried from GAE
> datastore?
> I made some tests while observing quota limits... and seens that each time
> I do
> limitby=(0,10), all 845 entities I have are being returned... but web2py
> only shows 10 first...
>
> Is there a way I can only get then 10 first from database ? GAE costs
> increases when more entities are returned...
> How to solve that?
>
>
>
> On Thursday, January 14, 2010 1:34:31 PM UTC-2, mdipierro wrote:
>>
>> l = db().select(db.artikel.id,limitby=(0,10))
>>
>> On Jan 14, 9:19 am, Johann Spies <[email protected]> wrote:
>> > What is the equivalent in DAL for
>> >
>> > l = db.executesql("select id from artikel limit 10;")
>> >
>> > Regards
>> > Johann
>>
>