[tmql-wg] Proposed new requirement: Paging of result sets

Lars Marius Garshol larsga@garshol.priv.no
21 Jul 2003 13:49:25 +0200

* Robert Barta
| I would love to have a functionality doing this in the language. 

Good! That's the important thing, really. The SQL bits were really
only in there so that people would understand what I meant. I can
rewrite it to make sure that it's understood to only be an example.

| I wonder whether this can be done more elegantly in the language
| than with that heavy-handed LIMIT/OFFSET. So if the SQL part is
| omitted or deemphasized...

Will do that.
| XQuery, btw, had already the concept of ordered list and uses
| XPath's position() function to limit the range. It is probably
| debatable whether this is elegant, but, hey, its XML anyway. :-)

If we could provide features that would let us do this indirectly that
would be the best. 
| If the language already has lists, then a simple
|    function I_want_results (..., $lower as natural := 0, $nr as natural := 15) {
|    ....
|       return @results[$lower, $lower + $nr]
|    ....
|    }
| could do the job without hardcoding this into the language.

Conceivably, yes.

Lars Marius Garshol, Ontopian         <URL: http://www.ontopia.net >
GSM: +47 98 21 55 50                  <URL: http://www.garshol.priv.no >