From 312f4defb0704d77af173dc90bbedf3870b77d38 Mon Sep 17 00:00:00 2001 From: k00b Date: Thu, 30 Jan 2025 10:10:29 -0600 Subject: [PATCH] fix recursive limited comments call --- prisma/migrations/20250118010433_comment_pages/migration.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/prisma/migrations/20250118010433_comment_pages/migration.sql b/prisma/migrations/20250118010433_comment_pages/migration.sql index d5f52b43..5750ce78 100644 --- a/prisma/migrations/20250118010433_comment_pages/migration.sql +++ b/prisma/migrations/20250118010433_comment_pages/migration.sql @@ -85,7 +85,7 @@ BEGIN EXECUTE '' || 'SELECT COALESCE(jsonb_agg(sub), ''[]''::jsonb) AS comments ' || 'FROM ( ' - || ' SELECT "Item".*, item_comments_zaprank_with_me("Item".id, $2, $3, $4, $5, $6, $7 - 1, $8, $9) AS comments ' + || ' SELECT "Item".*, item_comments_zaprank_with_me_limited("Item".id, $2, $3, $4, $5, $6, $7 - 1, $8, $9) AS comments ' || ' FROM t_item "Item" ' || ' WHERE "Item"."parentId" = $1 ' || _order_by @@ -136,7 +136,7 @@ BEGIN EXECUTE '' || 'SELECT COALESCE(jsonb_agg(sub), ''[]''::jsonb) AS comments ' || 'FROM ( ' - || ' SELECT "Item".*, item_comments("Item".id, $2, $3, $4, $5 - 1, $6, $7) AS comments ' + || ' SELECT "Item".*, item_comments_limited("Item".id, $2, $3, $4, $5 - 1, $6, $7) AS comments ' || ' FROM t_item "Item" ' || ' WHERE "Item"."parentId" = $1 ' || _order_by