We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 70cdd62 commit 458102fCopy full SHA for 458102f
connectorx/src/sources/mssql/mod.rs
@@ -94,8 +94,12 @@ pub fn mssql_config(url: &Url) -> Config {
94
impl MsSQLSource {
95
#[throws(MsSQLSourceError)]
96
pub fn new(rt: Arc<Runtime>, conn: &str, nconn: usize) -> Self {
97
- let url = Url::parse(conn)?;
98
- let config = mssql_config(&url)?;
+ // If it doesn't look like a URL, then it might be an ADO string
+ let config = if let Ok(url) = Url::parse(conn) {
99
+ mssql_config(&url)?
100
+ } else {
101
+ Config::from_ado_string(conn)?
102
+ };
103
let manager = bb8_tiberius::ConnectionManager::new(config);
104
let pool = rt.block_on(Pool::builder().max_size(nconn as u32).build(manager))?;
105
0 commit comments