Skip to content

Cypher stats #163

@stefanli

Description

@stefanli

More of a feature request than a bug.

Currently if you do a MATCH and SET without a RETURN statement in a cypher query it is not possible to know whether the SET was successful or not (e.g. due to a failed match). The REST API has a "stats" field that contains this information e.g:

{
"results": [{
"columns": [],
"data": [],
"stats": {
"contains_updates": true,
"nodes_created": 1,
"nodes_deleted": 0,
"properties_set": 1,
"relationships_created": 0,
"relationship_deleted": 0,
"labels_added": 1,
"labels_removed": 0,
"indexes_added": 0,
"indexes_removed": 0,
"constraints_added": 0,
"constraints_removed": 0
}
}],
"errors": []
}

But this is never exposed in the GraphDatabase.cypher() callback. The only workaround right now that I know of is to add a RETURN statement which adds an unnecessary penalty hit.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions