Closed mudrz closed 3 years ago
The problem there is that you're using execute
, which is for queries that don't return a result. You should use get_one
instead.
There's no way to omit the types currently and I think it would be difficult to implement something to do that. One problem is that the information is flowing the other way: it's that the preprocessor generates a function that expects a record with structure { name: string; address: string}
and your type has that structure, rather than generating a function that takes the User
type specifically.
this worked, thanks Roddy I'll close the issue, I guess for the automated fields parsing to work the record would need to be a part of the ppx
hey @roddyyaga , I can't understand how to simply insert a record and get the resulting id
but it seems that the resulting type is incorrect - I get
Type unit is not compatible with type int
also is there a way to omit the types after
%
and@
when using record, since those are already defined in the records themselves?