Interface StatementResult (6.60.0)

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.

Methods

getClientSideStatementType()

public abstract StatementResult.ClientSideStatementType getClientSideStatementType()
Returns
TypeDescription
StatementResult.ClientSideStatementType

the ClientSideStatementType that was executed, or null if no such statement was executed.

getResultSet()

public abstract ResultSet getResultSet()

Returns the ResultSet held by this result. May only be called if the type of this result is ResultType#RESULT_SET.

Returns
TypeDescription
ResultSet

the ResultSet held by this result.

getResultType()

public abstract StatementResult.ResultType getResultType()

Returns the ResultType of this result.

Returns
TypeDescription
StatementResult.ResultType

the result type.

getUpdateCount()

public abstract Long getUpdateCount()

Returns the update count held by this result. May only be called if the type of this result is ResultType#UPDATE_COUNT.

Returns
TypeDescription
Long

the update count held by this result.