Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

* cleanTables now uses truncate instead of deleteMany #150

Closed
wants to merge 5 commits into from

Conversation

Dosexe
Copy link
Collaborator

@Dosexe Dosexe commented May 21, 2024

Changes

Please describe

Checklist

  • Apply one of following labels; major, minor, patch or skip-release
  • I've updated the documentation, or no changes were necessary
  • I've updated the tests, or no changes were necessary


for (const delegate of delegates) {
await delegate.deleteMany()
async cleanTables(prisma: PrismaClient) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isn't it better to only clear the necessary subset of given tables, from perf perspective?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, overoptimized the code

Copy link
Collaborator Author

@Dosexe Dosexe May 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now it looks to me, that we can simply expose one function without a class:) Unless we want to enclose the schema

@Dosexe Dosexe closed this Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants