[Nepomuk] Result sorting with Nepomuk Querylib
Vishesh Handa
handa.vish at gmail.com
Sun Sep 18 17:36:52 UTC 2011
Hey Sebastian
I was working on my note taking application, and I want all the resources
which are notes. So, I did this -
Nepomuk::Query::ResourceTypeTerm typeTerm( Nepomuk::Types::Class(
PIMO::Note() ) );
Nepomuk::Query::Query query( typeTerm );
which was fine. Then I realized that I wanted the notes to be sorted
according to the last modification date.
Currently, I'm doing this -
Nepomuk::Query::ResourceTypeTerm typeTerm( Nepomuk::Types::Class(
PIMO::Note() ) );
Nepomuk::Query::Query query( typeTerm );
Nepomuk::Query::Query::RequestProperty rp( NAO::lastModified(), false );
query.addRequestProperty( rp );
QString sparql = query.toSparqlQuery() + " order by desc(?reqProp1)";
client->sparqlQuery( sparql );
Is it possible that you forgot to implement sorting in the query lib? Cause
I can't seem to find how to do it.
--
Vishesh Handa
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/nepomuk/attachments/20110918/90619340/attachment.html>
More information about the Nepomuk
mailing list