Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

quarkus-mongodb-client ReactiveMongoCollection expose the Updates with Aggregation Pipeline method #38114

Closed
kuoche1712003 opened this issue Jan 10, 2024 · 7 comments · Fixed by #38124
Labels
area/mongodb kind/enhancement New feature or request
Milestone

Comments

@kuoche1712003
Copy link

Description

I want to use the mongo client with the findOneAndUpdate method.

I have observed that the quarkus-mongodb-client ReactiveMongoCollection currently does not expose the method.

I've noticed that none of the methods related to updates in the quarkus-mongo-client ReactiveMongoCollection include the Updates with Aggregation Pipeline functionality.

Implementation ideas

The ReactiveMongoCollection interface adds methods related to Updates with Aggregation Pipeline and implements them.

...

    Uni<T> findOneAndUpdate(Bson filter, List<? extends Bson> update);
    
    Uni<T> findOneAndUpdate(Bson filter, List<? extends Bson> update, FindOneAndUpdateOptions options);

    Uni<T> findOneAndUpdate(ClientSession clientSession, Bson filter, List<? extends Bson> update);

    Uni<T> findOneAndUpdate(ClientSession clientSession, Bson filter, List<? extends Bson> update,
                                           FindOneAndUpdateOptions options);
...                                           
@kuoche1712003 kuoche1712003 added the kind/enhancement New feature or request label Jan 10, 2024
Copy link

quarkus-bot bot commented Jan 10, 2024

/cc @loicmathieu (mongodb)

loicmathieu added a commit to loicmathieu/quarkus that referenced this issue Jan 10, 2024
loicmathieu added a commit to loicmathieu/quarkus that referenced this issue Jan 10, 2024
@loicmathieu
Copy link
Contributor

This is done in #38124

@kuoche1712003
Copy link
Author

kuoche1712003 commented Jan 10, 2024

@loicmathieu Thank you for your help.

Acutal the updateOne and updateMany have same problem.

    Uni<UpdateResult> updateOne(Bson filter, List<? extends Bson> update);

    Uni<UpdateResult> updateOne(Bson filter, List<? extends Bson> update, UpdateOptions options);

    Uni<UpdateResult> updateOne(ClientSession clientSession, Bson filter, List<? extends Bson> update);

    Uni<UpdateResult> updateOne(ClientSession clientSession, Bson filter, List<? extends Bson> update, UpdateOptions options);

    Uni<UpdateResult> updateMany(Bson filter, List<? extends Bson> update);

    Uni<UpdateResult> updateMany(Bson filter, List<? extends Bson> update, UpdateOptions options);

    Uni<UpdateResult> updateMany(ClientSession clientSession, Bson filter, List<? extends Bson> update);

    Uni<UpdateResult> updateMany(ClientSession clientSession, Bson filter, List<? extends Bson> update, UpdateOptions options);

@loicmathieu
Copy link
Contributor

@kuoche1712003 which problem? DO you mean those methods are also missing?

@kuoche1712003
Copy link
Author

kuoche1712003 commented Jan 10, 2024

@loicmathieu yes, those methods are also missing
you can check missing method and not implement

@loicmathieu
Copy link
Contributor

OK, I'll add them also then

loicmathieu added a commit to loicmathieu/quarkus that referenced this issue Jan 10, 2024
@loicmathieu
Copy link
Contributor

PR updated, I check and that all methods that was added in Mongo 4.2 so we should be OK now.
Thanks for listing them.

loicmathieu added a commit to loicmathieu/quarkus that referenced this issue Jan 10, 2024
@quarkus-bot quarkus-bot bot added this to the 3.7 - main milestone Jan 10, 2024
@gsmet gsmet modified the milestones: 3.7 - main, 3.6.6 Jan 15, 2024
gsmet pushed a commit to gsmet/quarkus that referenced this issue Jan 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/mongodb kind/enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants