Fork me on GitHub

Hi Sean and everyone I’ve rather wide and controversial question/feature-request A lot of folks using next.jdbc and honeysql together (but not all of course) both next.jdbc and honeysql have a rules to convert sql field names into clojure keys and back would be nice to keep those aligned or configured from one source wdyt? thanks


once source would imply 1 common dependency. AFAIK the projects are currently fully separated


I dont have a solution in my mind, just speaking out the probable improvement point


HoneySQL is about generating SQL. next.jdbc is about running SQL and producing results. HoneySQL converts keywords/symbols to column names. next.jdbc converts column names to keywords. The former just needs to produce valid SQL. The latter can be configured with any strategy you want (and there are camel-snake-kebab builders provided if you don't like the default strategy). They are otherwise unrelated.


By default, what next.jdbc produces is acceptable to HoneySQL as input for insert operations which is about the only point of interop.


I understand that, not a big deal for me, just seems like one global point of confiuration would make it cleaner next.jdbc.sql also converts keywords/symbpls to column names


Yes, but that is intended to be an extremely simple convenience -- it is not meant to be "full-featured". If you need more than next.jdbc.sql provides, use HoneySQL. Per the docstring on that ns:

This is intended to provide a minimal level of parity with (insert!, insert-multi!, query, find-by-keys, get-by-id, update!, and delete!).

For anything more complex, use a library like HoneySQL  to generate SQL + parameters.
(I should update that to use the new URL!).


clear, thanks as i said before - not something really important 🙂