This type is used to wrap unified results of DDL and DML query executions. JDBC execution results can be summarised to two properties:
Statement#getUpdateCount(): The number of affected rowsStatement#getResultSet(): The result set
See MockDataProvider#execute(MockExecuteContext) for more details
MockDataProvider
| Modifier and Type | Field and Description |
|---|---|
| public final Result | data
The result data associated with this execution result. |
| public final SQLException | exception
The exception associated with this execution result. |
| public final int | rows
The number of affected rows for this execution result. |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | MockResult(Record
The single record in this result. Record instances can be
obtained from queries, instantiated from generated record
classes, or created using
data)DSLContext#newRecord(org. and other
overloads.Create a new |
| public | MockResult(int
The number of affected rows rows, Result<?> The result data. Result instances can be obtained from
queries, or created using
data)DSLContext#newResult(org. and other
overloads.Create a new |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public String |
| data | back to summary |
|---|---|
| public final Result<?> data The result data associated with this execution result. This object describes the result data (including meta data).
If the given query execution did not provide any results (as in
Statement#getGeneratedKeys()
| |
| exception | back to summary |
|---|---|
| public final SQLException exception The exception associated with this execution result. If present, the current result produces an exception. | |
| rows | back to summary |
|---|---|
| public final int rows The number of affected rows for this execution result.
This number corresponds to the value of
| |
| MockResult | back to summary |
|---|---|
| public MockResult() Create a new
This is a convenience constructor calling
| |
| MockResult | back to summary |
|---|---|
| public MockResult(int rows) Create a new
This is a convenience constructor calling
| |
| MockResult | back to summary |
|---|---|
| public MockResult(Record data) Create a new
This is a convenience constructor creating a
| |
| MockResult | back to summary |
|---|---|
| public MockResult(int rows, Result<?> data) Create a new
| |
| MockResult | back to summary |
|---|---|
| public MockResult(SQLException exception) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |