Skip to content

How do I disable compile-time ability to send text = uuid query? #790

Answered by Expurple
k-bx asked this question in Q&A
Discussion options

You must be logged in to vote

If I remember everything correctly:

  • sea-query expressions are untyped by design. And so are sea-orm conditions, which are built on them.
  • sea-orm inserts are done through a typed ActiveModel and you shouldn't have such bugs there.
  • sea-orm updates can be done through a typed ActiveModel (UpdateMany::set) or an untyped expr (UpdateMany::col_expr). You can use the former where you can.
  • Custom sea-orm selects (using into_model or into_tuple, rather than automatically getting a Model) 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…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@k-bx
Comment options

@Expurple
Comment options

Answer selected by k-bx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants