()
| 10 | #[sea_orm_macros::test] |
| 11 | #[cfg(feature = "sqlx-sqlite")] |
| 12 | async fn main() -> Result<(), DbErr> { |
| 13 | dotenv::from_filename(".env.local").ok(); |
| 14 | dotenv::from_filename(".env").ok(); |
| 15 | |
| 16 | let base_url = std::env::var("DATABASE_URL").unwrap_or_else(|_| "sqlite::memory:".to_owned()); |
| 17 | |
| 18 | let db: DbConn = Database::connect(&base_url).await?; |
| 19 | setup_schema(&db).await?; |
| 20 | crud_cake(&db).await?; |
| 21 | |
| 22 | Ok(()) |
| 23 | } |
| 24 | |
| 25 | #[cfg(feature = "sqlx-sqlite")] |
| 26 | async fn setup_schema(db: &DbConn) -> Result<(), DbErr> { |
nothing calls this directly
no test coverage detected