Skip to content
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

Neo4j version 4 support #110

Open
Papillon6814 opened this issue Oct 23, 2022 · 5 comments
Open

Neo4j version 4 support #110

Papillon6814 opened this issue Oct 23, 2022 · 5 comments

Comments

@Papillon6814
Copy link

Hello.
As written in README, bolt_sips does not compatible with neo4j version 4.

Neo4j versions used for test: 3.0, 3.1, 3.4, 3.5

mix test

So when I run mix test with version 4.4.12, one test does not work.
Can I work on this issue and send a PR? Because I'd like to use this library for my project. Thank you.

@florinpatrascu
Copy link
Owner

So when I run mix test with version 4.4.12, one test does not work.

sure. Also specifying which "one test" doesn't work, would help clarifying the context better next time.

@Papillon6814
Copy link
Author

Hello, thank you for the reply!

> mix test                                                                                                                                                        23:13
Excluding tags: [:bolt_v1, :routing, :boltkit, :enterprise, :skip, :bench, :apoc]

........................................................................................................................................................................................................................................................................................................................................

  1) test exception when creating a node using SET properties with a nested map (ErrorsTest)
     test/errors_test.exs:25
     Wrong message for Bolt.Sips.Exception
     expected:
       "Property values can only be of primitive types or arrays thereof"
     actual:
       "Property values can only be of primitive types or arrays thereof. Encountered: Map{baz -> String(\"foo\"), unu -> Long(1), doi -> Long(2)}."
     code: assert_raise Bolt.Sips.Exception, err, fn ->
     stacktrace:
       test/errors_test.exs:28: (test)

     The following output was logged:
     2022-10-24 23:13:38.226 [debug] C: RUN ~ ["CREATE (report:Report) SET report = $props", %{props: %{a_list: [1, 2, 3.14], a_map: %{baz: "foo", doi: 2, unu: 1}, bolt_sips: true, foo: "bar"}}, %{}]
     2022-10-24 23:13:38.227 [debug] S: RECORD ~ [0]
     2022-10-24 23:13:38.227 [debug] S: SUCCESS ~ %{"bookmark" => "FB:kcwQqQRXgOcbQxGwtaBRge3Q32CQ", "t_last" => 4, "type" => "r"}
     2022-10-24 23:13:38.229 [debug] C: HANDSHAKE ~ "<<0x60, 0x60, 0xB0, 0x17>> [3, 2, 1, 0]"
     2022-10-24 23:13:38.229 [debug] S: HANDSHAKE ~ 3
     2022-10-24 23:13:38.230 [debug] C: HELLO ~ [%{credentials: "test", principal: "neo4j", scheme: "basic", user_agent: "BoltSips/2.0.11"}]
     2022-10-24 23:13:38.243 [debug] S: SUCCESS ~ %{"connection_id" => "bolt-281", "hints" => %{}, "server" => "Neo4j/4.4.12"}
     2022-10-24 23:13:38.243 [debug] C: RUN ~ ["RETURN 1 AS num", %{}, %{}]
     2022-10-24 23:13:38.246 [debug] S: SUCCESS ~ %{"fields" => ["num"], "t_first" => 2}
     2022-10-24 23:13:38.246 [debug] C: PULL_ALL ~ []
     2022-10-24 23:13:38.249 [debug] S: RECORD ~ [1]
     2022-10-24 23:13:38.249 [debug] S: SUCCESS ~ %{"bookmark" => "FB:kcwQqQRXgOcbQxGwtaBRge3Q32CQ", "t_last" => 1, "type" => "r"}
     2022-10-24 23:13:38.249 [debug] S: FAILURE ~ %{"code" => "Neo.ClientError.Statement.TypeError", "message" => "Property values can only be of primitive types or arrays thereof. Encountered: Map{baz -> String(\"foo\"), unu -> Long(1), doi -> Long(2)}."}
     2022-10-24 23:13:38.249 [debug] C: RESET ~ []
     2022-10-24 23:13:38.250 [debug] S: SUCCESS ~ %{}

