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
Using Expr::is_not(<expr>, Value::Bool(Some(false))) generates SQL like SELECT * FROM table WHERE col IS NOT $1 which is not legal in Postgres (you'd get a ERROR: syntax error at or near "$1" if you do PREPARE q AS ...).
I don't see how SeaQuery can easily fix this, but it might be nice to mention in docs and provide alternatives. In particular, hardcoding the RHS as Expr::expr(SimpleExpr::Constant(Value::Bool(Some(false))))) works.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Using
Expr::is_not(<expr>, Value::Bool(Some(false)))
generates SQL likeSELECT * FROM table WHERE col IS NOT $1
which is not legal in Postgres (you'd get aERROR: syntax error at or near "$1"
if you doPREPARE q AS ...
).I don't see how SeaQuery can easily fix this, but it might be nice to mention in docs and provide alternatives. In particular, hardcoding the RHS as
Expr::expr(SimpleExpr::Constant(Value::Bool(Some(false)))))
works.Beta Was this translation helpful? Give feedback.
All reactions