import { MachineData , Post , PrismaClient , User } from '@prisma/client' ; async function main ( ) { const p1 = new PrismaClient ( { rejectOnNotFound : true , } ) ; const r1p1 = await p1 . user . findFirst ( ) ; const r2p1 = await p1 . user . findFirst ( { rejectOnNotFound : true , } ) ; const r3p1 = await p1 . user . findFirst ( { rejectOnNotFound : false , } ) ; const r4p1 = await p1 . user . findFirst ( { rejectOnNotFound : ( ) => new Error ( 'Error' ) , } ) ; const r5p1 = await p1 . user . findUnique ( { where : { id : '' } , rejectOnNotFound : ( ) => new Error ( 'Error' ) , } ) ; const p2 = new PrismaClient ( { rejectOnNotFound : { findFirst : true , findUnique : true , } , } ) ; const r1p2 = await p2 . user . findFirst ( ) ; const r2p2 = await p2 . post . findFirst ( ) ; const r3p2 = await p2 . post . findUnique ( { where : { id : '' } } ) ; const r4p2 = await p2 . user . findUnique ( { where : { id : '' } } ) ; const r5p2 = await p2 . post . findUnique ( { where : { id : '' } , rejectOnNotFound : false , } ) ; const r6p2 = await p2 . user . findUnique ( { where : { id : '' } , rejectOnNotFound : false , } ) ; const p3 = new PrismaClient ( { rejectOnNotFound : { findFirst : { User : true , Post : ( ) => new Error ( ) , } , findUnique : { User : true , Post : false , } , } , } ) ; const r1p3 = await p3 . user . findFirst ( ) ; const r2p3 = await p3 . post . findUnique ( { where : { id : '' } } ) ; const p4 = new PrismaClient ( { rejectOnNotFound : { findUnique : ( ) => new Error ( 'Error' ) , findFirst : true , } , } ) ; const r1p4 = await p3 . user . findUnique ( { where : { id : '' } } ) ; const r2p4 = await p3 . user . findFirst ( { rejectOnNotFound : true , } ) ; const p5 = new PrismaClient ( { rejectOnNotFound : { findUnique : { User : false , MachineData : ( ) => new Error ( 'Error' ) , Post : false , } , findFirst : false , } , } ) ; const r1p5 = await p5 . user . findUnique ( { where : { id : 'anything' } , } ) ; const r2p5 = await p5 . machineData . findUnique ( { where : { id : 'anything' } , rejectOnNotFound : true , } ) ; const r3p5 = await p5 . post . findUnique ( { where : { id : 'anything' } , rejectOnNotFound : ( ) => new Error ( 'FindUnique Custom Error' ) , } ) ; const r4p5 = await p5 . user . findUnique ( { where : { id : 'anything' } , rejectOnNotFound : ( ) => new Error ( 'FindUnique Custom Error' ) , } ) ; const r5p5 = await p5 . user . findUnique ( { where : { id : 'anything' } , rejectOnNotFound : false , } ) ; const r6p5 = await p5 . user . findFirst ( { where : { id : 'anything' } , } ) ; const r7p5 = await p5 . user . findFirst ( { where : { id : 'anything' } , rejectOnNotFound : true , } ) ; const r8p5 = await p5 . user . findFirst ( { where : { id : 'anything' } , rejectOnNotFound : ( ) => new Error ( 'FindUnique Custom Error' ) , } ) ; const r9p5 = await p5 . user . findFirst ( { where : { id : 'anything' } , rejectOnNotFound : false , } ) ; } main ( ) . catch ( ( e ) => { console . error ( e ) ; } ) ;