Class BoundStatement

java.lang.Object
com.google.cloud.bigtable.data.v2.models.sql.BoundStatement

public class BoundStatement extends Object
A bound SQL statement that can be executed by calling BigtableDataClient.executeQuery(BoundStatement).

It is an error to bind a statement with unset parameters.

BoundStatements are constructed using a BoundStatement.Builder and calling setTypeParam(String paramName, Type value) for the appropriate type. For example:


 BoundStatementt boundStatement = preparedStatement.bind()
     .setBytesParam("qualifier", ByteString.copyFromUtf8("test"))
     .setBytesParam("key", ByteString.copyFromUtf8("testKey"))
     .build();
 
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    assertUsingSameStub(com.google.cloud.bigtable.data.v2.stub.EnhancedBigtableStub stub)
    Asserts that the given stub matches the stub used for plan refresh.
    com.google.cloud.bigtable.data.v2.internal.PreparedStatementImpl.PreparedQueryData
    Gets the most recent version of the PrepareResponse associated with this query.
    com.google.cloud.bigtable.data.v2.internal.PreparedStatementImpl.PreparedQueryData
    markExpiredAndStartRefresh(com.google.cloud.bigtable.data.v2.internal.PreparedStatementImpl.PreparedQueryVersion expiredPreparedQueryVersion)
     
    toProto(com.google.protobuf.ByteString preparedQuery, com.google.cloud.bigtable.data.v2.internal.RequestContext requestContext, com.google.protobuf.ByteString resumeToken)
    Creates the request protobuf.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • getLatestPrepareResponse

      @InternalApi("For internal use only") public com.google.cloud.bigtable.data.v2.internal.PreparedStatementImpl.PreparedQueryData getLatestPrepareResponse()
      Gets the most recent version of the PrepareResponse associated with this query.

      This is considered an internal implementation detail and should not be used by applications.

    • toProto

      @InternalApi("For internal use only") public ExecuteQueryRequest toProto(com.google.protobuf.ByteString preparedQuery, com.google.cloud.bigtable.data.v2.internal.RequestContext requestContext, @Nullable com.google.protobuf.ByteString resumeToken)
      Creates the request protobuf. This method is considered an internal implementation detail and not meant to be used by applications.
    • markExpiredAndStartRefresh

      @InternalApi("For internal use only") public com.google.cloud.bigtable.data.v2.internal.PreparedStatementImpl.PreparedQueryData markExpiredAndStartRefresh(com.google.cloud.bigtable.data.v2.internal.PreparedStatementImpl.PreparedQueryVersion expiredPreparedQueryVersion)
    • assertUsingSameStub

      @InternalApi public void assertUsingSameStub(com.google.cloud.bigtable.data.v2.stub.EnhancedBigtableStub stub)
      Asserts that the given stub matches the stub used for plan refresh. This is necessary to ensure that the request comes from the same client and uses the same configuration.

      This is considered an internal implementation detail and not meant to be used by applications