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
!347
Something went wrong on our end
Refactoring + additional SQL functions
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Refactoring + additional SQL functions
mt-different-fixes
into
develop
Overview
2
Commits
4
Pipelines
0
Changes
3
Merged
Mariusz Trela
requested to merge
mt-different-fixes
into
develop
4 years ago
Overview
2
Commits
4
Pipelines
0
Changes
3
Expand
0
0
Merge request reports
Viewing commit
4faeaf8d
Prev
Next
Show latest version
3 files
+
31
−
9
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
3
Search (e.g. *.vue) (Ctrl+P)
4faeaf8d
Introduced `condenser_get_account_reputations` SQL function
· 4faeaf8d
Mariusz Trela
authored
4 years ago
hive/db/sql_scripts/condenser_get_account_reputations.sql
0 → 100644
+
28
−
0
Options
DROP
FUNCTION
IF
EXISTS
condenser_get_account_reputations
;
CREATE
OR
REPLACE
FUNCTION
condenser_get_account_reputations
(
in
_account_lower_bound
VARCHAR
,
in
_without_lower_bound
BOOLEAN
,
in
_limit
INTEGER
)
RETURNS
TABLE
(
name
hive_accounts
.
name
%
TYPE
,
reputation
hive_accounts
.
reputation
%
TYPE
)
AS
$
function
$
DECLARE
BEGIN
RETURN
QUERY
SELECT
ha
.
name
,
ha
.
reputation
FROM
hive_accounts
ha
WHERE
_without_lower_bound
OR
(
ha
.
name
>=
_account_lower_bound
)
ORDER
BY
name
LIMIT
_limit
;
END
$
function
$
language
plpgsql
STABLE
;
Loading