APOC create relationship statistics

apoc
java-driver

(Eric) #1

Hi, I am using neo4j-java-driver 1.6.2. When a query is executed, I am using InternalResultSummary counters().containsUpdates() method to know if my query has changed something. This is working fine, except when I am executing a query with APOC (in order to create relationships with dynamic names) and the resulting counters is null, saying like the query did not apply any change, but the relationship was actually created. The cause is that org.neo4j.driver.internal.util.MetadataUtil class, which is doing the extract of counters is searching for a "stats" metadata which is missing.

Here is my APOC query :

MATCH (from) WHERE from.t = {from}
MATCH (to) where to.t = {to}
CALL apoc.create.relationship(from, {type}, {properties}, to) yield rel
RETURN count(*)

Is there any way to get statistics when using APOC ? How can I know if my APOC query did update something ?

Thanks.


(Michael Hunger) #2

Unfortunately procedures have no way of reporting their changes to the Cypher-Runtime
Currently your RETURN count(*) is the best we can do.