rust - 无法使用 rusted_cypher 连接到 Neo4j
问题描述
我正在尝试将 Neo4j 与 Rust 一起使用。目前,没有官方驱动程序。我一直在尝试连接 rusted_cypher 板条箱,但无济于事。我在 Python 中广泛使用了 Neo4j,但我是 Rust 的新手。
这是最小的例子:
Cargo.toml
rusted_cypher = "1.1.0"
main.rs
use rusted_cypher::GraphClient;
fn main() {
let graph = GraphClient::connect(
"http://<username>:<password>@localhost:7474/<database_name>/data").unwrap();
}
这将返回:
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Serde(Error("EOF while parsing a value", line: 1, column: 0))', src/main.rs:6:53
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
当我尝试删除数据库名称时,我得到:
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Serde(Error("missing field `extensions`", line: 0, column: 0))', src/main.rs:6:49
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
解决方案
似乎生锈的密码不再适用于更改的数据库 URL,现在http(s)//:host:7474/db/<database>/tx
但是我发现这两个驱动程序看起来更有前途,最近更新并使用了螺栓:
https://github.com/lucis-fluxum/bolt-rs
推荐阅读
- python - 如何将 python 代码添加到 Nodejs Express API?
- react-native - 带有 useEffect 钩子和 useSelector 的无限循环
- python - 我需要在不使用 tha max min python 的情况下编写一个 max 和 min 函数
- flutter - 键盘立即消失文本字段颤动
- sql - SQL 错误:“运算符不存在:字符变化 = bigint”
- flask - Flask-SQLAlchemy 自动增量 id 问题
- c# - 是否可以使用 System.Text.Json 转义 Json 字符串
- java - 需要帮助将相同的日志消息写入具有不同日志记录级别的多个目标
- mysql - 未处理的异常:SocketException:操作系统错误:连接被拒绝,errno = 111,地址 = localhost,端口 = 35760 颤动
- python - 列表之间的随机替换项目