GabrielC
DTDrizzle Team
•Created by GabrielC on 1/4/2024 in #help
left join make the types never
Hi guys, im now sure if this is the expected behavior or not but i have this query
where the type of reminders is
so that is ok but when i add a left join all the types are never
this is the left join and now the types are
I'm not sure why is never i was expecting something like
Im doing something wrong or it is correct this way? Im using "drizzle-orm": "^0.29.2" Thanks so much in advance for the time
Im doing something wrong or it is correct this way? Im using "drizzle-orm": "^0.29.2" Thanks so much in advance for the time
11 replies
DTDrizzle Team
•Created by GabrielC on 11/26/2023 in #help
Mysql JSON_ARRAYAGG as a string instead of a json
Hi guys, how are you ?
I'm trying to use a sub query to get and array of objects but in the result i'm not sure how to get the array and dont' get a string
My query is like this
and the result that im getting is
one solution is for loop every result and do a JSON.parse but dosen't feel right
I'm not really sure what to do here
thanks for help
3 replies
DTDrizzle Team
•Created by GabrielC on 9/25/2023 in #help
How can I get a type from SelectedFields<MySqlColumn, Table>?
Hi guys sorry to bother buy I'm trying to build a Repository Pattern with Drizzle and I stuck with a type.
The interface with I came up is
This is working fine but my problem is that the type of allUsers is
and I'm trying to get something like
So i want to do something like InferSelectModel<S> but I can't and I'm not sure how to do it, any hint on how can i solve it o what documentation can i read to understand a bit more and solve it?
Thanks
18 replies
DTDrizzle Team
•Created by GabrielC on 5/4/2023 in #help
Error types with custom schema
Hi, I'm trying to do a general function to paginate my querys, but I'm having some problems with the types.
I'm trying to use the types of the library, but I'm not sure if I'm doing it right.
All my tables have the same columns, so I created a function to create the base table, and I'm trying to use it to create the pagination function,
and definitly i'm doing it wrong but I'm not shure how to do it, could you point me in the right direction? to know if it's possible to do it.
5 replies