ClickHouse/programs/client/Client.h

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

61 lines
1.7 KiB
C++
Raw Normal View History

#pragma once
2024-07-15 16:36:45 +00:00
#include <Client/ClientApplicationBase.h>
namespace DB
{
2024-07-15 16:36:45 +00:00
class Client : public ClientApplicationBase
{
public:
2024-07-15 16:36:45 +00:00
using Arguments = ClientApplicationBase::Arguments;
Client()
{
fuzzer = QueryFuzzer(randomSeed(), &std::cout, &std::cerr);
}
2021-09-11 11:34:22 +00:00
2021-07-23 20:56:47 +00:00
void initialize(Poco::Util::Application & self) override;
2021-09-11 11:34:22 +00:00
2021-09-04 18:19:01 +00:00
int main(const std::vector<String> & /*args*/) override;
2021-07-23 20:56:47 +00:00
protected:
2024-06-25 14:23:37 +00:00
Poco::Util::LayeredConfiguration & getClientConfiguration() override;
2021-07-28 12:56:11 +00:00
bool processWithFuzzing(const String & full_query) override;
2022-08-11 02:34:10 +00:00
std::optional<bool> processFuzzingStep(const String & query_to_execute, const ASTPtr & parsed_query);
2021-07-26 22:28:27 +00:00
2021-09-04 18:19:01 +00:00
void connect() override;
2022-03-14 11:00:47 +00:00
2021-08-19 11:07:47 +00:00
void processError(const String & query) const override;
2022-03-14 11:00:47 +00:00
2021-09-19 21:42:28 +00:00
String getName() const override { return "client"; }
2021-07-23 20:56:47 +00:00
void printHelpMessage(const OptionsDescription & options_description, bool verbose) override;
2022-03-14 11:00:47 +00:00
void addOptions(OptionsDescription & options_description) override;
2022-03-14 11:00:47 +00:00
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;
2022-03-14 11:00:47 +00:00
2021-08-18 14:39:04 +00:00
void processConfig() override;
2021-07-22 21:27:26 +00:00
2022-03-01 09:22:12 +00:00
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(Poco::Util::AbstractConfiguration & config, const std::string & connection_name);
2021-07-28 12:56:11 +00:00
std::vector<String> loadWarningMessages();
};
}