npm.io
3.0.2 • Published 2d ago

@x12i/memorix-mongo

Licence
exellix-license
Version
3.0.2
Deps
1
Size
147 kB
Vulns
0
Weekly
0

@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

npm install @x12i/memorix-mongo@3.0.2
Audience Use this package?
Remote app No
Platform internals Rarely — prefer higher-level packages

API

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

npm test