2024-03-23 00:40:48 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
|
|
|
# shellcheck source=../shell_config.sh
|
|
|
|
. "$CURDIR"/../shell_config.sh
|
|
|
|
|
|
|
|
# clickhouse-local has --input-format and --output-format parameters,
|
|
|
|
# and also the --format parameter which is the default for both input and output formats, but has less preference.
|
|
|
|
|
|
|
|
# clickhouse-client does not have the --input-format parameter.
|
|
|
|
# However, it accepts both --format and --output-format for convenience.
|
|
|
|
|
|
|
|
${CLICKHOUSE_LOCAL} --output-format Markdown --query "SELECT 'Hello, world' AS x"
|
|
|
|
${CLICKHOUSE_CLIENT} --output-format Markdown --query "SELECT 'Hello, world' AS x"
|
|
|
|
${CLICKHOUSE_LOCAL} --format Markdown --query "SELECT 'Hello, world' AS x"
|
|
|
|
${CLICKHOUSE_CLIENT} --format Markdown --query "SELECT 'Hello, world' AS x"
|
2024-03-23 01:31:51 +00:00
|
|
|
${CLICKHOUSE_LOCAL} --vertical --query "SELECT 'Hello, world' AS x"
|
|
|
|
${CLICKHOUSE_CLIENT} --vertical --query "SELECT 'Hello, world' AS x"
|
2024-03-23 01:34:59 +00:00
|
|
|
${CLICKHOUSE_LOCAL} --query "SELECT 'Hello, world' AS x"
|
|
|
|
${CLICKHOUSE_CLIENT} --query "SELECT 'Hello, world' AS x"
|