@FunctionalInterface public interface PreparedStatementBinder
CqlTemplate and ReactiveCqlTemplate classes.
This interface binds values on a PreparedStatement provided by the CqlTemplate class, for each of a
number of updates in a batch using the same CQL. Implementations are responsible for setting any necessary
parameters. CQL with placeholders will already have been supplied.
It's easier to use this interface than PreparedStatementCreator: The CqlTemplate will create the
PreparedStatement, with the callback only being responsible for setting parameter values.
Implementations do not need to concern themselves with DriverExceptions that may be thrown from
operations they attempt. The CqlTemplate class will catch and handle DriverException appropriately.
| Modifier and Type | Method and Description |
|---|---|
com.datastax.oss.driver.api.core.cql.BoundStatement |
bindValues(com.datastax.oss.driver.api.core.cql.PreparedStatement ps)
Bind parameter values on the given
PreparedStatement. |
com.datastax.oss.driver.api.core.cql.BoundStatement bindValues(com.datastax.oss.driver.api.core.cql.PreparedStatement ps)
throws com.datastax.oss.driver.api.core.DriverException
PreparedStatement.ps - the PreparedStatement to invoke setter methods on.com.datastax.oss.driver.api.core.DriverException - if a DriverException is encountered (i.e. there is no need to catch
DriverException)Copyright © 2011–2021 Pivotal Software, Inc.. All rights reserved.