Address #15 by documenting new option

The internal `:next.jdbc/sql-string` option is documented as passed into 
the builder functions.
This commit is contained in:
Sean Corfield 2019-04-24 10:09:07 -07:00
parent 13ad917864
commit b5f0ef4daa

View file

@ -42,7 +42,7 @@ The `as-*` functions described above are all implemented in terms of these proto
The options hash map for any `next.jdbc` function can contain a `:gen-fn` key and the value is used at the row/result set builder function. The tests for `next.jdbc.result-set` include a [record-based builder function](https://github.com/seancorfield/next-jdbc/blob/master/test/next/jdbc/result_set_test.clj#L148-L164) as an example of how you can extend this to satisfy your needs. The options hash map for any `next.jdbc` function can contain a `:gen-fn` key and the value is used at the row/result set builder function. The tests for `next.jdbc.result-set` include a [record-based builder function](https://github.com/seancorfield/next-jdbc/blob/master/test/next/jdbc/result_set_test.clj#L148-L164) as an example of how you can extend this to satisfy your needs.
The options hash map passed to the builder function will contain a `:next.jdbc/sql-string` key, whose value is the SQL string passed into the The options hash map passed to the builder function will contain a `:next.jdbc/sql-string` key, whose value is the SQL string passed into the top-level `next.jdbc` functions (`reducible!`, `execute!`, and `execute-one!`). If no SQL string was passed in -- those functions were called with just a `PreparedStatement` -- then `:next.jdbc/sql-string` will have a `nil` value.
# ReadableColumn # ReadableColumn