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 [,...] ) ]
","
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
row per new row is affected, an exception is thrown. If the table contains an
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.
row per new row is affected, an exception is thrown.
","
MERGE INTO TEST KEY(ID) VALUES(2, 'World')
"
......@@ -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.
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.
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 (
SELECT 1
......@@ -3851,7 +3849,7 @@ WEEK(CREATED)
"Functions (Time and Date)","ISO_WEEK","
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
first week of year should have at least four days
and week is started with Monday.
......@@ -4262,7 +4260,7 @@ CALL SCHEMA()
SCOPE_IDENTITY()
","
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().
This method returns a long.
","
......
......@@ -41,10 +41,21 @@ public class GenerateHelp {
for (int i = 0; i < columnCount; i++) {
String s = rs.getString(1 + i);
if (i == 3) {
int dot = s.indexOf('.');
if (dot >= 0) {
s = s.substring(0, dot + 1);
int len = s.length();
int end = 0;
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;
}
......
......@@ -765,4 +765,4 @@ jacoco xdata invokes sourcefiles classfiles duplication crypto stacktraces prt d
interpolated thead
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 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论