-
Notifications
You must be signed in to change notification settings - Fork 187
Anydata join / exclude / include #923
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
Conversation
| return l_valid_name; | ||
| end; | ||
|
|
||
| function add_prefix(a_list ut_varchar2_list, a_prefix varchar2, a_connector varchar2 := '/') return ut_varchar2_list is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about having add_prefix function for individual elements to avoid duplicating the below logic in 3 places:
case
when self.is_anydata = 1 then
l_prefix||'/'||trim (leading '/' from fl.column_value)
else
fl.column_value
endThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually that causes an issue due to SQL context switch and min grant user.
We will need to grant execute to public and get a public synonym on utils.
|
It would be great to enhance documentation for extended data comparison with 1-2 examples for exclude/include with use of ANYDATA.convertCollection. |
|
Never used it so far - maybe I should. |
You don't have to wrap a collection into cursor and then use a fancy include / exclude option to compare elements or object. An extra abstraction layer, underneath is still a cursor compare but accessing a nested elements directly to avoid an wrapping into long XML path. |
Adding a new attribute filterpath that is used for filtering cursor in anydata / refcursor. This value will be different from cursor in anydata as we skip root element.
Adding a new attribute filterpath that is used for filtering cursor in anydata / refcursor. This value will be different from cursor in anydata as we skip root element.
…utPLSQL into fix/anydata_join_syntax
|
That's working however using a complex string manipulation. To simplify method the new attribute of filter path can be added but a diff sql will have to be changed to use a cursor details instead of xml extract |
…yntax # Conflicts: # source/core/ut_utils.pkb # source/core/ut_utils.pks
Fixes #912
Address issue of using a full type name in include / exclude / join_by on collections compare.
Now we are using only attributes names as previously.
We are treating refcursor as extra wrapping layer so when filtering a columns we need to make sure that a root name of collection / object name type is added to the filter to allow as properly use filter on cursor information.