Skip to content
GitLab
Explore
Sign in
Register
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
Merge requests
!368
New tests
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
New tests
mt-new-tests
into
develop
Overview
0
Commits
10
Pipelines
0
Changes
9
Merged
Mariusz Trela
requested to merge
mt-new-tests
into
develop
4 years ago
Overview
0
Commits
10
Pipelines
0
Changes
8
Expand
0
0
Merge request reports
Compare
version 5
version 8
df32c0bb
4 years ago
version 7
82778047
4 years ago
version 6
039f75f7
4 years ago
version 5
87b418ed
4 years ago
version 4
cda1a819
4 years ago
version 3
aca7a645
4 years ago
version 2
efc6af50
4 years ago
version 1
0caf2448
4 years ago
develop (base)
and
version 6
latest version
c50a6aa5
10 commits,
4 years ago
version 8
df32c0bb
9 commits,
4 years ago
version 7
82778047
8 commits,
4 years ago
version 6
039f75f7
5 commits,
4 years ago
version 5
87b418ed
4 commits,
4 years ago
version 4
cda1a819
3 commits,
4 years ago
version 3
aca7a645
2 commits,
4 years ago
version 2
efc6af50
1 commit,
4 years ago
version 1
0caf2448
1 commit,
4 years ago
Show latest version
8 files
+
20
−
92
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
8
Search (e.g. *.vue) (Ctrl+P)
hive/db/sql_scripts/bridge_get_account_posts_by_replies.sql
+
13
−
3
Options
DROP
FUNCTION
IF
EXISTS
bridge_get_account_posts_by_replies
;
CREATE
FUNCTION
bridge_get_account_posts_by_replies
(
in
_account
VARCHAR
,
in
_author
VARCHAR
,
in
_permlink
VARCHAR
,
in
_limit
SMALLINT
)
CREATE
FUNCTION
bridge_get_account_posts_by_replies
(
in
_account
VARCHAR
,
in
_author
VARCHAR
,
in
_permlink
VARCHAR
,
in
_limit
SMALLINT
,
in
_bridge_api
BOOLEAN
)
RETURNS
SETOF
bridge_api_post
AS
$
function
$
@@ -8,8 +8,18 @@ DECLARE
__account_id
INT
;
__post_id
INT
;
BEGIN
__account_id
=
find_account_id
(
_account
,
True
);
__post_id
=
find_comment_id
(
_author
,
_permlink
,
True
);
IF
NOT
_bridge_api
AND
_permlink
<>
''
THEN
-- find blogger account using parent author of page defining post
__post_id
=
find_comment_id
(
_author
,
_permlink
,
True
);
SELECT
pp
.
author_id
INTO
__account_id
FROM
hive_posts
hp
JOIN
hive_posts
pp
ON
hp
.
parent_id
=
pp
.
id
WHERE
hp
.
id
=
__post_id
;
IF
__account_id
=
0
THEN
__account_id
=
NULL
;
END
IF
;
ELSE
__account_id
=
find_account_id
(
_account
,
True
);
__post_id
=
find_comment_id
(
_author
,
_permlink
,
True
);
END
IF
;
RETURN
QUERY
SELECT
hp
.
id
,
hp
.
author
,
Loading