Turbo
CCConvex Community
•Created by Turbo on 3/15/2023 in #general
Complex Filtering
👌 Got it done in the end
Thanks so much for the help!!
12 replies
CCConvex Community
•Created by Turbo on 3/15/2023 in #general
Complex Filtering
ah, i was confused by your first reply to that
I was thinking there was a way to do that within
filter()
and dug through the api docs for a good minute 😄12 replies
CCConvex Community
•Created by Turbo on 3/15/2023 in #general
Complex Filtering
indexes are the next optimization after that. It sounds like an index on the posts table by map would be useful here, since you want to grab all the posts of a given map valueI did read up on indexing, and it did sound interesting. I'll go through it once more and try to put it to use ✨
for the second part, there are ways to data model this - but you could wait to get into this until you have thousands of posts with the same map value to do it, because doing this in memory as you already are sure is convenientOh, i see. i think i'll need more time working with backend to get into it then 😅 This is only the second time i'm even doing anything database related
12 replies
CCConvex Community
•Created by Turbo on 3/15/2023 in #general
Complex Filtering
it's ok not to do this the most efficient way for now, Convex being relational helps make it easy to change data access patterns later👍 got it!
for doing a condition inside the filter it would help to see code, that's a reasonable thing to do!About this, i still don't understand how i would make it filter the query, only if my map arg is not
""
or "All"
should i do it like so?
I'll test it now anyway, but i just want your input on if this a "proper" way to do it12 replies
CCConvex Community
•Created by Turbo on 3/15/2023 in #general
Complex Filtering
i'm not the most well versed with backend, so forgive me if what i've explained is not clear enough 😅
12 replies
CCConvex Community
•Created by Turbo on 3/15/2023 in #general
Complex Filtering
I was planning to do an if condition inside the
db.query().filter()
but that didn't seem to work12 replies
CCConvex Community
•Created by Turbo on 3/8/2023 in #general
useQuery types are `never`
thanks!
11 replies
CCConvex Community
•Created by Turbo on 3/8/2023 in #general
useQuery types are `never`
i didn't even restart my workspace or anything-
11 replies
CCConvex Community
•Created by Turbo on 3/8/2023 in #general
useQuery types are `never`
useQuery works fine now?
11 replies
CCConvex Community
•Created by Turbo on 3/8/2023 in #general
useQuery types are `never`
it fixed itself
11 replies
CCConvex Community
•Created by Turbo on 3/8/2023 in #general
useQuery types are `never`
hol up
11 replies
CCConvex Community
•Created by Turbo on 3/8/2023 in #general
useQuery types are `never`
lemme try that import
also, the convex function works just right when i use the generic one, so i doubt it could be the convex function
11 replies