Array slicing doesn't always return a QuerySet and shouldn't be adapted to
this proposed behavior. Directly exposing Query.set_limits() on the
QuerySet would most likely have confusing behavior to at least some group
of people.
Given the current behavior of Query.set_limits(), what should be the s
I completely agree with Gary's argumentation here. And I would love to see
.limit() introduced (or array slicing adapted).
I ran into a situation where I have access into intermediate queryset()
construction, where I normally do add .filter() statements, but now I had
to limit a number of queri
Luke Plant wrote:
> On Tuesday 04 December 2007 07:25:31 Gary Wilson wrote:
>
>> Sort of my point. Since filter() and [:] both return QuerySets why
>> should they be any different:
>>
>> UTPerson.objects.all().filter(name__startswith='a')[:10]
>
> 1) This, logically, should return the first ten
On Tuesday 04 December 2007 07:25:31 Gary Wilson wrote:
> Sort of my point. Since filter() and [:] both return QuerySets why
> should they be any different:
>
> UTPerson.objects.all().filter(name__startswith='a')[:10]
1) This, logically, should return the first ten people whose 'name'
starts w
Derek Anderson wrote:
> even if it was possible, i don't think it's what you would really want.
> logically, this would return an indefinite number of records,
> somewhere between 0 and 10, depending on what's in your table, not the
> first 10 records of people who's name starts w/ an 'a'.
even if it was possible, i don't think it's what you would really want.
logically, this would return an indefinite number of records,
somewhere between 0 and 10, depending on what's in your table, not the
first 10 records of people who's name starts w/ an 'a'.
why are you not doing this?
U