import { GeneratorOptions } from '@prisma/generator-helper' ; param dmmf export function generatePoolType ( options ) { const [ datasource ] = options . datasources ; if ( ! datasource ) { throw new Error ( `No defined datasource!` ) ; } switch ( datasource . connectorType ) { case 'sqlite' : { return 'getSQLitePool' ; } case 'mysql' : { return 'getMySQLPool' ; } case 'postgresql' : { return 'getPostgreSQLPool' ; } default : { throw new Error ( `Unknown datasource: ${ datasource . connectorType }` ) ; } } }