Class BoundStatement.Builder
java.lang.Object
com.google.cloud.bigtable.data.v2.models.sql.BoundStatement.Builder
- Enclosing class:
- BoundStatement
-
Constructor Summary
ConstructorsConstructorDescriptionBuilder(com.google.cloud.bigtable.data.v2.internal.PreparedStatementImpl preparedStatement, Map<String, SqlType<?>> paramTypes) Creates a builder from aPreparedStatement -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds aBoundStatementfrom the buildersetBooleanParam(String paramName, Boolean value) Sets a query parameter with the nameparamNameand the BOOL typed valuevaluesetBytesParam(String paramName, com.google.protobuf.ByteString value) Sets a query parameter with the nameparamNameand the Bytes typed valuevaluesetDateParam(String paramName, com.google.cloud.Date value) Sets a query parameter with the nameparamNameand the DATE typed valuevaluesetDoubleParam(String paramName, Double value) Sets a query parameter with the nameparamNameand the FLOAT64 typed valuevaluesetFloatParam(String paramName, Float value) Sets a query parameter with the nameparamNameand the FLOAT32 typed valuevaluesetListParam(String paramName, List<T> value, SqlType.Array<T> arrayType) Sets a query parameter with the nameparamNameand the ARRAY typed valuevalue.setLongParam(String paramName, Long value) Sets a query parameter with the nameparamNameand the INT64 typed valuevaluesetStringParam(String paramName, String value) Sets a query parameter with the nameparamNameand the String typed valuevaluesetTimestampParam(String paramName, Instant value) Sets a query parameter with the nameparamNameand the TIMESTAMP typed valuevalue
-
Constructor Details
-
Builder
@InternalApi("For internal use only") public Builder(com.google.cloud.bigtable.data.v2.internal.PreparedStatementImpl preparedStatement, Map<String, SqlType<?>> paramTypes) Creates a builder from aPreparedStatementThis is considered an internal implementation detail and should not be used by applications.
-
-
Method Details
-
build
Builds aBoundStatementfrom the builder -
setStringParam
Sets a query parameter with the nameparamNameand the String typed valuevalue -
setBytesParam
public BoundStatement.Builder setBytesParam(String paramName, @Nullable com.google.protobuf.ByteString value) Sets a query parameter with the nameparamNameand the Bytes typed valuevalue -
setLongParam
Sets a query parameter with the nameparamNameand the INT64 typed valuevalue -
setFloatParam
Sets a query parameter with the nameparamNameand the FLOAT32 typed valuevalue -
setDoubleParam
Sets a query parameter with the nameparamNameand the FLOAT64 typed valuevalue -
setBooleanParam
Sets a query parameter with the nameparamNameand the BOOL typed valuevalue -
setTimestampParam
Sets a query parameter with the nameparamNameand the TIMESTAMP typed valuevalue -
setDateParam
Sets a query parameter with the nameparamNameand the DATE typed valuevalue -
setListParam
public <T> BoundStatement.Builder setListParam(String paramName, @Nullable List<T> value, SqlType.Array<T> arrayType) Sets a query parameter with the nameparamNameand the ARRAY typed valuevalue. The array element type is specified byarrayTypeand the List elements must be of the corresponding Java type. Null array elements are valid.
-