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
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
Next Next commit
Fixing #273 - Failed to write to dbms_output (Oracle 11g)
  • Loading branch information
jgebal committed Apr 17, 2017
commit d47dd10a83a6a55fa130d90914eb94edc313e743
6 changes: 3 additions & 3 deletions source/api/ut.pkb
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ create or replace package body ut is
rollback;
end;

function run(a_reporter ut_reporter_base := ut_documentation_reporter(), a_color_console integer := 0) return ut_varchar2_list pipelined is
function run(a_reporter ut_reporter_base := ut_documentation_reporter(), a_color_console integer := 0) return ut_varchar2_rows pipelined is
l_reporter ut_reporter_base := coalesce(a_reporter, ut_documentation_reporter());
l_paths ut_varchar2_list := ut_varchar2_list(sys_context('userenv', 'current_schema'));
l_lines sys_refcursor;
Expand All @@ -115,7 +115,7 @@ create or replace package body ut is
close l_lines;
end;

function run(a_paths ut_varchar2_list, a_reporter ut_reporter_base := ut_documentation_reporter(), a_color_console integer := 0) return ut_varchar2_list pipelined is
function run(a_paths ut_varchar2_list, a_reporter ut_reporter_base := ut_documentation_reporter(), a_color_console integer := 0) return ut_varchar2_rows pipelined is
l_reporter ut_reporter_base := coalesce(a_reporter, ut_documentation_reporter());
l_lines sys_refcursor;
l_line varchar2(4000);
Expand All @@ -130,7 +130,7 @@ create or replace package body ut is
close l_lines;
end;

function run(a_path varchar2, a_reporter ut_reporter_base := ut_documentation_reporter(), a_color_console integer := 0) return ut_varchar2_list pipelined is
function run(a_path varchar2, a_reporter ut_reporter_base := ut_documentation_reporter(), a_color_console integer := 0) return ut_varchar2_rows pipelined is
l_reporter ut_reporter_base := coalesce(a_reporter, ut_documentation_reporter());
l_paths ut_varchar2_list := ut_varchar2_list(coalesce(a_path, sys_context('userenv', 'current_schema')));
l_lines sys_refcursor;
Expand Down
6 changes: 3 additions & 3 deletions source/api/ut.pks
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ create or replace package ut authid current_user as

procedure fail(a_message in varchar2);

function run(a_reporter ut_reporter_base := ut_documentation_reporter(), a_color_console integer := 0) return ut_varchar2_list pipelined;
function run(a_reporter ut_reporter_base := ut_documentation_reporter(), a_color_console integer := 0) return ut_varchar2_rows pipelined;

function run(a_paths ut_varchar2_list, a_reporter ut_reporter_base := ut_documentation_reporter(), a_color_console integer := 0) return ut_varchar2_list pipelined;
function run(a_paths ut_varchar2_list, a_reporter ut_reporter_base := ut_documentation_reporter(), a_color_console integer := 0) return ut_varchar2_rows pipelined;

function run(a_path varchar2, a_reporter ut_reporter_base := ut_documentation_reporter(), a_color_console integer := 0) return ut_varchar2_list pipelined;
function run(a_path varchar2, a_reporter ut_reporter_base := ut_documentation_reporter(), a_color_console integer := 0) return ut_varchar2_rows pipelined;

procedure run(a_reporter ut_reporter_base := ut_documentation_reporter(), a_color_console boolean := false);

