Skip to content

Improve Registering a new Clause Formatter documentation #541

New issue

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

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

Already on GitHub? Sign in to your account

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!

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

No branches or pull requests

2 participants