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

Method is_changed

src/entity/active_model.rs:565–568  ·  view source on GitHub ↗

Return `true` if any attribute of `ActiveModel` is `Set`

(&self)

Source from the content-addressed store, hash-verified

563
564 /// Return `true` if any attribute of `ActiveModel` is `Set`
565 fn is_changed(&self) -> bool {
566 <Self::Entity as EntityTrait>::Column::iter()
567 .any(|col| self.get(col).is_set() && !self.get(col).is_unchanged())
568 }
569}
570
571/// A Trait for overriding the ActiveModel behavior

Callers

nothing calls this directly

Calls 3

is_setMethod · 0.80
is_unchangedMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected