Skip to content

Commit

Permalink
Merge pull request #14 from paulissoft/development
Browse files Browse the repository at this point in the history
Development merge
  • Loading branch information
gpaulissen authored Sep 10, 2021
2 parents 86dae25 + f26b924 commit 69e8808
Show file tree
Hide file tree
Showing 199 changed files with 6,509 additions and 3,917 deletions.
2 changes: 1 addition & 1 deletion .mvn/maven.config
Original file line number Diff line number Diff line change
@@ -1 +1 @@
-Drevision=1.1.0-SNAPSHOT
-Drevision=1.1.0
2 changes: 1 addition & 1 deletion apex/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
The following property should be set:
- application
-->
<echo message="Reading apex properties from file ${apex.config.dir}/apex.properties" />
<echo level="${ant.log.level}" message="Reading apex properties from file ${apex.config.dir}/apex.properties" />
<property file="${apex.config.dir}/apex.properties" prefix="apex" />
</target>
</configuration>
Expand Down
44 changes: 29 additions & 15 deletions conf/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -98,24 +98,28 @@
<!-- Make sure this isn't included on any classpath-->
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.oracle.ojdbc</groupId>
<artifactId>ojdbc8</artifactId>
<version>${ojdbc8.version}</version>
<exclusions>
<exclusion>
<groupId>com.oracle.database.ha</groupId>
<artifactId>simplefan</artifactId>
</exclusion>
<exclusion>
<groupId>com.oracle.database.ha</groupId>
<artifactId>ons</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>com.oracle.ojdbc</groupId>
<artifactId>ojdbc8</artifactId>
<version>${ojdbc8.version}</version>
<exclusions>
<exclusion>
<groupId>com.oracle.database.ha</groupId>
<artifactId>simplefan</artifactId>
</exclusion>
<exclusion>
<groupId>com.oracle.database.ha</groupId>
<artifactId>ons</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>

Expand Down Expand Up @@ -149,14 +153,16 @@
<id>conf-debug-before</id>
<phase>${conf.phase.init}</phase>
<configuration>
<exportAntProperties>true</exportAntProperties>
<target if="maven.debug">
<property name="ant.log.level" value="info" />
<!-- also dbUrl, dbUser, dbPass -->
<echoproperties prefix="java." />
<echoproperties prefix="maven." />
<echoproperties prefix="db." />
<echoproperties prefix="oracle-tools." />
<echoproperties prefix="oracle." />
<echoproperties prefix="conf." />
<echoproperties prefix="conf." />
</target>
</configuration>
<goals>
Expand Down Expand Up @@ -189,6 +195,9 @@
This reduces the need for duplicate folders/files.
-->

<!-- GJP 2021-09-06 For the time being display always the "Reading ... properties from file ..." -->
<property name="ant.log.level" value="info" />

<property name="db.config.dir.env.properties" value="${db.config.dir}${file.separator}env.properties" />

<fail message="The database conf directory '${db.config.dir}' does not contain a file 'env.properties'">
Expand Down Expand Up @@ -242,7 +251,7 @@
1) read the file env.properties (file may not exist)
2) the file should set db and maybe db.prev (for backwards compability we also check db.source and db.target)
-->
<echo message="Reading environment properties from file ${env.properties.abs}" />
<echo level="${ant.log.level}" message="Reading environment properties from file ${env.properties.abs}" />
<property file="${env.properties.abs}" />

<!-- backwards compability -->
Expand All @@ -264,7 +273,7 @@
<available file="${db.config.dir}${file.separator}${db}${file.separator}db.properties" type="file" />
</condition>
<property name="db.properties.abs" location="${db.properties}" />
<echo message="Reading db properties from file ${db.properties.abs}" />
<echo level="${ant.log.level}" message="Reading db properties from file ${db.properties.abs}" />
<!-- prefixValues="true" is needed for correctly expanding
username=prxy[${schema}] -->
<property file="${db.properties.abs}" prefix="db"
Expand All @@ -287,6 +296,11 @@
<property name="dbUser" value="${db.username}" />
<property name="dbPass" value="${db.password}" />

