Closed sergey-ivlev closed 7 years ago
Hi there - yep, you caught a bug, thank you! Please try the master
branch (is 0.2.5).
BTW, you should escape the "
character. For example:
iex(2)> Bolt.Sips.query!(Bolt.Sips.conn, "MERGE (:AnotherTest {text: \"test with semicolon;\"})")
%{stats: %{"labels-added" => 1, "nodes-created" => 1, "properties-set" => 1}, type: "w"}
or use single quote:
iex(4)> Bolt.Sips.query!(Bolt.Sips.conn, "MERGE (:YetAnotherTest {text: 'test with semicolon;'})")
%{stats: %{"labels-added" => 1, "nodes-created" => 1, "properties-set" => 1}, type: "w"}
The web editor is not a close comparison, unfortunately, but I understood how to replicate your finding.
Thanks again and please let me know if the new version works for you. Also, it will be awesome if you can confirm it's working on Windows as well, just in case you're using Windows?!
🍻
Thanks a lot, it works! tested on nix* and i haven't Windows, sorry Thanks again
Cool, thank you too!
Package published to https://hex.pm/packages/bolt_sips/0.2.5
Hello! a little example whith semicolon in text, which raise exeption
Bolt.Sips.query!(Bolt.Sips.conn, "MERGE (:Test {text: \"test with semicolon;\"})")
21:58:18.753 [debug] [{:sock_ref, "", #PID<0.624.0>, #PID<0.625.0>, #PID<0.626.0>}] cypher: "MERGE (:Test {text: \"test with semicolon" - params: %{} - bolt: {:error, %Boltex.Error{code: "Neo.ClientError.Statement.SyntaxError", connection_id: nil, function: :run_statement, message: "Unexpected end of input: expected '\', ANY or '\"' (line 1, column 41 (offset: 40))\n\"MERGE (:Test {text: \"test with semicolon\"\n ^", type: :cypher_error}} (elixir) lib/exception.ex:494: RuntimeError.exception(%Boltex.Error{code: "Neo.ClientError.Statement.SyntaxError", connection_id: nil, function: :run_statement, message: "Unexpected end of input: expected '\', ANY or '\"' (line 1, column 41 (offset: 40))\n\"MERGE (:Test {text: \"test with semicolon\"\n ^", type: :cypher_error}) (bolt_sips) lib/bolt_sips/query.ex:100: Bolt.Sips.Query.send!/4 (elixir) lib/enum.ex:1755: Enum."-reduce/3-lists^foldl/2-0-"/3 (bolt_sips) lib/bolt_sips/query.ex:86: Bolt.Sips.Query.tx/3 (bolt_sips) lib/bolt_sips/query.ex:55: Bolt.Sips.Query.query!/3
In web editor this request process correctly.