-
One of the most common runtime errors I get is when I send text instead of uuid to my PostgreSQL query, which ends up in a runtime error. Is there a way to disable this? Not sure if sea-query or sea-orm question as I mostly use sea-orm. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
If I remember everything correctly:
Untyped exprs is one of the tradeoffs that Disclaimer: I'm not a maintainer. |
Beta Was this translation helpful? Give feedback.
If I remember everything correctly:
sea-query
expressions are untyped by design. And so aresea-orm
conditions, which are built on them.sea-orm
inserts are done through a typedActiveModel
and you shouldn't have such bugs there.sea-orm
updates can be done through a typedActiveModel
(UpdateMany::set) or an untyped expr (UpdateMany::col_expr). You can use the former where you can.sea-orm
selects (usinginto_model
orinto_tuple
, rather than automatically getting aModel
) are not type checked against your query. It's possible to declare a Rust type (or field name) that doesn't match the query and results in a runtime error.Untyped exprs is one of the tradeoffs that
sea-query
mak…