diff options
author | Carlo Zancanaro <carlo@clearboxsystems.com.au> | 2013-06-21 10:42:56 +1000 |
---|---|---|
committer | Carlo Zancanaro <carlo@clearboxsystems.com.au> | 2013-06-21 10:42:56 +1000 |
commit | fb946311da111e2a422a938b0b8720c3ecf3341c (patch) | |
tree | 3a060344dcf2d8d0ad84040de505de3008441da4 /README.md | |
parent | 7377eee7fe3c81522680151bfd5ac3b120b87a30 (diff) |
Add take/drop, move jdbc stuff, document default of postgres
Add take and drop functionality to the queries, so now you can use the take and
drop functions in a similar way to how they work on seqs in clojure.
Move jdbc interface stuff into clojure-sql.jdbc, so if you're using jdbc you
can include it yourself. (If you're not using jdbc then it shouldn't bother
you).
Given the default compilation target is actually postgres, document that.
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -20,7 +20,7 @@ allow for data to be inserted, updated and deleted. queries is performed by multimethods which dispatch on an arbitrary (and otherwise unused) `db` parameter. This allows the compilation of queries to be entirely special-cased per database. By default -`clojure-sql` will produce standard ANSI SQL. +`clojure-sql` will produce SQL for PostgreSQL. ## Usage @@ -39,8 +39,10 @@ queries to be entirely special-cased per database. By default '(= :uid :pid)) (s/project [:username])) ; => ["SELECT \"u\".\"username\" FROM \"users\" AS \"u\" JOIN \"people\" AS \"p\" ON (\"u\".\"id\" = \"p\".\"id\") WHERE (\"p\".\"fname\" = ?)" "Henry")] - - (s/use-jdbc! "postgres://user:pass@localhost:5432/db") + + (require '[clojure-sql.jdbc :as jdbc]) + ; => nil + (jdbc/use-jdbc! "postgres://user:pass@localhost:5432/db") ; => nil |