Refer/link to next.jdbc as appropriate
This commit is contained in:
parent
58a9a97694
commit
ac92047d5e
3 changed files with 8 additions and 4 deletions
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
* Switch dev/test pipeline to use CLI/`deps.edn` instead of Leiningen.
|
||||
* Remove macrovich dependency as this is no longer needed with modern ClojureScript.
|
||||
* Add mention of `next.jdbc` everywhere `clojure.java.jdbc` was mentioned.
|
||||
|
||||
## 0.9.10
|
||||
|
||||
|
|
@ -70,7 +71,7 @@
|
|||
* Avoid wrapping QUERY with parens while formatting `INSERT INTO ... QUERY`. (@emidln)
|
||||
* Allow for custom name-transform-fn. Fix #193. (@madvas)
|
||||
* Add :intersect to default-clause-priorities. (@kenfehling)
|
||||
* Add `:parameterizer` `:none` for skipping `clojure.java.jdbc` parameter generation. (@arichiardi)
|
||||
* Add `:parameterizer` `:none` for skipping `next.jdbc` or `clojure.java.jdbc` parameter generation. (@arichiardi)
|
||||
* Add ClojureScript self-host support. (@arichiardi)
|
||||
|
||||
## 0.9.1
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ Column names can be provided as keywords or symbols (but not strings -- HoneySQL
|
|||
|
||||
### `format`
|
||||
|
||||
`format` turns maps into `clojure.java.jdbc`-compatible, parameterized SQL:
|
||||
`format` turns maps into `next.jdbc`-compatible (and `clojure.java.jdbc`-compatible), parameterized SQL:
|
||||
|
||||
```clojure
|
||||
(sql/format sqlmap)
|
||||
|
|
@ -551,7 +551,9 @@ If you do implement a clause or function handler for an ANSI SQL, consider submi
|
|||
|
||||
## Why does my parameter get emitted as `()`?
|
||||
|
||||
If you want to use your own datatype as a parameter then the idiomatic approach of implementing `clojure.java.jdbc`'s [`ISQLValue`](https://clojure.github.io/java.jdbc/#clojure.java.jdbc/ISQLValue) protocol isn't enough as `honeysql` won't correct pass through your datatype, rather it will interpret it incorrectly.
|
||||
If you want to use your own datatype as a parameter then the idiomatic approach of implementing
|
||||
`next.jdbc`'s [`SettableParameter`](https://cljdoc.org/d/seancorfield/next.jdbc/CURRENT/api/next.jdbc.prepare#SettableParameter)
|
||||
or `clojure.java.jdbc`'s [`ISQLValue`](https://clojure.github.io/java.jdbc/#clojure.java.jdbc/ISQLValue) protocol isn't enough as `honeysql` won't correct pass through your datatype, rather it will interpret it incorrectly.
|
||||
|
||||
To teach `honeysql` how to handle your datatype you need to implement [`honeysql.format/ToSql`](https://github.com/jkk/honeysql/blob/a9dffec632be62c961be7d9e695d0b2b85732c53/src/honeysql/format.cljc#L94). For example:
|
||||
``` clojure
|
||||
|
|
|
|||
|
|
@ -267,7 +267,8 @@
|
|||
|
||||
(defn format
|
||||
"Takes a SQL map and optional input parameters and returns a vector
|
||||
of a SQL string and parameters, as expected by clojure.java.jdbc.
|
||||
of a SQL string and parameters, as expected by `next.jbc` and
|
||||
`clojure.java.jdbc`.
|
||||
|
||||
Input parameters will be filled into designated spots according to
|
||||
name (if a map is provided) or by position (if a sequence is provided).
|
||||
|
|
|
|||
Loading…
Reference in a new issue