You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I am currently reviewing the repo and I found this line public users = new PrismaClient().user; and similar in each class. I want to ask: when we make this instance in every class means we are creating a new connection to the database for example: postgresql. Does this make an excessive use of the database pools ? Or how does this work!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello, I am currently reviewing the repo and I found this line
public users = new PrismaClient().user;
and similar in each class. I want to ask: when we make this instance in every class means we are creating a new connection to the database for example: postgresql. Does this make an excessive use of the database pools ? Or how does this work!Beta Was this translation helpful? Give feedback.
All reactions