next.jdbc.sql
(source)Some utility functions that make common operations easier by
providing some syntactic sugar over `execute!`/`execute-one!`.
This is intended to provide a minimal level of parity with
`clojure.java.jdbc` (`insert!`, `insert-multi!`, `query`, `find-by-keys`,
`get-by-id`, `update!`, and `delete!`).
For anything more complex, use a library like HoneySQL
https://github.com/seancorfield/honeysql to generate SQL + parameters.
The following options are supported:
* `:table-fn` -- specify a function used to convert table names (strings)
to SQL entity names -- see the `next.jdbc.quoted` namespace for the
most common quoting strategy functions,
* `:column-fn` -- specify a function used to convert column names (strings)
to SQL entity names -- see the `next.jdbc.quoted` namespace for the
most common quoting strategy functions.
In addition, `find-by-keys` supports `:order-by` to add an `ORDER BY`
clause to the generated SQL.
For more info about this library see:
https://cljdoc.org/d/com.github.seancorfield/next.jdbc/1.3.909/doc/readmePublic Variable | Short Description |
---|---|
delete! (clj) | Syntactic sugar over `execute-one!` to make certain common deletes easier. |
find-by-keys (clj) | Syntactic sugar over `execute!` to make certain common queries easier. |
get-by-id (clj) | Syntactic sugar over `execute-one!` to make certain common queries easier. |
insert! (clj) | Syntactic sugar over `execute-one!` to make inserting hash maps easier. |
insert-multi! (clj) | Syntactic sugar over `execute!` or `execute-batch!` to make inserting columns/rows easier. |
query (clj) | Syntactic sugar over `execute!` to provide a query alias. |
update! (clj) | Syntactic sugar over `execute-one!` to make certain common updates easier. |