Closed andrenth closed 5 years ago
Sorry, I missed this one :] Yes, this is something I was planning to do. Another idea was to generate records for callbacks, see #18 And probably need a command line flag indeed, to not break code, though named parameters better be a default in future..
Hi
In my general SQL usage, queries generally have a large number of results. I think having support for named parameters in callbacks would avoid the trouble of having to keep the parameter list in the same order as specified in the query.
I'm not familiar with the code yet, but I managed to get this working with this simple change:
Would you be interested in adding this? Maybe the behavior could be selected via a command-line flag. Some validation would also have to be added to make sure the column name or alias are valid OCaml parameter name. If you're interested I could start working on a proper pull request.
Thanks, Andre