com.github.davidmoten.rx.jdbc.QueryUpdateTransformerFromObservable Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rxjava-jdbc Show documentation
Show all versions of rxjava-jdbc Show documentation
rx-java Observables for jdbc
package com.github.davidmoten.rx.jdbc;
import com.github.davidmoten.rx.jdbc.QueryUpdate.Builder;
import rx.Observable;
import rx.Observable.Transformer;
import rx.functions.Func1;
/**
* {@link Transformer} corresonding to {@link QueryUpdateOperation}.
*/
class QueryUpdateTransformerFromObservable
implements Transformer, Observable> {
private final Builder builder;
/**
* Constructor.
*
* @param builder
* @param operatorType
*/
QueryUpdateTransformerFromObservable(final QueryUpdate.Builder builder) {
this.builder = builder;
}
@Override
public Observable> call(Observable> observable) {
return observable.map(new Func1, Observable>() {
@Override
public Observable call(Observable parameters) {
return builder.clearParameters().parameters(parameters).count();
}
});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy