pub trait WhereInput {
type Model: Model;
// Required method
fn into_ir(self) -> Filter;
}Expand description
A typed shape that lowers to a runtime Filter.
Implemented by per-model UserWhereInput, PostWhereInput, …
§Warning: Default::default() lowers to Filter::None
A *WhereInput constructed via Default::default() (no fields set)
produces Filter::None, which lowers to WHERE TRUE — i.e. matches
every row. Passing such a filter to delete_many or update_many
affects every row in the table. Codegen never refuses this at
compile time; if a delete_many / update_many call site needs a
non-empty filter, it is the caller’s responsibility to verify the
Filter::None case before invoking .exec().
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".