Skip to content

How to use $addFields aggregation #40

@lenguyenthanh

Description

@lenguyenthanh

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions