-
Notifications
You must be signed in to change notification settings - Fork 109
Conversation
Signed-off-by: bake <bake@192k.pw>
README.md
Outdated
- Date and Timestamp functions: `YEAR(date)`, `MONTH(date)`, `DAY(date)`, `HOUR(date)`, `MINUTE(date)`, `SECOND(date)`, `DAYOFYEAR(date)`. | ||
- `ARRAY_LENGTH(json)`: If the json representation is an array, this function returns its size. | ||
- `SPLIT(str,sep)`: Receives a string and a separator and returns the parts of the string split by the separator as a JSON array of strings. | ||
- `CONCAT(...)`: Concatenate any group of fields into a single string. | ||
- `CONCAT_WS(sep, ...)`: Concatenate any group of fields into a single string separated by the first field. |
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.
Probably worth mentioning that null arguments are skipped and only returns null if sep is null.
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.
Thank you!
"Returns null if the separator is null. Following null fields are skipped." - Would this be ok?
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.
Sounds good to me!
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.
Lets copy paste from mysql docs:
... stands for Concatenate With Separator and is a special form of CONCAT(). The first argument is the separator for the rest of the arguments. The separator is added between the strings to be concatenated. The separator can be a string, as can the rest of the arguments. If the separator is NULL, the result is NULL.
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.
Sorry, I only just saw the comment. The descriptions now come from MySQLs docs.
Please sign a PR. |
Signed-off-by: bake <bake@192k.pw>
6e3f478
to
45230e1
Compare
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.
LGTM
Signed-off-by: bake <bake@192k.pw>
Add support for
CONCAT_WS
. Other thanCONCAT
, it returnsnull
only if the separator isnull
.null
fields are skipped.