The class simplifies creation of ResultHandler delegates: it provides default implementation for the interface methods
| Modifier and Type | Field and Description |
|---|---|
| private final @Nullable ResultHandler |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public @Nullable SQLException | getException()
Implements org. Returns the first encountered exception. |
| public @Nullable SQLWarning | getWarning()
Implements org. Returns the first encountered warning. |
| public void | handleCommandStatus(String
the command status string (e.g. "SELECT") returned by the backend status, long the number of rows affected by an INSERT, UPDATE, DELETE, FETCH, or MOVE
command; -1 if not available. updateCount, long for a single-row INSERT query, the OID of the newly inserted row; 0 if not
available. insertOID)Implements org. Called when a query that did not return a resultset completes. |
| public void | handleCompletion()
Implements org. Called before a QueryExecutor method returns. |
| public void | handleError(SQLException
the error that occurred error)Implements org. Called when an error occurs. |
| public void | handleResultRows(Query fromQuery, Field[] fields, List<Tuple> tuples, @Nullable ResultCursor cursor)
|
| public void | handleWarning(SQLWarning
the warning that occurred. warning)Implements org. Called when a warning is emitted. |
| public void | secureProgress()
Implements org. Callback for batch statements. |
| delegate | back to summary |
|---|---|
| private final @Nullable ResultHandler delegate | |
| ResultHandlerDelegate | back to summary |
|---|---|
| public ResultHandlerDelegate(@Nullable ResultHandler delegate) | |
| getException | back to summary |
|---|---|
| public @Nullable SQLException getException() Implements org. Doc from org. Returns the first encountered exception. The rest are chained via
| |
| getWarning | back to summary |
|---|---|
| public @Nullable SQLWarning getWarning() Implements org. Doc from org. Returns the first encountered warning. The rest are chained via
| |
| handleCommandStatus | back to summary |
|---|---|
| public void handleCommandStatus(String status, long updateCount, long insertOID) Implements org. Doc from org. Called when a query that did not return a resultset completes.
| |
| handleCompletion | back to summary |
|---|---|
| public void handleCompletion() throws SQLException Implements org. Doc from org. Called before a QueryExecutor method returns. This method may throw a SQLException if desired; if it does, the QueryExecutor method will propagate that exception to the original caller.
| |
| handleError | back to summary |
|---|---|
| public void handleError(SQLException error) Implements org. Doc from org. Called when an error occurs. Subsequent queries are abandoned; in general the only calls between a handleError call and a subsequent handleCompletion call are handleError or handleWarning.
| |
| handleResultRows | back to summary |
|---|---|
public void handleResultRows(Query fromQuery, Field[] fields, List<Tuple> tuples, @Nullable ResultCursor cursor)
| |
| handleWarning | back to summary |
|---|---|
| public void handleWarning(SQLWarning warning) Implements org. Doc from org. Called when a warning is emitted.
| |
| secureProgress | back to summary |
|---|---|
| public void secureProgress() Implements org. Doc from org. Callback for batch statements. In case batch statement is executed in autocommit==true mode, the executor might commit "as it this it is best", so the result handler should track which statements are executed successfully and which are not.
| |