Conversation
t-bonk
left a comment
There was a problem hiding this comment.
Looks good to me. Only thing i noticed is that I don't understand the advantage of scalar functions...
|
todo:
|
Co-authored-by: René Jeglinsky <rene.jeglinsky@sap.com>
|
|
||
| The `substring` method creates an expression for substring extraction from a string value. Extract a substring from a specified starting position of either a given length or to the end of the string. The first position is zero. | ||
| ```java | ||
| date.extract(ChronoField.DAY_OF_MONTH) |
There was a problem hiding this comment.
Would that be correct as the snippet checker suggests?
| date.extract(ChronoField.DAY_OF_MONTH) | |
| date.extract(ChronoField.DAY_OF_MONTH); |
There was a problem hiding this comment.
That's also fine. With semicolon it's a "statement". Without a semicolon it's an "expression". Both are valid syntactical constructs in Java. But a "statement" should do something useful like assign the value, e.g.
CqnValue day = date.extract(ChronoField.DAY_OF_MONTH);Without a semicolon it's it's clear that the "expression" is just a building block that can be used to build something useful with.
| ##### `concat` | ||
|
|
||
| See [`Concat`](#string-expressions) String Expression | ||
| See [`Concat Expression`](#concat-expression). |
There was a problem hiding this comment.
maybe we also keep the anchor #string-expressions to avoid breaking a link someone might have bookmarked
|
|
||
| The `substring` method creates an expression for substring extraction from a string value. Extract a substring from a specified starting position of either a given length or to the end of the string. The first position is zero. | ||
| ```java | ||
| date.extract(ChronoField.DAY_OF_MONTH) |
There was a problem hiding this comment.
That's also fine. With semicolon it's a "statement". Without a semicolon it's an "expression". Both are valid syntactical constructs in Java. But a "statement" should do something useful like assign the value, e.g.
CqnValue day = date.extract(ChronoField.DAY_OF_MONTH);Without a semicolon it's it's clear that the "expression" is just a building block that can be used to build something useful with.
| #### Concat Expression | ||
| ###### String Expressions |
There was a problem hiding this comment.
There is only one String Expression, namely Concat hence I simplified the hierarchy but we can also revert to
No description provided.