Unverified 提交 bae4f972 authored 作者: Noel Grandin's avatar Noel Grandin 提交者: GitHub

Merge pull request #896 from katzyn/docs

Assorted changes in help.csv
...@@ -115,9 +115,7 @@ MERGE INTO tableName [ ( columnName [,...] ) ] ...@@ -115,9 +115,7 @@ MERGE INTO tableName [ ( columnName [,...] ) ]
"," ","
Updates existing rows, and insert rows that don't exist. If no key column is Updates existing rows, and insert rows that don't exist. If no key column is
specified, the primary key columns are used to find the row. If more than one specified, the primary key columns are used to find the row. If more than one
row per new row is affected, an exception is thrown. If the table contains an row per new row is affected, an exception is thrown.
auto-incremented key or identity column, and the row was updated, the generated
key is set to 0; otherwise it is set to the new key.
"," ","
MERGE INTO TEST KEY(ID) VALUES(2, 'World') MERGE INTO TEST KEY(ID) VALUES(2, 'World')
" "
...@@ -127,7 +125,7 @@ MERGE INTO targetTableName [ [AS] targetAlias] ...@@ -127,7 +125,7 @@ MERGE INTO targetTableName [ [AS] targetAlias]
USING { ( select ) | sourceTableName }[ [AS] sourceAlias ] USING { ( select ) | sourceTableName }[ [AS] sourceAlias ]
ON ( expression ) ON ( expression )
[ WHEN MATCHED THEN [ update ] [ delete] ] [ WHEN MATCHED THEN [ update ] [ delete] ]
[ WHEN NOT MATCHED THEN insert ] [ WHEN NOT MATCHED THEN insert ]
"," ","
Updates or deletes existing rows, and insert rows that don't exist. The ON clause Updates or deletes existing rows, and insert rows that don't exist. The ON clause
specifies the matching column expression and must be specified. If more than one row specifies the matching column expression and must be specified. If more than one row
...@@ -232,7 +230,7 @@ Can be used to create a recursive or non-recursive query (common table expressio ...@@ -232,7 +230,7 @@ Can be used to create a recursive or non-recursive query (common table expressio
For recursive queries the first select has to be a UNION. For recursive queries the first select has to be a UNION.
One or more common table entries can be referred to by name. One or more common table entries can be referred to by name.
Column name declarations are now optional - the column names will be inferred from the named select queries. Column name declarations are now optional - the column names will be inferred from the named select queries.
The final action in a WITH statement can be a select , insert , update , merge , delete or create table. The final action in a WITH statement can be a select, insert, update, merge, delete or create table.
"," ","
WITH RECURSIVE cte(n) AS ( WITH RECURSIVE cte(n) AS (
SELECT 1 SELECT 1
...@@ -274,8 +272,8 @@ ALTER SCHEMA TEST RENAME TO PRODUCTION ...@@ -274,8 +272,8 @@ ALTER SCHEMA TEST RENAME TO PRODUCTION
ALTER SEQUENCE [ IF EXISTS ] sequenceName [ RESTART WITH long ] [ INCREMENT BY long ] ALTER SEQUENCE [ IF EXISTS ] sequenceName [ RESTART WITH long ] [ INCREMENT BY long ]
[ MINVALUE long | NOMINVALUE | NO MINVALUE ] [ MINVALUE long | NOMINVALUE | NO MINVALUE ]
[ MAXVALUE long | NOMAXVALUE | NO MAXVALUE ] [ MAXVALUE long | NOMAXVALUE | NO MAXVALUE ]
[ CYCLE long | NOCYCLE | NO CYCLE ] [ CYCLE long | NOCYCLE | NO CYCLE ]
[ CACHE long | NOCACHE | NO CACHE ] [ CACHE long | NOCACHE | NO CACHE ]
"," ","
Changes the parameters of a sequence. Changes the parameters of a sequence.
This command does not commit the current transaction; however the new value is used by other This command does not commit the current transaction; however the new value is used by other
...@@ -663,8 +661,8 @@ CREATE SEQUENCE [ IF NOT EXISTS ] newSequenceName [ START WITH long ] ...@@ -663,8 +661,8 @@ CREATE SEQUENCE [ IF NOT EXISTS ] newSequenceName [ START WITH long ]
[ INCREMENT BY long ] [ INCREMENT BY long ]
[ MINVALUE long | NOMINVALUE | NO MINVALUE ] [ MINVALUE long | NOMINVALUE | NO MINVALUE ]
[ MAXVALUE long | NOMAXVALUE | NO MAXVALUE ] [ MAXVALUE long | NOMAXVALUE | NO MAXVALUE ]
[ CYCLE long | NOCYCLE | NO CYCLE ] [ CYCLE long | NOCYCLE | NO CYCLE ]
[ CACHE long | NOCACHE | NO CACHE ] [ CACHE long | NOCACHE | NO CACHE ]
"," ","
Creates a new sequence. Creates a new sequence.
The data type of a sequence is BIGINT. The data type of a sequence is BIGINT.
...@@ -2131,7 +2129,7 @@ Long numbers are between -9223372036854775808 and 9223372036854775807. ...@@ -2131,7 +2129,7 @@ Long numbers are between -9223372036854775808 and 9223372036854775807.
" "
"Other Grammar","Name"," "Other Grammar","Name","
{ { A-Z|_ } [ { A-Z|_|0-9 } [...] ] } | quotedName { { A-Z|_ } [ { A-Z|_|0-9 } [...] ] } | quotedName
"," ","
Names are not case sensitive. There is no maximum name length. Names are not case sensitive. There is no maximum name length.
"," ","
...@@ -2517,7 +2515,7 @@ OTHER ...@@ -2517,7 +2515,7 @@ OTHER
"Data Types","VARCHAR Type"," "Data Types","VARCHAR Type","
{ VARCHAR | LONGVARCHAR | VARCHAR2 | NVARCHAR { VARCHAR | LONGVARCHAR | VARCHAR2 | NVARCHAR
| NVARCHAR2 | VARCHAR_CASESENSITIVE} [ ( precisionInt ) ] | NVARCHAR2 | VARCHAR_CASESENSITIVE} [ ( precisionInt ) ]
"," ","
A Unicode String. A Unicode String.
Use two single quotes ('') to create a quote. Use two single quotes ('') to create a quote.
...@@ -3851,7 +3849,7 @@ WEEK(CREATED) ...@@ -3851,7 +3849,7 @@ WEEK(CREATED)
"Functions (Time and Date)","ISO_WEEK"," "Functions (Time and Date)","ISO_WEEK","
ISO_WEEK(timestamp) ISO_WEEK(timestamp)
"," ","
Returns the week (1-53) from a timestamp. Returns the ISO week (1-53) from a timestamp.
This method uses the ISO definition when This method uses the ISO definition when
first week of year should have at least four days first week of year should have at least four days
and week is started with Monday. and week is started with Monday.
...@@ -4242,7 +4240,7 @@ Returns the number of the current row. ...@@ -4242,7 +4240,7 @@ Returns the number of the current row.
This method returns a long. This method returns a long.
It is supported for SELECT statements, as well as for DELETE and UPDATE. It is supported for SELECT statements, as well as for DELETE and UPDATE.
The first row has the row number 1, and is calculated before ordering and grouping the result set, The first row has the row number 1, and is calculated before ordering and grouping the result set,
but after evaluating index conditions (even when the index conditions are specified in an outer query). but after evaluating index conditions (even when the index conditions are specified in an outer query).
To get the row number after ordering and grouping, use a subquery. To get the row number after ordering and grouping, use a subquery.
"," ","
SELECT ROWNUM(), * FROM TEST; SELECT ROWNUM(), * FROM TEST;
...@@ -4253,7 +4251,7 @@ SELECT ID FROM (SELECT T.*, ROWNUM AS R FROM TEST T) WHERE R BETWEEN 2 AND 3; ...@@ -4253,7 +4251,7 @@ SELECT ID FROM (SELECT T.*, ROWNUM AS R FROM TEST T) WHERE R BETWEEN 2 AND 3;
"Functions (System)","SCHEMA"," "Functions (System)","SCHEMA","
SCHEMA() SCHEMA()
"," ","
Returns the name of the default schema for this session. Returns the name of the default schema for this session.
"," ","
CALL SCHEMA() CALL SCHEMA()
" "
...@@ -4262,7 +4260,7 @@ CALL SCHEMA() ...@@ -4262,7 +4260,7 @@ CALL SCHEMA()
SCOPE_IDENTITY() SCOPE_IDENTITY()
"," ","
Returns the last inserted identity value for this session for the current scope Returns the last inserted identity value for this session for the current scope
(ie. the current statement). (the current statement).
Changes within triggers and Java functions are ignored. See also IDENTITY(). Changes within triggers and Java functions are ignored. See also IDENTITY().
This method returns a long. This method returns a long.
"," ","
......
...@@ -41,10 +41,21 @@ public class GenerateHelp { ...@@ -41,10 +41,21 @@ public class GenerateHelp {
for (int i = 0; i < columnCount; i++) { for (int i = 0; i < columnCount; i++) {
String s = rs.getString(1 + i); String s = rs.getString(1 + i);
if (i == 3) { if (i == 3) {
int dot = s.indexOf('.'); int len = s.length();
if (dot >= 0) { int end = 0;
s = s.substring(0, dot + 1); for (; end < len; end++) {
char ch = s.charAt(end);
if (ch == '.') {
end++;
break;
}
if (ch == '"') {
do {
end++;
} while (end < len && s.charAt(end) != '"');
}
} }
s = s.substring(0, end);
} }
row[i] = s; row[i] = s;
} }
......
...@@ -765,4 +765,4 @@ jacoco xdata invokes sourcefiles classfiles duplication crypto stacktraces prt d ...@@ -765,4 +765,4 @@ jacoco xdata invokes sourcefiles classfiles duplication crypto stacktraces prt d
interpolated thead interpolated thead
die weekdiff osx subprocess dow proleptic microsecond microseconds divisible cmp denormalized suppressed saturated mcs die weekdiff osx subprocess dow proleptic microsecond microseconds divisible cmp denormalized suppressed saturated mcs
london dfs weekdays intermittent looked msec tstz africa monrovia london dfs weekdays intermittent looked msec tstz africa monrovia asia tokyo
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论