luminus-framework / conman

a helper library for managing database connections
Eclipse Public License 1.0
122 stars 27 forks source link

Three-argument form of conman query functions? #12

Closed genovese closed 8 years ago

genovese commented 9 years ago

The options that Yesql offers for specifying processors in its query functions are sometimes useful, and it would be nice if conman offered some support for that feature in those cases.

For instance, this could be done relatively clearly and at little cost with a 3-ary form of the query functions in bind-connection, something like

([args# conn# options#] (yesql-query# args# (merge {:connection conn#} options#)))

where options# is a map of processors. This could even replace the 2-ary form directly with

([args# conn# & [options#]] (yesql-query# args# (merge {:connection conn#} options#)))

if that were desirable.

What do you think? Thanks.

yogthos commented 9 years ago

That seems reasonable to me, if you'd be up for a pr I can push out a new release with the update.

genovese commented 9 years ago

Will do, thanks.

On Mon, Nov 16, 2015 at 12:50 AM, Dmitri Sotnikov notifications@github.com wrote:

That seems reasonable to me, if you'd be up for a pr I can push out a new release with the update.

— Reply to this email directly or view it on GitHub https://github.com/luminus-framework/conman/issues/12#issuecomment-156922721 .

yogthos commented 8 years ago

I don't think this will apply now that conman is using HugSQL.