Type errors after 0.27.1 upgrade
After upgrading to the lastest verision, I've got a couple of type errors that I'm not sure how to resolve. They are both the same kind of error, I have a custom WHERE IN expression:
Which gives me this error:
I assume I need to pass a type to sql.raw, but I haven't been able to figure out what that type should be.
9 Replies
The type should be the same of objects.type[]
as in,
string[]
?
that doesn't seem to work, maybe I'm not following
I was looking through the code to see if there was something like an InExpression
type or something, but I didn't find anything like that.Btw do you really need a sql.raw?
What's stopping you from just passing allowed_object_types
Solution
yeah, I just realized that, I don't need sql.raw at all
That avoids the issue, thanks!
oh, I just ran into another case where I can't avoid sql.raw:
I think it should be sql<Date>
${minDuration} MILLISECONDS
sure enough, thanks!
it was mentioned in the release notes that
sql
template tag will require typing now.