Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hivemind
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hive
hivemind
Commits
efc6af50
Commit
efc6af50
authored
4 years ago
by
Mariusz Trela
Committed by
Mariusz Trela
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
New tests + fix in `condenser_get_by_replies_to_account` SQL method
parent
13868a13
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!456
Release candidate v1 24
,
!368
New tests
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
hive/db/sql_scripts/condenser_get_by_replies_to_account.sql
+16
-16
16 additions, 16 deletions
hive/db/sql_scripts/condenser_get_by_replies_to_account.sql
tests/tests_api
+1
-1
1 addition, 1 deletion
tests/tests_api
with
17 additions
and
17 deletions
hive/db/sql_scripts/condenser_get_by_replies_to_account.sql
+
16
−
16
View file @
efc6af50
...
...
@@ -10,20 +10,27 @@ AS
$
function
$
DECLARE
__post_id
INTEGER
:
=
0
;
__parent_author_id
INTEGER
:
=
0
;
BEGIN
IF
_permlink
<>
''
THEN
__post_id
=
find_comment_id
(
_author
,
_permlink
,
True
);
SELECT
ha_pp
.
name
,
hp
.
id
pp
.
author_
id
INTO
_author
,
__post
_id
__parent_author
_id
FROM
hive_posts
hp
JOIN
hive_posts
pp
ON
hp
.
parent_id
=
pp
.
id
JOIN
hive_accounts
ha_pp
ON
ha_pp
.
id
=
pp
.
author_id
JOIN
hive_permlink_data
hpd_pp
ON
hpd_pp
.
id
=
pp
.
permlink_id
JOIN
hive_accounts
ha
ON
hp
.
author_id
=
ha
.
id
WHERE
hpd_pp
.
permlink
=
_permlink
AND
ha
.
name
=
_author
;
WHERE
hp
.
id
=
__post_id
;
ELSE
SELECT
id
INTO
__parent_author_id
FROM
hive_accounts
WHERE
name
=
_author
;
END
IF
;
RETURN
QUERY
SELECT
...
...
@@ -64,15 +71,8 @@ BEGIN
hp
.
is_pinned
,
hp
.
curator_payout_value
FROM
hive_posts_view
hp
JOIN
(
SELECT
hp
.
id
FROM
hive_posts_view
hp
WHERE
hp
.
author
=
_author
ORDER
BY
hp
.
id
DESC
LIMIT
_limit
)
T
ON
hp
.
parent_id
=
T
.
id
WHERE
(
(
__post_id
=
0
)
OR
(
hp
.
id
<=
__post_id
)
)
JOIN
hive_posts
pp
ON
hp
.
parent_id
=
pp
.
id
WHERE
pp
.
author_id
=
__parent_author_id
AND
(
(
__post_id
=
0
)
OR
(
hp
.
id
<=
__post_id
)
)
ORDER
BY
hp
.
id
DESC
LIMIT
_limit
;
...
...
This diff is collapsed.
Click to expand it.
tests_api
@
fba171b0
Compare
640732ad
...
fba171b0
Subproject commit
640732ad7ed82afe9da93183e62b71f7f67b2bd9
Subproject commit
fba171b01622cae77e8b6d9f7f5be3c14f920924
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment