use of com.google.cloud.spanner.Statement.Builder in project jans by JanssenProject.
the class SpannerOperationServiceImpl method applyParametersBinding.
private void applyParametersBinding(Statement.Builder builder, ConvertedExpression expression) throws IncompatibleTypeException {
if (expression == null) {
return;
}
Map<String, ValueWithStructField> queryParameters = expression.queryParameters();
for (Entry<String, ValueWithStructField> queryParameterEntry : queryParameters.entrySet()) {
String attributeName = queryParameterEntry.getKey();
ValueWithStructField valueWithStructField = queryParameterEntry.getValue();
ValueBinder<Builder> valueBinder = builder.bind(attributeName);
setMutationBuilderValue(valueBinder, valueWithStructField.getStructField(), true, valueWithStructField.getValue());
}
}
Aggregations