Closed anmonteiro closed 4 years ago
Thanks, this is great. I'll take a closer look tomorrow.
Just added support for custom types too, and I'm gonna work on adding some docs to the README.
I tried to separate this PR into different relevant commits, so while it's become a little large, it's still best reviewed commit by commit. Let me know if you want me to open different PRs instead.
Single PR is fine; everything looks good. Is there anything else you want to add to this PR? Will merge if not.
It seems that new base types (e.g. ptime
) don't work:
Fatal error: exception Error in ppx_rapper: Unknown type specification 'ptime'
.
I think new types need to be added to build_param
function in query.mll
oh good point, I'll fix later
I just fixed the support for ptime
and all the other added types. Thanks again for pointing it out, @mxmzdlv
This diff does a few things:
list
support in the input parametersThere are a couple things left to do here:
Note: because queries containing list parameters are dynamically constructed, they need to be
~oneshot:true
as per Caqti's docs.