This commit is contained in:
Ottmar Gobrecht 2020-10-24 15:13:57 +02:00
parent daf5434c14
commit 2559f984ed
6 changed files with 113 additions and 94 deletions

View File

@ -1,4 +1,5 @@
<!-- DO NOT EDIT THIS FILE DIRECTLY - it is generated from source file src/PLEX.pks --> <!-- DO NOT EDIT THIS FILE DIRECTLY - it is generated from source file src/PLEX.pks -->
<!-- markdownlint-disable MD003 MD012 MD033 -->
PL/SQL Export Utilities PL/SQL Export Utilities
======================= =======================
@ -45,6 +46,8 @@ INSTALLATION
CHANGELOG CHANGELOG
- 2.1.1 (2020-10-22)
- Fixed: #5 - function BackApp raises "ORA-03113: end-of-file on communication channel" in Oracle 19.6 (collection specific code was running fine in 12.2)
- 2.1.0 (2019-12-30) - 2.1.0 (2019-12-30)
- Function BackApp: - Function BackApp:
- New parameter to include ORDS modules (p_include_ords_modules) - New parameter to include ORDS modules (p_include_ords_modules)
@ -81,7 +84,7 @@ SIGNATURE
```sql ```sql
PACKAGE PLEX AUTHID current_user IS PACKAGE PLEX AUTHID current_user IS
c_plex_name CONSTANT VARCHAR2(30 CHAR) := 'PLEX - PL/SQL Export Utilities'; c_plex_name CONSTANT VARCHAR2(30 CHAR) := 'PLEX - PL/SQL Export Utilities';
c_plex_version CONSTANT VARCHAR2(10 CHAR) := '2.1.0.1'; c_plex_version CONSTANT VARCHAR2(10 CHAR) := '2.1.1.1';
c_plex_url CONSTANT VARCHAR2(40 CHAR) := 'https://github.com/ogobrecht/plex'; c_plex_url CONSTANT VARCHAR2(40 CHAR) := 'https://github.com/ogobrecht/plex';
c_plex_license CONSTANT VARCHAR2(10 CHAR) := 'MIT'; c_plex_license CONSTANT VARCHAR2(10 CHAR) := 'MIT';
c_plex_license_url CONSTANT VARCHAR2(60 CHAR) := 'https://github.com/ogobrecht/plex/blob/master/LICENSE.txt'; c_plex_license_url CONSTANT VARCHAR2(60 CHAR) := 'https://github.com/ogobrecht/plex/blob/master/LICENSE.txt';

30
package-lock.json generated
View File

