-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
add detail desc for String Function SUBSTRING_INDEX () and TO_BASE64 #16112
Conversation
Welcome @lyssom! |
@@ -292,11 +292,34 @@ SELECT BIN("123q123"); | |||
|
|||
### [`SUBSTRING_INDEX()`](https://dev.mysql.com/doc/refman/8.0/en/string-functions.html#function_substring-index) | |||
|
|||
从一个字符串中返回指定出现次数的定界符之前的子字符串 | |||
定义:返回字符串str中出现count次分隔符delim之前的子字符串。如果count为正数,则返回最终分隔符左侧的所有内容(从左侧算起)。 |
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.
定义:返回字符串str中出现count次分隔符delim之前的子字符串。如果count为正数,则返回最终分隔符左侧的所有内容(从左侧算起)。 | |
定义: 返回字符串 str 中出现第 count 次分隔符 delim 之前的子字符串。如果 count 为正数,则返回最终分隔符左侧的所有内容(从左侧算起)。 |
从一个字符串中返回指定出现次数的定界符之前的子字符串 | ||
定义:返回字符串str中出现count次分隔符delim之前的子字符串。如果count为正数,则返回最终分隔符左侧的所有内容(从左侧算起)。 | ||
如果count为负数,则返回最终分隔符右侧(从右侧计数)的所有内容。 | ||
SUBSTRING_INDEX()在搜索delim时执行区分大小写的匹配 |
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.
SUBSTRING_INDEX()在搜索delim时执行区分大小写的匹配 | |
SUBSTRING_INDEX() 在搜索 delim 时执行大小写敏感的匹配 |
定义:返回字符串str中出现count次分隔符delim之前的子字符串。如果count为正数,则返回最终分隔符左侧的所有内容(从左侧算起)。 | ||
如果count为负数,则返回最终分隔符右侧(从右侧计数)的所有内容。 | ||
SUBSTRING_INDEX()在搜索delim时执行区分大小写的匹配 | ||
语法:SUBSTRING_INDEX(str,delim,count) |
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.
参数和逗号之间请加空格
语法:SUBSTRING_INDEX(str,delim,count) | |
语法: SUBSTRING_INDEX(str, delim, count) |
|
||
### [`TO_BASE64()`](https://dev.mysql.com/doc/refman/8.0/en/string-functions.html#function_to-base64) | ||
|
||
返回转化为 base-64 表示的字符串参数 | ||
定义:将字符串参数转换为base-64编码形式,并将结果作为具有连接字符集和排序规则的字符串返回。 | ||
如果参数不是字符串,则在转换之前将其转换为字符串。 |
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.
定义中无需换行
|
||
### [`TO_BASE64()`](https://dev.mysql.com/doc/refman/8.0/en/string-functions.html#function_to-base64) | ||
|
||
返回转化为 base-64 表示的字符串参数 | ||
定义:将字符串参数转换为base-64编码形式,并将结果作为具有连接字符集和排序规则的字符串返回。 |
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.
定义:将字符串参数转换为base-64编码形式,并将结果作为具有连接字符集和排序规则的字符串返回。 | |
定义: 将字符串参数转换为 base-64 编码形式,并将带有连接字符集和 collation 的字符串作为结果返回。 |
collation 无需翻译,直接写 collation 就行
Base-64编码的字符串可以使用FROM_BASE64()函数进行解码。 | ||
语法:TO_BASE64(str) | ||
参数: str,必须项。待编码的字符串。 | ||
返回值:base-64编码 |
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.
@qiancai 我们的文档中需要写返回值吗?
如果参数为NULL,则结果为NULL。 | ||
Base-64编码的字符串可以使用FROM_BASE64()函数进行解码。 | ||
语法:TO_BASE64(str) | ||
参数: str,必须项。待编码的字符串。 |
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.
参数后面的格式是否有问题 @qiancai
@@ -292,11 +292,40 @@ SELECT BIN("123q123"); | |||
|
|||
### [`SUBSTRING_INDEX()`](https://dev.mysql.com/doc/refman/8.0/en/string-functions.html#function_substring-index) | |||
|
|||
从一个字符串中返回指定出现次数的定界符之前的子字符串 | |||
|
|||
定义:返回字符串 str 中出现 count 次分隔符 delim 之前的子字符串。如果 count 为正数,则返回最终分隔符左侧的所有内容(从左侧算起)。如果 count 为负数,则返回最终分隔符右侧(从右侧计数)的所有内容。SUBSTRING_INDEX() 在搜索 delim 时执行区分大小写的匹配 |
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.
冒号后面请添加空格,其它的地方同样。
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.
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.
LGTM
@xzhangxian1008: adding LGTM is restricted to approvers and reviewers in OWNERS files. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
[LGTM Timeline notifier]Timeline:
|
/test pull-verify |
/ok-to-test |
/test pull-verify |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: qiancai The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Fix #15950
First-time contributors' checklist
What is changed, added or deleted? (Required)
Which TiDB version(s) do your changes apply to? (Required)
Tips for choosing the affected version(s):
By default, CHOOSE MASTER ONLY so your changes will be applied to the next TiDB major or minor releases. If your PR involves a product feature behavior change or a compatibility change, CHOOSE THE AFFECTED RELEASE BRANCH(ES) AND MASTER.
For details, see tips for choosing the affected versions (in Chinese).
What is the related PR or file link(s)?
Do your changes match any of the following descriptions?