Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/smithg09/mongo-aggregation-builder
It is a aggregation builder for the db.collection.aggregate method and db.aggregate method. It will simplify pipelines by making them more readable and much easier to edit.
https://github.com/smithg09/mongo-aggregation-builder
aggregation mongodb
Last synced: about 1 month ago
JSON representation
It is a aggregation builder for the db.collection.aggregate method and db.aggregate method. It will simplify pipelines by making them more readable and much easier to edit.
- Host: GitHub
- URL: https://github.com/smithg09/mongo-aggregation-builder
- Owner: smithg09
- License: mit
- Created: 2022-04-26T08:19:09.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-07-31T13:13:36.000Z (over 1 year ago)
- Last Synced: 2024-10-11T19:09:06.891Z (2 months ago)
- Topics: aggregation, mongodb
- Language: TypeScript
- Homepage:
- Size: 903 KB
- Stars: 2
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# mongodb-aggregation-builder
**mongodb-aggregation-builder** is a aggregation builder for the [db.collection.aggregate](https://docs.mongodb.com/manual/reference/method/db.collection.aggregate/) method and db.aggregate method.
- Simplify aggregations by making them more readable
- Aggregations are easier to edit.
- Aggregations are testable on a dataset.
- Aggregation stages appear in an array.
- Sequential stages for documents## npm package
### `npm i -S mongodb-aggregation-builder`
## Usage:
### Using `require()`
```typescript
const AggregationBuilder = require("mongodb-aggregation-builder").AggregationBuilder;
const { EqualityPayload, OnlyPayload, Field } = require('mongodb-aggregation-builder/helpers');
const { LessThanEqual, ArrayElemAt, Equal, Expression } = require('mongodb-aggregation-builder/operators');
```### Using `import`
```typescript
import { AggregationBuilder } from 'mongodb-aggregation-builder';
import { EqualityPayload, OnlyPayload, Field } from 'mongodb-aggregation-builder/helpers';
import { LessThanEqual, ArrayElemAt, Equal, Expression } from 'mongodb-pipeline-builder/operators';
```___