Extract multiple values from a ClickHouse config key (wildcard patterns return multiple lines).
| 255 | |
| 256 | /// Extract multiple values from a ClickHouse config key (wildcard patterns return multiple lines). |
| 257 | std::vector<std::string> extractConfigValues(const std::string & config_file, const std::string & key) |
| 258 | { |
| 259 | auto [code, lines] = captureCommand({ |
| 260 | g_clickhouse_binary, "extract-from-config", |
| 261 | "--config-file", config_file, |
| 262 | "--key", key, |
| 263 | "--try", |
| 264 | }); |
| 265 | return (code == 0) ? std::move(lines) : std::vector<std::string>{}; |
| 266 | } |
| 267 | |
| 268 | /// Recursively chown a path. Logs warnings but does not abort on failure. |
| 269 | void recursiveChown(const std::string & path_str, uid_t uid, gid_t gid) |
no test coverage detected