Result, and use
GraphDatabaseService.execute(String, Map) instead.@Deprecated public class ExecutionResult extends Object implements ResourceIterable<Map<String,Object>>, Result
Nodes,
Relationships or java primitives.
Either iterate directly over the ExecutionResult to retrieve each row of the result
set, or use columnAs() to access a single column with result objects
cast to a type.| Constructor and Description |
|---|
ExecutionResult(org.neo4j.cypher.ExtendedExecutionResult projection)
Deprecated.
Constructor used by the Cypher framework.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Deprecated.
Closes the result, freeing up any resources held by the result.
|
<T> ResourceIterator<T> |
columnAs(String n)
Deprecated.
Returns an iterator with the result objects from a single column of the result set.
|
List<String> |
columns()
Deprecated.
The exact names used to represent each column in the result set.
|
String |
dumpToString()
Deprecated.
Provides a textual representation of the query result.
|
PlanDescription |
executionPlanDescription()
Deprecated.
Returns a string representation of the query plan used to produce this result.
|
ExecutionPlanDescription |
getExecutionPlanDescription()
Deprecated.
Returns a description of the query plan used to produce this result.
|
QueryExecutionType |
getQueryExecutionType()
Deprecated.
Indicates what kind of query execution produced this result.
|
QueryStatistics |
getQueryStatistics()
Deprecated.
Returns statistics about this result.
|
boolean |
hasNext()
Deprecated.
Denotes there being more rows available in this result.
|
ResourceIterator<Map<String,Object>> |
iterator()
Deprecated.
Returns an iterator over the return clause of the query.
|
Map<String,Object> |
next()
Deprecated.
Returns the next row in this result.
|
void |
remove()
Deprecated.
Removing rows from the result is not supported.
|
String |
resultAsString()
Deprecated.
Provides a textual representation of the query result.
|
String |
toString()
Deprecated.
|
void |
toString(PrintWriter writer)
Deprecated.
|
void |
writeAsStringTo(PrintWriter writer)
Deprecated.
Provides a textual representation of the query result to the provided
PrintWriter. |
public ExecutionResult(org.neo4j.cypher.ExtendedExecutionResult projection)
ExecutionEngine.execute(String).projection - Execution result projection to use.public <T> ResourceIterator<T> columnAs(String n)
To ensure that any resources, including transactions bound to it, are properly closed, the iterator must
either be fully exhausted, or the close() method must be
called.
columnAs in interface ResultT - desired type cast for the result objectsn - exact name of the column, as it appeared in the original queryClassCastException - when the result object can not be cast to the requested typeNotFoundException - when the column name does not appear in the original querypublic QueryExecutionType getQueryExecutionType()
ResultgetQueryExecutionType in interface Resultpublic List<String> columns()
public String dumpToString()
The execution result represented by this object will be consumed in its entirety after this method is called. Calling any of the other iterating methods on it should not be expected to return any results.
public QueryStatistics getQueryStatistics()
getQueryStatistics in interface Resultpublic PlanDescription executionPlanDescription()
public void toString(PrintWriter writer)
public ResourceIterator<Map<String,Object>> iterator()
To ensure that any resources, including transactions bound to it, are properly closed, the iterator must
either be fully exhausted, or the close() method must be
called.
public boolean hasNext()
ResultResult.next(), or the result has to be closed.public Map<String,Object> next()
Resultpublic void close()
Resultnext-method.public ExecutionPlanDescription getExecutionPlanDescription()
ResultQueryExecutionType.requestedExecutionPlanDescription()-method is used.
Being able to invoke this method, regardless of whether the user requested the plan or not is useful for
purposes of debugging queries in applications.getExecutionPlanDescription in interface Resultpublic String resultAsString()
ResultThe execution result represented by this object will be consumed in its entirety after this method is called. Calling any of the other iterating methods on it should not be expected to return any results.
resultAsString in interface Resultpublic void writeAsStringTo(PrintWriter writer)
ResultPrintWriter.
The execution result represented by this object will be consumed in its entirety after this method is called. Calling any of the other iterating methods on it should not be expected to return any results.
writeAsStringTo in interface Resultwriter - the PrintWriter to receive the textual representation of the query result.Copyright © 2002–2015 The Neo4j Graph Database Project. All rights reserved.