提交 72e0aab6 authored 作者: Thomas Mueller's avatar Thomas Mueller

Documentation.

上级 40c6ecf3
...@@ -1656,15 +1656,16 @@ charsetString [, fieldSepString [, fieldDelimString [, escString [, nullString]] ...@@ -1656,15 +1656,16 @@ charsetString [, fieldSepString [, fieldDelimString [, escString [, nullString]]
Optional parameters for CSVREAD and CSVWRITE. Optional parameters for CSVREAD and CSVWRITE.
Instead of setting the options one by one, all options can be Instead of setting the options one by one, all options can be
combined into a space separated key-value pairs, as follows: combined into a space separated key-value pairs, as follows:
'charset=UTF-8 escape="" fieldDelimiter="" fieldSeparator=, ' || STRINGDECODE('charset=UTF-8 escape=\"" fieldDelimiter=\"" fieldSeparator=, ' ||
'lineComment=# lineSeparator=\n null= rowSeparator='. 'lineComment=# lineSeparator=\n null= rowSeparator=').
The following options are supported: The following options are supported:
charset, escape, fieldDelimiter, fieldSeparator, charset, escape, fieldDelimiter, fieldSeparator,
lineComment (# for H2 version 1.2, disabled for H2 version 1.3), lineComment (# for H2 version 1.2, disabled for H2 version 1.3),
lineSeparator, null, rowSeparator (not set by default). lineSeparator, null, rowSeparator (not set by default).
The options text is encoded like a Java string. For a newline or other special character, use STRINGDECODE as in the example above.
A space needs to be escaped with a backslash ('\ ').
A backslash needs to be escaped with another backslash ('\\').
"," ","
CALL CSVWRITE('test2.csv', 'SELECT * FROM TEST', 'UTF-8', '|');
CALL CSVWRITE('test2.csv', 'SELECT * FROM TEST', 'charset=UTF-8 fieldSeparator=|'); CALL CSVWRITE('test2.csv', 'SELECT * FROM TEST', 'charset=UTF-8 fieldSeparator=|');
" "
......
...@@ -20,7 +20,7 @@ Change Log ...@@ -20,7 +20,7 @@ Change Log
<h2>Next Version (unreleased)</h2> <h2>Next Version (unreleased)</h2>
<ul><li>Improved error detection when starting a server with invalid arguments, <ul><li>Improved error detection when starting a server with invalid arguments,
such as "-tcpPort=9091" or "-tcpPort 9091" (as one parameter) instead of "-tcpPort", "9091". such as "-tcpPort=9091" or "-tcpPort 9091" (as one parameter) instead of "-tcpPort", "9091".
</li><li>The function JAVADECODE ignored characters after a non-escaped double quote. </li><li>The function STRINGDECODE ignored characters after a non-escaped double quote.
This is no longer the case. This is no longer the case.
</li><li>The new CSV option feature introduced in version 1.3.150 didn't support spaces. </li><li>The new CSV option feature introduced in version 1.3.150 didn't support spaces.
Now the escape mechanism is changed to support it. Now the escape mechanism is changed to support it.
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -106,7 +106,7 @@ public abstract class Tool { ...@@ -106,7 +106,7 @@ public abstract class Tool {
* then an exception is thrown. * then an exception is thrown.
* *
* @param arg the argument * @param arg the argument
* @param the option * @param option the command line option
* @return true if it matches * @return true if it matches
*/ */
public static boolean isOption(String arg, String option) { public static boolean isOption(String arg, String option) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论