From e2bd4b4939d34fc9400c9843b691428d3888ecc4 Mon Sep 17 00:00:00 2001 From: Carlo Zancanaro Date: Fri, 24 May 2013 10:02:16 +1000 Subject: Fix a bug in `resolve-fields` The recursive calls to `resolve-fields` were not being made due to programmer error. This has been fixed, so now the field resolution stuff should work properly again. This is really highlighting the need for better testing. Get on that! --- test/clojure_sql/core_test.clj | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'test/clojure_sql') diff --git a/test/clojure_sql/core_test.clj b/test/clojure_sql/core_test.clj index b5d65e7..236e421 100644 --- a/test/clojure_sql/core_test.clj +++ b/test/clojure_sql/core_test.clj @@ -18,8 +18,13 @@ (into {} (-> (table :user) (project '{(+ :username :password) :u}))) -(-> (table {(-> (table :users) - (project '[:username (+ 1 2 3)]) - (rename '{(+ 1 2 3) :x}) - (select `(exists ~(table :users)))) :u}) +(-> (table :users) + (project '[:username (+ 1 2 3)]) + (rename '{(+ 1 2 3) :x}) + (select `(exists ~(-> (table :users) + (select '(= 10 :username))))) println) + +(-> (table :users) + (project {:username :un}) + (select '(= :username 10))) -- cgit v1.2.3