Insert many Model or ActiveModel ``` use sea_orm::{entity::*, query::*, tests_cfg::cake, DbBackend}; assert_eq!( Insert::many([ cake::Model { id: 1, name: "Apple Pie".to_owned(), }, cake::Model { id: 2, name: "Orange Scone".to_owned(), } ]) .build(DbBackend::Postgres) .to_string(), r#"INSERT INTO "cake" ("id", "name") VALUES (1, 'Apple Pie'), (2, 'Orange Scone')"#, ); ```
(models: I)
| 101 | /// ); |
| 102 | /// ``` |
| 103 | pub fn many<M, I>(models: I) -> Self |
| 104 | where |
| 105 | M: IntoActiveModel<A>, |
| 106 | I: IntoIterator<Item = M>, |
| 107 | { |
| 108 | Self::new().add_many(models) |
| 109 | } |
| 110 | |
| 111 | /// Add a Model to Self |
| 112 | /// |