Discussion:
NXQL and the LIMIT clause
j***@public.gmane.org
2009-11-20 17:59:26 UTC
Permalink
I was writing an NXQL query in the Advanced Seach and tried to use the LIMIT/OFFSET clauses. Both appear to be ignored. Is LIMIT not supported or is some special syntax required? Then I tried the LIMIT clause in a session.query(...) call and it was also ignored.

I did take a look at nuxeo-core-query and the LIMIT clause is used in a number of places but I haven't had time to sort through this.

Thoughts?

Thanks,
bruce.
--
Posted by "bgrant" at Nuxeo Discussions <http://nuxeo.org/discussions>
View the complete thread: <http://www.nuxeo.org/discussions/thread.jspa?threadID=3034#8938>
Olivier Grisel
2009-11-21 01:02:19 UTC
Permalink
Post by j***@public.gmane.org
I was writing an NXQL query in the Advanced Seach and tried to use the LIMIT/OFFSET clauses. Both appear to be ignored. Is LIMIT not supported or is some special syntax required? Then I tried the LIMIT clause in a session.query(...) call and it was also ignored.
I did take a look at nuxeo-core-query and the LIMIT clause is used in a number of places but I haven't had time to sort through this.
Limit and offset should be passed as java arguments to the
session.query method instead of being included inside the query string
itself.
--
Olivier
j***@public.gmane.org
2009-11-21 04:58:24 UTC
Permalink
Olivier was kind enough to send the following response.
Limit and offset should be passed as java arguments to the session.query method instead of being included inside the query string itself.
Thanks, I now see the right method

DocumentModelList query(String query, Filter filter, long limit, long offset, boolean countTotal)
--
Posted by "bgrant" at Nuxeo Discussions <http://nuxeo.org/discussions>
View the complete thread: <http://www.nuxeo.org/discussions/thread.jspa?threadID=3034#8941>
Loading...