summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md12
1 files changed, 5 insertions, 7 deletions
diff --git a/README.md b/README.md
index b83479e..9a90ee2 100644
--- a/README.md
+++ b/README.md
@@ -28,7 +28,7 @@ queries to be entirely special-cased per database. By default
(-> (s/table :users) ;; tables are automatically given internal aliases
(s/project [:id :username]))
- ; => ["SELECT \"users1234\".\"id\", \"users1234\".\"username\" FROM \"users\" AS \"users1234\""]
+ ;; => ["SELECT \"users3205\".\"id\" AS \"id\", \"users3205\".\"username\" AS \"username\" FROM \"users\" AS \"users3205\""]
(-> (s/table :users)
(s/project [:id :username])
@@ -36,11 +36,9 @@ queries to be entirely special-cased per database. By default
(s/join (-> (s/table :people)
(s/project {:id :pid, :fname :first})
(s/select '(= :first "Henry")))
- '(= :uid :pid))
+ :on '(= :uid :pid))
(s/project [:username]))
- ; => ["SELECT \"users1234\".\"username\" FROM \"users\" AS \"users1234\" JOIN \"people\" AS \"people1234\" ON (\"users1234\".\"id\" = \"people1234\".\"id\") WHERE (\"people1234\".\"fname\" = ?)" "Henry")]
-
-
+ ;; => ["SELECT \"users3430\".\"username\" AS \"username\" FROM (\"users\" AS \"users3430\" INNER JOIN \"people\" AS \"people3432\" ON (\"users3430\".\"id\" = \"people3432\".\"id\")) WHERE (\"people3432\".\"fname\" = ?)" "Henry"]
[`clojure.java.jdbc`][3] support is provided, but must be included
explicitly. `clojure-sql` does not depend on `clojure.java.jdbc`.
@@ -48,11 +46,11 @@ explicitly. `clojure-sql` does not depend on `clojure.java.jdbc`.
(require '[clojure-sql.jdbc :as jdbc])
(jdbc/use-jdbc! "postgres://user:pass@localhost:5432/db")
- ; => nil
+ ;; => nil
(deref (-> (s/table :users)
(s/project [:id :username])))
- ; => [{:id 5, :username "mange"}]
+ ;; => [{:id 5, :username "mange"}]
Results are returned from queries in an eager vector.