GT
GT
DTDrizzle Team
Created by GT on 12/27/2024 in #help
Exclude results with empty relation
I thought sub-queries for simple fields would be smth considered bad in some sense
13 replies
DTDrizzle Team
Created by GT on 12/27/2024 in #help
Exclude results with empty relation
I'm being verbose everywhere then
13 replies
DTDrizzle Team
Created by GT on 12/27/2024 in #help
Exclude results with empty relation
Oh, didn't knew abt that
13 replies
DTDrizzle Team
Created by GT on 12/27/2024 in #help
Exclude results with empty relation
The other code I sent seems to be in the same problem described in the link mentioned. I had to do all those sub-queries because I'm unable to reference the "root event" inside the where in the relation.
Even though I could also pretiffy it after taking another look into it and seeing your message, I'm still using the same sub-query and I'm unable to reference the "root event".
13 replies
DTDrizzle Team
Created by GT on 12/27/2024 in #help
Exclude results with empty relation
Thanks for the response, I actually did some of what y'v said or kinda tried. Also realized I didn't really gave much info abt the issue neither had explained it. - Time ternary I ended up placing in an if stmt cause even though it can be undefined, day always is defined. Not sure if using the array is the most particle way of doing it; - U were right abt the subquery, but I couldn't place it outside cause event might be undefined, so I switched to the callback version; The thing is that, even though I tried "prettifying it", I couldn't make it ignore the results where availabilities relation is empty. As mentioned earlier, by this link I came to the conclusion the way of doing it would be to add #filter(employees => employees.availabilities.lenght != 0), but by that, the returned result might be less than PAGE_SIZE sometimes, that's what I was trying to avoid and couldn't find an way using the core API - as mentioned in the link.
13 replies
DTDrizzle Team
Created by GT on 12/27/2024 in #help
Exclude results with empty relation
this one query is also pretty odd, is this the right way to do it? Seems like it should be more smth like this ( sure, the last one doesn't work as expected )
13 replies
DTDrizzle Team
Created by GT on 12/27/2024 in #help
Exclude results with empty relation
If so, which would be the ways around for "Using the core API."?
13 replies
DTDrizzle Team
Created by GT on 12/27/2024 in #help
Exclude results with empty relation
By this I must run an subquery, that's right?
13 replies
DTDrizzle Team
Created by GT on 12/27/2024 in #help
Exclude results with empty relation
( If u have any improvements to point out, I'm open to ideas tho )
13 replies
DTDrizzle Team
Created by GT on 10/22/2023 in #help
"VALUES(Column)" abstraction ( quick )
Ping on response, pls S2
2 replies