Skip to content

Commit 64a52dc

Browse files
committed
perf: improve polymorphism code generation speed
1 parent 0ac596f commit 64a52dc

File tree

7 files changed

+645
-148
lines changed

7 files changed

+645
-148
lines changed

packages/schema/src/plugins/enhancer/delegate/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import { PrismaSchemaGenerator } from '../../prisma/schema-generator';
55
import path from 'path';
66

77
export async function generate(model: Model, options: PluginOptions, project: Project, outDir: string) {
8-
const prismaGenerator = new PrismaSchemaGenerator();
9-
await prismaGenerator.generate(model, {
8+
const prismaGenerator = new PrismaSchemaGenerator(model);
9+
await prismaGenerator.generate({
1010
provider: '@internal',
1111
schemaPath: options.schemaPath,
1212
output: path.join(outDir, 'delegate.prisma'),

0 commit comments

Comments
 (0)