Clarify handling of empty arguments in xpath function contains#10814
Clarify handling of empty arguments in xpath function contains#10814pijuskri wants to merge 1 commit intomendix:developmentfrom
Conversation
|
Needs team review |
aac06dd to
ce9d797
Compare
| {{% alert color="info" %}} | ||
| In the case the `attribute` is empty or `NULL`, the function will always return `false`, independent of the value of `string_expression`. | ||
|
|
||
| In the case the `string_expression` is empty, it is treated as an empty string. The function is then equivalent to ```attribute != ''```. |
There was a problem hiding this comment.
This is not correct. The empty string still contains the empty string. It would be equivalent to attribute != empty.
| `string_expression` specifies the value to test for being contained in the attribute. It can be a string literal or an expression that returns a string. | ||
|
|
||
| {{% alert color="info" %}} | ||
| In the case the `attribute` is empty or `NULL`, the function will always return `false`, independent of the value of `string_expression`. |
There was a problem hiding this comment.
It would be good to be even more clear that this refers to an empty value, not the empty string.
|
The same things hold for |
|
|
||
| ### expression | ||
|
|
||
| `string_expression` specifies the value to test for being contained in the attribute. It can be a string literal or an expression that returns a string. |
There was a problem hiding this comment.
We only accept literals or parameters, not arbitrary expressions.
|
|
||
| ### attribute | ||
|
|
||
| `attribute` specifies the attribute to test in. Attribute must be of the **String** type. |
There was a problem hiding this comment.
It doesn't have to be a simple attribute, it can also be a long path ending at an attribute.
There was a problem hiding this comment.
I thought about mentioning that, but the entire xpath constraint documentation never explicitly mentions paths and always refers to attributes. I don't know if this distinction is necessary to highlight.
…ts-with and ends-with
ce9d797 to
1ac875d
Compare
|
Approved by datastorage team. |
No description provided.