Strange behaviour with inferred nullability when using JOIN #1355
Unanswered
pantonshire
asked this question in
Q&A
Replies: 1 comment
-
also experiencing this, very weird but adding the limit worked |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I recently ran into some confusing behaviour with inferred nullability in the
query_as
macro when I useJOIN
in a query. I'm using Postgres.If I have the following tables:
Then the following code does not compile; SQLx seems to expect all of the fields to be
Option<T>
:But if I add a
LIMIT
to the query, then it compiles just fine:What's going on here? Is this expected behaviour, or a bug?
Beta Was this translation helpful? Give feedback.
All reactions