2017-12-15 19:34:19 +00:00
|
|
|
#!/usr/bin/env bash
|
2016-08-17 05:53:14 +00:00
|
|
|
|
2017-12-15 19:34:19 +00:00
|
|
|
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
|
|
|
. $CURDIR/../shell_config.sh
|
2016-08-17 05:53:14 +00:00
|
|
|
|
2020-05-29 10:08:11 +00:00
|
|
|
$CLICKHOUSE_CLIENT --query="DROP TABLE IF EXISTS numbers";
|
|
|
|
$CLICKHOUSE_CLIENT --query="CREATE TABLE numbers (number UInt64) engine = MergeTree order by number";
|
|
|
|
$CLICKHOUSE_CLIENT --query="INSERT INTO numbers select * from system.numbers limit 10";
|
2017-12-15 19:34:19 +00:00
|
|
|
|
2020-05-29 10:08:11 +00:00
|
|
|
$CLICKHOUSE_CLIENT --query="SELECT number FROM numbers LIMIT 10 FORMAT JSON" | grep 'rows_read';
|
|
|
|
$CLICKHOUSE_CLIENT --query="SELECT number FROM numbers LIMIT 10 FORMAT JSONCompact" | grep 'rows_read';
|
|
|
|
$CLICKHOUSE_CLIENT --query="SELECT number FROM numbers LIMIT 10 FORMAT XML" | grep 'rows_read';
|
2019-04-29 16:07:59 +00:00
|
|
|
|
2020-05-29 10:08:11 +00:00
|
|
|
${CLICKHOUSE_CURL} -sS "${CLICKHOUSE_URL}" -d "SELECT number FROM numbers LIMIT 10 FORMAT JSON" | grep 'rows_read';
|
|
|
|
${CLICKHOUSE_CURL} -sS "${CLICKHOUSE_URL}" -d "SELECT number FROM numbers LIMIT 10 FORMAT JSONCompact" | grep 'rows_read';
|
|
|
|
${CLICKHOUSE_CURL} -sS "${CLICKHOUSE_URL}" -d "SELECT number FROM numbers LIMIT 10 FORMAT XML" | grep 'rows_read';
|
2019-04-29 16:07:59 +00:00
|
|
|
|
2020-05-29 10:08:11 +00:00
|
|
|
$CLICKHOUSE_CLIENT --query="DROP TABLE IF EXISTS numbers";
|