public class SimplePreparedStatementCreator extends Object implements PreparedStatementCreator, CqlProvider
PreparedStatementCreator. This prepared statement creator simply prepares a
statement from the CQL string. Exposes the given CQL statement through CqlProvider.getCql(),CqlProvider| Constructor and Description |
|---|
SimplePreparedStatementCreator(com.datastax.oss.driver.api.core.cql.SimpleStatement statement)
Create a
SimplePreparedStatementCreator given cql. |
SimplePreparedStatementCreator(String cql)
Create a
SimplePreparedStatementCreator given cql. |
| Modifier and Type | Method and Description |
|---|---|
com.datastax.oss.driver.api.core.cql.PreparedStatement |
createPreparedStatement(com.datastax.oss.driver.api.core.CqlSession 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 SimplePreparedStatementCreator(String cql)
SimplePreparedStatementCreator given cql.cql - must not be null.public SimplePreparedStatementCreator(com.datastax.oss.driver.api.core.cql.SimpleStatement statement)
SimplePreparedStatementCreator given cql.statement - must not be null.public com.datastax.oss.driver.api.core.cql.PreparedStatement createPreparedStatement(com.datastax.oss.driver.api.core.CqlSession session)
throws com.datastax.oss.driver.api.core.DriverException
PreparedStatementCreatorPreparedStatement.createPreparedStatement in interface PreparedStatementCreatorsession - CqlSession to use to create statement.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 CqlTemplate class will handle them.public String getCql()
CqlProvidergetCql in interface CqlProviderCopyright © 2011–2021 Pivotal Software, Inc.. All rights reserved.