Interface StatementResult
- All Known Subinterfaces:
AsyncStatementResult
@InternalApi
public interface StatementResult
A result of the execution of a statement. Statements that are executed by the
Connection.execute(com.google.cloud.spanner.Statement) method could have different types of
return values. These are wrapped in a StatementResult.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumThe type of client side statement that was executed.static enumEnum indicating the type of result that was returned byConnection.execute(com.google.cloud.spanner.Statement) -
Method Summary
Modifier and TypeMethodDescriptionReturns theResultSetheld by this result.Returns theStatementResult.ResultTypeof this result.Returns the update count held by this result.
-
Method Details
-
getResultType
StatementResult.ResultType getResultType()Returns theStatementResult.ResultTypeof this result.- Returns:
- the result type.
-
getClientSideStatementType
StatementResult.ClientSideStatementType getClientSideStatementType()- Returns:
- the
StatementResult.ClientSideStatementTypethat was executed, or null if no such statement was executed.
-
getResultSet
ResultSet getResultSet()Returns theResultSetheld by this result. May only be called if the type of this result isStatementResult.ResultType.RESULT_SET.- Returns:
- the
ResultSetheld 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.
-