Skip to content
Snippets Groups Projects

Small fixes and mock data for observer tests in get_ranked_posts

Merged Andrzej Lisak requested to merge abw_get_ranked_posts_mutes into develop
14 files
+ 87
72
Compare changes
  • Side-by-side
  • Inline
Files
14
@@ -8,7 +8,7 @@ DECLARE
__observer_id INT;
BEGIN
__post_id = find_comment_id( _author, _permlink, True );
__observer_id = find_account_id(_observer, False);
__observer_id = find_account_id( _observer, True );
RETURN QUERY SELECT
hp.id,
hp.author,
@@ -76,7 +76,7 @@ DECLARE
__observer_id INT;
BEGIN
__post_id = find_comment_id( _author, _permlink, True );
__observer_id = find_account_id(_observer, False);
__observer_id = find_account_id( _observer, True );
IF __post_id <> 0 THEN
SELECT hp.sc_hot INTO __hot_limit FROM hive_posts hp WHERE hp.id = __post_id;
END IF;
@@ -220,7 +220,7 @@ DECLARE
__observer_id INT;
BEGIN
__post_id = find_comment_id( _author, _permlink, True );
__observer_id = find_account_id(_observer, False);
__observer_id = find_account_id( _observer, True );
IF __post_id <> 0 THEN
SELECT ( hp.payout + hp.pending_payout ) INTO __payout_limit FROM hive_posts hp WHERE hp.id = __post_id;
END IF;
@@ -294,7 +294,7 @@ DECLARE
__observer_id INT;
BEGIN
__post_id = find_comment_id( _author, _permlink, True );
__observer_id = find_account_id(_observer, False);
__observer_id = find_account_id( _observer, True );
IF __post_id <> 0 THEN
SELECT ( hp.payout + hp.pending_payout ) INTO __payout_limit FROM hive_posts hp WHERE hp.id = __post_id;
END IF;
@@ -369,7 +369,7 @@ DECLARE
__observer_id INT;
BEGIN
__post_id = find_comment_id( _author, _permlink, True );
__observer_id = find_account_id(_observer, False);
__observer_id = find_account_id( _observer, True );
IF __post_id <> 0 THEN
SELECT hp.promoted INTO __promoted_limit FROM hive_posts hp WHERE hp.id = __post_id;
END IF;
@@ -442,7 +442,7 @@ DECLARE
__observer_id INT;
BEGIN
__post_id = find_comment_id( _author, _permlink, True );
__observer_id = find_account_id(_observer, False);
__observer_id = find_account_id( _observer, True );
IF __post_id <> 0 THEN
SELECT hp.sc_trend INTO __trending_limit FROM hive_posts hp WHERE hp.id = __post_id;
END IF;
Loading