public class MockResult extends java.lang.Object
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 rows
Statement.getResultSet(): The result set
MockDataProvider.execute(MockExecuteContext) for more details
|Modifier and Type||Field and Description|
The result data associated with this execution result.
The number of affected rows for this execution result.
|Constructor and Description|
Create a new
Create a new
public final int rows
This number corresponds to the value of
Statement.getUpdateCount(). The following values are possible:
public final Result<?> data
This object describes the result data (including meta data).
If the given query execution did not provide any results (as in
), this may be
Statement.execute(String) == false
null. This is not the same as producing an empty
result, which can only be modelled by an empty
column information but no rows.
public MockResult(Record data)
This is a convenience constructor creating a
MockResult with exactly one record.
data- The single record in this result.
public MockResult(int rows, Result<?> data)
rows- The number of affected rows
data- The result data
Copyright © 2018. All Rights Reserved.