From 3ce695f6b2daf943490b2b4a9dac7be01bdd6356 Mon Sep 17 00:00:00 2001 From: Carlo Zancanaro Date: Thu, 20 Jun 2013 13:58:31 +1000 Subject: A few small changes/fixes to join behaviour, and code cleanup Fix compilation of cross joins. Remove the sort clauses on queries when they become subqueries in joins because then the sorting means nothing (although when take/drop stuff is added the sort will be relevant, so we'll see about that). Favour the left side of a join, which is mostly only relevant for the outer join case (and technically it's not quite right for full-outer joins, maybe, but I'll get to that later). --- src/clojure_sql/query.clj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/clojure_sql/query.clj') diff --git a/src/clojure_sql/query.clj b/src/clojure_sql/query.clj index 00eb212..218ae7a 100644 --- a/src/clojure_sql/query.clj +++ b/src/clojure_sql/query.clj @@ -5,9 +5,9 @@ (alter-var-root #'*query-deref-behaviour* (constantly f)) nil) -(defrecord ^:private Query [] +(defrecord ^:private Query [] clojure.lang.IDeref (deref [this] (*query-deref-behaviour* this))) -(def query? (partial instance? (class (->Query)))) +(def query? (partial instance? Query)) -- cgit v1.2.3