From ae7d42bd32bc4fc4ff89a7724eda09b132f95d66 Mon Sep 17 00:00:00 2001 From: Mike Blume Date: Mon, 16 Mar 2015 12:32:07 -0700 Subject: [PATCH] use case instead of condp --- src/honeysql/format.clj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/honeysql/format.clj b/src/honeysql/format.clj index 6d48ccb..cace514 100644 --- a/src/honeysql/format.clj +++ b/src/honeysql/format.clj @@ -161,7 +161,7 @@ (to-sql pattern) (when (seq opts) (str " " (space-join (for [opt opts] - (condp = opt + (case opt :boolean "IN BOOLEAN MODE" :natural "IN NATURAL LANGUAGE MODE" :expand "WITH QUERY EXPANSION"))))) @@ -256,7 +256,7 @@ clojure.lang.Keyword (-to-sql [x] (let [s (name x)] - (condp = (.charAt s 0) + (case (.charAt s 0) \% (let [call-args (string/split (subs s 1) #"\." 2)] (to-sql (apply call (map keyword call-args)))) \? (to-sql (param (keyword (subs s 1))))