..................................................................................................................................................

Finished in 3.2 seconds
39 doctests, 479 tests, 1 failure, 43 excluded
> mix test                                                                                                                                                        23:13
Excluding tags: [:bolt_v1, :routing, :boltkit, :enterprise, :skip, :bench, :apoc]

........................................................................................................................................................................................................................................................................................................................................

  1) test exception when creating a node using SET properties with a nested map (ErrorsTest)
     test/errors_test.exs:25
     Wrong message for Bolt.Sips.Exception
     expected:
       "Property values can only be of primitive types or arrays thereof"
     actual:
       "Property values can only be of primitive types or arrays thereof. Encountered: Map{baz -> String(\"foo\"), unu -> Long(1), doi -> Long(2)}."
     code: assert_raise Bolt.Sips.Exception, err, fn ->
     stacktrace:
       test/errors_test.exs:28: (test)

     The following output was logged:
     2022-10-24 23:13:38.226 [debug] C: RUN ~ ["CREATE (report:Report) SET report = $props", %{props: %{a_list: [1, 2, 3.14], a_map: %{baz: "foo", doi: 2, unu: 1}, bolt_sips: true, foo: "bar"}}, %{}]
     2022-10-24 23:13:38.227 [debug] S: RECORD ~ [0]
     2022-10-24 23:13:38.227 [debug] S: SUCCESS ~ %{"bookmark" => "FB:kcwQqQRXgOcbQxGwtaBRge3Q32CQ", "t_last" => 4, "type" => "r"}
     2022-10-24 23:13:38.229 [debug] C: HANDSHAKE ~ "<<0x60, 0x60, 0xB0, 0x17>> [3, 2, 1, 0]"
     2022-10-24 23:13:38.229 [debug] S: HANDSHAKE ~ 3
     2022-10-24 23:13:38.230 [debug] C: HELLO ~ [%{credentials: "test", principal: "neo4j", scheme: "basic", user_agent: "BoltSips/2.0.11"}]
     2022-10-24 23:13:38.243 [debug] S: SUCCESS ~ %{"connection_id" => "bolt-281", "hints" => %{}, "server" => "Neo4j/4.4.12"}
     2022-10-24 23:13:38.243 [debug] C: RUN ~ ["RETURN 1 AS num", %{}, %{}]
     2022-10-24 23:13:38.246 [debug] S: SUCCESS ~ %{"fields" => ["num"], "t_first" => 2}
     2022-10-24 23:13:38.246 [debug] C: PULL_ALL ~ []
     2022-10-24 23:13:38.249 [debug] S: RECORD ~ [1]
     2022-10-24 23:13:38.249 [debug] S: SUCCESS ~ %{"bookmark" => "FB:kcwQqQRXgOcbQxGwtaBRge3Q32CQ", "t_last" => 1, "type" => "r"}
     2022-10-24 23:13:38.249 [debug] S: FAILURE ~ %{"code" => "Neo.ClientError.Statement.TypeError", "message" => "Property values can only be of primitive types or arrays thereof. Encountered: Map{baz -> String(\"foo\"), unu -> Long(1), doi -> Long(2)}."}
     2022-10-24 23:13:38.249 [debug] C: RESET ~ []
     2022-10-24 23:13:38.250 [debug] S: SUCCESS ~ %{}

..................................................................................................................................................

Finished in 3.2 seconds
39 doctests, 479 tests, 1 failure, 43 excluded

This test does not work in version 4.4.12. thank you.

@flip111
Copy link

flip111 commented Nov 11, 2023

Are there any plans for bolt protocol version 5?

https://neo4j.com/docs/bolt/current/bolt-compatibility/

@florinpatrascu
Copy link
Owner

none from my end, sorry.

@flip111
Copy link

flip111 commented Nov 12, 2023

Alright thanks for the update 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants