David
David
Explore posts from servers
PPrisma
Created by David on 11/4/2024 in #help-and-questions
Argument "columnName" is missing (v5.21.1)
bump
3 replies
PPrisma
Created by bill92 on 5/22/2024 in #help-and-questions
`PrismaClientInitializationError: Prisma Client could not locate the Query Engine for runtime` error
Did you?
7 replies
PPrisma
Created by JayPe on 6/10/2024 in #help-and-questions
Multiple schema - node_modules - prisma client
Hey, we just do this in both of our schema.prisma files
output = "../../node_modules/@prisma/client-mysql"
output = "../../node_modules/@prisma/client-mysql"
8 replies
PPrisma
Created by Florian on 5/11/2024 in #help-and-questions
Extra query into object (GetPayload)
You can use const name = {} satisfies Prisma.Type if you are above TS 4.9
5 replies
PPrisma
Created by David on 5/7/2024 in #help-and-questions
Set max execution timeout
Ah very cool, will try, thanks!
7 replies
PPrisma
Created by David on 5/7/2024 in #help-and-questions
Set max execution timeout
We use MySQL unfortunately. I should have mentioned
7 replies
PPrisma
Created by Wolverine on 5/3/2024 in #help-and-questions
How to Handle Case Insensitivity?
No description
9 replies
PPrisma
Created by Wolverine on 5/3/2024 in #help-and-questions
How to Handle Case Insensitivity?
9 replies
PPrisma
Created by fotoflo on 4/19/2024 in #help-and-questions
How to get the type of a compound query?
type Comments = typeof comments but that only works if you define the type inside the function. If you want it outside its best to abstract the query to its own function.
async function getComments() {
return await prisma.statusChecks.findMany({
where: {
urlId,
httpCode: {
notIn: [200, 301, 302, 303, 307, 308],
},
},
orderBy: {
createdAt: "desc",
},
});
}

type Comments = Awaited<ReturnType<typeof getComments>>
async function getComments() {
return await prisma.statusChecks.findMany({
where: {
urlId,
httpCode: {
notIn: [200, 301, 302, 303, 307, 308],
},
},
orderBy: {
createdAt: "desc",
},
});
}

type Comments = Awaited<ReturnType<typeof getComments>>
6 replies
PPrisma
Created by TANK on 4/25/2024 in #help-and-questions
Typescript error
That is only the type for the basic entity. Better to do type Issue = typeof issue in the place where you run the query.
5 replies
PPrisma
Created by TANK on 4/25/2024 in #help-and-questions
Typescript error
Can you show how you are defining the Issue type?
5 replies
PPrisma
Created by fotoflo on 4/19/2024 in #help-and-questions
How to get the type of a compound query?
What type exactly are you looking to get? The return of both statusCheckPromise as well as commentsPromise?
6 replies
PPrisma
Created by Bean on 4/16/2024 in #help-and-questions
union type findMany
No need for an attitude towards someone that is trying to help you, my guy
14 replies
PPrisma
Created by Bean on 4/16/2024 in #help-and-questions
union type findMany
So what is the issue with passing prisma.modelName instead of "modelName"? You're making it very hard for yourself in terms of TS by wanting a string, especially since it has the same result.
14 replies
PPrisma
Created by Bean on 4/16/2024 in #help-and-questions
union type findMany
My assumption was that you want to create an abstraction over something you do often without knowing which model beforehand
14 replies
PPrisma
Created by Bean on 4/16/2024 in #help-and-questions
union type findMany
What are you ultimately trying to achieve?
14 replies
PPrisma
Created by Bean on 4/16/2024 in #help-and-questions
union type findMany
14 replies