Database.Esqueleto conundrum regarding ==. val True
While debugging a query that unexpectedly returned an empty list, I realized I had written something silly:
fetchDim cId = runDb . select . from $ \dim -> do where_ dim ^. DimensionIsRowKey ==. val True return dim
... because you can add
to any boolean value. Replacing it with the next unexpectedly solved problem of mine and the result was no longer empty.
fetchDim cId = runDb . select . from $ \dim -> do where_ dim ^. DimensionIsRowKey return dim
Can anyone please tell me the actual difference between the two? Why should they be?
EDIT: The backend of the database is sqlite.
source to share
No one has answered this question yet
Check out similar questions: