smykes
PPrisma
•Created by smykes on 12/26/2024 in #help-and-questions
Programatic where clause based off query parameters.
I'm using fastify although I doubt that matters.
Attached is pseudoish code. I am looking for a way to programmatically add to the where clause based off query parameters. If there are no query parameters, just do a select * from {table}
I have searched the documentation pretty well, and searched blog entries etc, couldn't find an answer:
Here is my code with comments in the broken where
https://gist.github.com/smykes/deeffc91002340057e107803aa9e58f8
Thank you in advance.
11 replies
PPrisma
•Created by smykes on 12/19/2024 in #help-and-questions
Strange type error in seeding file
I have a strange issue with my seeding file.
title is insisting
Type 'string | number' is not assignable to type 'string'.
but my schema and migration files clearly state title is a string. Where is this coming from? It's really strange.
11 replies