Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -212,10 +212,13 @@ In addition to the generated types, Prisma Client also provides a data access AP

```js
import { PrismaClient } from '../prisma/generated/client'
import { PrismaPg } from '@prisma/adapter-pg';
// or
// const { PrismaClient } = require('../prisma/generated/client')
// const { PrismaPg } = require('@prisma/adapter-pg')

const prisma = new PrismaClient()
const adapter = new PrismaPg({ connectionString: process.env.DATABASE_URL });
const prisma = new PrismaClient({ adapter })

// use inside an `async` function to `await` the result
await prisma.user.findUnique(...)
Expand Down