Search in sources :

Example 1 with ResultStringBuilder

use of org.neo4j.cypher.internal.result.string.ResultStringBuilder in project neo4j by neo4j.

the class ResultSubscriber method writeAsStringTo.

@Override
public void writeAsStringTo(PrintWriter writer) {
    ResultStringBuilder stringBuilder = ResultStringBuilder.apply(execution.fieldNames(), context);
    try {
        // paths
        if (this.hasFetchedNext()) {
            stringBuilder.addRow(new ResultRowImpl(this.getNextObject()));
        }
        accept(stringBuilder);
        stringBuilder.result(writer, statistics);
        for (Notification notification : getNotifications()) {
            writer.println(notification.getDescription());
        }
    } catch (Exception e) {
        close();
        throw converted(e);
    }
}
Also used : ResultStringBuilder(org.neo4j.cypher.internal.result.string.ResultStringBuilder) Notification(org.neo4j.graphdb.Notification) QueryExecutionKernelException(org.neo4j.kernel.impl.query.QueryExecutionKernelException) QueryExecutionException(org.neo4j.graphdb.QueryExecutionException) Neo4jException(org.neo4j.exceptions.Neo4jException) CypherExecutionException(org.neo4j.exceptions.CypherExecutionException)

Aggregations

ResultStringBuilder (org.neo4j.cypher.internal.result.string.ResultStringBuilder)1 CypherExecutionException (org.neo4j.exceptions.CypherExecutionException)1 Neo4jException (org.neo4j.exceptions.Neo4jException)1 Notification (org.neo4j.graphdb.Notification)1 QueryExecutionException (org.neo4j.graphdb.QueryExecutionException)1 QueryExecutionKernelException (org.neo4j.kernel.impl.query.QueryExecutionKernelException)1