[Crossdb-developers] LIMITS discussion
Status: Beta
Brought to you by:
prophecyslides
|
From: <tr...@th...> - 2002-10-21 22:44:13
|
Hi, Just wanted to know what people thought of this for implementing limits: SelectQuery can have a function called setLimit(x, y); x is offset, y is range (or how many returned). Now for databases that support this natively, it's easy. For databases that don't support it, the CrossdbResultSet object could do the best thing possible, like Oracle could do the /*FIRST_ROWS*/ thing (or whatever the syntax is) that returns the results as soon as they come in rather than waiting for the whole set, and the Resultset could initialize itself to the offset and will have a counter that will only allow the user to call rs.next() up to y times. For SQL Server you could use TOP x + y so it will only return what is absolutely necessary then initialize it to start at x. Sound good? Sound crap? Travis Reeder |