| 299 | |
| 300 | |
| 301 | void KeeperClient::defineOptions(Poco::Util::OptionSet & options) |
| 302 | { |
| 303 | Poco::Util::Application::defineOptions(options); |
| 304 | |
| 305 | options.addOption( |
| 306 | Poco::Util::Option("help", "", "show help and exit") |
| 307 | .binding("help")); |
| 308 | |
| 309 | options.addOption( |
| 310 | Poco::Util::Option("host", "h", "server hostname. default `localhost`") |
| 311 | .argument("<host>") |
| 312 | .binding("host")); |
| 313 | |
| 314 | options.addOption( |
| 315 | Poco::Util::Option("port", "p", "server port. default `9181`") |
| 316 | .argument("<port>") |
| 317 | .binding("port")); |
| 318 | |
| 319 | options.addOption( |
| 320 | Poco::Util::Option("password", "", "password to connect to keeper server") |
| 321 | .argument("<password>") |
| 322 | .binding("password")); |
| 323 | |
| 324 | options.addOption( |
| 325 | Poco::Util::Option("query", "q", "will execute given query, then exit.") |
| 326 | .argument("<query>") |
| 327 | .binding("query")); |
| 328 | |
| 329 | options.addOption( |
| 330 | Poco::Util::Option("connection-timeout", "", "set connection timeout in seconds. default 10s.") |
| 331 | .argument("<seconds>") |
| 332 | .binding("connection-timeout")); |
| 333 | |
| 334 | options.addOption( |
| 335 | Poco::Util::Option("session-timeout", "", "set session timeout in seconds. default 10s.") |
| 336 | .argument("<seconds>") |
| 337 | .binding("session-timeout")); |
| 338 | |
| 339 | options.addOption( |
| 340 | Poco::Util::Option("operation-timeout", "", "set operation timeout in seconds. default 10s.") |
| 341 | .argument("<seconds>") |
| 342 | .binding("operation-timeout")); |
| 343 | |
| 344 | options.addOption( |
| 345 | Poco::Util::Option("use-xid-64", "", "use 64-bit XID. default false.") |
| 346 | .binding("use-xid-64")); |
| 347 | |
| 348 | options.addOption( |
| 349 | Poco::Util::Option("config-file", "c", "if set, will try to get a connection string from clickhouse config. default `config.xml`") |
| 350 | .argument("<file>") |
| 351 | .binding("config-file")); |
| 352 | |
| 353 | options.addOption( |
| 354 | Poco::Util::Option("history-file", "", "set path of history file. default `~/.keeper-client-history`") |
| 355 | .argument("<file>") |
| 356 | .binding("history-file")); |
| 357 | |
| 358 | options.addOption( |