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
With that, I think this is an issue with how the NamedTuple parameters to Query.where are handled. Specifically, the resolved type of the Hash created by parsing the parameters is too precise. In my case, the error had an extra Hash(Symbol, Bool) entry in the type union, and in yours, there's at least one type I saw that had Time, and Nil added to the value type of Hash.
I wonder if a solution might be to always cast where values to strings when they get stored?
Using Crystal 0.25.0, if a query is formulated as such:
with field day being defined of type
Time
in the schema, the following exception is thrown at compile-time:However, if the query is formatted with the
Time.to_s
method invoked, as such:the program compiles (and runs) perfectly fine.
Not sure if I should make this an issue in the Crystal repo until it's determined if it's a bug with crecto
The text was updated successfully, but these errors were encountered: