Created
February 17, 2023 16:43
-
-
Save 0xdeafbeef/234fcc5f2733de8ac0ff33e780099dcc to your computer and use it in GitHub Desktop.
Find expected types for sqlx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[cfg(test)] | |
mod test { | |
#[tokio::test] | |
async fn test() { | |
use sqlx::Executor; | |
let pool = sqlx::mysql::MySqlPoolOptions::new() | |
.connect(std::env!("DATABASE_URL")) | |
.await | |
.unwrap(); | |
let mut conn = pool.acquire().await.unwrap(); | |
let query = include_str!("queries/stats.sql"); | |
let res = conn.describe(query).await.unwrap(); | |
dbg!(res); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment