Skip to content
Snippets Groups Projects

Various fixes to problems discovered by 1000_pairs test and more

Merged Andrzej Lisak requested to merge abw_pmaniora_find_comments_1000_pairs_and_more into develop
All threads resolved!
12 files
+ 88
58
Compare changes
  • Side-by-side
  • Inline
Files
12
  • [ABW]: [Fix] query updating hive_posts.active no longer stops update on older active (which can come from edit) - fixes second set of problems with active value in 1000_pairs test
    [Fix] delete_hive_post now properly updates active value - fixes first set of problems with it in 1000_pairs test
    [Fix] order of posts in database_api.find_comments is now defined by order requested in call parameters (1000_pairs test)
    [Fix] added escaping to find_comments values (escape_chars test)
    [Fix] unified checks in various community related calls (in some cases it means there is check where there was none)
    added find_community_id SQL function that follows other find_ routines (there is more places where it should be used, community related get_ranked_posts versions in particular)
@@ -144,12 +144,13 @@ END
$function$
;
DROP FUNCTION if exists delete_hive_post(character varying,character varying,character varying, integer)
DROP FUNCTION if exists delete_hive_post(character varying,character varying,character varying, integer, timestamp)
;
CREATE OR REPLACE FUNCTION delete_hive_post(
in _author hive_accounts.name%TYPE,
in _permlink hive_permlink_data.permlink%TYPE,
in _block_num hive_blocks.num%TYPE)
in _block_num hive_blocks.num%TYPE,
in _date hive_posts.active%TYPE)
RETURNS TABLE (id hive_posts.id%TYPE, depth hive_posts.depth%TYPE)
LANGUAGE plpgsql
AS
@@ -165,6 +166,7 @@ BEGIN
WHERE ha.name = _author AND hpd.permlink = _permlink
)
, block_num = _block_num
, active = _date
FROM hive_posts hp1
INNER JOIN hive_accounts ha ON hp1.author_id = ha.id
INNER JOIN hive_permlink_data hpd ON hp1.permlink_id = hpd.id
Loading