@chubbyts/chubbyts-mongodb

1.4.0 • Public • Published

chubbyts-mongodb

CI Coverage Status Infection MSI npm-version

bugs code_smells coverage duplicated_lines_density ncloc sqale_rating alert_status reliability_rating security_rating sqale_index vulnerabilities

Description

Mongodb helper(s).

Requirements

Installation

Through NPM as @chubbyts/chubbyts-mongodb.

npm i @chubbyts/chubbyts-mongodb@^1.4.0

Usage

upsertIndexes

const mongoClient = await MongoClient.connect('mongodb://localhost');
await upsertIndexes(mongoClient, {
  pet: [
    {
      key: { id: 1 },
      name: 'pet.id',
      unique: true,
    },
    {
      key: { name: 1 },
      name: 'pet.name',
    },
  ]
});

Copyright

2023 Dominik Zogg

Readme

Keywords

Package Sidebar

Install

npm i @chubbyts/chubbyts-mongodb

Weekly Downloads

82

Version

1.4.0

License

MIT

Unpacked Size

8.08 kB

Total Files

6

Last publish

Collaborators

  • dominikzogg