You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I definitely would not want register-clause! or register-fn! to automatically create a helper in the calling namespace (I don't think that's what you're suggesting but I want to clarify that this should be explicit).
Possibilities include:
exposing versions of generic and generic-1 with better names as public functions in honey.sql.helpers
providing machinery in honey.sql to define such helpers (via a macro -- which would be the first and only macro in HoneySQL)
simply documenting the private generic and generic-1 functions as a way to do this
(implied in #1 and #2: document the new functions/machinery)
For me, option 1 sounds proper - to allow users to participate in the helpers arena. And a bit more telling names for the public functions would assist with that.
A macro would be fine too.
As per #380 :
Once a clause has been registered to mimic existing clause, the usage of that clause is foreign to the surrounding code.
It would be nice if the ergonomics of the existing helpers can be exposed and made public to allow reuse.
Example:
(sql/register-clause! :qualify :having :window )
Usage:
(-> (h/select :*) (h/from :foo) (h/where [:= :a "a"]) (my-qualify [...] )
The text was updated successfully, but these errors were encountered: