On this page
org.polypheny.jdbc.multimodel.Result is the abstract base class for values returned by PolyStatement.execute.
getResultType
getResultType() returns a Result.ResultType enum value:
| Value | Implementation | Content |
|---|---|---|
RELATIONAL |
RelationalResult |
Iterable rows from a relational result frame. |
DOCUMENT |
DocumentResult |
Iterable documents from a document result frame. |
SCALAR |
ScalarResult |
The long value from a scalar response, commonly an affected row count. |
GRAPH |
GraphResult |
Iterable nodes and edges from a graph result frame. Use RelationalResult for mixed graph and scalar projections. |
Subclasses pass the corresponding ResultType to the Result(ResultType) constructor.
unwrap
<T> T unwrap(Class<T> type) returns this result as the requested class when the instance is assignable to that class. If it is incompatible, the method throws PrismInterfaceServiceException. Check getResultType() or use Java’s instanceof to choose the class.
Iterate row, document, and graph results before reusing their PolyStatement or closing its connection. The driver can request more frames while you iterate. See JDBC examples and the Cypher example.
© Polypheny GmbH. All Rights Reserved.