<!-- set code check properties -->
<property name="db.recompile" value="1" /> <!-- 0 or 1 -->
<property name="db.plsql.warnings" value="ENABLE:ALL" /> <!-- alter session set PLSQL_WARNINGS = ... -->
<property name="db.plscope.settings" value="IDENTIFIERS:ALL" /> <!-- alter session set PLSCOPE_SETTINGS = ... -->

<!-- READ THE db.prev.properties FILE. -->

<!-- DB.PREV -->
Expand All @@ -296,7 +310,7 @@
</condition>
<property name="db.prev.properties.abs" location="${db.prev.properties}" />
<!-- target info -->
<echo message="Reading db.prev properties from file ${db.prev.properties.abs}" />
<echo level="${ant.log.level}" message="Reading db.prev properties from file ${db.prev.properties.abs}" />
<property file="${db.prev.properties.abs}" prefix="db.prev" />
<!-- db.prev.database.link is empty meaning the previous database schema is used -->
<property name="db.prev.database.link"
Expand Down
90 changes: 87 additions & 3 deletions db/app/api/src/full/R__09.PACKAGE_SPEC.API_PKG.sql
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
CREATE OR REPLACE PACKAGE "API_PKG" authid current_user -- needed to invoke procedures from the calling schema without grants
is

-- GJP 2020-11-30 Use cfg_pkg.c_debugging instead
-- -- for conditional compiling
-- c_debugging constant pls_integer := data_api_pkg.c_debugging;
-- for conditional compiling
c_debugging constant pls_integer := 0;

type t_rec is record
( id integer
Expand Down Expand Up @@ -79,8 +78,93 @@ procedure ut_expect_violation
, p_data_owner in all_tables.owner%type -- default get_data_owner
);

/**
* Enable the DBMS_OUTPUT buffer for a database link session.
*
* Usefull while debugging a remote session using dbms_output.
*
* Will issue:
*
* execute immediate
* utl_lms.format_message('call dbms_output.enable@%s(:b1)', p_db_link)
* using p_buffer_size
*
* @param p_db_link The database link.
* @param p_buffer_size The buffer size
*/
procedure dbms_output_enable
( p_db_link in varchar2
, p_buffer_size in integer default null
);

/**
* Clear the DBMS_OUTPUT buffer for a database link session.
*
* Usefull while debugging a remote session using dbms_output.
*
* Will issue:
*
* execute immediate
* utl_lms.format_message
* ( 'declare
* l_line varchar2(32767 char);
* l_status integer;
* begin
* dbms_output.get_line@%s(l_line, l_status);
* end;'
* , p_db_link
* )
*
* NOTE from the Oracle documentation:
*
* <blockquote>
* After calling GET_LINE or GET_LINES, any lines not retrieved before the next call to
* PUT, PUT_LINE, or NEW_LINE are discarded to avoid confusing them with the next
* message.
* </blockquote>
*
* So this means that a single call to get_line is enough.
*
* @param p_db_link The database link.
*/
procedure dbms_output_clear
( p_db_link in varchar2
);

/**
* Flush the DBMS_OUTPUT buffer for a database link session.
*
* Usefull while debugging a remote session using dbms_output.
*
* The general idea is to invoke dbms_output_enable and dbms_output_clear before the
* remote call and to invoke dbms_output_flush after the call.
*
* This procedure will issue:
*
* execute immediate
* utl_lms.format_message
* ( 'declare
* l_line varchar2(32767 char);
* l_status integer;
* begin
* loop
* dbms_output.get_line@%s(line => l_line, status => l_status);
* exit when l_status != 0;
* dbms_output.put_line(l_line);
* end loop;
* end;'
* , p_db_link
* )
*
* @param p_db_link The database link.
*/
procedure dbms_output_flush
( p_db_link in varchar2
);

$if cfg_pkg.c_testing $then

--%suitepath(API)
--%suite

-- for unit testing
Expand Down
Loading

0 comments on commit 69e8808

Please sign in to comment.