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

Send NULL as extra_where_single in init_result_get_iterator #1275

Closed

Conversation

mattmundell
Copy link
Contributor

@mattmundell mattmundell commented Aug 26, 2020

What:

Prevents filters from having an effect when specifying a result_id in
GET_RESULTS.

Why:

This error was introduced in c9dc67a (from #1076) which
introduced the extra_where_single arg. Before that there was no way to
send extra args to init_get_iterator2_with when getting a single specified
resource, which is equivalent to sending NULL now.

How:

Response from each of these should include result, even if result has min_qod < 70:

  • 2o m m '<get_results result_id="e89920a5-9af3-47af-975c-cb38cccdea69" filter="min_qod=70"/>'
  • 2o m m '<get_results result_id="e89920a5-9af3-47af-975c-cb38cccdea69" filter="min_qod=0"/>'
  • 2o m m '<get_results result_id="e89920a5-9af3-47af-975c-cb38cccdea69"/>'

Checklist:

Prevents filters from having an effect when specifying a result_id in
GET_RESULTS.

This error was introduced in c9dc67a which
introduced the extra_where_single arg.  Before that there was no way to
send extra args to init_get_iterator2_with when getting a single specified
resource, which is equivalent to sending NULL now.
@mattmundell mattmundell marked this pull request as ready for review August 26, 2020 21:00
Copy link
Member

@timopollmeier timopollmeier left a comment

Choose a reason for hiding this comment

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

While this fixes the issue with the min_qod, I think this will also make the command ignore the apply_overrides keyword.
I think we should selectively filter out the min_qod or set it to 0 for the extra_where_single clause instead.

@timopollmeier
Copy link
Member

I've implemented a different solution that still applies other special keywords like apply_overrides in #1276.

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