sql first refactor
This commit is contained in:
15
db/routines/R__fn_planning_run_horizon.sql
Normal file
15
db/routines/R__fn_planning_run_horizon.sql
Normal file
@@ -0,0 +1,15 @@
|
||||
create or replace function ems.fn_planning_run_horizon(p_run_id int)
|
||||
returns jsonb
|
||||
language sql
|
||||
stable
|
||||
as $fn$
|
||||
select jsonb_build_object(
|
||||
'horizon_start', pr.horizon_start,
|
||||
'horizon_end', pr.horizon_end
|
||||
)
|
||||
from ems.planning_run pr
|
||||
where pr.id = p_run_id;
|
||||
$fn$;
|
||||
|
||||
comment on function ems.fn_planning_run_horizon(int) is
|
||||
'Horizont po úspěšném POST /plan/run (read-model).';
|
||||
Reference in New Issue
Block a user