danfascia
DTDrizzle Team
•Created by danfascia on 5/22/2024 in #help
Help with conditional parameters in a .where () statement please
I've got URL searchParams for category, difficulty and not (which is a record to exclude). The parameters are optional and are used as filters in my question bank app.
I'm struggling to build a drizzle query that conditionally supports the presence of these parameters and I wonder if someone can help.
This is what I have that doesn't work. Note thanks to @Mykhailo for the bit
4 replies
DTDrizzle Team
•Created by danfascia on 5/21/2024 in #help
Selecting a random record (libSQL SQLite)
I have a table of questions and I would like to select a single random record to create a quiz.
In raw SQL I would use
I have no idea how to model this into a drizzle query as there only seem to be asc and desc methods on orderBy - I am using libSQL
Thanks
4 replies