# @x12i/memorix-mongo

> Low-level Mongo client helpers for Memorix (no semantic APIs).

Latest version **3.0.2** (published 2026-07-23) · exellix-license license · 0 weekly downloads

## Install

```sh
npm install @x12i/memorix-mongo
pnpm add @x12i/memorix-mongo
yarn add @x12i/memorix-mongo
bun add @x12i/memorix-mongo
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 3.0.2 |
| Published | 2026-07-23 |
| First published | 2026-06-22 |
| Weekly downloads | 0 |
| License | exellix-license |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=20 |
| Dependencies | 1 |
| Unpacked size | 147.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | x12i |

## Links

- npm: https://www.npmjs.com/package/@x12i/memorix-mongo
- Repository: https://github.com/x12i/memorix-mono-repo
- Homepage: https://github.com/x12i/memorix-mono-repo#readme
- Issues: https://github.com/x12i/memorix-mono-repo/issues
- npm.io page: https://npm.io/package/@x12i/memorix-mongo

## Dependencies (1)

- [mongodb](https://npm.io/package/mongodb.md) ^6.21.0

## Recent versions

- 3.0.2 (latest) — 2026-07-23
- 3.0.0 (next) — 2026-07-23
- 3.0.1 — 2026-07-23
- 2.0.0 — 2026-07-23
- 1.33.0 — 2026-07-13
- 1.32.0 — 2026-07-11
- 1.5.0 — 2026-06-30
- 1.4.0 — 2026-06-26
- 1.3.0 — 2026-06-24
- 1.2.0 — 2026-06-22

## README

# `@x12i/memorix-mongo`

Low-level **Mongo client helpers** for Memorix. No domain semantics (no writers, no record laws, no routing policy).

Prefer `@x12i/memorix-data`, `@x12i/memorix-memory`, and `memorix-service` for product I/O. Use this package only when you need shared connection utilities inside the platform.

## Install

```bash
npm install @x12i/memorix-mongo@3.0.2
```

| Audience | Use this package? |
|----------|-------------------|
| Remote app | **No** |
| Platform internals | Rarely — prefer higher-level packages |

## API

```ts
import {
  getMongoClientForUri,
  resetMongoClientPool,
  type MongoClientLease,
} from "@x12i/memorix-mongo";
// same surface:
import { getMongoClientForUri } from "@x12i/memorix-mongo/low-level";
```

| Export | Role |
|--------|------|
| `getMongoClientForUri(uri)` | Pooled `MongoClient` lease for a URI |
| `resetMongoClientPool()` | Drop pooled clients (tests / shutdown) |
| `MongoClientLease` | `{ client, release }` lease handle |

Database **naming** belongs in `@x12i/memorix-db-router`. Record **mutation** belongs in `@x12i/memorix-data`.

## Docs

- [`documentation/packages/memorix-mongo.md`](../documentation/packages/memorix-mongo.md)
- Hub: [https://ebooks.memorix.x12i.com](https://ebooks.memorix.x12i.com)

```bash
npm test
```

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