public class CassandraStatementAdapter<T,R> extends Object implements StatementAdapter<T,com.datastax.driver.core.Row>
Constructor and Description |
---|
CassandraStatementAdapter(com.datastax.driver.core.Session session,
com.datastax.driver.core.Statement stmt,
Queryable queryable,
RegisterType registerType) |
Modifier and Type | Method and Description |
---|---|
StatementAdapter<T,com.datastax.driver.core.Row> |
bind(Param... values)
Bind the varargs parameters to statement
|
StatementAdapter<T,com.datastax.driver.core.Row> |
bind(Param value)
Bind an argument to a position parameter.
|
StatementAdapter<T,com.datastax.driver.core.Row> |
bind(String name,
Object value)
Bind an argument to a named parameter.
|
void |
bindKey()
bind the keys generated
|
void |
close() |
int |
execute() |
int |
reset()
reset the internal index position parameter to zero.
|
List<T> |
rows() |
void |
setFetchSize(int rows)
Set the number of rows that should be fetched when the statement hit the database.
|
StatementAdapter<T,com.datastax.driver.core.Row> |
with(AutoKey generateKey) |
StatementAdapter<T,com.datastax.driver.core.Row> |
with(ResultRow<T,com.datastax.driver.core.Row> resultRow)
result row
|
public CassandraStatementAdapter(com.datastax.driver.core.Session session, com.datastax.driver.core.Statement stmt, Queryable queryable, RegisterType registerType)
public StatementAdapter<T,com.datastax.driver.core.Row> with(ResultRow<T,com.datastax.driver.core.Row> resultRow)
StatementAdapter
with
in interface StatementAdapter<T,com.datastax.driver.core.Row>
resultRow
- how to process the rowspublic StatementAdapter<T,com.datastax.driver.core.Row> bind(String name, Object value)
StatementAdapter
bind
in interface StatementAdapter<T,com.datastax.driver.core.Row>
name
- of parametervalue
- of parameterpublic StatementAdapter<T,com.datastax.driver.core.Row> bind(Param value)
StatementAdapter
bind
in interface StatementAdapter<T,com.datastax.driver.core.Row>
value
- of parameterpublic StatementAdapter<T,com.datastax.driver.core.Row> bind(Param... values)
StatementAdapter
bind
in interface StatementAdapter<T,com.datastax.driver.core.Row>
values
- of parameters as arbitrary numberpublic List<T> rows()
rows
in interface StatementAdapter<T,com.datastax.driver.core.Row>
public void bindKey()
StatementAdapter
bindKey
in interface StatementAdapter<T,com.datastax.driver.core.Row>
public StatementAdapter<T,com.datastax.driver.core.Row> with(AutoKey generateKey)
with
in interface StatementAdapter<T,com.datastax.driver.core.Row>
public int execute()
execute
in interface StatementAdapter<T,com.datastax.driver.core.Row>
public int reset()
StatementAdapter
reset
in interface StatementAdapter<T,com.datastax.driver.core.Row>
public void close()
close
in interface StatementAdapter<T,com.datastax.driver.core.Row>
public void setFetchSize(int rows)
StatementAdapter
setFetchSize
in interface StatementAdapter<T,com.datastax.driver.core.Row>
rows
- the number of rows to fetchCopyright © 2012–2020 jkniv, copyleft code. All rights reserved.