cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aristedes Maniatis <...@maniatis.org>
Subject Re: Sorting strings numerically
Date Fri, 24 Sep 2010 00:53:42 GMT
On 24/09/10 7:43 AM, Marek Ĺ abo wrote:
> sorry, my first post  was probably confusing.
> I could do it programmatically but I want to know if it is possible with
> cayenne sorting engine, paraphrased, Can I modify sort order property
> for cayenne somehow, e.g. as MySQL function INET_ATON()?
>
> Meanwhile I can create a template query:
>
> SELECT ipAddress FROM Ip4Address ORDER BY
> INET_ATON(Ip4Address.ipAddress)  ASC

There is no such thing as the "cayenne sorting engine". Cayenne does its sorting by creating
SQL commands to send to the database. Your approach, sorting in by formula inside the database,
is probably the best. It is potentially very slow since I don't think you can create an index
on a formula inside mysql.

Ari

-- 
-------------------------->
Aristedes Maniatis
GPG fingerprint CBFB 84B4 738D 4E87 5E5C  5EFA EF6A 7D2E 3E49 102A

Mime
View raw message