Git Product home page Git Product logo

bolt-rs's People

Contributors

0xsio avatar garrensmith avatar maldrake avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

bolt-rs's Issues

bolt-client v0.8.0 fails to build. bolt-proto v0.9.2 has incompatible with v0.9.1 change.

First of all - thank you for the work you do!

As title said - bolt-client v0.8.0 fails to compile with bolt-proto v0.9.2

I believe error is in bolt-client's dependency on bolt-proto
bolt-proto = "^0.9.0" //this will pick latest...

I had to lock bolt-proto with "cargo update -p bolt-proto --precise 0.9.1"

cargo tree | grep bolt
โ”œโ”€โ”€ bb8-bolt v0.5.0
โ”‚ โ”œโ”€โ”€ bolt-client v0.8.0
โ”‚ โ”‚ โ”œโ”€โ”€ bolt-client-macros v0.2.1 (proc-macro)
โ”‚ โ”‚ โ”œโ”€โ”€ bolt-proto v0.9.2
โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ bolt-proto-derive v0.5.2 (proc-macro)
โ”‚ โ”œโ”€โ”€ bolt-proto v0.9.2 ()
โ”œโ”€โ”€ bolt-client v0.8.0 (
)
โ”œโ”€โ”€ bolt-proto v0.9.2 (*)

==================== Build error ==============================================
Compiling bolt-client v0.8.0
error[E0277]: the trait bound Vec<bytes::Bytes>: From<bolt_proto::Message> is not satisfied
--> /home/soleinik/.cargo/registry/src/github.com-1ecc6299db9ec823/bolt-client-0.8.0/src/client.rs:75:42
|
75 | let chunks: Vec = message.try_into()?;
| ^^^^^^^^ the trait From<bolt_proto::Message> is not implemented for Vec<bytes::Bytes>
|
= help: the following implementations were found:
<Vec<T, A> as From<Box<[T], A>>>
<Vec as From<&[T]>>
<Vec as From<&mut [T]>>
<Vec as From<BinaryHeap>>
and 6 others
= note: required because of the requirements on the impl of Into<Vec<bytes::Bytes>> for bolt_proto::Message
= note: required because of the requirements on the impl of TryFrom<bolt_proto::Message> for Vec<bytes::Bytes>

Example uses unavailable function compat

In the example here https://docs.rs/bolt-client/0.10.1/bolt_client/index.html There is this line

let stream = BufStream::new(stream).compat();

Where BufStream is imported with

use tokio::io::BufStream;

When i go to the documentation of this type https://docs.rs/tokio/1.15.0/tokio/io/struct.BufStream.html i don't see the method compat


Additionally i have a question. I would like to build up the stream and client and then store the client variable in another struct to make it available throughout my application. I can't quite get the type of Client right because i don't know what to fill in for S in Client<S: AsyncRead + AsyncWrite + Unpin> i tried bolt_client::Client<BufStream<bolt_client::Stream>> but couldn't verify it due to compile failure of compat. Would appreciate feedback on this type.

Debug for Manager

deadpool_bolt::Manager does not derive Debug. It would be nice if it did.

Access Underlying value of each type

I'm trying to turn the records I get from a query into json; however I haven't found any easy way to do that. I tried to use custom serialisation using serde_json but I found that I cannot access the underlying value of the different Value types that are supported.

Is there any way we can get hold of the underlying value so custom serialization into different types could be possible?

GrapheneDB doesn't negotiate protocol version correctly

Given that I had to write https://github.com/lucis-fluxum/bolt-rs/blob/b6d05ab2aec94b0f6ebf8b760c5946dab8bcfe57/bolt-client/src/client/v1.rs#L505 and https://github.com/lucis-fluxum/bolt-rs/blob/b6d05ab2aec94b0f6ebf8b760c5946dab8bcfe57/bolt-client/src/client/v2.rs#L1 in response to issues encountered with the remote test DB, I thought I'd open an issue to document how I'm resolving this.

I use a GrapheneDB instance running Neo4j 3.5.17 for running this project's tests against a remote server, and I found that it violates the Bolt handshake protocol in some cases.

# Bolt v2 negotiation (should succeed)
Client: <open TCP connection>
Client: 60 60 B0 17 # protocol preamble
Client: 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 00 # allowed versions
Server: 00 00 00 01 # chosen version

