Skip to content

New option to pass through HugSQL options #25

Closed
@nottmey

Description

@nottmey

To my knowledge it is currently not possible to make use of the options parameter of the encapsulated hugsql.core/def-db-fns function (docs) when using conman.core/bind-connection to set connection specific configurations.

I propose the use of an options map for bind-connection, similar showcased and helpful in #19, which is then handed to def-db-fns.

In my case I need to enable :quoting (:mysql) for HugSQL functions per default. Currently this is solved by always providing the database and options map for each call of a generated HugSQL function (example in first snippet), which is far from ideal (second snippet), since connection aware functions are one key feature of conman.

(db/get-user *db* {:id "foo"} {:quoting :mysql})
(db/get-user {:id "foo"})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions