ad mssql
This commit is contained in:
18
src/main.rs
18
src/main.rs
@@ -39,6 +39,22 @@ async fn check_maria_db() -> Result<(), sqlx::Error> {
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// async fn check_ms_sql() -> Result<(), sqlx::Error> {
|
||||||
|
// let pool = MySqlPoolOptions::new()
|
||||||
|
// .max_connections(5)
|
||||||
|
// .connect("mssql://sa:'adm1n_pa%s'@localhost:8085/demo")
|
||||||
|
// .await?;
|
||||||
|
|
||||||
|
// // Make a simple query to return the given parameter
|
||||||
|
// let row = sqlx::query("SELECT * from events")
|
||||||
|
// .fetch_all(&pool)
|
||||||
|
// .await?;
|
||||||
|
|
||||||
|
// info!("Received {:?}", row);
|
||||||
|
|
||||||
|
// Ok(())
|
||||||
|
// }
|
||||||
|
|
||||||
async fn check_mysql() -> Result<(), sqlx::Error> {
|
async fn check_mysql() -> Result<(), sqlx::Error> {
|
||||||
let pool = MySqlPoolOptions::new()
|
let pool = MySqlPoolOptions::new()
|
||||||
.max_connections(5)
|
.max_connections(5)
|
||||||
@@ -91,7 +107,7 @@ async fn main() -> Result<(), sqlx::Error> {
|
|||||||
check_mysql().await.unwrap();
|
check_mysql().await.unwrap();
|
||||||
}),
|
}),
|
||||||
// tokio::spawn(async move {
|
// tokio::spawn(async move {
|
||||||
// check_postgres().await.unwrap();
|
// check_ms_sql().await.unwrap();
|
||||||
// }),
|
// }),
|
||||||
tokio::spawn(async move {
|
tokio::spawn(async move {
|
||||||
check_maria_db().await.unwrap();
|
check_maria_db().await.unwrap();
|
||||||
|
|||||||
Reference in New Issue
Block a user