public static class ReactiveCassandraTemplate.PreparedStatementHandler extends Object implements ReactiveCassandraTemplate.ReactivePreparedStatementHandler
SimpleStatement
and bind values associated with the statement to a
BoundStatement
.Constructor and Description |
---|
PreparedStatementHandler(com.datastax.oss.driver.api.core.cql.Statement<?> statement) |
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 . |
reactor.core.publisher.Mono<com.datastax.oss.driver.api.core.cql.PreparedStatement> |
createPreparedStatement(ReactiveSession session)
Create a statement in this session.
|
String |
getCql()
Return the CQL string for this object, i.e. typically the CQL used for creating statements.
|
public PreparedStatementHandler(com.datastax.oss.driver.api.core.cql.Statement<?> statement)
public reactor.core.publisher.Mono<com.datastax.oss.driver.api.core.cql.PreparedStatement> createPreparedStatement(ReactiveSession session) throws com.datastax.oss.driver.api.core.DriverException
ReactivePreparedStatementCreator
PreparedStatement
s. The
ReactiveCqlTemplate
will attempt to cache the PreparedStatement
s for future use without the
overhead of re-preparing on the entire cluster.createPreparedStatement
in interface ReactivePreparedStatementCreator
session
- Session to use to create statement, must not be null.com.datastax.oss.driver.api.core.DriverException
- there is no need to catch DriverException that may be thrown in the implementation of this
method. The ReactiveCqlTemplate
class will handle them.public 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
PreparedStatementBinder
PreparedStatement
.bindValues
in interface PreparedStatementBinder
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
)public String getCql()
CqlProvider
getCql
in interface CqlProvider
Copyright © 2011–2022 Pivotal Software, Inc.. All rights reserved.