Permalink
Browse files

Bumped version to BETA2

  • Loading branch information...
1 parent 0fa2864 commit d73c671571d149d86c9036a1ffdc2ed6118dc59f @LauJensen committed Nov 25, 2010
Showing with 10 additions and 9 deletions.
  1. +2 −2 README.md
  2. +1 −1 project.clj
  3. +7 −4 src/clojureql/core.clj
  4. +0 −2 src/clojureql/predicates.clj
View
@@ -21,14 +21,14 @@ Add the following to your **project.clj** or pom.xml:
Cake/Lein artifact:
- [clojureql "1.0.0-beta1-SNAPSHOT"]
+ [clojureql "1.0.0-beta2-SNAPSHOT"]
Maven:
<dependency>
<groupId>clojureql</groupId>
<artifactId>clojureql</artifactId>
- <version>1.0.0-beta1-SNAPSHOT</version>
+ <version>1.0.0-beta2-SNAPSHOT</version>
</dependency>
Then execute
View
@@ -1,4 +1,4 @@
-(defproject clojureql "1.0.0-beta1-SNAPSHOT"
+(defproject clojureql "1.0.0-beta2-SNAPSHOT"
:description "SQL abstractions for Clojure"
:dependencies [[org.clojure/clojure "1.2.0"]
[org.clojure/clojure-contrib "1.2.0"]]
@@ -159,12 +159,12 @@
(defmacro where [clause]
"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
- select, ie.
+ If you call str on the result, you'll get the above. If you call
+ (:env) you will see the captured environment
- (select tble (where ...))"
+ Use as: (select tble (where ...))"
`(where* ~(into {} (for [[local] &env] [(list 'quote local) local]))
'~clause))
@@ -177,6 +177,9 @@
(seq (:restriction table)))))
(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]
(for [[tbl-or-kwd pred] (map :data joins)
:when (requires-subselect? tbl-or-kwd)
@@ -17,8 +17,6 @@
(str (to-tablename %))
"?"))
(join-str (str \space op \space)))
- ;(join-str op (repeat (count (remove keyword? expression)) " ? "))
-
")"))
(defprotocol Predicate

0 comments on commit d73c671

Please sign in to comment.