message: support windows trusted connection
diff: @@ -24,6 +24,7 @@ use log::debug;
  use owning_ref::OwningHandle;
  use rust_decimal::Decimal;
  use sqlparser::dialect::MsSqlDialect;
  +use std::collections::HashMap;
  use std::sync::Arc;
  use tiberius::{AuthMethod, Config, EncryptionLevel, QueryResult, Row};
  use tokio::runtime::{Handle, Runtime};
  @@ -60,6 +61,24 @@ pub fn mssql_config(url: &Url) -> Config {
  // remove the leading "/"
  config.database(&url.path()[1..]);
  // Using SQL Server authentication.
  + #[allow(unused)]
  + let params: HashMap<String, String> = url.query_pairs().into_owned().collect();
  + #[cfg(windows)]
  + match params.get("trusted_connection") {
  + // pefer trusted_connection if set to true
  + Some(v) if v == "true" => {
  + debug!("mssql auth through trusted connection!");
  + config.authentication(AuthMethod::Integrated);
  + }
  + _ => {
  + debug!("mssql auth through sqlserver authentication");
  + config.authentication(AuthMethod::sql_server(
  + decode(url.username())?.to_owned(),
  + decode(url.password().unwrap_or(""))?.to_owned(),
  + ));
  + }
  + };
  + #[cfg(not(windows))]
  config.authentication(AuthMethod::sql_server(
  decode(url.username())?.to_owned(),
  decode(url.password().unwrap_or(""))?.to_owned(),
  