Skip to content

Commit

Permalink
perf: improve polymorphism code generation speed
Browse files Browse the repository at this point in the history
  • Loading branch information
ymc9 committed Mar 4, 2024
1 parent 0ac596f commit 64a52dc
Show file tree
Hide file tree
Showing 7 changed files with 645 additions and 148 deletions.
4 changes: 2 additions & 2 deletions packages/schema/src/plugins/enhancer/delegate/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { PrismaSchemaGenerator } from '../../prisma/schema-generator';
import path from 'path';

export async function generate(model: Model, options: PluginOptions, project: Project, outDir: string) {
const prismaGenerator = new PrismaSchemaGenerator();
await prismaGenerator.generate(model, {
const prismaGenerator = new PrismaSchemaGenerator(model);
await prismaGenerator.generate({
provider: '@internal',
schemaPath: options.schemaPath,
output: path.join(outDir, 'delegate.prisma'),
Expand Down
Loading

0 comments on commit 64a52dc

Please sign in to comment.