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
Modifier and TypeInterfaceDescriptionstatic enum
The type of client side statement that was executed.static enum
Enum indicating the type of result that was returned byConnection.execute(com.google.cloud.spanner.Statement)
-
Method Summary
Modifier and TypeMethodDescriptionReturns theResultSet
held by this result.Returns theStatementResult.ResultType
of this result.Returns the update count held by this result.
-
Method Details
-
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.
-