mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 07:31:57 +00:00
Add pager property into ClientBase
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
This commit is contained in:
parent
3257d5643d
commit
4cb3de3110
@ -1239,6 +1239,8 @@ void Client::processConfig()
|
|||||||
if (config().has("multiquery"))
|
if (config().has("multiquery"))
|
||||||
is_multiquery = true;
|
is_multiquery = true;
|
||||||
|
|
||||||
|
pager = config().getString("pager", "");
|
||||||
|
|
||||||
is_default_format = !config().has("vertical") && !config().has("format");
|
is_default_format = !config().has("vertical") && !config().has("format");
|
||||||
if (config().has("vertical"))
|
if (config().has("vertical"))
|
||||||
format = config().getString("format", "Vertical");
|
format = config().getString("format", "Vertical");
|
||||||
|
@ -578,6 +578,8 @@ void LocalServer::processConfig()
|
|||||||
if (config().has("multiquery"))
|
if (config().has("multiquery"))
|
||||||
is_multiquery = true;
|
is_multiquery = true;
|
||||||
|
|
||||||
|
pager = config().getString("pager", "");
|
||||||
|
|
||||||
delayed_interactive = config().has("interactive") && (!queries.empty() || config().has("queries-file"));
|
delayed_interactive = config().has("interactive") && (!queries.empty() || config().has("queries-file"));
|
||||||
if (!is_interactive || delayed_interactive)
|
if (!is_interactive || delayed_interactive)
|
||||||
{
|
{
|
||||||
|
@ -560,7 +560,6 @@ try
|
|||||||
}
|
}
|
||||||
|
|
||||||
WriteBuffer * out_buf = nullptr;
|
WriteBuffer * out_buf = nullptr;
|
||||||
String pager = config().getString("pager", "");
|
|
||||||
if (!pager.empty())
|
if (!pager.empty())
|
||||||
{
|
{
|
||||||
if (SIG_ERR == signal(SIGPIPE, SIG_IGN))
|
if (SIG_ERR == signal(SIGPIPE, SIG_IGN))
|
||||||
|
@ -213,6 +213,8 @@ protected:
|
|||||||
bool stderr_is_a_tty = false; /// stderr is a terminal.
|
bool stderr_is_a_tty = false; /// stderr is a terminal.
|
||||||
uint64_t terminal_width = 0;
|
uint64_t terminal_width = 0;
|
||||||
|
|
||||||
|
String pager;
|
||||||
|
|
||||||
String format; /// Query results output format.
|
String format; /// Query results output format.
|
||||||
bool select_into_file = false; /// If writing result INTO OUTFILE. It affects progress rendering.
|
bool select_into_file = false; /// If writing result INTO OUTFILE. It affects progress rendering.
|
||||||
bool select_into_file_and_stdout = false; /// If writing result INTO OUTFILE AND STDOUT. It affects progress rendering.
|
bool select_into_file_and_stdout = false; /// If writing result INTO OUTFILE AND STDOUT. It affects progress rendering.
|
||||||
|
Loading…
Reference in New Issue
Block a user