Interface StatementResult
-
- All Known Subinterfaces:
AsyncStatementResult
@InternalApi public interface StatementResult
A result of the execution of a statement. Statements that are executed by theConnection.execute(com.google.cloud.spanner.Statement)
method could have different types of return values. These are wrapped in aStatementResult
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
StatementResult.ClientSideStatementType
The type of client side statement that was executed.static class
StatementResult.ResultType
Enum indicating the type of result that was returned byConnection.execute(com.google.cloud.spanner.Statement)
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StatementResult.ClientSideStatementType
getClientSideStatementType()
ResultSet
getResultSet()
Returns theResultSet
held by this result.StatementResult.ResultType
getResultType()
Returns theStatementResult.ResultType
of this result.Long
getUpdateCount()
Returns the update count held by this result.
-
-
-
Method Detail
-
getResultType
StatementResult.ResultType getResultType()
Returns theStatementResult.ResultType
of this result.- Returns:
- the result type.
-
getClientSideStatementType
StatementResult.ClientSideStatementType getClientSideStatementType()
- Returns:
- the
StatementResult.ClientSideStatementType
that was executed, or null if no such statement was executed.
-
getResultSet
ResultSet getResultSet()
Returns theResultSet
held by this result. May only be called if the type of this result isStatementResult.ResultType.RESULT_SET
.- Returns:
- the
ResultSet
held by this result.
-
getUpdateCount
Long getUpdateCount()
Returns the update count held by this result. May only be called if the type of this result isStatementResult.ResultType.UPDATE_COUNT
.- Returns:
- the update count held by this result.
-
-