# @incresco/mongodb-core

> A high-performance MongoDB driver core for Nest.js, providing essential connectivity and functionality to optimize your database interactions.

Latest version **1.0.36** (published 2023-12-06) · ISC license · 0 weekly downloads

## Install

```sh
npm install @incresco/mongodb-core
pnpm add @incresco/mongodb-core
yarn add @incresco/mongodb-core
bun add @incresco/mongodb-core
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.36 |
| Published | 2023-12-06 |
| First published | 2023-08-24 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 44.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | incresco |
| Maintainers | srinivas_narayanam2002, yokesh_ks, incresco.admin |

## Links

- npm: https://www.npmjs.com/package/@incresco/mongodb-core
- npm.io page: https://npm.io/package/@incresco/mongodb-core

## Dependencies (4)

- [typescript](https://npm.io/package/typescript.md) ^5.0.0
- [@types/graphql](https://npm.io/package/@types/graphql.md) ^14.5.0
- [@nestjs/graphql](https://npm.io/package/@nestjs/graphql.md) ^12.0.8
- [@types/mongoose](https://npm.io/package/@types/mongoose.md) ^5.11.97

## Recent versions

- 1.0.36 (latest) — 2023-12-06
- 1.0.35 — 2023-11-29
- 1.0.34 — 2023-11-22
- 1.0.33 — 2023-11-16
- 1.0.32 — 2023-09-24
- 1.0.31 — 2023-09-23
- 1.0.30 — 2023-09-09
- 1.0.29 — 2023-09-09
- 1.0.28 — 2023-09-08
- 1.0.27 — 2023-09-08
- 1.0.26 — 2023-09-08
- 1.0.25 — 2023-09-08
- 1.0.24 — 2023-09-08
- 1.0.22 — 2023-09-04
- 1.0.21 — 2023-08-30
- … 19 more at https://npm.io/package/@incresco/mongodb-core/versions

## README

# MongoDB-core Library

The **MongoDB-core** library is a powerful and flexible utility for interacting with MongoDB databases, designed to streamline and simplify common database operations. Whether you're building a small application or a complex system, this library provides essential functions to manage your data effectively.

## Features

- **Create**: Easily create and insert new documents into your MongoDB collections.
- **findById**: Retrieve documents by their unique identifier.
- **findByIds**: Fetch a batch of documents using a list of IDs.
- **findOne**: Quickly find a single document based on specified criteria.
- **findAll**: Retrieve all documents that match a given set of conditions.
- **update**: Seamlessly update documents with new information or modifications.
- **softDelete**: Perform soft delete operations, allowing you to retain data while marking it as deleted.
- **session**: Manage transactions and operations within a session to maintain data integrity.

## Installation

1. Install the dependencies:
   ```bash
   yarn 

## Usage

To integrate the **MongoDB-core** library into your project, follow these steps:

1. Install the library using a package manager of your choice:
   ```bash
   npm install @incresco/mongodb-core
2. import the BaseService in your project:
   ```bash
   import { BaseService } from '@incresco/mongodb-core';
## Deployment

Before deploying and publishing your package, remember to increment the version number each time you make changes to the package. This ensures that users can identify and access the latest version of your library.

Follow these steps to deploy your changes and publish the package:

1. Install dependencies and build the project:
   ```bash
   yarn
2. Log in to your npm account:
   ```bash
   npm login
3. Increment the version number in the package.json file based on your changes.
4. Publish the package to npm:
   ```bash
   npm publish
By increasing the version number and publishing the package, you're providing users with the most up-to-date features and improvements. Remember that semantic versioning (SemVer) principles can guide you in determining how to update the version number (e.g., major, minor, patch) based on the nature of the changes made.|
## Contribution
Contributions to the MongoDB-core library are welcome! If you encounter any issues or have suggestions for improvements, please feel free to submit a pull request or open an issue on the GitHub repository.

---
_Source: https://npm.io/package/@incresco/mongodb-core · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
