()
| 659 | |
| 660 | #[smol_potat::test] |
| 661 | async fn test_stream_2() -> Result<(), DbErr> { |
| 662 | use fruit::Entity as Fruit; |
| 663 | use futures_util::TryStreamExt; |
| 664 | |
| 665 | let db = MockDatabase::new(DbBackend::Postgres) |
| 666 | .append_query_results([Vec::<fruit::Model>::new()]) |
| 667 | .into_connection(); |
| 668 | |
| 669 | let mut stream = Fruit::find().stream(&db).await?; |
| 670 | |
| 671 | while let Some(item) = stream.try_next().await? { |
| 672 | let _item: fruit::ActiveModel = item.into(); |
| 673 | } |
| 674 | |
| 675 | Ok(()) |
| 676 | } |
| 677 | |
| 678 | #[smol_potat::test] |
| 679 | async fn test_stream_in_transaction() -> Result<(), DbErr> { |
nothing calls this directly
no test coverage detected