loopback-mongo-aggregate-mixin

1.0.1 • Public • Published

loopback-mongo-aggregate-mixin

Aggregation Pipeline For MongoDB Loopback Connector

  • mixin to enable the aggregation pipeline
  • npm install loopback-mongo-aggregate-mixin --save

example

{ "aggregate": { "group": { "id": "$status", "count": { "$sum": 1 } } } }

{
  "where": {
    "name": "bob"
  },
  "aggregate": {
    "group": {
      "id": "$status",
      "count": {
        "$sum": 1
      }
    }
  },
  "sort": "date DESC",
  "limit": 5,
  "skip": 20,
  "fields": {
    "external": false
  }
}

License: MIT

Readme

Keywords

none

Package Sidebar

Install

npm i loopback-mongo-aggregate-mixin

Weekly Downloads

13

Version

1.0.1

License

MIT

Last publish

Collaborators

  • bolamn