mschae / boltex

Elixir driver for the neo4j bolt protocol
Other
29 stars 6 forks source link

shouldn't: fields, be always returned, on SUCCESS` #1

Closed florinpatrascu closed 8 years ago

florinpatrascu commented 8 years ago

Hi there - I am trying to use Boltex in my project and during some tests I realized the fields field is not always returned (on SUCCESS). For example:

neo< MATCH (p:Person) RETURN p LIMIT 1
neo> [record: [sig: 78, fields: [1070, ["Person", %{"name" => "Patrick Rothfuss", 
     "neo4j_sips" => true}]]], success: %{"type" => "r"}]
neo< RETURN 1 AS num
neo> [record: [1], success: %{"type" => "r"}]

Shouldn't the response to the last query be:

{"fields": ["num"] } # or something like this?

Note: _both results illustrated above are received from running Boltex.Bolt.run_statement(:gen_tcp, p, query)_

mschae commented 8 years ago

Hey @florinpatrascu,

Thanks for testing this out, please note this is very much WIP. You will definitely need to at least use a pool of connections to use this in production.

I intend to add options for pools, possibly using DBConnection in the not-so-distant future.

Either way you are absolutely right - I was just throwing away the first success response. I added it to what the run_statement function returns, hope this works out for you.

I pushed straight into master. Let me know if you would like another release.

Cheers

florinpatrascu commented 8 years ago

thank you!