MCPcopy Create free account
hub / github.com/SeaQL/sea-orm / main

Function main

tests/basic.rs:12–23  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

10#[sea_orm_macros::test]
11#[cfg(feature = "sqlx-sqlite")]
12async 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")]
26async fn setup_schema(db: &DbConn) -> Result<(), DbErr> {

Callers

nothing calls this directly

Calls 2

setup_schemaFunction · 0.85
crud_cakeFunction · 0.85

Tested by

no test coverage detected