-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changes to the capability reporting logic to persist transient report…
…ing data
- Loading branch information
1 parent
2b2d344
commit 79da18f
Showing
11 changed files
with
94 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
drop function if exists reporting.add_transient_data; | ||
|
||
create function reporting.add_transient_data | ||
( | ||
_transient_id varchar(100), | ||
_transient_data json, | ||
_transient_report_id varchar(100), | ||
_transient_report_name varchar(100) | ||
) | ||
returns void | ||
as $$ | ||
begin | ||
insert into reporting.transient(transient_id, transient_data, transient_report_id, transient_report_name) | ||
values (_transient_id, _transient_data, _transient_report_id, _transient_report_name); | ||
end; | ||
$$ language plpgsql; |
11 changes: 11 additions & 0 deletions
11
database/functions/R__reporting.truncate_transient_data.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
drop function if exists reporting.truncate_transient_data; | ||
|
||
create function reporting.truncate_transient_data | ||
( | ||
) | ||
returns void | ||
as $$ | ||
begin | ||
truncate table reporting.transient; | ||
end; | ||
$$ language plpgsql; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
drop table if exists reporting.transient; | ||
create table reporting.transient | ||
( | ||
transient_id varchar(100) not null, | ||
transient_data json not null, | ||
transient_report_id varchar(100) not null, | ||
transient_report_name varchar(100) not null | ||
); | ||
|
||
grant select, insert, update, delete on table reporting.transient to app_user; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters