(db: &DbConn)
| 239 | } |
| 240 | |
| 241 | async fn find_all_json(db: &DbConn) -> Result<(), DbErr> { |
| 242 | print!("find all cakes: "); |
| 243 | |
| 244 | let cakes = Cake::find().into_json().all(db).await?; |
| 245 | |
| 246 | println!("\n{}\n", serde_json::to_string_pretty(&cakes).unwrap()); |
| 247 | |
| 248 | print!("find all fruits: "); |
| 249 | |
| 250 | let fruits = Fruit::find().into_json().all(db).await?; |
| 251 | |
| 252 | println!("\n{}\n", serde_json::to_string_pretty(&fruits).unwrap()); |
| 253 | |
| 254 | Ok(()) |
| 255 | } |
| 256 | |
| 257 | async fn find_together_json(db: &DbConn) -> Result<(), DbErr> { |
| 258 | print!("find cakes and fruits: "); |
no test coverage detected