Re: Limit / Offset

Kevin Rosenberg <kevin-HJRc7zDS/[email protected]> Wed, 3 May 2006 07:12:18 -0600
Newsgroups gmane.lisp.clsql.devel
Message-ID <[email protected]>
Marcus Pearce wrote:
> As of Lispworks version 4.4.5, the implementation of SELECT in CommonSQL 
> accepts a :LIMIT keyword argument (which presumably does the obvious 
> thing although it doesn't appear to be documented in the reference 
> manual).[1]

Not too surprising to have new features in CommonSQL and for the
documentation to lag the code.

> CLSQL:SELECT actually already handles both :LIMIT and :OFFSET keyword 
> arguments (if you're going to have the former, you might as well have the 
> latter) although this fact is currently undocumented and untested. The 
> attached patch against 3.5.6 documents these abilities and adds a couple 
> of tests to the test suite.

That's great, thank you for the contribution.

> I don't know whether other databases support limit clauses in queries so 
> the tests are currently skipped for other backends.

Makes sense.

Thanks again for the patch and welcome back to the ChangeLog!

Kevin