Add English documents for Doris (#1719)

The english documents is translated by machine. So It may has some mistake.
We will fix them later
This commit is contained in:
xy720
2019-08-29 13:47:15 +08:00
committed by Mingyu Chen
parent 056a9fada3
commit 7a0c7f45b2
225 changed files with 14615 additions and 0 deletions

View File

@ -0,0 +1,28 @@
It35; ASCII
Description
'35;'35;' 35; Syntax
'INT AXES (WARCHAR STR)'
Returns the ASCII code corresponding to the first character of the string
'35;'35; example
```
mysql > select ascii ('1');
+------------+
124; ASCII ('1') 124;
+------------+
| 49 |
+------------+
mysql > select axes ('234');
+--------------+
124; ASCII ('234') 124;
+--------------+
| 50 |
+--------------+
```
##keyword
ASCII

View File

@ -0,0 +1,35 @@
'35; concat
Description
'35;'35;' 35; Syntax
'VARCHAR concat (VARCHAR,...)'
Connect multiple strings and return NULL if any of the parameters is NULL
'35;'35; example
```
mysql> select concat("a", "b");
+------------------+
*124concat ('a','b') 1244;
+------------------+
1.2.2.2.2.2.
+------------------+
mysql> select concat("a", "b", "c");
+-----------------------+
124concat ('a','b','c') 1244;
+-----------------------+
1.2.2.2.2.2.2.
+-----------------------+
mysql > select concat ("a", null, "c");
+------------------------+
124concat (a), NULL,'c')
+------------------------+
No. No. No.
+------------------------+
```
##keyword
CONCAT

View File

@ -0,0 +1,37 @@
Concat w
Description
'35;'35;' 35; Syntax
'VARCHAR concat ws (VARCHAR sep., VARCHAR str,...)'
Using the first parameter SEP as a connector, the second parameter and all subsequent parameters are spliced into a string.
If the separator is NULL, return NULL.
` The concat_ws` function does not skip empty strings, but NULL values.
'35;'35; example
```
mysql> select concat_ws("or", "d", "is");
+----------------------------+
124concat ws (or','d','is') 124s;
+----------------------------+
1.2.2.2.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.
+----------------------------+
mysql> select concat_ws(NULL, "d", "is");
+----------------------------+
(NULL,'d','is') 1244;
+----------------------------+
No. No. No.
+----------------------------+
mysql > select concat ws ("or", "d", NULL,"is");
+---------------------------------+
Concat ws ("or", "d", NULL,"is").
+---------------------------------+
1.2.2.2.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.
+---------------------------------+
```
##keyword
CONCAT WS,CONCAT,WS

View File

@ -0,0 +1,21 @@
IV35; Find@U set
Description
'35;'35;' 35; Syntax
"NOT found in set (VARCHAR str., VARCHAR strlist)"
Return to the location where the str first appears in strlist (counting from 1). Strlist is a comma-separated string. If not, return 0. Any parameter is NULL, returning NULL.
'35;'35; example
```
mysql > select find in u set ("b", "a,b,c");
+---------------------------+
Find in set ('b','a,b,c') 1244;
+---------------------------+
| 2 |
+---------------------------+
```
##keyword
FIND IN SET,FIND,IN,SET

View File

@ -0,0 +1,48 @@
Get two copies
Description
'35;'35;' 35; Syntax
"DOUBLE get" is a double (VARCHAR is on the street, VARCHAR is on the path)
Parse and get the floating-point content of the specified path in the JSON string.
Where json_path must start with the $symbol and use. as the path splitter. If the path contains..., double quotation marks can be used to surround it.
Use [] to denote array subscripts, starting at 0.
The content of path cannot contain ",[and].
If the json_string format is incorrect, or the json_path format is incorrect, or matches cannot be found, NULL is returned.
'35;'35; example
1. Get the value of key as "k1"
```
mysql > SELECT get'u json 'double ('{"k1":1.3, "k2":"2"}, "$.k1");
+-------------------------------------------------+
Get double ('{"k1":1.3, "k2":"2"},'$.k1')'124get;
+-------------------------------------------------+
| 1.3 |
+-------------------------------------------------+
```
2. Get the second element of the array whose key is "my. key"
```
mysql > SELECT get'u json 'double ('{"k1":"v1", "my.key":[1.1, 2.2, 3.3]}','$"my.key"[1]);
+---------------------------------------------------------------------------+
Get me a double ('{"k1":"v1", "my.key":[1.1, 2.2, 3.3]}','$"my.key"[1]])'124;
+---------------------------------------------------------------------------+
| 2.2 |
+---------------------------------------------------------------------------+
```
3. Get the first element in an array whose secondary path is k1. key - > K2
```
mysql > SELECT get'u json 'double ('{"k1.key":{"k2":[1.1, 2.2]}}','$."k1.key".k2 [0]);
+---------------------------------------------------------------------+
Get double ('{"k1.key":{"k2":[1.1, 2.2]}}','$"k1.key.k2 [0]])'124;
+---------------------------------------------------------------------+
| 1.1 |
+---------------------------------------------------------------------+
```
##keyword
GET_JSON_DOUBLE,GET,JSON,DOUBLE

View File

@ -0,0 +1,48 @@
# get_json_int
Description
'35;'35;' 35; Syntax
'I don't get you int (VARCHAR is on, VARCHAR is on the path)
Parse and retrieve the integer content of the specified path in the JSON string.
Where json_path must start with the $symbol and use. as the path splitter. If the path contains..., double quotation marks can be used to surround it.
Use [] to denote array subscripts, starting at 0.
The content of path cannot contain ",[and].
If the json_string format is incorrect, or the json_path format is incorrect, or matches cannot be found, NULL is returned.
'35;'35; example
1. Get the value of key as "k1"
```
mysql > SELECT get json u int ('{"k1":1, "k2":"2"}, "$.k1");
+--------------------------------------------+
Get it on int ('{"k1":1, "k2":"2"},'$.k1') 124s;
+--------------------------------------------+
| 1 |
+--------------------------------------------+
```
2. Get the second element of the array whose key is "my. key"
```
mysql > SELECT get u json u int ('{"k1":"v1", "my.key":[1, 2, 3]}','$"my.key"[1]);
+------------------------------------------------------------------+
Get me on int ('{"k1":"v1", "my.key":[1, 2, 3]}','$"my.key"[1]])'124;
+------------------------------------------------------------------+
| 2 |
+------------------------------------------------------------------+
```
3. Get the first element in an array whose secondary path is k1. key - > K2
```
mysql > SELECT get u json u int ('{"k1.key":{"k2":[1, 2]}','$"k1.key".k2 [0]');
+--------------------------------------------------------------+
Get me on int ('{"k1.key":{"k2":[1, 2]}','$"k1.key".k2 [0]) 1244;
+--------------------------------------------------------------+
| 1 |
+--------------------------------------------------------------+
```
##keyword
GET_JSON_INT,GET,JSON,INT

View File

@ -0,0 +1,58 @@
''35; get me a string
Description
'35;'35;' 35; Syntax
'VARCHAR get'u string (VARCHAR json str, VARCHAR json path)
Parse and retrieve the string content of the specified path in the JSON string.
Where json_path must start with the $symbol and use. as the path splitter. If the path contains..., double quotation marks can be used to surround it.
Use [] to denote array subscripts, starting at 0.
The content of path cannot contain ",[and].
If the json_string format is incorrect, or the json_path format is incorrect, or matches cannot be found, NULL is returned.
'35;'35; example
1. Get the value of key as "k1"
```
mysql > SELECT get a json string ('{"k1":"v1", "k2":"v2"}, "$.k1");
+---------------------------------------------------+
Get json string ('{"k1":"v1", "k2":"v2"}','$.k1')'124get;
+---------------------------------------------------+
1.2.2.1.;
+---------------------------------------------------+
```
2. Get the second element of the array whose key is "my. key"
```
mysql > SELECT get u json string ('{"k1":"v1", "my.key":["e1", "e2", "e3"]}','$."my.key"[1]);
+------------------------------------------------------------------------------+
Get json string ('{"k1":"v1", "my.key":["e1", "e2", "e3"]}','$"my.key"[1]])'1244;
+------------------------------------------------------------------------------+
1.2.2.;2.;
+------------------------------------------------------------------------------+
```
3. Get the first element in an array whose secondary path is k1. key - > K2
```
mysql > SELECT get u json string ('{"k1.key":{"k2":["v1", "v2"]}}','$."k1.key".k2 [0]);
+-----------------------------------------------------------------------+
Get json string ('{"k1.key":{"k2":["v1", "v2"]}','$"k1.key.k2 [0]])'124s;
+-----------------------------------------------------------------------+
1.2.2.1.;
+-----------------------------------------------------------------------+
```
4. Get all the values in the array where the key is "k1"
```
mysql > SELECT get u json string ('["k1":"v1"}, {"k2":"v2"}, {"k1":"v3"}, {"k1":"v4"}],'$.k1');
+---------------------------------------------------------------------------------+
Get your string ('[{"k1":"v1"}, {"k2":"v2"}, {"k1":"v3"}, {"k1":"v3"}, {"k1":"v4"}]],'$.k1') 1244;
+---------------------------------------------------------------------------------+
124; ["v1","v3","v4"].124
+---------------------------------------------------------------------------------+
```
##keyword
GET_JSON_STRING,GET,JSON,STRING

View File

@ -0,0 +1,37 @@
Groups \\\35
Description
'35;'35;' 35; Syntax
'VARCHAR group 'concat (VARCHAR str [, VARCHAR sep])
This function is an aggregation function similar to sum (), and group_concat links multiple rows of results in the result set to a string. The second parameter, sep, is a connection symbol between strings, which can be omitted. This function usually needs to be used with group by statements.
'35;'35; example
```
mysql> select value from test;
+-------+
| value |
+-------+
(a)'124;
(b)'1244;
(c)'1244;
+-------+
mysql> select group_concat(value) from test;
+-----------------------+
| group_concat(`value`) |
+-----------------------+
124a, b, c, 124a;
+-----------------------+
mysql> select group_concat(value, " ") from test;
+----------------------------+
| group_concat(`value`, ' ') |
+----------------------------+
| a b c |
+----------------------------+
```
##keyword
GROUP_CONCAT,GROUP,CONCAT

View File

@ -0,0 +1,8 @@
=============
字符串函数
=============
.. toctree::
:glob:
*

View File

@ -0,0 +1,28 @@
~35instr
Description
'35;'35;' 35; Syntax
'INT INSR (WARCHAR STR, WARCHAR substrate)'
Returns the location where substr first appeared in str (counting from 1). If substr does not appear in str, return 0.
'35;'35; example
```
mysql> select instr("abc", "b");
+-------------------+
124Insr ('abc','b') 124
+-------------------+
| 2 |
+-------------------+
mysql> select instr("abc", "d");
+-------------------+
124Insr ('abc','d') 124
+-------------------+
| 0 |
+-------------------+
```
##keyword
INSTR

View File

@ -0,0 +1,11 @@
'35; lcase
Description
'35;'35;' 35; Syntax
'INT lcase (VARCHAR str)'
Consistent with `lower'.
##keyword
LCASE

View File

@ -0,0 +1,21 @@
# left
Description
'35;'35;' 35; Syntax
'VARCHAR left (VARCHAR str)'
It returns the left part of a string of specified length
'35;'35; example
```
mysql> select left("Hello doris",5);
+------------------------+
left ('Hello doris', 5)'1244;
+------------------------+
| Hello |
+------------------------+
```
##keyword
LEFT

View File

@ -0,0 +1,28 @@
# length
Description
'35;'35;' 35; Syntax
'INT length (VARCHAR str)'
Returns the length of the string and the number of characters returned for multi-byte characters. For example, five two-byte width words return a length of 10.
'35;'35; example
```
mysql> select length("abc");
+---------------+
length ('abc') 1244;
+---------------+
| 3 |
+---------------+
mysql> select length("中国");
+------------------+
| length('中国') |
+------------------+
| 6 |
+------------------+
```
##keyword
LENGTH

View File

@ -0,0 +1,35 @@
'35; locate
Description
'35;'35;' 35; Syntax
'INT LOCATION (WARCHAR substrate, WARCHAR str [, INT pos]]'
Returns where substr appears in str (counting from 1). If the third parameter POS is specified, the position where substr appears is found from the string where STR starts with POS subscript. If not found, return 0
'35;'35; example
```
mysql> SELECT LOCATE('bar', 'foobarbar');
+----------------------------+
| locate('bar', 'foobarbar') |
+----------------------------+
| 4 |
+----------------------------+
mysql> SELECT LOCATE('xbar', 'foobar');
+--------------------------+
| locate('xbar', 'foobar') |
+--------------------------+
| 0 |
+--------------------------+
mysql > SELECT LOCATE ('bar','foobarbar', 5);
+-------------------------------+
Location ('bar','foobarbar', 5)'124s;
+-------------------------------+
| 7 |
+-------------------------------+
```
##keyword
LOCATE

View File

@ -0,0 +1,21 @@
# lower
Description
'35;'35;' 35; Syntax
'INT lower (WARCHAR str)'
Convert all strings in parameters to lowercase
'35;'35; example
```
mysql> SELECT lower("AbC123");
+-----------------+
1.A/AC.109/2002/L.1;
+-----------------+
1244; abc123
+-----------------+
```
##keyword
LOWER

View File

@ -0,0 +1,28 @@
{35; lpad
Description
'35;'35;' 35; Syntax
'VARCHAR lpad (VARCHAR str., INT len, VARCHAR pad)'
Returns a string of length len in str, starting with the initials. If len is longer than str, pad characters are added to STR until the length of the string reaches len. If len is less than str's length, the function is equivalent to truncating STR strings and returning only strings of len's length.
'35;'35; example
```
mysql > SELECT lpad ("hi", 5, "xy");
+---------------------+
1244; lpad ('hi', 5,'xy') 1244;
+---------------------+
| xyxhi |
+---------------------+
mysql > SELECT lpad ("hi", 1, "xy");
+---------------------+
1244; lpad ('hi', 1,'xy') 1244;
+---------------------+
1.2.2.2.2.2.1.1.1.1.2.
+---------------------+
```
##keyword
LPAD

View File

@ -0,0 +1,21 @@
'35; ltrim
Description
'35;'35;' 35; Syntax
'VARCHAR ltrim (VARCHAR str)'
Remove the space that appears continuously from the beginning of the parameter str
'35;'35; example
```
mysql > SELECT ltrim (ab d');
+------------------+
1244; ltrim (ab d') 1244;
+------------------+
1.2.4.;b d
+------------------+
```
##keyword
LTRIM

View File

@ -0,0 +1,35 @@
# money_format
Description
'35;'35;' 35; Syntax
VARCHAR money format (Number)
The number is output in currency format, the integer part is separated by commas every three bits, and the decimal part is reserved for two bits.
'35;'35; example
```
mysql> select money_format(17014116);
+------------------------+
| money_format(17014116) |
+------------------------+
| 17,014,116.00 |
+------------------------+
mysql> select money_format(1123.456);
+------------------------+
| money_format(1123.456) |
+------------------------+
| 1,123.46 |
+------------------------+
mysql> select money_format(1123.4);
+----------------------+
| money_format(1123.4) |
+----------------------+
| 1,123.40 |
+----------------------+
```
##keyword
MONEY_FORMAT,MONEY,FORMAT

View File

@ -0,0 +1,28 @@
# regexp_extract
Description
'35;'35;' 35; Syntax
'VARCHAR regexp 'extract (VARCHAR str, VARCHAR pattern, int pos)
The string STR is matched regularly and the POS matching part which conforms to pattern is extracted. Patterns need to match exactly some part of the STR to return to the matching part of the pattern. If there is no match, return an empty string.
'35;'35; example
```
mysql> SELECT regexp_extract('AbCdE', '([[:lower:]]+)C([[:lower:]]+)', 1);
+-------------------------------------------------------------+
.124; regexp Extract ('AbCdE', [[[[[:lower:]]]+)C ([[[:lower:]+]]]]'-1'-124;
+-------------------------------------------------------------+
(b)'1244;
+-------------------------------------------------------------+
mysql> SELECT regexp_extract('AbCdE', '([[:lower:]]+)C([[:lower:]]+)', 2);
+-------------------------------------------------------------+
.124; regexp Extract ('AbCdE', [[[[[:lower:]]]+)C ([[[:lower:]+]]]]]'-2'-124;
+-------------------------------------------------------------+
(d) 124d;
+-------------------------------------------------------------+
```
##keyword
REGEXP_EXTRACT,REGEXP,EXTRACT

View File

@ -0,0 +1,28 @@
Replace regexp
Description
'35;'35;' 35; Syntax
VARCHAR regexp replace (VARCHAR str, VARCHAR pattern, VARCHAR repl)
Regular matching of STR strings, replacing the part hitting pattern with repl
'35;'35; example
```
mysql> SELECT regexp_replace('a b c', " ", "-");
+-----------------------------------+
| regexp_replace('a b c', ' ', '-') |
+-----------------------------------+
A -b -c `124;
+-----------------------------------+
mysql> SELECT regexp_replace('a b c','(b)','<\\1>');
+----------------------------------------+
Replace ('a b c','(b)','<\1 >') regexp;
+----------------------------------------+
A <b >c {1244}
+----------------------------------------+
```
##keyword
REGEXP_REPLACE,REGEXP,REPLACE

View File

@ -0,0 +1,28 @@
# repeat
Description
'35;'35;' 35; Syntax
'VARCHAR repeat (VARCHAR str, INT count)
Repeat the str of the string count times, return empty string when count is less than 1, return NULL when str, count is any NULL
'35;'35; example
```
mysql> SELECT repeat("a", 3);
+----------------+
repeat ('a', 3)'1244;
+----------------+
| aaa |
+----------------+
mysql> SELECT repeat("a", -1);
+-----------------+
repeat ('a', -1) 1244;
+-----------------+
| |
+-----------------+
```
##keyword
REPEAT,

View File

@ -0,0 +1,21 @@
# right
Description
'35;'35;' 35; Syntax
'WARCHAR RIGHT (WARCHAR STR)'
It returns the right part of a string of specified length
'35;'35; example
```
mysql> select right("Hello doris",5);
+-------------------------+
Right ('Hello doris', 5)'1244;
+-------------------------+
1.2.2.2.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.
+-------------------------+
```
##keyword
RIGHT

View File

@ -0,0 +1,43 @@
# split_part
Description
'35;'35;' 35; Syntax
'VARCHAR split party (VARCHAR content, VARCHAR delimiter, INT field)'
Returns the specified partition (counting from the beginning) by splitting the string according to the partitioner.
'35;'35; example
```
mysql> select split_part("hello world", " ", 1);
+----------------------------------+
(hello world','1)'124split part';
+----------------------------------+
| hello |
+----------------------------------+
mysql> select split_part("hello world", " ", 2);
+----------------------------------+
(hello world','2)'124u;
+----------------------------------+
| world |
+----------------------------------+
mysql> select split_part("2019年7月8号", "月", 1);
+-----------------------------------------+
(2019726376;821495;','263761,') 1244;
+-----------------------------------------+
| July 2019|
+-----------------------------------------+
mysql> select split_part("abca", "a", 1);
+----------------------------+
split part ('abca','a', 1)
+----------------------------+
| |
+----------------------------+
```
##keyword
SPLIT_PART,SPLIT,PART

View File

@ -0,0 +1,21 @@
# strleft
Description
'35;'35;' 35; Syntax
'WARCHAR STRAIGHT (WARCHAR STR)'
It returns the left part of a string of specified length
'35;'35; example
```
mysql> select strleft("Hello doris",5);
+------------------------+
(Hello doris', 5)'1244;
+------------------------+
| Hello |
+------------------------+
```
##keyword
STRLEFT

View File

@ -0,0 +1,21 @@
35; strright
Description
'35;'35;' 35; Syntax
'VARCHAR strright (VARCHAR str)'
It returns the right part of a string of specified length
'35;'35; example
```
mysql> select strright("Hello doris",5);
+-------------------------+
strright ('Hello doris', 5)'1244;
+-------------------------+
1.2.2.2.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.
+-------------------------+
```
##keyword
STRRIGHT