@ -175,9 +175,9 @@
"dev": true "dev": true
}, },
"glob": { "glob": {
"version": "7.1.4", "version": "7.1.6",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
"integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==", "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
"dev": true, "dev": true,
"requires": { "requires": {
"fs.realpath": "^1.0.0", "fs.realpath": "^1.0.0",
@ -208,9 +208,9 @@
} }
}, },
"inherits": { "inherits": {
"version": "2.0.3", "version": "2.0.4",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
"dev": true "dev": true
}, },
"is-binary-path": { "is-binary-path": {
@ -281,9 +281,9 @@
} }
}, },
"minimist": { "minimist": {
"version": "1.2.0", "version": "1.2.5",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
"dev": true "dev": true
}, },
"normalize-path": { "normalize-path": {
@ -344,9 +344,9 @@
"dev": true "dev": true
}, },
"ploc": { "ploc": {
"version": "0.6.1", "version": "0.6.2",
"resolved": "https://registry.npmjs.org/ploc/-/ploc-0.6.1.tgz", "resolved": "https://registry.npmjs.org/ploc/-/ploc-0.6.2.tgz",
"integrity": "sha512-xEiYb8AO7AUC7RGXs6myDHo+xb8eyd2ome5F9sibHuYnT1D8R8RsoAZXoWOfw+APb6AC5nrY015qIJxd5ajcZg==", "integrity": "sha512-ohDLxYTVkZ5VhJw0JHjgQEOI4WUS+KG2V8mvqJPT/lVK5RhKAPZExhxvE3VaHiWpboBO2FR3GU7BEbj0TegQIg==",
"dev": true, "dev": true,
"requires": { "requires": {
"glob": "^7.1.4", "glob": "^7.1.4",
@ -457,9 +457,9 @@
} }
}, },
"yargs-parser": { "yargs-parser": {
"version": "13.1.1", "version": "13.1.2",
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.1.tgz", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz",
"integrity": "sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ==", "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==",
"dev": true, "dev": true,
"requires": { "requires": {
"camelcase": "^5.0.0", "camelcase": "^5.0.0",

View File

@ -9,12 +9,12 @@
"scripts": { "scripts": {
"prebuild": "npx ploc --in src/PLEX.pks --out README.md", "prebuild": "npx ploc --in src/PLEX.pks --out README.md",
"build": "node src/build.js", "build": "node src/build.js",
"postbuild": "echo exit | sqlplus -S /@cloud_playground_data @plex_install.sql", "postbuild": "echo exit | sqlplus -S /@playground @plex_install.sql",
"watch": "chokidar src/PLEX.pks src/PLEX.pkb src/plex_install.sql --initial -c \"npm run build\"", "watch": "chokidar src/PLEX.pks src/PLEX.pkb src/plex_install.sql --initial -c \"npm run build\"",
"test-ccflags": "echo exit | sqlplus -S /@cloud_playground_data @plex_install_dev_test_ccflags.sql" "test-ccflags": "echo exit | sqlplus -S /@playground @plex_install_dev_test_ccflags.sql"
}, },
"devDependencies": { "devDependencies": {
"chokidar-cli": "^2.1.0", "chokidar-cli": "^2.1.0",
"ploc": "^0.6.1" "ploc": "^0.6.2"
} }
} }

View File

@ -38,7 +38,7 @@ END;
prompt Compile package plex (spec) prompt Compile package plex (spec)
CREATE OR REPLACE PACKAGE PLEX AUTHID current_user IS CREATE OR REPLACE PACKAGE PLEX AUTHID current_user IS
c_plex_name CONSTANT VARCHAR2(30 CHAR) := 'PLEX - PL/SQL Export Utilities'; c_plex_name CONSTANT VARCHAR2(30 CHAR) := 'PLEX - PL/SQL Export Utilities';
c_plex_version CONSTANT VARCHAR2(10 CHAR) := '2.1.0.1'; c_plex_version CONSTANT VARCHAR2(10 CHAR) := '2.1.1.1';
c_plex_url CONSTANT VARCHAR2(40 CHAR) := 'https://github.com/ogobrecht/plex'; c_plex_url CONSTANT VARCHAR2(40 CHAR) := 'https://github.com/ogobrecht/plex';
c_plex_license CONSTANT VARCHAR2(10 CHAR) := 'MIT'; c_plex_license CONSTANT VARCHAR2(10 CHAR) := 'MIT';
c_plex_license_url CONSTANT VARCHAR2(60 CHAR) := 'https://github.com/ogobrecht/plex/blob/master/LICENSE.txt'; c_plex_license_url CONSTANT VARCHAR2(60 CHAR) := 'https://github.com/ogobrecht/plex/blob/master/LICENSE.txt';
@ -76,6 +76,8 @@ INSTALLATION
CHANGELOG CHANGELOG
- 2.1.1 (2020-10-22)
- Fixed: #5 - function BackApp raises "ORA-03113: end-of-file on communication channel" in Oracle 19.6 (collection specific code was running fine in 12.2)
- 2.1.0 (2019-12-30) - 2.1.0 (2019-12-30)
- Function BackApp: - Function BackApp:
- New parameter to include ORDS modules (p_include_ords_modules) - New parameter to include ORDS modules (p_include_ords_modules)
@ -565,7 +567,7 @@ PROCEDURE util_setup_dbms_metadata (
p_constraints_as_alter IN BOOLEAN DEFAULT false, p_constraints_as_alter IN BOOLEAN DEFAULT false,
p_emit_schema IN BOOLEAN DEFAULT false); p_emit_schema IN BOOLEAN DEFAULT false);
PROCEDURE util_ensure_unique_file_names (p_export_files IN OUT tab_export_files); PROCEDURE util_ensure_unique_file_names (p_export_files IN OUT NOCOPY tab_export_files);
FUNCTION util_to_xlsx_datetime ( FUNCTION util_to_xlsx_datetime (
p_date IN DATE) p_date IN DATE)
@ -807,7 +809,7 @@ PROCEDURE util_clob_create_runtime_log (p_export_files IN OUT NOCOPY tab_export_
PROCEDURE util_clob_create_error_log (p_export_files IN OUT NOCOPY tab_export_files); PROCEDURE util_clob_create_error_log (p_export_files IN OUT NOCOPY tab_export_files);
PROCEDURE util_ensure_unique_file_names (p_export_files IN OUT tab_export_files); PROCEDURE util_ensure_unique_file_names (p_export_files IN OUT NOCOPY tab_export_files);
PROCEDURE util_log_init (p_module IN VARCHAR2); PROCEDURE util_log_init (p_module IN VARCHAR2);
@ -1184,7 +1186,7 @@ END util_setup_dbms_metadata;
-------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------
PROCEDURE util_ensure_unique_file_names (p_export_files IN OUT tab_export_files) IS PROCEDURE util_ensure_unique_file_names (p_export_files IN OUT NOCOPY tab_export_files) IS
v_file_list_lookup tab_file_list_lookup; v_file_list_lookup tab_file_list_lookup;
v_apex_install_file_id PLS_INTEGER; v_apex_install_file_id PLS_INTEGER;
v_file_name VARCHAR2(256); v_file_name VARCHAR2(256);
@ -1959,6 +1961,7 @@ RETURN tab_export_files IS
$if $$apex_installed $then $if $$apex_installed $then
PROCEDURE process_apex_app IS PROCEDURE process_apex_app IS
v_apex_files apex_t_export_files; v_apex_files apex_t_export_files;
v_clob CLOB;
BEGIN BEGIN
-- save as individual files -- save as individual files
util_log_start(p_base_path_frontend || '/APEX_EXPORT:individual_files'); util_log_start(p_base_path_frontend || '/APEX_EXPORT:individual_files');
@ -1990,11 +1993,16 @@ RETURN tab_export_files IS
-- special handling for install file -- special handling for install file
IF v_export_files(i).name = 'f' || p_app_id || '/install.sql' THEN IF v_export_files(i).name = 'f' || p_app_id || '/install.sql' THEN
v_export_files(i).name := 'scripts/install_frontend_generated_by_apex.sql'; v_export_files(i).name := 'scripts/install_frontend_generated_by_apex.sql';
v_export_files(i).contents := '-- DO NOT TOUCH THIS FILE - IT WILL BE OVERWRITTEN ON NEXT PLEX BACKAPP CALL' -- We need the clob as temporary container.
-- When we use v_export_files(i).contents := 'someText' || replace(replace(v_export_files(i).contents, ...) ...),
-- then Oracle 19.6 will raise "ORA-03113: end-of-file on communication channel".
-- This was running without issues in Oracle 12.2.
v_clob := '-- DO NOT TOUCH THIS FILE - IT WILL BE OVERWRITTEN ON NEXT PLEX BACKAPP CALL'
|| c_lf || c_lf || c_lf || c_lf
|| replace(replace(v_export_files(i).contents, || replace(replace(v_export_files(i).contents,
'@application/', '@../' || p_base_path_frontend || '/'), '@application/', '@../' || p_base_path_frontend || '/'),
'prompt --install', 'prompt --install_frontend_generated_by_apex'); 'prompt --install', 'prompt --install_frontend_generated_by_apex');
v_export_files(i).contents := v_clob;
END IF; END IF;
-- handle build status RUN_ONLY -- handle build status RUN_ONLY
IF v_export_files(i).name = p_base_path_frontend || '/create_application.sql' AND p_app_build_status_run_only THEN IF v_export_files(i).name = p_base_path_frontend || '/create_application.sql' AND p_app_build_status_run_only THEN

View File

@ -1335,6 +1335,7 @@ RETURN tab_export_files IS
$if $$apex_installed $then $if $$apex_installed $then
PROCEDURE process_apex_app IS PROCEDURE process_apex_app IS
v_apex_files apex_t_export_files; v_apex_files apex_t_export_files;
v_clob CLOB;
BEGIN BEGIN
-- save as individual files -- save as individual files
util_log_start(p_base_path_frontend || '/APEX_EXPORT:individual_files'); util_log_start(p_base_path_frontend || '/APEX_EXPORT:individual_files');
@ -1366,11 +1367,16 @@ RETURN tab_export_files IS
-- special handling for install file -- special handling for install file
IF v_export_files(i).name = 'f' || p_app_id || '/install.sql' THEN IF v_export_files(i).name = 'f' || p_app_id || '/install.sql' THEN
v_export_files(i).name := 'scripts/install_frontend_generated_by_apex.sql'; v_export_files(i).name := 'scripts/install_frontend_generated_by_apex.sql';
v_export_files(i).contents := '-- DO NOT TOUCH THIS FILE - IT WILL BE OVERWRITTEN ON NEXT PLEX BACKAPP CALL' -- We need the clob as temporary container.
-- When we use v_export_files(i).contents := 'someText' || replace(replace(v_export_files(i).contents, ...) ...),
-- then Oracle 19.6 will raise "ORA-03113: end-of-file on communication channel".
-- This was running without issues in Oracle 12.2.
v_clob := '-- DO NOT TOUCH THIS FILE - IT WILL BE OVERWRITTEN ON NEXT PLEX BACKAPP CALL'
|| c_lf || c_lf || c_lf || c_lf
|| replace(replace(v_export_files(i).contents, || replace(replace(v_export_files(i).contents,
'@application/', '@../' || p_base_path_frontend || '/'), '@application/', '@../' || p_base_path_frontend || '/'),
'prompt --install', 'prompt --install_frontend_generated_by_apex'); 'prompt --install', 'prompt --install_frontend_generated_by_apex');
v_export_files(i).contents := v_clob;
END IF; END IF;
-- handle build status RUN_ONLY -- handle build status RUN_ONLY
IF v_export_files(i).name = p_base_path_frontend || '/create_application.sql' AND p_app_build_status_run_only THEN IF v_export_files(i).name = p_base_path_frontend || '/create_application.sql' AND p_app_build_status_run_only THEN

View File

@ -1,6 +1,6 @@
CREATE OR REPLACE PACKAGE PLEX AUTHID current_user IS CREATE OR REPLACE PACKAGE PLEX AUTHID current_user IS
c_plex_name CONSTANT VARCHAR2(30 CHAR) := 'PLEX - PL/SQL Export Utilities'; c_plex_name CONSTANT VARCHAR2(30 CHAR) := 'PLEX - PL/SQL Export Utilities';
c_plex_version CONSTANT VARCHAR2(10 CHAR) := '2.1.0.1'; c_plex_version CONSTANT VARCHAR2(10 CHAR) := '2.1.1.1';
c_plex_url CONSTANT VARCHAR2(40 CHAR) := 'https://github.com/ogobrecht/plex'; c_plex_url CONSTANT VARCHAR2(40 CHAR) := 'https://github.com/ogobrecht/plex';
c_plex_license CONSTANT VARCHAR2(10 CHAR) := 'MIT'; c_plex_license CONSTANT VARCHAR2(10 CHAR) := 'MIT';
c_plex_license_url CONSTANT VARCHAR2(60 CHAR) := 'https://github.com/ogobrecht/plex/blob/master/LICENSE.txt'; c_plex_license_url CONSTANT VARCHAR2(60 CHAR) := 'https://github.com/ogobrecht/plex/blob/master/LICENSE.txt';
@ -38,6 +38,8 @@ INSTALLATION
CHANGELOG CHANGELOG
- 2.1.1 (2020-10-22)
- Fixed: #5 - function BackApp raises "ORA-03113: end-of-file on communication channel" in Oracle 19.6 (collection specific code was running fine in 12.2)
- 2.1.0 (2019-12-30) - 2.1.0 (2019-12-30)
- Function BackApp: - Function BackApp:
- New parameter to include ORDS modules (p_include_ords_modules) - New parameter to include ORDS modules (p_include_ords_modules)