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

Method many

src/query/delete.rs:91–101  ·  view source on GitHub ↗

Delete many ActiveModel ``` use sea_orm::{entity::*, query::*, tests_cfg::fruit, DbBackend}; assert_eq!( Delete::many(fruit::Entity) .filter(fruit::Column::Name.contains("Apple")) .build(DbBackend::Postgres) .to_string(), r#"DELETE FROM "fruit" WHERE "fruit"."name" LIKE '%Apple%'"#, ); ```

(entity: E)

Source from the content-addressed store, hash-verified

89 /// );
90 /// ```
91 pub fn many<E>(entity: E) -> DeleteMany<E>
92 where
93 E: EntityTrait,
94 {
95 DeleteMany {
96 query: DeleteStatement::new()
97 .from_table(entity.table_ref())
98 .to_owned(),
99 entity: PhantomData,
100 }
101 }
102}
103
104impl<A> DeleteOne<A>

Callers

nothing calls this directly

Calls 2

table_refMethod · 0.80
newFunction · 0.50

Tested by

no test coverage detected