Jonathan
Explore posts from serversPPrisma
•Created by Jonathan on 6/24/2024 in #help-and-questions
Ensuring Filtering if variable is undefined
I have an application that is a multi-tenant app where we always filter by
Basically I am curious if there is ways to guarantee that no filter leaks because of a value being undefined.
TenantId
, so for example we do queries like this:
While obviously I need to check the tenantId
but from a general question, when a a variable sometimes is undefined, it completely ignores that part of query. Some of this is just the nature of how JS objects are built.
But I am curious if there is a way to guarantee that the where statement never ignores a variable. I think this is where most query builder alternatives handle by passing variables into a method.Basically I am curious if there is ways to guarantee that no filter leaks because of a value being undefined.
6 replies
PPrisma
•Created by Jonathan on 6/12/2024 in #help-and-questions
Connection Pooling issues with Azure SQL
I continue to see issues in our error logs in production with prisma using Azure SQL:
The connection string looks like this:
This is in a nextjs app that we are using it.
8 replies