G$Row
Explore posts from serversDTDrizzle Team
•Created by G$Row on 7/23/2024 in #help
I'm getting a Postgres Error when running my drizzle query but not when running the generated sql
I have a drizzle query.
Which generates this query
When I run my js code I get the error
PostgresError: column "calendar_event.start_time_utc" must appear in the GROUP BY clause or be used in an aggregate function
but when I just run the query in Dbeaver it runs just fine. I'm very confused. I'm not sure if I made a mistake or if this is a bug. Seems like a bug though.4 replies
How to get data type from onMutate function in useMutation
I'm doing optimistic updates using the technique which is documented here https://tanstack.com/query/latest/docs/framework/react/guides/optimistic-updates . I found that I'm using the same queries in multiple spots and want to extract the update code so that I don't have to copy and paste. I can't figure out the type of the
data
parameter in the onMutate function.
I've tried using type MutateData = Parameters<typeof api.task.createTask.useMutation>[0]
. The problem is that I can't then access the ['onMutate'] because it doesn't exist on there. Does anyone know how to get this?30 replies
DTDrizzle Team
•Created by G$Row on 4/18/2024 in #help
How to use subquery in inArray?
I'm trying to use a subquery to populate an IN statement. There is no typescript error but it doesn't work.
Here's my code.
Here's the executed sql
Notice the third parameter being just
{}
.1 replies
DTDrizzle Team
•Created by G$Row on 11/8/2023 in #help
Getting "never" type from querying a relation
5 replies