Niclas Hedhman wrote: > On Tue, Apr 29, 2008 at 9:03 PM, Rickard Öberg <[EMAIL PROTECTED]> wrote: >> The problem with size() is that it would have to execute the Query, > > Well, then that would trigger a follow up question; When is the Query > executed, and should there be a way to "re-execute"? > > I mean size(), find() and iterator() could all trigger the query, but > there is one small difference... > > size() need to return the number of objects that a non-bounded (with > first/max) query would return, whereas the find() and iterator() only > deal with the (potentially) bounded query. For simple queries, a good > backend will be very fast for a SELECT count(*) from Abc where age > > 25;
Yeah, I guess there is no other way than to simply execute the query on those three operations, with the semantics as you outlined. That would make it very easy to implement paging views at least. Anyone see any problems with that semantics? /Rickard _______________________________________________ qi4j-dev mailing list [email protected] http://lists.ops4j.org/mailman/listinfo/qi4j-dev

