Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Improve Registering a new Clause Formatter documentation #541

Closed
phronmophobic opened this issue Sep 17, 2024 · 1 comment
Closed

Improve Registering a new Clause Formatter documentation #541

phronmophobic opened this issue Sep 17, 2024 · 1 comment
Assignees
Labels
documentation I need to write something up!

Comments

@phronmophobic
Copy link

https://cljdoc.org/d/com.github.seancorfield/honeysql/2.6.1161/doc/extending-honeysql#registering-a-new-clause-formatter

The description of honey.sql/register-clause! doesn't seem to specify the formatter function's return value. An example using honey.sql/register-clause! would also be very helpful.

Here's the extension that I ended up using:

(honey.sql/register-clause!
 :merge-into
 (fn [_ table]
   [(str "MERGE INTO " (honey.sql/format-entity table))])
 :values)

Thanks for the useful library!

@seancorfield seancorfield self-assigned this Sep 17, 2024
@seancorfield seancorfield added the documentation I need to write something up! label Sep 17, 2024
@phronmophobic
Copy link
Author

Awesome!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
documentation I need to write something up!
Projects
None yet
Development

No branches or pull requests

2 participants