Skip to content

Commit

Permalink
Bumped version to BETA2
Browse files Browse the repository at this point in the history
  • Loading branch information
Lau B. Jensen committed Nov 25, 2010
1 parent 0fa2864 commit d73c671
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -21,14 +21,14 @@ Add the following to your **project.clj** or pom.xml:


Cake/Lein artifact: Cake/Lein artifact:


[clojureql "1.0.0-beta1-SNAPSHOT"] [clojureql "1.0.0-beta2-SNAPSHOT"]


Maven: Maven:


<dependency> <dependency>
<groupId>clojureql</groupId> <groupId>clojureql</groupId>
<artifactId>clojureql</artifactId> <artifactId>clojureql</artifactId>
<version>1.0.0-beta1-SNAPSHOT</version> <version>1.0.0-beta2-SNAPSHOT</version>
</dependency> </dependency>


Then execute Then execute
Expand Down
2 changes: 1 addition & 1 deletion project.clj
@@ -1,4 +1,4 @@
(defproject clojureql "1.0.0-beta1-SNAPSHOT" (defproject clojureql "1.0.0-beta2-SNAPSHOT"
:description "SQL abstractions for Clojure" :description "SQL abstractions for Clojure"
:dependencies [[org.clojure/clojure "1.2.0"] :dependencies [[org.clojure/clojure "1.2.0"]
[org.clojure/clojure-contrib "1.2.0"]] [org.clojure/clojure-contrib "1.2.0"]]
Expand Down
11 changes: 7 additions & 4 deletions src/clojureql/core.clj
Expand Up @@ -159,12 +159,12 @@
(defmacro where [clause] (defmacro where [clause]
"Constructs a where-clause for queries. "Constructs a where-clause for queries.
(where (or (< :a 2) (>= :b 4))) => \"((a < 2) OR (b >= 4))\" (where (or (< :a 2) (>= :b 4))) => \"((a < ?) OR (b >= ?))\"
Strings are auto quoted. Typically you will use this in conjunction with If you call str on the result, you'll get the above. If you call
select, ie. (:env) you will see the captured environment
(select tble (where ...))" Use as: (select tble (where ...))"
`(where* ~(into {} (for [[local] &env] [(list 'quote local) local])) `(where* ~(into {} (for [[local] &env] [(list 'quote local) local]))
'~clause)) '~clause))


Expand All @@ -177,6 +177,9 @@
(seq (:restriction table))))) (seq (:restriction table)))))


(defn extract-aliases (defn extract-aliases
" Internal: Looks through the tables in 'joins' and finds tables
which requires subselects. It returns a vector of the
original name and the new name for each table "
[joins] [joins]
(for [[tbl-or-kwd pred] (map :data joins) (for [[tbl-or-kwd pred] (map :data joins)
:when (requires-subselect? tbl-or-kwd) :when (requires-subselect? tbl-or-kwd)
Expand Down
2 changes: 0 additions & 2 deletions src/clojureql/predicates.clj
Expand Up @@ -17,8 +17,6 @@
(str (to-tablename %)) (str (to-tablename %))
"?")) "?"))
(join-str (str \space op \space))) (join-str (str \space op \space)))
;(join-str op (repeat (count (remove keyword? expression)) " ? "))

")")) ")"))


(defprotocol Predicate (defprotocol Predicate
Expand Down

0 comments on commit d73c671

Please sign in to comment.