Function
insert_functions
(db: &DbConn, functions: HashSet<String>)
Source from the content-addressed store, hash-verified
| 190 | } |
| 191 | |
| 192 | async fn insert_functions(db: &DbConn, functions: HashSet<String>) -> Result<(), DbErr> { |
| 193 | use sea_orm::{sea_query::OnConflict, Set}; |
| 194 | |
| 195 | Function::insert_many(functions.into_iter().map(|n| function::ActiveModel { |
| 196 | function_name: Set(n), |
| 197 | })) |
| 198 | .on_conflict(OnConflict::new().do_nothing().to_owned()) |
| 199 | .do_nothing() |
| 200 | .exec(db) |
| 201 | .await?; |
| 202 | |
| 203 | Ok(()) |
| 204 | } |
| 205 | |
| 206 | pub async fn insert_type_info( |
| 207 | db: &Database, |
Tested by
no test coverage detected