-
Notifications
You must be signed in to change notification settings - Fork 256
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
string-function_dev #1851
base: master
Are you sure you want to change the base?
string-function_dev #1851
Conversation
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.
- 问题较多,请仔细看参考文档中函数部分的示例。
- 共性问题评论到了第一篇文档上,麻烦把后续的文档也一并修改吧
|
||
```sql | ||
trim( str [, VARCHAR rhs]) |
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.
- 函数名大写
- 不需要参数类型
- 参数需要用尖括号包裹
trim( str [, VARCHAR rhs]) | |
TRIM( <str> [, <rhs> ]) |
```sql | ||
trim( str [, VARCHAR rhs]) | ||
``` | ||
|
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.
缺少参数和返回值章节
### keywords | ||
UCASE | ||
```sql | ||
mysql> SELECT ucase("aBc123"); |
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.
不用能 prompt
mysql> SELECT ucase("aBc123"); | |
SELECT ucase("aBc123"); |
## 描述 | ||
|
||
将URL转换为解码字符串。 | ||
|
||
## 语法 | ||
|
||
```sql | ||
VARCHAR url_decode(VARCHAR url) | ||
URL_DECODE(' STRING ') | ||
``` | ||
|
||
### Parameters |
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.
中文文档的章节名需要用中文
URL_ENCODE(' STRING ') | ||
``` | ||
|
||
## 必选参数 |
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.
## 必选参数 | |
## 参数 |
|
||
## 必选参数 | ||
|
||
- STRING: 待编码的字符串。 |
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.
参数需要时表格形式
## 示例 | ||
|
||
```sql | ||
mysql> select URL_ENCODE('Doris Q&A'); |
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.
结果和查询要分成两个code block
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.
就一个问题,参数章节里面的参数列,也需要带上尖括号
docs/sql-manual/sql-functions/scalar-functions/string-functions/trim-in.md
Outdated
Show resolved
Hide resolved
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.
中文文档语法部分都有类似的问题,评论了一个,其他的也修改一下吧
|
||
When the 'rhs' parameter is not present, remove the continuous spaces that appear from the starting and ending of the 'str' parameter. Otherwise, remove 'rhs'. | ||
```sql | ||
RTIM( <str> [ , <rhs>]) |
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.
RTIM( <str> [ , <rhs>]) | |
TRIM( <str> [ , <rhs>]) |
select URL_ENCODE('Doris Q&A'); | ||
``` | ||
|
||
```sql |
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.
```sql | |
```text |
## 语法 | ||
|
||
`DOUBLE get_json_double(VARCHAR json_str, VARCHAR json_path)` | ||
`DOUBLE GET_JSON_DOUBLE( <json_str>, <json_path>)` |
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.
- 要用 code block 不要用 inline code
- 不要返回类型
`DOUBLE GET_JSON_DOUBLE( <json_str>, <json_path>)` | |
```sql | |
GET_JSON_DOUBLE( <json_str>, <json_path>) | |
``` |
|
||
When the 'rhs' parameter is not present, remove the continuous spaces that appear from the starting and ending of the 'str' parameter. Otherwise, remove 'rhs'. | ||
```sql | ||
RTIM( <str> [ , <rhs>]) |
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.
RTIM( <str> [ , <rhs>]) | |
TRIM( <str> [ , <rhs>]) |
Versions
Languages
Docs Checklist