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. |
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 and document results before reusing their PolyStatement or closing its connection. The driver can request more frames while you iterate. For full examples, see JDBC examples.
© Polypheny GmbH. All Rights Reserved.