Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
haf_block_explorer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
haf_block_explorer
Commits
06dfe43a
Commit
06dfe43a
authored
1 week ago
by
Michal Zander
Browse files
Options
Downloads
Patches
Plain Diff
Add missing account exception
parent
0d270eb1
No related branches found
No related tags found
1 merge request
!298
Unify API returns to sql composite types
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
backend/hafbe_exceptions.sql
+22
-11
22 additions, 11 deletions
backend/hafbe_exceptions.sql
with
22 additions
and
11 deletions
backend/hafbe_exceptions.sql
+
22
−
11
View file @
06dfe43a
...
...
@@ -6,7 +6,7 @@ CREATE OR REPLACE FUNCTION hafbe_exceptions.raise_exception(
_status
INT
,
_error_id
INT
,
_error
TEXT
,
_message
TEXT
,
_data
TEXT
=
NULL
)
RETURNS
JSON
LANGUAGE
'plpgsql'
S
TABLE
LANGUAGE
'plpgsql'
IMMU
TABLE
AS
$$
BEGIN
...
...
@@ -23,7 +23,7 @@ $$;
CREATE
OR
REPLACE
FUNCTION
hafbe_exceptions
.
raise_block_num_too_high_exception
(
_block_num
NUMERIC
,
_head_block_num
INT
)
RETURNS
JSON
LANGUAGE
'plpgsql'
S
TABLE
LANGUAGE
'plpgsql'
IMMU
TABLE
AS
$$
BEGIN
...
...
@@ -35,7 +35,7 @@ $$;
CREATE
OR
REPLACE
FUNCTION
hafbe_exceptions
.
raise_unknown_hash_exception
(
_hash
TEXT
)
RETURNS
JSON
LANGUAGE
'plpgsql'
S
TABLE
LANGUAGE
'plpgsql'
IMMU
TABLE
AS
$$
BEGIN
...
...
@@ -47,7 +47,7 @@ $$;
CREATE
OR
REPLACE
FUNCTION
hafbe_exceptions
.
raise_unknown_input_exception
(
_input
TEXT
)
RETURNS
JSON
LANGUAGE
'plpgsql'
S
TABLE
LANGUAGE
'plpgsql'
IMMU
TABLE
AS
$$
BEGIN
...
...
@@ -60,7 +60,7 @@ $$;
CREATE
OR
REPLACE
FUNCTION
hafbe_exceptions
.
raise_ops_limit_exception
(
_start
BIGINT
,
_limit
BIGINT
)
RETURNS
JSON
LANGUAGE
'plpgsql'
S
TABLE
LANGUAGE
'plpgsql'
IMMU
TABLE
AS
$$
BEGIN
...
...
@@ -73,7 +73,7 @@ $$;
CREATE
OR
REPLACE
FUNCTION
hafbe_exceptions
.
raise_no_such_column_exception
(
_order_by
TEXT
)
RETURNS
JSON
LANGUAGE
'plpgsql'
S
TABLE
LANGUAGE
'plpgsql'
IMMU
TABLE
AS
$$
BEGIN
...
...
@@ -86,7 +86,7 @@ $$;
CREATE
OR
REPLACE
FUNCTION
hafbe_exceptions
.
raise_no_such_order_exception
(
_order_is
TEXT
)
RETURNS
JSON
LANGUAGE
'plpgsql'
S
TABLE
LANGUAGE
'plpgsql'
IMMU
TABLE
AS
$$
BEGIN
...
...
@@ -100,7 +100,7 @@ $$;
CREATE
OR
REPLACE
FUNCTION
hafbe_exceptions
.
validate_limit
(
given_limit
BIGINT
,
expected_limit
INT
,
given_limit_name
TEXT
DEFAULT
'page-size'
)
RETURNS
VOID
-- noqa: LT01, CP05
LANGUAGE
'plpgsql'
S
TABLE
IMMU
TABLE
AS
$$
BEGIN
...
...
@@ -115,7 +115,7 @@ $$;
CREATE
OR
REPLACE
FUNCTION
hafbe_exceptions
.
validate_page
(
given_page
BIGINT
,
max_page
INT
)
RETURNS
VOID
-- noqa: LT01, CP05
LANGUAGE
'plpgsql'
S
TABLE
IMMU
TABLE
AS
$$
BEGIN
...
...
@@ -131,7 +131,7 @@ $$;
CREATE
OR
REPLACE
FUNCTION
hafbe_exceptions
.
validate_negative_limit
(
given_limit
BIGINT
,
given_limit_name
TEXT
DEFAULT
'page-size'
)
RETURNS
VOID
-- noqa: LT01, CP05
LANGUAGE
'plpgsql'
S
TABLE
IMMU
TABLE
AS
$$
BEGIN
...
...
@@ -146,7 +146,7 @@ $$;
CREATE
OR
REPLACE
FUNCTION
hafbe_exceptions
.
validate_negative_page
(
given_page
BIGINT
)
RETURNS
VOID
-- noqa: LT01, CP05
LANGUAGE
'plpgsql'
S
TABLE
IMMU
TABLE
AS
$$
BEGIN
...
...
@@ -158,4 +158,15 @@ BEGIN
END
$$
;
CREATE
OR
REPLACE
FUNCTION
hafbe_exceptions
.
rest_raise_missing_account
(
_account_name
TEXT
)
RETURNS
VOID
LANGUAGE
'plpgsql'
IMMUTABLE
AS
$$
BEGIN
RAISE
EXCEPTION
'Account
''
%
''
does not exist'
,
_account_name
;
END
$$
;
RESET
ROLE
;
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