LauJensen / clojureql

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

Invalid SQL with project #94

Closed ronslow closed 12 years ago

ronslow commented 13 years ago

I have code which is

(clojureql/take (-> (clojureql/table :microcvxdb :tweets) (clojureql/project :message_id) (clojureql/sort [:message_id#desc])) 1 )

=>

SELECT :message_id FROM tweets ORDER BY tweets.message_id desc LIMIT 1

Solved with

(clojureql/take (-> (clojureql/table :microcvxdb :tweets) (clojureql/project "message_id") (clojureql/sort [:message_id#desc])) 1 )

LauJensen commented 13 years ago

strings are usually passed along literally, however project takes a vector, not a single argument.

Lau

On Jun 7, 2011, at 15:31 , ronslow wrote:

I have code which is

(clojureql/take (-> (clojureql/table :microcvxdb :tweets) (clojureql/project :message_id) (clojureql/sort [:message_id#desc])) 1 )

=>

SELECT :message_id FROM tweets ORDER BY tweets.message_id desc LIMIT 1

Solved with

(clojureql/take (-> (clojureql/table :microcvxdb :tweets) (clojureql/project "message_id") (clojureql/sort [:message_id#desc])) 1 )

Reply to this email directly or view it on GitHub: https://github.com/LauJensen/clojureql/issues/94

Med venlig hilsen / Best regards

Lau Bjrn Jensen http://www.bestinclass.dk

bendlas commented 12 years ago

Merging this into the meta issue https://github.com/LauJensen/clojureql/wiki/Better-error-messages