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
Commits
c2cdd241
Commit
c2cdd241
authored
4 years ago
by
Jason Salyers
Browse files
Options
Downloads
Patches
Plain Diff
[JES] Fix a broken query
parent
d3d5f951
No related branches found
No related tags found
2 merge requests
!456
Release candidate v1 24
,
!370
Jsalyers muting at sql level
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
hive/db/sql_scripts/bridge_get_ranked_post_for_observer_communities.sql
+3
-3
3 additions, 3 deletions
...ripts/bridge_get_ranked_post_for_observer_communities.sql
with
3 additions
and
3 deletions
hive/db/sql_scripts/bridge_get_ranked_post_for_observer_communities.sql
+
3
−
3
View file @
c2cdd241
...
@@ -45,7 +45,8 @@ BEGIN
...
@@ -45,7 +45,8 @@ BEGIN
hp
.
community_title
,
hp
.
community_title
,
hp
.
role_id
,
hp
.
role_id
,
hp
.
is_pinned
,
hp
.
is_pinned
,
hp
.
curator_payout_value
hp
.
curator_payout_value
,
hp
.
is_muted
FROM
FROM
hive_posts_view
hp
hive_posts_view
hp
JOIN
hive_subscriptions
hs
ON
hp
.
community_id
=
hs
.
community_id
JOIN
hive_subscriptions
hs
ON
hp
.
community_id
=
hs
.
community_id
...
@@ -394,12 +395,11 @@ BEGIN
...
@@ -394,12 +395,11 @@ BEGIN
WHERE
WHERE
ha
.
name
=
_observer
AND
hp1
.
counter_deleted
=
0
AND
NOT
hp1
.
is_paidout
AND
hp1
.
depth
=
0
ha
.
name
=
_observer
AND
hp1
.
counter_deleted
=
0
AND
NOT
hp1
.
is_paidout
AND
hp1
.
depth
=
0
AND
(
__post_id
=
0
OR
hp1
.
sc_trend
<
__trending_limit
OR
(
hp1
.
sc_trend
=
__trending_limit
AND
hp1
.
id
<
__post_id
)
)
AND
(
__post_id
=
0
OR
hp1
.
sc_trend
<
__trending_limit
OR
(
hp1
.
sc_trend
=
__trending_limit
AND
hp1
.
id
<
__post_id
)
)
AND
hp
.
author
NOT
IN
(
SELECT
muted
FROM
muted_accounts_view
WHERE
observer
=
_observer
)
ORDER
BY
hp1
.
sc_trend
DESC
,
hp1
.
id
DESC
ORDER
BY
hp1
.
sc_trend
DESC
,
hp1
.
id
DESC
LIMIT
_limit
LIMIT
_limit
)
trending
)
trending
JOIN
hive_posts_view
hp
ON
trending
.
id
=
hp
.
id
JOIN
hive_posts_view
hp
ON
trending
.
id
=
hp
.
id
WHERE
hp
.
author
NOT
IN
(
SELECT
muted
FROM
muted_accounts_view
WHERE
observer
=
_observer
)
ORDER
BY
trending
.
sc_trend
DESC
,
trending
.
id
DESC
ORDER
BY
trending
.
sc_trend
DESC
,
trending
.
id
DESC
LIMIT
_limit
;
LIMIT
_limit
;
END
END
...
...
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