[redland-dev] order by on dates

Danny Ayers danny.ayers at gmail.com
Tue Jun 7 17:56:55 BST 2005


On 6/7/05, Dave Beckett <dave.beckett at bristol.ac.uk> wrote:

> I guess you'll be happy to know that I added an initial sorting
> implementation in the query engine CVS this morning.  

Bravo!

Sorting is
> performed on all results in memory (so don't try that with huge results)
> and it's with stringy compares so integer 10 collates less
> than integer 2 since "10" < "2", i.e. like RDQL.  Fixing that is
> piles of detail.   So date sorting might work if you stick to
> a normalised form such as without timezones.

Great stuff, I can definitely use this.

I did discover a workaround - xsl:sort on the results - but as the
main aim of the app is to show off SPARQL, it's not exactly elegant.
Ideally I would like to sort on the MySQL models, in fact I took a
brief look at rdf_storage_mysql.c, wondering if there was an easy way
to slip in an order by there. Waaa! Scary code. In-memory sorting will
do just fine for now (although I might still badger* Morten).

Cheers,
Danny. 

* http://www.badgerbadgerbadger.com/

-- 

http://dannyayers.com


More information about the redland-dev mailing list