Client.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #pragma once
  2. #include <Client/ClientBase.h>
  3. namespace DB
  4. {
  5. class Client : public ClientBase
  6. {
  7. public:
  8. Client() = default;
  9. void initialize(Poco::Util::Application & self) override;
  10. int main(const std::vector<String> & /*args*/) override;
  11. protected:
  12. bool processWithFuzzing(const String & full_query) override;
  13. std::optional<bool> processFuzzingStep(const String & query_to_execute, const ASTPtr & parsed_query);
  14. void connect() override;
  15. void processError(const String & query) const override;
  16. String getName() const override { return "client"; }
  17. void printHelpMessage(const OptionsDescription & options_description) override;
  18. void addOptions(OptionsDescription & options_description) override;
  19. void processOptions(
  20. const OptionsDescription & options_description,
  21. const CommandLineOptions & options,
  22. const std::vector<Arguments> & external_tables_arguments,
  23. const std::vector<Arguments> & hosts_and_ports_arguments) override;
  24. void processConfig() override;
  25. void readArguments(
  26. int argc,
  27. char ** argv,
  28. Arguments & common_arguments,
  29. std::vector<Arguments> & external_tables_arguments,
  30. std::vector<Arguments> & hosts_and_ports_arguments) override;
  31. private:
  32. void printChangedSettings() const;
  33. void showWarnings();
  34. void parseConnectionsCredentials();
  35. std::vector<String> loadWarningMessages();
  36. };
  37. }