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

Method many

src/query/update.rs:77–85  ·  view source on GitHub ↗

Update many ActiveModel ``` use sea_orm::{entity::*, query::*, sea_query::Expr, tests_cfg::fruit, DbBackend}; assert_eq!( Update::many(fruit::Entity) .col_expr(fruit::Column::Name, Expr::value("Golden Apple")) .filter(fruit::Column::Name.contains("Apple")) .build(DbBackend::Postgres) .to_string(), r#"UPDATE "fruit" SET "name" = 'Golden Apple' WHERE "fruit"."name" LIKE '%Apple%'"#, ); ```

(entity: E)

Source from the content-addressed store, hash-verified

75 /// );
76 /// ```
77 pub fn many<E>(entity: E) -> UpdateMany<E>
78 where
79 E: EntityTrait,
80 {
81 UpdateMany {
82 query: UpdateStatement::new().table(entity.table_ref()).to_owned(),
83 entity: PhantomData,
84 }
85 }
86}
87
88impl<A> UpdateOne<A>

Callers

nothing calls this directly

Calls 2

table_refMethod · 0.80
newFunction · 0.50

Tested by

no test coverage detected