Socket
Book a DemoInstallSign in
Socket

ilorm-connector-mongo

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ilorm-connector-mongo

Connector to MongoDB for ilorm ORM

0.2.0
latest
npmnpm
Version published
Maintainers
1
Created
Source

Ilorm-connector-mongodb

The ilorm connector to MongoDB.

MongoQuery

An ilorm model binded with the ilorm connector mongoDB. Could use a powerful extension of the Ilorm Query : IlormMongoQuery

Aggregate

const query = UserModel.query();

query
    .firstName.is('Sam')
    .match() // Declare a match aggregator stage
    .gender.isKey()
    .age.avg('avgAge')
    .count('totalUser')
    .group()
    .run()
    
This code will be converted to the aggregate query :
[
    {
        $match: {
            firstName: 'Sam'
        }
    },
    {
        $group: {
            _id: '$gender',
            avgAge: { $avg: '$age' },
            totalUser: { $sum: 1 }
        }
    }
]




]
    

Keywords

connector

FAQs

Package last updated on 05 Feb 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.