-
Notifications
You must be signed in to change notification settings - Fork 11
*: add interfaces zh && add link to other lang #8
Conversation
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.
主要是部分不是太符合中文语法或者直接看中文无法理解是什么意思的句子,看看可以怎么改
@@ -1,6 +1,6 @@ | |||
<a name="formats"></a> | |||
|
|||
# Formats | |||
# 数据格式 | |||
|
|||
The format determines how data is returned to you after SELECTs (how it is written and formatted by the server), and how it is accepted for INSERTs (how it is read and parsed by the server). |
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.
外链,后续涉及此页面的再翻译
zh/interfaces/cli.md
Outdated
To use batch mode, specify the 'query' parameter, or send data to 'stdin' (it verifies that 'stdin' is not a terminal), or both. | ||
Similar to the HTTP interface, when using the 'query' parameter and sending data to 'stdin', the request is a concatenation of the 'query' parameter, a line feed, and the data in 'stdin'. This is convenient for large INSERT queries. | ||
这个客户端可以选择使用交互式与非交互式(批量)两种模式。 | ||
使用批量模式,要指定 `query` 参数,或者发送数据到 `stdin`(它会检查 `stdin` 是否是结束输入),或者两种同时使用。 |
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.
结束输入 => 终端/命令行/直接写terminal就好了
zh/interfaces/cli.md
Outdated
|
||
By default, you can only process a single query in batch mode. To make multiple queries from a "script," use the --multiquery parameter. This works for all queries except INSERT. Query results are output consecutively without additional separators. | ||
Similarly, to process a large number of queries, you can run 'clickhouse-client' for each query. Note that it may take tens of milliseconds to launch the 'clickhouse-client' program. | ||
在批量模式中,默认的数据格式是 Tab 分隔的。您可以根据查询来灵活设置 FORMAT 格式。 |
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.
TabSeparated
还是保留原样吧,因为这是一个可以用的参数值
zh/interfaces/cli.md
Outdated
|
||
In interactive mode, you get a command line where you can enter queries. | ||
默认情况下,在批量模式中您只能执行单个查询。为了从一个 Script 中执行多个查询,可以使用 `--multiquery` 参数。但这只在除了 INSERT 请求 中有用。查询结果会连续且不含分隔符地输出。 |
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.
但这只在除了 INSERT 请求 中有用 => 中文比较容易读的话可以说除了 INSERT 外,这个参数在任何请求中均可用。
zh/interfaces/cli.md
Outdated
|
||
If 'multiline' is not specified (the default):To run the query, press Enter. The semicolon is not necessary at the end of the query. To enter a multiline query, enter a backslash `\` before the line feed. After you press Enter, you will be asked to enter the next line of the query. | ||
在交互模式下,当您输入查询后,您都会得到一行命令。 |
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.
建议译成 在交互模式下,每条查询过后,你可以直接输入下一条查询命令。
zh/interfaces/http_interface.md
Outdated
If part of the query is sent in the parameter, and part in the POST, a line feed is inserted between these two data parts. | ||
Example (this won't work): | ||
如果一部分请求是通过参数发送的,另外一部分通过 POST 主体发送,两部分查询之间会一行空行插入。 | ||
示例(这并不能正常工作): |
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.
示例(这并不能正常工作)
=> 错误示例
zh/interfaces/http_interface.md
Outdated
@@ -72,39 +72,39 @@ $ echo 'SELECT 1 FORMAT Pretty' | curl 'http://localhost:8123/?' --data-binary @ | |||
└───┘ | |||
``` | |||
|
|||
The POST method of transmitting data is necessary for INSERT queries. In this case, you can write the beginning of the query in the URL parameter, and use POST to pass the data to insert. The data to insert could be, for example, a tab-separated dump from MySQL. In this way, the INSERT query replaces LOAD DATA LOCAL INFILE from MySQL. | |||
通过 POST 方法来插入数据对于 INSERT 是很有必要的。这种情况下,你可以将查询的开头部分放在 URL 参数中,然后用 POST 主体传入插入的数据。插入的数据可以是,举个例子,从 MySQL 导出的以 tab 分割的数据。在这种方式中,INSERT 查询取代了 LOAD DATA LOCAL INFILE from MySQL。 |
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.
通过 POST 方法来插入数据对于 INSERT 是很有必要的
=> INSERT 必须通过 POST 方法来插入数据
zh/interfaces/http_interface.md
Outdated
|
||
In contrast to the native interface, the HTTP interface does not support the concept of sessions or session settings, does not allow aborting a query (to be exact, it allows this in only a few cases), and does not show the progress of query processing. Parsing and data formatting are performed on the server side, and using the network might be ineffective. | ||
The optional 'query_id' parameter can be passed as the query ID (any string). For more information, see the section "Settings, replace_running_query". | ||
在对比了本地接口,HTTP接口不支持会话或会话设置的概念,不允许中止查询(准确地说,它让这只在少数情况下),不显示查询处理的进展。服务器端执行解析和数据格式化,使用网络可能无效。 |
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.
在对比了本地接口
=> 与 TCP 原生接口相反的是
它让这只在少数情况下
=> 在少数情况下这是可行的
使用网络可能无效
=> 所以带宽的使用效率并不高
zh/interfaces/http_interface.md
Outdated
In contrast to the native interface, the HTTP interface does not support the concept of sessions or session settings, does not allow aborting a query (to be exact, it allows this in only a few cases), and does not show the progress of query processing. Parsing and data formatting are performed on the server side, and using the network might be ineffective. | ||
The optional 'query_id' parameter can be passed as the query ID (any string). For more information, see the section "Settings, replace_running_query". | ||
在对比了本地接口,HTTP接口不支持会话或会话设置的概念,不允许中止查询(准确地说,它让这只在少数情况下),不显示查询处理的进展。服务器端执行解析和数据格式化,使用网络可能无效。 | ||
对于本地接口,HTTP 接口不支持会话或会话设置的概念,不允许中止查询(准确地说,少数情况下允许),不显示查询处理的进展。服务器端执行解析和数据格式化,网络的使用可能会无效。 |
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.
这句重复了
@@ -1,6 +1,6 @@ | |||
# Libraries from third-party developers | |||
# 三方开发的库 |
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.
第三方
?
按照reviewer的意见修改了一下 |
zh/interfaces/cli.md
Outdated
|
||
如果 `multiline` 没有指定(默认没指定的):为了执行查询,按下 Enter 即可。查询语句不是必须使用分号结尾。为了执行多个查询,可以在换行之前输入一个反斜杠` \ `,然后在您按下 Enter 键后,您就可以输入下一行查询 了。 | ||
如果 `multiline` 没有指定(默认没指定):为了执行查询,按下 Enter 即可。查询语句不是必须使用分号结尾。如果需要些一个多行的查询语句,可以在换行之前输入一个反斜杠` \ `,然后在您按下 Enter 键后,您就可以输入当前语句的下一行查询了。 |
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.
typo 如果需要些一个多行的查询语句
=> 写
zh/interfaces/http_interface.md
Outdated
@@ -72,7 +72,7 @@ $ echo 'SELECT 1 FORMAT Pretty' | curl 'http://localhost:8123/?' --data-binary @ | |||
└───┘ | |||
``` | |||
|
|||
通过 POST 方法来插入数据对于 INSERT 是很有必要的。这种情况下,你可以将查询的开头部分放在 URL 参数中,然后用 POST 主体传入插入的数据。插入的数据可以是,举个例子,从 MySQL 导出的以 tab 分割的数据。在这种方式中,INSERT 查询取代了 LOAD DATA LOCAL INFILE from MySQL。 | |||
INSERT 必须通过POST 方法来插入数据。这种情况下,你可以将查询的开头部分放在 URL 参数中,然后用 POST 主体传入插入的数据。插入的数据可以是,举个例子,从 MySQL 导出的以 tab 分割的数据。在这种方式中,INSERT 查询取代了 LOAD DATA LOCAL INFILE from MySQL。 |
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.
POST 前空格(这个纯粹找茬)
zh/interfaces/http_interface.md
Outdated
@@ -190,8 +190,7 @@ $ echo 'SELECT number FROM system.numbers LIMIT 10' | curl 'http://localhost:812 | |||
|
|||
更多关于其他参数的信息,参见 "[设置](../../operations/settings)" 部分。 | |||
|
|||
在对比了本地接口,HTTP接口不支持会话或会话设置的概念,不允许中止查询(准确地说,它让这只在少数情况下),不显示查询处理的进展。服务器端执行解析和数据格式化,使用网络可能无效。 | |||
对于本地接口,HTTP 接口不支持会话或会话设置的概念,不允许中止查询(准确地说,少数情况下允许),不显示查询处理的进展。服务器端执行解析和数据格式化,网络的使用可能会无效。 | |||
相比起 TCP 原生接口,HTTP 接口不支持会话和会话设置的概念,不允许中止查询(准确地说,只在少数情况下运行),不显示查询处理的进展。执行解析和数据格式化都是在服务端处理,网络上会比 TCP 原生接口更低效。 |
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.
允许。。
zh/interfaces/http_interface.md
Outdated
@@ -213,4 +212,4 @@ HTTP 接口允许传入额外的数据(外部临时表)来查询。更多信 | |||
curl -sS 'http://localhost:8123/?max_result_bytes=4000000&buffer_size=3000000&wait_end_of_query=1' -d 'SELECT toUInt8(number) FROM system.numbers LIMIT 9000000 FORMAT RowBinary' | |||
``` | |||
|
|||
使用缓冲区可以避免在响应状态码和HTTP头被发送到客户机后发生查询处理出错的情况。在这种情况下,响应主体的结尾会写入一条错误消息,而在客户端,只能在解析阶段检测错误。 | |||
查询请求响应状态码和HTTP头被发送到客户端后,若发生查询处理出错,使用缓冲区可以避免这种情况的发生。在这种情况下,响应主体的结尾会写入一条错误消息,而在客户端,只能在解析阶段检测到该错误。 |
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.
HTTP 的空格
fix #5 |
添加 接口 的翻译文档
添加外链到官方其他语言