Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
36a061c
Removed parsing of annotation text (params) from ut_annotations as an…
jgebal Oct 6, 2017
a29cabe
Removed duplicate `old_tests` for ut_annotations - the functionality …
jgebal Oct 6, 2017
58c6293
Renamed `ut_annotations` to `ut_annotation_parser` and moved to annot…
jgebal Oct 7, 2017
375a7ff
Removed ``ut_annotations` from uninstall script.
jgebal Oct 7, 2017
13703fa
Fixed failing old tests after refactoring.
jgebal Oct 7, 2017
ac23f15
Refactored ut_annotation_parser API to use `ut_annotations` collectio…
jgebal Oct 7, 2017
df2c763
Added cache mechanism to `ut_annotation_parser`.
jgebal Oct 8, 2017
6088c81
Added ability to get annotations for single object.
jgebal Oct 9, 2017
4ec9eb5
Reworking annotation cache - not to use cast(Collect()) on dba_source.
jgebal Oct 13, 2017
dbf2538
Fixed failing test and test for Wrapped package.
jgebal Oct 14, 2017
ca31e98
Added missing annotation manager.
jgebal Oct 14, 2017
289f006
Removed dbms_output from code.
jgebal Oct 14, 2017
8e26ed0
Merge remote-tracking branch 'upstream/develop' into feature/annotati…
jgebal Oct 14, 2017
239abde
Add grant ut_annotation_manager to public
pesse Oct 16, 2017
6acd2ad
Add grant ut_annotation_manager to ut3_user
pesse Oct 16, 2017
e114aae
Merge branch 'develop' into feature/annotations_restructuring
jgebal Oct 17, 2017
b83e142
Fixed hardcoded schema-name
jgebal Oct 18, 2017
6dcaae9
Merge remote-tracking branch 'upstream/develop' into feature/annotati…
jgebal Oct 18, 2017
aafca84
Refactored annotation cache.
jgebal Oct 22, 2017
cd394c7
Fixed test execution on 12.1.
jgebal Oct 23, 2017
73c15a2
Merge remote-tracking branch 'upstream/develop' into feature/annotati…
jgebal Oct 23, 2017
5967a3a
Fixed test execution on 12.1.
jgebal Oct 23, 2017
1438753
Merge branch 'develop' into feature/annotations_restructuring
jgebal Oct 24, 2017
4f5d870
Merge conflicts cleanup
jgebal Oct 24, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'develop' into feature/annotations_restructuring
# Conflicts:
#	source/core/ut_utils.pkb
#	source/core/ut_utils.pks
  • Loading branch information
jgebal committed Oct 17, 2017
commit e114aaec711902b1acb7f9266fad0205945a0457
51 changes: 51 additions & 0 deletions source/core/ut_utils.pkb
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,57 @@ create or replace package body ut_utils is
return l_result;
end;

procedure save_dbms_output_to_cache is
l_status number;
l_line varchar2(32767);
l_line_no integer := 1;
l_lines ut_varchar2_rows := ut_varchar2_rows();
c_lines_limit constant integer := 100;
pragma autonomous_transaction;

procedure flush_lines is
begin
insert into ut_dbms_output_cache (seq_no,text)
select rownum, column_value
from table(l_lines);
l_lines.delete;
end;
begin
loop
dbms_output.get_line(line => l_line, status => l_status);
exit when l_status = 1;
l_lines := l_lines multiset union all ut_utils.convert_collection(ut_utils.clob_to_table(l_line||chr(7),4000));
if l_lines.count > c_lines_limit then
flush_lines();
end if;
end loop;
flush_lines();
commit;
end;

procedure read_cache_to_dbms_output is
l_lines_data sys_refcursor;
l_lines ut_varchar2_rows;
c_lines_limit constant integer := 100;
pragma autonomous_transaction;
begin
open l_lines_data for select text from ut_dbms_output_cache order by seq_no;
loop
fetch l_lines_data bulk collect into l_lines limit c_lines_limit;
for i in 1 .. l_lines.count loop
if substr(l_lines(i),-1) = chr(7) then
dbms_output.put_line(rtrim(l_lines(i),chr(7)));
else
dbms_output.put(l_lines(i));
end if;
end loop;
exit when l_lines_data%notfound;
end loop;
delete from ut_dbms_output_cache;
commit;
end;


function ut_owner return varchar2 is
begin
return sys_context('userenv','current_schema');
Expand Down
15 changes: 15 additions & 0 deletions source/core/ut_utils.pks
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,21 @@ create or replace package ut_utils authid definer is
function to_version(a_version_no varchar2) return t_version;


/**
* Saves data from dbms_output buffer into a global temporary table (cache)
* used to store dbms_output buffer captured before the run
*
*/
procedure save_dbms_output_to_cache;

/**
* Reads data from global temporary table (cache) abd puts it back into dbms_output
* used to recover dbms_output buffer data after a run is complete
*
*/
procedure read_cache_to_dbms_output;


/**
* Function is used to reference to utPLSQL owned objects in dynamic sql statements executed from packages with invoker rights
*
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.