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

Method prepare_values

src/query/update.rs:105–119  ·  view source on GitHub ↗
(mut self)

Source from the content-addressed store, hash-verified

103 }
104
105 fn prepare_values(mut self) -> Self {
106 for col in <A::Entity as EntityTrait>::Column::iter() {
107 if <A::Entity as EntityTrait>::PrimaryKey::from_column(col).is_some() {
108 continue;
109 }
110 match self.model.get(col) {
111 ActiveValue::Set(value) => {
112 let expr = col.save_as(Expr::val(value));
113 self.query.value(col, expr);
114 }
115 ActiveValue::Unchanged(_) | ActiveValue::NotSet => {}
116 }
117 }
118 self
119 }
120}
121
122impl<A> QueryFilter for UpdateOne<A>

Callers 1

oneMethod · 0.80

Calls 2

getMethod · 0.45
save_asMethod · 0.45

Tested by

no test coverage detected