summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/clojure_sql/dsl.clj2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/clojure_sql/dsl.clj b/src/clojure_sql/dsl.clj
index 6d9b413..6ba81bc 100644
--- a/src/clojure_sql/dsl.clj
+++ b/src/clojure_sql/dsl.clj
@@ -371,7 +371,7 @@
(-> query (take 10) (drop 2)) = (-> query (drop 2) (take 8))"
[query n]
(let [query (if-let [old-take (:take query)]
- (assoc query :take (- old-take n))
+ (assoc query :take (max (- old-take n) 0))
query)]
(if-let [old-drop (:drop query)]
(assoc query :drop (+ old-drop n))