Skip to content

Commit

Permalink
simplify case clauses
Browse files Browse the repository at this point in the history
  • Loading branch information
cemerick committed Aug 18, 2011
1 parent 6ae1201 commit cb1d00f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
</scm>

<properties>
<clojure.version>1.2.0</clojure.version>
<clojure.version>1.3.0-beta1</clojure.version>
</properties>

<dependencies>
Expand All @@ -41,7 +41,7 @@
<dependency>
<groupId>com.cemerick</groupId>
<artifactId>utc-dates</artifactId>
<version>0.0.1</version>
<version>0.0.2</version>
</dependency>
</dependencies>

Expand Down
7 changes: 4 additions & 3 deletions src/main/clojure/cemerick/rummage.clj
Original file line number Diff line number Diff line change
Expand Up @@ -276,9 +276,9 @@

(def ^{:private true} query-language
{:select #(case (strip-symbol-ns %)
'* "*"
'id "itemName()"
'count "count(*)"
* "*"
id "itemName()"
count "count(*)"
(if-not (coll? %)
(throw (IllegalArgumentException. (str "invalid attribute spec: " %)))
(->> (map strip-symbol-ns %)
Expand Down Expand Up @@ -436,3 +436,4 @@
; can't imagine when one wouldn't want to minimize round-trips when obtaining all results
(if (map? q) (assoc q :limit 2500) q)
nil))

0 comments on commit cb1d00f

Please sign in to comment.