-
Hey @Velocio, I think the new upgrade is great. I know zilch about development but all your hard work with "that stuff" is super appreciated. I think it's very slick. Cheers as always for this place.
-
Thanks. The new stuff is pretty nice, and I've got to play with some awesome SQL recently... such as this beauty:
SELECT microcosm_id ,row_number() OVER( partition BY site_id ORDER BY count DESC, microcosm_id ) AS sequence FROM ( SELECT m.site_id ,m.microcosm_id ,COALESCE( (SELECT SUM(comment_count) + SUM(item_count) FROM microcosms WHERE path <@ m.path AND is_deleted IS NOT TRUE AND is_moderated IS NOT TRUE ), 0 ) AS count FROM microcosms m GROUP BY m.site_id, m.microcosm_id ORDER BY site_id, count DESC ) AS mm
Isn't that great!
It has:
- row_number()
- OVER()
- PARTITION
- COALESCE
- An LTREE
path
And what does it do?
It figures out the order in which to show all forums on all sites by rolling up the SUM of all comments and items in all forums, across the tree, and then ordering them by that total within each site, and then numbering them 1, 2, 3... within each site.
It's fun.
- row_number()
Another not-so-subtle.
I've just done a major upgrade.
A big new addition... we now have subforums.
Lots of small additions that are subtle, like if you ignore someone and they're in a huddle with you and others and they post a new message, their message won't increment your unread huddle count.
Tons of small things.
Let me know of any problems.