Hi,
we are evaluating JOOQ at the moment and one hibernate (well, native sql ;P 
) query we have is:

Restrictions.sqlRestriction("? * ACOS((SIN(PI() * ? / 180) * SIN(PI() * 
hospital2_.latitude/ 180)) + (COS(PI() * ? /180) * cos(PI() * 
hospital2_.latitude / 180) * COS(PI() * hospital2_.longitude / 180 - PI() * 
? / 180)) ) <= ?", params, types)

(The 4 parameters you have in this query, are all BigDecimals, or in code 
speak:
Distance.earthRadius(withDistance.getUnit()).getLength(), 
fromCoordinate.getLatitude(), fromCoordinate.getLatitude(), 
fromCoordinate.getLongitude(), withDistance.getLength()))

I played around with acos() a bit and it seems it cannot take a condition 
as parameter? Or am I going down the wrong path?

Thanks

-- 
You received this message because you are subscribed to the Google Groups "jOOQ 
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to