public static final class QueryUpdate.Builder extends Object
QueryUpdate
.Constructor and Description |
---|
QueryUpdate.Builder(String sql,
Database db)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
QueryUpdate.Builder |
clearParameters()
Clears the parameter inputs for the query.
|
rx.Observable<Integer> |
count()
Returns an
Observable with the count of rows affected by the
update statement. |
QueryUpdate.Builder |
dependsOn(rx.Observable<?> dependency)
Appends a dependency to the dependencies that have to complete their
emitting before the query is executed.
|
QueryUpdate.Builder |
dependsOnLastTransaction()
Appends a dependency on the result of the last transaction (
true for commit or false for rollback) to
the dependencies that have to complete their emitting before the
query is executed. |
rx.Observable.Operator<Integer,Object> |
dependsOnOperator()
Returns an
Observable.Operator to allow the query to be pushed
dependencies via the Observable.lift(Operator) method. |
QueryUpdate.Builder |
parameter(Object value)
Appends a parameter to the parameter list for the query.
|
QueryUpdate.Builder |
parameter(String name,
Object value)
Sets a named parameter.
|
QueryUpdate.Builder |
parameterBlob(byte[] bytes)
Appends a parameter to the parameter list for the query for a CLOB
parameter and handles null appropriately.
|
QueryUpdate.Builder |
parameterClob(String value)
Appends a parameter to the parameter list for the query for a CLOB
parameter and handles null appropriately.
|
rx.Observable.Operator<rx.Observable<Integer>,rx.Observable<Object>> |
parameterListOperator()
Returns an
Observable.Operator to allow the query to be run once per
parameter list in the source. |
rx.Observable.Operator<Integer,Object> |
parameterOperator()
Returns an
Observable.Operator to allow the query to be pushed
parameters via the Observable.lift(Operator) method. |
QueryUpdate.Builder |
parameters(Object... objects)
Appends the given parameter values to the parameter list for the
query.
|
<T> QueryUpdate.Builder |
parameters(rx.Observable<T> parameters)
Appends the given parameters to the parameter list for the query.
|
QueryUpdate.ReturnGeneratedKeysBuilder |
returnGeneratedKeys()
Returns a builder used to specify how to process the generated keys
ResultSet . |
public <T> QueryUpdate.Builder parameters(rx.Observable<T> parameters)
parameters
- public QueryUpdate.Builder parameters(Object... objects)
objects
- public QueryUpdate.Builder parameter(Object value)
value
- public QueryUpdate.Builder parameter(String name, Object value)
NullPointerException
. If value is instance of Observable then
throws an IllegalArgumentException
.name
- the parameter name. Cannot be null.value
- the parameter valuepublic QueryUpdate.Builder parameterClob(String value)
value
- the string to insert in the CLOB columnpublic QueryUpdate.Builder parameterBlob(byte[] bytes)
value
- public QueryUpdate.Builder dependsOn(rx.Observable<?> dependency)
dependency
- public QueryUpdate.Builder dependsOnLastTransaction()
true
for commit or false
for rollback) to
the dependencies that have to complete their emitting before the
query is executed.public QueryUpdate.ReturnGeneratedKeysBuilder returnGeneratedKeys()
ResultSet
. Not all jdbc drivers support this functionality
and some have limitations in their support (h2 for instance only
returns the last generated key when multiple inserts happen in the
one statement).public rx.Observable<Integer> count()
Observable
with the count of rows affected by the
update statement.public rx.Observable.Operator<Integer,Object> parameterOperator()
Observable.Operator
to allow the query to be pushed
parameters via the Observable.lift(Operator)
method.public rx.Observable.Operator<Integer,Object> dependsOnOperator()
Observable.Operator
to allow the query to be pushed
dependencies via the Observable.lift(Operator)
method.public rx.Observable.Operator<rx.Observable<Integer>,rx.Observable<Object>> parameterListOperator()
Observable.Operator
to allow the query to be run once per
parameter list in the source.public QueryUpdate.Builder clearParameters()
Copyright © 2014–2015. All rights reserved.