public class ExecutionResult extends Object implements com.mware.ge.io.ResourceIterable<Map<String,Object>>, Result, QueryResultProvider
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.
Result.ResultRow, Result.ResultVisitor<VisitationException extends Exception>| Constructor and Description |
|---|
ExecutionResult(InternalExecutionResult projection)
Constructor used by the Cypher framework.
|
| Modifier and Type | Method and Description |
|---|---|
<VisitationException extends Exception> |
accept(Result.ResultVisitor<VisitationException> visitor) |
void |
close() |
<T> com.mware.ge.io.ResourceIterator<T> |
columnAs(String n)
Returns an iterator with the result objects from a single column of the result set.
|
List<String> |
columns()
The exact names used to represent each column in the result set.
|
String |
dumpToString()
Provides a textual representation of the query result.
|
ExecutionPlanDescription |
getExecutionPlanDescription() |
Iterable<Notification> |
getNotifications() |
QueryExecutionType |
getQueryExecutionType() |
QueryStatistics |
getQueryStatistics()
Returns statistics about this result.
|
boolean |
hasNext() |
InternalExecutionResult |
internalExecutionResult() |
com.mware.ge.io.ResourceIterator<Map<String,Object>> |
iterator()
Returns an iterator over the return clause of the query.
|
Map<String,Object> |
next() |
QueryResult |
queryResult() |
void |
remove() |
String |
resultAsString() |
Stream<Map<String,Object>> |
stream() |
String |
toString() |
void |
toString(PrintWriter writer) |
void |
writeAsStringTo(PrintWriter writer) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitforEach, spliteratorforEachRemainingpublic ExecutionResult(InternalExecutionResult projection)
QueryExecutionEngine.executeQuery(String, MapValue, GeCypherQueryContext) )}.projection - Execution result projection to use.public <T> com.mware.ge.io.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()
getQueryExecutionType 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 void toString(PrintWriter writer)
public com.mware.ge.io.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()
public void close()
public ExecutionPlanDescription getExecutionPlanDescription()
getExecutionPlanDescription in interface Resultpublic String resultAsString()
resultAsString in interface Resultpublic void writeAsStringTo(PrintWriter writer)
writeAsStringTo in interface Resultpublic void remove()
public <VisitationException extends Exception> void accept(Result.ResultVisitor<VisitationException> visitor) throws VisitationException extends Exception
public Iterable<Notification> getNotifications()
getNotifications in interface Resultpublic InternalExecutionResult internalExecutionResult()
public QueryResult queryResult()
queryResult in interface QueryResultProviderCopyright © 2016–2021 MWARE SOLUTIONS. All rights reserved.