Interface StatementResult
-
- All Known Subinterfaces:
AsyncStatementResult
@InternalApi public interface StatementResultA 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 classStatementResult.ClientSideStatementTypeThe type of client side statement that was executed.static classStatementResult.ResultTypeEnum 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.ClientSideStatementTypegetClientSideStatementType()ResultSetgetResultSet()Returns theResultSetheld by this result.StatementResult.ResultTypegetResultType()Returns theStatementResult.ResultTypeof this result.LonggetUpdateCount()Returns the update count held by this result.
-
-
-
Method Detail
-
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.
-
-