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
Merge requests
!297
get state fix
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
get state fix
mt-get_state-fix
into
develop
Overview
0
Commits
2
Pipelines
0
Changes
7
Merged
Mariusz Trela
requested to merge
mt-get_state-fix
into
develop
4 years ago
Overview
0
Commits
2
Pipelines
0
Changes
6
Expand
@bwrona
0
0
Merge request reports
Compare
version 2
version 2
c38cedc4
4 years ago
version 1
53290e19
4 years ago
develop (base)
and
latest version
latest version
fddd29e8
2 commits,
4 years ago
version 2
c38cedc4
1 commit,
4 years ago
version 1
53290e19
1 commit,
4 years ago
Show latest version
6 files
+
266
−
5
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
6
Search (e.g. *.vue) (Ctrl+P)
hive/db/sql_scripts/condenser_get_discussions_by_created.sql
+
62
−
0
Options
@@ -62,3 +62,65 @@ BEGIN
END
$
function
$
language
plpgsql
STABLE
;
DROP
FUNCTION
IF
EXISTS
condenser_get_discussions_by_created_with_empty_tag
;
CREATE
FUNCTION
condenser_get_discussions_by_created_with_empty_tag
(
in
_tag
VARCHAR
,
in
_author
VARCHAR
,
in
_permlink
VARCHAR
,
in
_limit
SMALLINT
)
RETURNS
SETOF
bridge_api_post
AS
$
function
$
DECLARE
__post_id
INT
;
__community
VARCHAR
;
__category_id
INT
;
BEGIN
__post_id
=
find_comment_id
(
_author
,
_permlink
,
True
);
__community
=
(
SELECT
substring
(
_tag
from
'^hive-'
)
);
__category_id
=
(
SELECT
id
FROM
hive_category_data
WHERE
category
=
_tag
);
RETURN
QUERY
SELECT
hp
.
id
,
hp
.
author
,
hp
.
parent_author
,
hp
.
author_rep
,
hp
.
root_title
,
hp
.
beneficiaries
,
hp
.
max_accepted_payout
,
hp
.
percent_hbd
,
hp
.
url
,
hp
.
permlink
,
hp
.
parent_permlink_or_category
,
hp
.
title
,
hp
.
body
,
hp
.
category
,
hp
.
depth
,
hp
.
promoted
,
hp
.
payout
,
hp
.
pending_payout
,
hp
.
payout_at
,
hp
.
is_paidout
,
hp
.
children
,
hp
.
votes
,
hp
.
created_at
,
hp
.
updated_at
,
hp
.
rshares
,
hp
.
abs_rshares
,
hp
.
json
,
hp
.
is_hidden
,
hp
.
is_grayed
,
hp
.
total_votes
,
hp
.
sc_trend
,
hp
.
role_title
,
hp
.
community_title
,
hp
.
role_id
,
hp
.
is_pinned
,
hp
.
curator_payout_value
FROM
hive_posts_view
hp
WHERE
(
__post_id
=
0
OR
hp
.
id
<
__post_id
)
AND
(
(
__community
IS
NULL
)
OR
(
(
__community
IS
NOT
NULL
)
AND
(
__category_id
=
0
OR
hp
.
category_id
=
__category_id
)
)
)
ORDER
BY
hp
.
id
DESC
LIMIT
_limit
;
END
$
function
$
language
plpgsql
STABLE
;
Loading