Skip to content

Improve Reporter hasOutput-Check #68

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 10, 2019
Merged

Conversation

pesse
Copy link
Member

@pesse pesse commented Jan 10, 2019

There might be a problem of pipelined functions limited by regexp_like
in 11g we can probably avoid with a different approach.
Additionally, setting a Statement-Timeout here will prevent the cli to
wait forever in case of an error.

There might be a problem of pipelined functions limited by regexp_like
in 11g we can probably avoid with a different approach.
Additionally, setting a Statement-Timeout here will prevent the cli to
wait forever in case of an error.
@pesse pesse changed the title Change hasOutput-Query to not use Regexp. Added Statement Timeout Improve Reporter hasOutput-Check Jan 10, 2019
Copy link
Member

@jgebal jgebal left a comment

Choose a reason for hiding this comment

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

One comment

String sql = "select is_output_reporter from table(ut_runner.get_reporters_list) where regexp_like(reporter_object_name, ?)";
String sql = "select is_output_reporter " +
" from table(ut_runner.get_reporters_list)" +
" where ? = substr(reporter_object_name, length(reporter_object_name)-?+1)";
try ( PreparedStatement stmt = oraConn.prepareStatement(sql)) {
Copy link
Member

Choose a reason for hiding this comment

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

It would be much better to have a plsql seperate check for it.
The check could be:

begin
declare
   l_result boolean;
begin
   execute immediate '
   begin 
:x :=' || DBMS_ASSERT.SQL_OBJECT_NAME( ? ) || '() is of ut_output_reporter_base;
   end;'
using out l_result;
exception when others then null;
end;
? := l_result;
end;

@pesse pesse merged commit 942f510 into develop Jan 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants