Faust(Thuen)
DTDrizzle Team
•Created by Faust(Thuen) on 12/15/2023 in #help
unionAll nullable typing error
I have something like this
then I do a
unionAll(blackPlayerOneEloChanges, blackPlayerTwoEloChanges
and get the following error, because blackPlayerTwo is nullable, it's optional, the question is if there is anyway I can override the type of playerid in the blackPlayerTwoEloChanges query, since I'm only selecting the ones where it is not null.
`The types of '.result' are incompatible between these types. Type '{ player_id: string | null; elo_change: number; }[]' is not assignable to type { player_id: string; elo_change: number; }[]'.`4 replies
DTDrizzle Team
•Created by Faust(Thuen) on 10/16/2023 in #help
Reuse with in multiple queries
This is what I currently do, but I would like to be able to reuse the
with
clause in multiple queries. Is there a way to do this?
I would like something like this, but when I do it this way I end up with wrong types
3 replies