On Tue, Nov 23, 2010 at 5:34 AM, LauJensen <lau.jen...@bestinclass.dk> wrote: > And finally, I've just refurbished the compiler so that its not a > 25 line beast of a recursive machine that automatically spawns > subselects for aggregates, limit/offset and predicates: > > cql.core> (to-sql (-> (table {} :users) > (join (table {} :salary) > (where (= :users.id :salary.id))) > (outer-join (take (table :wages) > 5) :left :id) > (join (select (table :test) (where (> :id > 5))) (where (= :test.id :users.id))) > (project [:users.id :salary.wage]) > (select (where (= :test.id :wages.id))))) > > SELECT users.id,salary.wage,wages_subselect.*,test_subselect.* FROM > users > JOIN salary ON (users.id = salary.id) LEFT OUTER JOIN > (SELECT wages.* FROM wages LIMIT 5) AS wages_subselect USING(id) > JOIN (SELECT test.* FROM test WHERE (id > 5)) AS test_subselect ON > (test_subselect.id = users.id) WHERE (test_subselect.id = > wages_subselect.id)" >
Great work. Has the updated version been pushed to clojars yet? Or do I need to git pull and build manually? -- Omnem crede diem tibi diluxisse supremum. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en