# Bolt v4 negotiation (should fail)
Client: <open TCP connection>
Client: 60 60 B0 17 # protocol preamble
Client: 00 00 00 04 00 00 00 00 00 00 00 00 00 00 00 00 # allowed versions
Server: 00 00 00 03 # chosen version

I've filed a support ticket with GrapheneDB describing this problem.

Appear Error "IO driver has terminated", How to solve

Recently, I try "neo4rs"," Deadpool-bolt", "b88-bolt" to create connection pool with neo4j. My program appears

"error:UnexpectedMessage("unexpected response for RUN: Err(IOError { detail: "IO driver has terminated" })")"driver has terminated"

when many query appears in a short time. How to solve it ?

I have google the error , but I did not found any useful information.

Missing Version Bump?

First of all, thanks for creating these crates!

But currently there seems to be a difference between the bolt-client code on docs.rs and this repo even though both have them same version and only the code from here actually builds.

Question: Bolt v4 doc?

Hello!
This might be the wrong channel for a meta question, but I didn't find any other possibility to contact you. Did you reverse engineer the bolt version 4 specs? Or do you have any official source?

Thanks in advance!

could not find `CommunicationError` in `error`

error[E0433]: failed to resolve: could not find `CommunicationError` in `error`
  --> /home/flip111/.cargo/registry/src/github.com-1ecc6299db9ec823/bolt-client-0.9.1/src/client/v1.rs:26:5
   |
26 |     #[bolt_version(1, 2)]
   |     ^^^^^^^^^^^^^^^^^^^^^ could not find `CommunicationError` in `error`
   |
   = note: this error originates in the attribute macro `bolt_version` (in Nightly builds, run with -Z macro-backtrace for more info)

Not sure how to fix this. Possibly a bug in this library ?

rustc 1.57.0 (f1edd0429 2021-11-29)

usage example

Thank you very much for open sourcing this. This is definitely useful. Is it possible that a usage example being provided for this library?
I tried to make the example here to work, but keep getting errors like the following:

let stream = BufStream::new(stream).compat();
    |                  -------------- ^^^^^^ the trait `std::io::Read` is not implemented for `bolt_client::Stream`
    |                  |
    |                  required by a bound introduced by this call

currently I have this in my cargo.toml file:

bufstream = "0.1"
bolt-client = {version = "0.10.0", features = ["tokio-stream"]}

and I have imports like this:

use bolt_client::*;
use bufstream::BufStream;
use bolt_proto::{message::*, value::*, version::*, Message, Value};

Not sure whether my cargo or import statements are correct. Would be great if a full example can be provided.

Production-readiness and contributions

Hi! This family of crates looks great and I have a couple of questions about your "production readiness" warnings:

  • What work needs to be done to consider it "production ready?"
  • What help do you need to achieve that state?

I'd love to be able to use this in some smaller projects for my day job and am looking to help out in any way I can. Thanks again for all the work you've done for this!

Hi!

Hi mate,
I am Noah, a Rust developer, and I am trying to reach out to you to ask you something about the crate atmos that you own. Please reply at [email protected] that would really mean a lot to me and my project.
Thanks in advance,
Noah dev@noahpn

Iteration over a result set in bolt_client

Currently the PullAll and Pull messages return a Vec of results instead of some form of iterator. This means that it is not possible to write streaming algorithms against older versions of Neo4j. Additionally, as the low-level read_message and send_message are only pub(crate) it isn't possible to implement this behaviour as a consumer.

In the case of Pull, this is probably fine as the user can specify a low n value to stream over results, but it might be worth changing both APIs to match anyway.

Serde Serialization/Deserialization

Currently there does not appear to be an easy way to serialize the Record structs and the Values they contain. My current work around is to manually convert the Bolt Values to Serde JSON Values, but it seems a bit clunky. I believe adding support for serialization/deserialization with Serde would be beneficial to this library.

Question: How Connect to a Neo4j Cluster?

i found an issue updated at 2021, i would like to use ROUTE with deadpool bolt: [(https://docs.rs/bolt-client/latest/bolt_client/struct.Client.html#method.route)]
Can you provide an example of how to use it with a cluster?
Thanks.

Neo4j 4 support

Hey, I'm currently researching a new tech stack for a new project and bolt-rs seems to be the only active library for rust->neo4j.

Is there a rough ETA on support for the newest Neo4j version (4)?
Would be great to be able to use Rust for a real life project

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.