2024-02-21 14:46:17 +01:00
|
|
|
#![allow(clippy::blocks_in_conditions)]
|
|
|
|
|
2023-04-03 16:11:26 +02:00
|
|
|
pub mod model;
|
2023-06-28 14:06:28 +02:00
|
|
|
|
|
|
|
#[cfg(feature = "rowing-tera")]
|
|
|
|
pub mod tera;
|
2023-04-03 22:03:45 +02:00
|
|
|
|
2023-07-16 19:16:42 +02:00
|
|
|
#[cfg(feature = "rest")]
|
|
|
|
pub mod rest;
|
|
|
|
|
2023-04-03 22:03:45 +02:00
|
|
|
#[cfg(test)]
|
|
|
|
#[macro_export]
|
|
|
|
macro_rules! testdb {
|
|
|
|
() => {{
|
|
|
|
let pool = SqlitePool::connect(":memory:").await.unwrap();
|
|
|
|
sqlx::query_file!("./migration.sql")
|
|
|
|
.execute(&pool)
|
|
|
|
.await
|
|
|
|
.unwrap();
|
|
|
|
sqlx::query_file!("./seeds.sql")
|
|
|
|
.execute(&pool)
|
|
|
|
.await
|
|
|
|
.unwrap();
|
|
|
|
pool
|
|
|
|
}};
|
|
|
|
}
|