mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-13 02:53:38 +00:00
4564a1ef29
This is somehow analog of .netrc [1]. [1]: https://www.gnu.org/software/inetutils/manual/html_node/The-_002enetrc-file.html The follow options can be overwritten on a per-hostname/connection basis: - hostname - port - secure - user - password - database - history_file Also note, that you can have multiple settings for one hostname, can be useful to distinguish readonly from non-readonly for example. Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
54 lines
1.4 KiB
C++
54 lines
1.4 KiB
C++
#pragma once
|
|
|
|
#include <Client/ClientBase.h>
|
|
|
|
|
|
namespace DB
|
|
{
|
|
|
|
class Client : public ClientBase
|
|
{
|
|
public:
|
|
Client() = default;
|
|
|
|
void initialize(Poco::Util::Application & self) override;
|
|
|
|
int main(const std::vector<String> & /*args*/) override;
|
|
|
|
protected:
|
|
bool processWithFuzzing(const String & full_query) override;
|
|
std::optional<bool> processFuzzingStep(const String & query_to_execute, const ASTPtr & parsed_query);
|
|
|
|
void connect() override;
|
|
|
|
void processError(const String & query) const override;
|
|
|
|
String getName() const override { return "client"; }
|
|
|
|
void printHelpMessage(const OptionsDescription & options_description) override;
|
|
|
|
void addOptions(OptionsDescription & options_description) override;
|
|
|
|
void processOptions(
|
|
const OptionsDescription & options_description,
|
|
const CommandLineOptions & options,
|
|
const std::vector<Arguments> & external_tables_arguments,
|
|
const std::vector<Arguments> & hosts_and_ports_arguments) override;
|
|
|
|
void processConfig() override;
|
|
|
|
void readArguments(
|
|
int argc,
|
|
char ** argv,
|
|
Arguments & common_arguments,
|
|
std::vector<Arguments> & external_tables_arguments,
|
|
std::vector<Arguments> & hosts_and_ports_arguments) override;
|
|
|
|
private:
|
|
void printChangedSettings() const;
|
|
void showWarnings();
|
|
void parseConnectionsCredentials();
|
|
std::vector<String> loadWarningMessages();
|
|
};
|
|
}
|