Skip to content

@xtandard/kit/storage/mongodb/internals

@xtandard/kit/storage/mongodb/internals — semi-public building blocks of the MongoDB driver (ADR 0004): the lazy connection, the duplicate-key check and the KV operations over a collection. Covered by the versioning policy like any export; changes are a MINOR bump.

import { … } from "@xtandard/kit/storage/mongodb/internals";
Name Summary
isDuplicateKey True for a MongoDB duplicate-key error (E11000). Semi-public.
mongoConnection Build a MongoConnection from a borrowed client or a url.
mongoKvStorage The KV operations over a collection (semi-public, ADR 0004): collection resolves it before every operation. createMongoStorage is this plus mongoConnection.
Name Summary
KvDocument One key/value document.
MongoConnection A lazily connected Mongo database handle (semi-public, ADR 0004).