Skip to content
Snippets Groups Projects

Draft: Refactor get_ranked_posts.sql to add a CTE to ensure posts get filtered by...

Closed Dan Notestein requested to merge speedup-ranked-posts into develop
3 unresolved threads
Files
32
@@ -30,7 +30,7 @@ BEGIN
_limit = hivemind_postgrest_utilities.valid_number(_limit, 100, 1, 100, 'limit');
RETURN(
SELECT jsonb_agg(
SELECT jsonb_agg( -- bridge_api_account_notifications
jsonb_build_object(
'id', hive_notification_cache.id,
'type', hivemind_postgrest_utilities.get_notify_type_from_id(hive_notification_cache.type_id),
@@ -93,6 +93,7 @@ BEGIN
ELSE hivemind_app.get_number_of_mentions_in_post( hnv.post_id )
END as mentions
) as hm
LIMIT _limit
) hive_notification_cache
);
END
Loading