Missing functions for DML ops

This commit is contained in:
Jan Kvetina 2022-02-02 07:29:12 +01:00
parent 89371e0d11
commit 65d27d1a20
2 changed files with 26 additions and 4 deletions

View File

@ -1325,12 +1325,21 @@ CREATE OR REPLACE PACKAGE app AS
-- Get DML error table name
--
FUNCTION get_dml_table (
in_table_name logs.module_name%TYPE
in_table_name logs.module_name%TYPE,
in_owner CHAR := NULL
)
RETURN VARCHAR2;
--
-- Get DML error table owner
--
FUNCTION get_dml_owner
RETURN VARCHAR2;
--
-- Creates MERGE query for selected _E$ table and row
--

View File

@ -3214,13 +3214,26 @@ CREATE OR REPLACE PACKAGE BODY app AS
FUNCTION get_dml_table (
in_table_name logs.module_name%TYPE
in_table_name logs.module_name%TYPE,
in_owner CHAR := NULL
)
RETURN VARCHAR2
AS
BEGIN
RETURN COALESCE(app.dml_tables_owner, app.get_owner(app.get_app_id())) ||
'.' || in_table_name || app.dml_tables_postfix;
RETURN
CASE WHEN in_owner IS NOT NULL
THEN app.get_dml_owner() || '.'
END ||
in_table_name || app.dml_tables_postfix;
END;
FUNCTION get_dml_owner
RETURN VARCHAR2
AS
BEGIN
RETURN COALESCE(app.dml_tables_owner, app.get_owner(app.get_app_id()));
END;