LauJensen / clojureql

ClojureQL is superior SQL integration for Clojure
https://clojureql.sabrecms.com
Eclipse Public License 1.0
285 stars 39 forks source link

The to-orderlist fn should not qualify string arguments #88

Closed r0man closed 13 years ago

r0man commented 13 years ago

The following statement

(-> (table :continents)
     (sort [(str "distance(location, ST_GeomFromText('SRID=4326;POINT(0 0)'))")]))

should compile to

SELECT continents.* FROM continents ORDER BY distance(location, ST_GeomFromText('SRID=4326;POINT(0 0)')) ASC

instead of

SELECT continents.* FROM continents ORDER BY continents.distance(location, ST_GeomFromText('SRID=4326;POINT(0 0)')) ASC

The orderlist-fix branch contains a fix, which also generates uppercase ASC and DESC modifiers.

r0man commented 13 years ago

Fix merged into master after IRC discussion ...