Expand Down
19 changes: 19 additions & 0 deletions source/core/types/ut_varchar2_rows.tps
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
create or replace type ut_varchar2_rows as
/*
utPLSQL - Version X.X.X.X
Copyright 2016 - 2017 utPLSQL Project

Licensed under the Apache License, Version 2.0 (the "License"):
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
table of varchar2(4000)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets fix it's bytes

/
4 changes: 2 additions & 2 deletions source/core/ut_output_buffer.pkb
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ create or replace package body ut_output_buffer is
commit;
end;

function get_lines(a_reporter_id varchar2, a_timeout_sec naturaln := gc_max_wait_sec) return ut_varchar2_list pipelined is
function get_lines(a_reporter_id varchar2, a_timeout_sec naturaln := gc_max_wait_sec) return ut_varchar2_rows pipelined is
pragma autonomous_transaction;
l_results ut_varchar2_list;
l_results ut_varchar2_rows;
l_wait_wait_time number(10,1) := 0;
l_finished boolean := false;
begin
Expand Down
2 changes: 1 addition & 1 deletion source/core/ut_output_buffer.pks
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ create or replace package ut_output_buffer authid definer is

procedure close(a_reporters ut_reporters);

function get_lines(a_reporter_id varchar2, a_timeout_sec naturaln := gc_max_wait_sec) return ut_varchar2_list pipelined;
function get_lines(a_reporter_id varchar2, a_timeout_sec naturaln := gc_max_wait_sec) return ut_varchar2_rows pipelined;

function get_lines_cursor(a_reporter_id varchar2, a_timeout_sec naturaln := gc_max_wait_sec) return sys_refcursor;

Expand Down
2 changes: 2 additions & 0 deletions source/create_synonyms_and_grants_for_public.sql
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ grant execute on ut_coverage_sonar_reporter to public;
grant execute on ut_coveralls_reporter to public;
grant execute on ut_reporters to public;
grant execute on ut_varchar2_list to public;
grant execute on ut_varchar2_rows to public;
grant execute on ut_reporter_base to public;
grant execute on ut_coverage to public;
grant execute on ut_coverage_helper to public;
Expand Down Expand Up @@ -85,6 +86,7 @@ create public synonym ut_coverage_sonar_reporter for ut_coverage_sonar_reporter;
create public synonym ut_coveralls_reporter for ut_coveralls_reporter;
create public synonym ut_reporters for ut_reporters;
create public synonym ut_varchar2_list for ut_varchar2_list;
create public synonym ut_varchar2_rows for ut_varchar2_rows;
create public synonym ut_reporter_base for ut_reporter_base;
create public synonym ut_coverage for ut_coverage;
create public synonym ut_coverage_helper for ut_coverage_helper;
Expand Down
2 changes: 2 additions & 0 deletions source/create_synonyms_and_grants_for_user.sql
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ grant execute on ut_coverage_sonar_reporter to &ut3_user;
grant execute on ut_coveralls_reporter to &ut3_user;
grant execute on ut_reporters to &ut3_user;
grant execute on ut_varchar2_list to &ut3_user;
grant execute on ut_varchar2_rows to &ut3_user;
grant execute on ut_reporter_base to &ut3_user;
grant execute on ut_coverage to &ut3_user;
grant execute on ut_coverage_helper to &ut3_user;
Expand Down Expand Up @@ -86,6 +87,7 @@ create or replace synonym &ut3_user .ut_coverage_sonar_reporter for ut_coverage_
create or replace synonym &ut3_user .ut_coveralls_reporter for ut_coveralls_reporter;
create or replace synonym &ut3_user .ut_reporters for ut_reporters;
create or replace synonym &ut3_user .ut_varchar2_list for ut_varchar2_list;
create or replace synonym &ut3_user .ut_varchar2_rows for ut_varchar2_rows;
create or replace synonym &ut3_user .ut_reporter_base for ut_reporter_base;
create or replace synonym &ut3_user .ut_coverage for ut_coverage;
create or replace synonym &ut3_user .ut_coverage_helper for ut_coverage_helper;
Expand Down
1 change: 1 addition & 0 deletions source/install.sql
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ whenever oserror exit failure rollback

--common utilities
@@core/types/ut_varchar2_list.tps
@@core/types/ut_varchar2_rows.tps
@@core/types/ut_object_name.tps
@@core/types/ut_object_name.tpb
@@core/types/ut_object_names.tps
Expand Down
2 changes: 2 additions & 0 deletions source/uninstall.sql
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,8 @@ drop type ut_object_name;

drop type ut_varchar2_list;

drop type ut_varchar2_rows;

begin
for syn in (
select
Expand Down