-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setting the database via config_builder.db("graph")
using the ConfigBuilder seems to be ignored
#116
Comments
config_builder.db("graph")
in the ConfigBuilder seems to be ignored
config_builder.db("graph")
in the ConfigBuilder seems to be ignored config_builder.db("graph")
using the ConfigBuilder seems to be ignored
Just hit this as well, you can hotfix this by vendoring in the repo and updating messages.rs from ... pub fn begin() -> BoltRequest {
BoltRequest::Begin(Begin::new(BoltMap::default()))
} ... to ... pub fn begin(db: &str) -> BoltRequest {
let mut extra = BoltMap::default();
extra.put("db".into(), db.to_owned().into());
BoltRequest::Begin(Begin::new(extra))
} ... and txn.rs from ... pub(crate) async fn new(config: Config, mut connection: ManagedConnection) -> Result<Self> {
let begin = BoltRequest::begin();
match connection.send_recv(begin).await? {
BoltResponse::Success(_) => Ok(Txn {
config,
connection: Arc::new(Mutex::new(connection)),
}),
msg => Err(unexpected(msg, "BEGIN")),
}
} ... to ... pub(crate) async fn new(config: Config, mut connection: ManagedConnection) -> Result<Self> {
let begin = BoltRequest::begin(&config.db);
match connection.send_recv(begin).await? {
BoltResponse::Success(_) => Ok(Txn {
config,
connection: Arc::new(Mutex::new(connection)),
}),
msg => Err(unexpected(msg, "BEGIN")),
}
} |
Thanks for reporting this. #117 fixes this issue, so that |
I'm working on some code in https://github.com/avrabe/graph-git-rs
For this I've locally created a project with an additional database graph.
Independent if I mention the database name in the
url()
or thedb()
of the ConfigBuilder, at the end always the neo4j database is used. Do I miss something in my code?The text was updated successfully, but these errors were encountered: