or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

Files

docs

aggregation.mdauthentication-security.mdbson-types.mdchange-streams.mdcollection-operations.mdconfiguration.mdconnection-management.mddatabase-operations.mdgridfs.mdindex.mdquery-building.mdsessions-transactions.md

aggregation.mddocs/

0

# Aggregation Framework

1

2

MongoDB aggregation pipeline operations with type-safe stage builders and result processing for complex data transformations and analytics.

3

4

## Capabilities

5

6

### Aggregation Pipeline Interface

7

8

```java { .api }

9

public interface MongoCollection<TDocument> {

10

AggregateIterable<TDocument> aggregate(List<? extends Bson> pipeline);

11

<TResult> AggregateIterable<TResult> aggregate(List<? extends Bson> pipeline, Class<TResult> resultClass);

12

}

13

14

public final class Aggregates {

15

public static Bson match(Bson filter);

16

public static Bson project(Bson projection);

17

public static Bson sort(Bson sort);

18

public static Bson group(Object id, BsonField... fieldAccumulators);

19

public static Bson lookup(String from, String localField, String foreignField, String as);

20

public static Bson unwind(String fieldName);

21

public static Bson skip(int skip);

22

public static Bson limit(int limit);

23

}

24

```

25

26

*[Full aggregation pipeline documentation would follow...]*