Skip to content
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

CFINSPEC-156 Oracle query fix when empty result #5938

Merged
merged 1 commit into from Mar 23, 2022

Conversation

Nik08
Copy link
Contributor

@Nik08 Nik08 commented Mar 22, 2022

Signed-off-by: Nikita Mathur nikita.mathur@chef.io

Description

Oracle query fix when empty result

Related Issue

Fixes #5932

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New content (non-breaking change)
  • Breaking change (a content change which would break existing functionality or processes)

Checklist:

  • I have read the CONTRIBUTING document.

@Nik08 Nik08 requested a review from a team as a code owner March 22, 2022 11:31
@netlify
Copy link

netlify bot commented Mar 22, 2022

✅ Deploy Preview for chef-inspec canceled.

🔨 Explore the source changes: 0f4ccee

🔍 Inspect the deploy log: https://app.netlify.com/sites/chef-inspec/deploys/6239b498a7a56e0009766221

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
raise Inspec::Exceptions::ResourceFailed, "Oracle query with errors: #{out}"
unless inspec_cmd.stdout.empty?
DatabaseHelper::SQLQueryResult.new(inspec_cmd, parse_csv_result(inspec_cmd.stdout))
else
Copy link
Contributor

Choose a reason for hiding this comment

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

unless-else 💯

Copy link
Contributor

@clintoncwolfe clintoncwolfe left a comment

Choose a reason for hiding this comment

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

Thanks!

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.

oracledb_session need to handle zero rows or empty output for select query.
2 participants