MCPcopy Create free account
hub / github.com/SeaQL/sea-orm / prepare

Method prepare

src/query/delete.rs:108–120  ·  view source on GitHub ↗
(mut self)

Source from the content-addressed store, hash-verified

106 A: ActiveModelTrait,
107{
108 pub(crate) fn prepare(mut self) -> Self {
109 for key in <A::Entity as EntityTrait>::PrimaryKey::iter() {
110 let col = key.into_column();
111 let av = self.model.get(col);
112 match av {
113 ActiveValue::Set(value) | ActiveValue::Unchanged(value) => {
114 self = self.filter(col.eq(value));
115 }
116 ActiveValue::NotSet => panic!("PrimaryKey is not set"),
117 }
118 }
119 self
120 }
121}
122
123impl<A> QueryFilter for DeleteOne<A>

Callers 3

oneMethod · 0.80
do_queryMethod · 0.80
do_executeMethod · 0.80

Calls 3

filterMethod · 0.80
getMethod · 0.45
eqMethod · 0.45

Tested by

no test coverage detected