florinpatrascu / bolt_sips

Neo4j driver for Elixir
Apache License 2.0
256 stars 49 forks source link

Response.profile is empty with a query with "PROFILE" #91

Closed dominique-vassard closed 3 years ago

dominique-vassard commented 4 years ago

Environment

Current behavior

Against a filled database, I ran:

statement = "PROFILE MATCH (n:User {firstName: 'John'}) RETURN n"
Bolt.Sips.query(Bolt.Sips.conn(), statement)

which returns:

{:ok,
 %Bolt.Sips.Response{
   bookmark: "neo4j:bookmark:v1:tx52350",
   fields: ["n"],
   notifications: [],
   plan: nil,
   profile: nil,
   records: [
     [
       ...
     ]
   ],
   results: [
     ...
   ],
   stats: [],
   type: "r"
 }}

records an results are omitted because they are right.

Expected behavior

profile entry should have the plan data. It may be due to the fact that "PROFILE" returns the plan data and the query result, where "EXPLAIN" only sends back the plan data.

I'll try to find some time to check this issue.