PrismaP
Prisma13mo ago
10 replies
smykes24

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.
Gist
programatic where clause? GitHub Gist: instantly share code, notes, and snippets.
programatic where clause?
Was this page helpful?