You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm building a search webservice using Caqti. The parser rejects my query if it compares input parameters with constants (Parse error at byte xxx: '=' is not allowed after parameter reference '?'); here's a simplified but meaningful example using ppx_rapper:
WHERE %string{mod_}='none'AND NOT EXISTS(SELECT*FROM required_module WHERE id_mission=m.id)
OR EXISTS(SELECT*FROM required_module WHERE id_mission=m.idAND mod_=%string{mod_}))
It can be reduced to a single line of code producing the same error message:
Caqti_query.of_string_exn "SELECT ?=1"
Would it be difficult to modify the parser to handle this case?
Thanks!
The text was updated successfully, but these errors were encountered:
I suggest adding spaces around the equality sign. Sequences of starting with ? followed by operator characters are reserved for future extensions, though the issue gets a bit obscured when using ppx_rapper, making it less obvious why it fails. I'm considering whether the best solution to that may be the adjust ppx_rappers code generator to insert a space in this case.
Hi,
I'm building a search webservice using Caqti. The parser rejects my query if it compares input parameters with constants (
Parse error at byte xxx: '=' is not allowed after parameter reference '?'
); here's a simplified but meaningful example using ppx_rapper:It can be reduced to a single line of code producing the same error message:
Would it be difficult to modify the parser to handle this case?
Thanks!
The text was updated successfully, but these errors were encountered: