Hi,
Looks like :limit works only partly - according to the documentation, "It limits the number of results to the amount given as the second argument, or when three arguments are given it returns the results between the two given numbers". However, if I give the 3rd value, say like this:
(query (:limit (:order-by (:select 'id 'name :from 'cities) 'name) 10 20))
I get an error like this:
Database error 42601: LIMIT #,# syntax is not supported Use separate LIMIT and OFFSET clauses. Query: (((SELECT id, name FROM cities) ORDER BY name) LIMIT 10, 20)
Looks like :offset is not implemented yet. I have attached a patch to fix these issues, kindly let me know the preferred way of sending patches (I used darcs diff --unified) so that I can help out where I can.
Thanks much, Vamsee.
Hi,
I adjusted the patch a bit, it does not add an :offset operator, but does make the second argument to :limit work correctly. If you ever find yourself needing just :offset without :limit, let me know, and we can add that operator as well. I never came across such a situation though.
The fixed :limit has been pushed into the darcs repo and will be included in the next release.
Cheers, Marijn
postmodern-devel@common-lisp.net