Skip to content

Commit 249c930

Browse files
authored
Warn when connecting against neo4j schema (#91)
1 parent f1db22c commit 249c930

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

lib/src/connection.rs

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,22 @@ impl Connection {
4242
};
4343

4444
match url.scheme() {
45-
"bolt" | "neo4j" | "" => Self::new_unencrypted(stream, user, password).await,
46-
"bolt+s" | "neo4j+s" => Self::new_tls(stream, host, user, password).await,
45+
"bolt" | "" => Self::new_unencrypted(stream, user, password).await,
46+
"bolt+s" => Self::new_tls(stream, host, user, password).await,
47+
"neo4j" => {
48+
log::warn!(concat!(
49+
"This driver does not yet implement client-side routing. ",
50+
"It is possible that operations against a cluster (such as Aura) will fail."
51+
));
52+
Self::new_unencrypted(stream, user, password).await
53+
}
54+
"neo4j+s" => {
55+
log::warn!(concat!(
56+
"This driver does not yet implement client-side routing. ",
57+
"It is possible that operations against a cluster (such as Aura) will fail."
58+
));
59+
Self::new_tls(stream, host, user, password).await
60+
}
4761
otherwise => Err(Error::UnsupportedScheme(otherwise.to_owned())),
4862
}
4963
}

0 commit comments

Comments
 (0)