下面列出了com.mongodb.rx.client.Success#com.mongodb.client.model.CreateViewOptions 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。
@Override
public Observable<Success> createView(final String viewName, final String viewOn, final List<? extends Bson> pipeline,
final CreateViewOptions createViewOptions) {
return RxObservables.create(Observables.observe(new Block<SingleResultCallback<Success>>() {
@Override
public void apply(final SingleResultCallback<Success> callback) {
wrapped.createView(viewName, viewOn, pipeline, createViewOptions, voidToSuccessCallback(callback));
}
}), observableAdapter);
}
@Override
public Publisher<Success> createView(final String viewName, final String viewOn, final List<? extends Bson> pipeline,
final CreateViewOptions createViewOptions) {
return new ObservableToPublisher<Success>(com.mongodb.async.client.Observables.observe(
new Block<com.mongodb.async.SingleResultCallback<Success>>() {
@Override
public void apply(final com.mongodb.async.SingleResultCallback<Success> callback) {
wrapped.createView(viewName, viewOn, pipeline, createViewOptions, voidToSuccessCallback(callback));
}
}));
}
@Override
public Publisher<Success> createView(final ClientSession clientSession, final String viewName, final String viewOn,
final List<? extends Bson> pipeline, final CreateViewOptions createViewOptions) {
return new ObservableToPublisher<Success>(com.mongodb.async.client.Observables.observe(
new Block<com.mongodb.async.SingleResultCallback<Success>>() {
@Override
public void apply(final com.mongodb.async.SingleResultCallback<Success> callback) {
wrapped.createView(clientSession.getWrapped(), viewName, viewOn, pipeline, createViewOptions,
voidToSuccessCallback(callback));
}
}));
}
@Override
public Uni<Void> createView(String viewName, String viewOn, List<? extends Bson> pipeline,
CreateViewOptions createViewOptions) {
return Wrappers.toUni(database.createView(viewName, viewOn, pipeline, createViewOptions));
}
@Override
public Uni<Void> createView(ClientSession clientSession, String viewName, String viewOn,
List<? extends Bson> pipeline, CreateViewOptions createViewOptions) {
return Wrappers
.toUni(database.createView(clientSession, viewName, viewOn, pipeline, createViewOptions));
}
@Override
public Publisher<Success> createView(final String viewName, final String viewOn, final List<? extends Bson> pipeline) {
return createView(viewName, viewOn, pipeline, new CreateViewOptions());
}
@Override
public Publisher<Success> createView(final ClientSession clientSession, final String viewName, final String viewOn,
final List<? extends Bson> pipeline) {
return createView(clientSession, viewName, viewOn, pipeline, new CreateViewOptions());
}
/**
* Creates a view with the given name, backing collection/view name, aggregation pipeline, and options that
* defines the view.
*
* @param viewName the name of the view to create
* @param viewOn the backing collection/view for the view
* @param pipeline the pipeline that defines the view
* @param createViewOptions various options for creating the view
* @return a {@link Uni} emitting {@code null} when the operation has completed
*/
Uni<Void> createView(String viewName, String viewOn, List<? extends Bson> pipeline,
CreateViewOptions createViewOptions);
/**
* Creates a view with the given name, backing collection/view name, aggregation pipeline, and options that
* defines the view.
*
* @param clientSession the client session with which to associate this operation
* @param viewName the name of the view to create
* @param viewOn the backing collection/view for the view
* @param pipeline the pipeline that defines the view
* @param createViewOptions various options for creating the view
* @return a {@link Uni} emitting {@code null} when the operation has completed
*/
Uni<Void> createView(ClientSession clientSession, String viewName, String viewOn,
List<? extends Bson> pipeline,
CreateViewOptions createViewOptions);
/**
* Creates a view with the given name, backing collection/view name, aggregation pipeline, and options that defines the view.
*
* @param viewName the name of the view to create
* @param viewOn the backing collection/view for the view
* @param pipeline the pipeline that defines the view
* @param createViewOptions various options for creating the view
* @return an observable identifying when the collection view has been created
* @since 1.3
* @mongodb.server.release 3.4
* @mongodb.driver.manual reference/command/create Create Command
*/
Observable<Success> createView(String viewName, String viewOn, List<? extends Bson> pipeline, CreateViewOptions createViewOptions);
/**
* Creates a view with the given name, backing collection/view name, aggregation pipeline, and options that defines the view.
*
* @param viewName the name of the view to create
* @param viewOn the backing collection/view for the view
* @param pipeline the pipeline that defines the view
* @param createViewOptions various options for creating the view
* @return an observable identifying when the collection view has been created
* @since 1.3
* @mongodb.server.release 3.4
* @mongodb.driver.manual reference/command/create Create Command
*/
Publisher<Success> createView(String viewName, String viewOn, List<? extends Bson> pipeline, CreateViewOptions createViewOptions);
/**
* Creates a view with the given name, backing collection/view name, aggregation pipeline, and options that defines the view.
*
* @param clientSession the client session with which to associate this operation
* @param viewName the name of the view to create
* @param viewOn the backing collection/view for the view
* @param pipeline the pipeline that defines the view
* @param createViewOptions various options for creating the view
* @return an observable identifying when the collection view has been created
* @mongodb.driver.manual reference/command/create Create Command
* @mongodb.server.release 3.6
* @since 1.7
*/
Publisher<Success> createView(ClientSession clientSession, String viewName, String viewOn, List<? extends Bson> pipeline,
CreateViewOptions createViewOptions);