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

How to use $addFields aggregation #40

Closed
lenguyenthanh opened this issue Jun 23, 2024 · 4 comments · Fixed by #42
Closed

How to use $addFields aggregation #40

lenguyenthanh opened this issue Jun 23, 2024 · 4 comments · Fixed by #42

Comments

@lenguyenthanh
Copy link
Contributor

First of all, thanks for your work on this library, We started to use it in lichess.org and it's just wonderful to use.

I just wonder how to use $addFields aggregation with mongo4cats. I see that We support some similar operation like unwind, replaceWith but not addFields.

I can create Document, Bson by my own, but I couldn't find a way to create an Aggregate our of them.

So, imho, We could solve this by two ways:

  • support $addFields and some other missing aggregations out of the box
  • support a way to construct aggration from org.boson.Bson or BsonValue.

I'm willing to create a PR if you think it's a good idea?

@Kirill5k
Copy link
Owner

@lenguyenthanh, I've just did a release with your change in it. You should now be able to use it in your code (v0.7.7) 👍

@lenguyenthanh
Copy link
Contributor Author

thanks a lot @Kirill5k for your quick help ❤️, really appreciated.

We still some other missing aggregation operators. I'll continue work on those. Do prefer one pr per operator or one pr with all operators (with careful one commit per operator)?

@Kirill5k
Copy link
Owner

Either way is fine, whichever is easier for you.

If you give me names of these operator, I could help you out on this as well.

@lenguyenthanh
Copy link
Contributor Author

I created a new issue with all the missing aggregation operators: #43

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants