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
!370
Something went wrong on our end
Jsalyers muting at sql level
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Jsalyers muting at sql level
jsalyers-muting-at-sql-level
into
develop
Overview
9
Commits
92
Pipelines
0
Changes
2
Merged
Jason Salyers
requested to merge
jsalyers-muting-at-sql-level
into
develop
4 years ago
Overview
6
Commits
92
Pipelines
0
Changes
2
Expand
0
0
Merge request reports
Viewing commit
142a662e
Prev
Next
Show latest version
2 files
+
6
−
5
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
142a662e
[JES] Initial test of adding observer to additional bridge calls before I go changing all of them
· 142a662e
Jason Salyers
authored
4 years ago
hive/db/sql_scripts/bridge_get_ranked_post_for_all.sql
+
2
−
1
Options
DROP
FUNCTION
IF
EXISTS
bridge_get_ranked_post_by_created
;
CREATE
FUNCTION
bridge_get_ranked_post_by_created
(
in
_author
VARCHAR
,
in
_permlink
VARCHAR
,
in
_limit
SMALLINT
)
CREATE
FUNCTION
bridge_get_ranked_post_by_created
(
in
_author
VARCHAR
,
in
_permlink
VARCHAR
,
in
_limit
SMALLINT
,
in
_observer
VARCHAR
)
RETURNS
SETOF
bridge_api_post
AS
$
function
$
@@ -52,6 +52,7 @@ BEGIN
FROM
hive_posts
hp1
JOIN
hive_accounts_view
ha
ON
hp1
.
author_id
=
ha
.
id
WHERE
hp1
.
counter_deleted
=
0
AND
hp1
.
depth
=
0
AND
NOT
ha
.
is_grayed
AND
(
__post_id
=
0
OR
hp1
.
id
<
__post_id
)
AND
(
CASE
WHEN
_observer
<>
''
THEN
hp
.
aouthor
NOT
IN
(
SELECT
muted
FROM
muted_accounts_view
WHERE
observer
=
_observer
)
ELSE
True
END
)
ORDER
BY
hp1
.
id
DESC
LIMIT
_limit
)
as
created
Loading