Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@prisma-next/adapter-mongo

Package Overview
Dependencies
Maintainers
3
Versions
316
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@prisma-next/adapter-mongo

MongoDB adapter for Prisma Next (lowers commands to wire format)

latest
Source
npmnpm
Version
0.12.0
Version published
Weekly downloads
3.9K
-33.99%
Maintainers
3
Weekly downloads
 
Created
Source

@prisma-next/adapter-mongo

MongoDB adapter for Prisma Next. Lowers abstract MongoDB commands into wire-protocol documents.

Responsibilities

  • Command lowering: MongoAdapter.lower(plan) converts a MongoCommand (find, aggregate, …) into a wire-protocol document. The method is async so it can await codec encode work on parameter values; the runtime (MongoRuntime.execute) awaits adapter.lower(plan) before issuing the command to the driver.
  • Codec application on encode: resolveValue walks parameter trees and dispatches codec-encoded leaves concurrently via Promise.all. The codec's encode is awaited (whether the codec body is sync or async), and the resolved wire value is placed into the lowered document.

Mongo does not currently decode rows — documents pass through from the driver directly — so this adapter has no decode-side codec application today. See ADR 204 — Single-Path Async Codec Runtime for the codec runtime's async boundary contract.

Dependencies

  • Depends on:
    • @prisma-next/mongo-core (command types, codec types)

FAQs

Package last updated on 02 Jun 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts