Skip to content

Commit 2f690f7

Browse files
committed
update conn parse
1 parent 93974cd commit 2f690f7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

connectorx-python/src/source_router.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ impl TryFrom<&str> for SourceConn {
4646

4747
fn try_from(conn: &str) -> Result<SourceConn> {
4848
let url = Url::parse(conn).map_err(|e| anyhow!("parse error: {}", e))?;
49-
match url.scheme() {
49+
// users from sqlalchemy may set engine in connection url (e.g. mssql+pymssql://...)
50+
// only for compatablility, we don't use the same engine
51+
match url.scheme().split('+').collect::<Vec<&str>>()[0] {
5052
"postgres" | "postgresql" => Ok(SourceConn {
5153
ty: SourceType::Postgres,
5254
conn: url,

0 commit comments

Comments
 (0)