@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>(observe(new Block<SingleResultCallback<Success>>() { @Override public void apply(final 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>(observe(new Block<SingleResultCallback<Success>>() { @Override public void apply(final SingleResultCallback<Success> callback) { wrapped.createView(clientSession, viewName, viewOn, pipeline, createViewOptions, voidToSuccessCallback(callback)); } })); }
@Override public void createView(String viewName, String viewOn, List<? extends Bson> pipeline, CreateViewOptions createViewOptions) { database.createView(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 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);