jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Graeme Rocher" <graemeroc...@yahoo.co.uk>
Subject Pagination of results & position() comparison queries
Date Mon, 12 Feb 2007 15:04:26 GMT
Hi,

I'm trying to figure out how to go about doing some form of pagination
of query results. In Hibernate app you would likely use the
setFirstResult and setMaxResults properties to manipulate the result
set. However, Hibernate handles the various SQL dialect issues around
data pagination for you.

I tried the following with an xpath query:

//wiki:WikiEntry[(position() > 10) and (position() < 20)]

which I was hoping would return me all the "WikiEntry" items between
10 and 20, however it throws this exception:

javax.jcr.query.InvalidQueryException: Unsupported expression with
position(). Only = is supported.

So given that this kind of comparison is not supported with the
position() function, how would I go about creating the query I'm
after? Is it possible at all?

Regards,

-- 
Graeme Rocher
Grails Project Lead
http://grails.org

Mime
View raw message