prisma-driver-adapter-implementation

Installation
Summary

Complete reference for implementing Prisma v7 driver adapters with transaction lifecycle, error mapping, and type conversion details.

  • Covers four required interfaces: SqlDriverAdapter, Transaction, SqlMigrationAwareDriverAdapterFactory, and SqlQueryable, with full method signatures and lifecycle requirements
  • Transaction commit() and rollback() are lifecycle hooks only; Prisma sends SQL via executeRaw, not these methods
  • Includes argument mapping (string→int/bigint/float, base64→bytes) and row mapping (bigint→string, Date→ISO, JSON→string) with column type inference fallbacks
  • Provides database-specific guidance for SQLite, PostgreSQL, and MySQL, plus error conversion patterns for constraint violations and driver-native exceptions
  • Contains implementation templates, testing strategies (unit and E2E), and a pre-launch verification checklist
SKILL.md

Prisma 7 Driver Adapter Implementation Guide

This skill provides everything needed to implement a Prisma ORM v7 driver adapter for any database.

Architecture Overview

┌─────────────────────────────────────────────────────────────────┐
│                         PrismaClient                            │
│                    (requires adapter factory)                   │
└─────────────────────────────────────────────────────────────────┘
┌─────────────────────────────────────────────────────────────────┐
│            SqlMigrationAwareDriverAdapterFactory                │
│   ┌─────────────────────┐    ┌─────────────────────────────┐    │
│   │ connect()           │    │ connectToShadowDb()         │    │
│   │ → SqlDriverAdapter  │    │ → SqlDriverAdapter          │    │
│   └─────────────────────┘    └─────────────────────────────┘    │
Related skills

More from prisma/skills

Installs
2.9K
Repository
prisma/skills
GitHub Stars
36
First Seen
Feb 23, 2026