mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-12 01:12:12 +00:00
29 lines
870 B
C++
29 lines
870 B
C++
#pragma once
|
|
|
|
#include <Poco/Util/AbstractConfiguration.h>
|
|
#include <Parsers/ASTCreateQuery.h>
|
|
#include <Interpreters/Context_fwd.h>
|
|
|
|
namespace DB
|
|
{
|
|
|
|
using DictionaryConfigurationPtr = Poco::AutoPtr<Poco::Util::AbstractConfiguration>;
|
|
|
|
/// Convert dictionary AST to Poco::AbstractConfiguration
|
|
/// This function is necessary because all loadable objects configuration are Poco::AbstractConfiguration
|
|
/// Can throw exception if query is ill-formed
|
|
DictionaryConfigurationPtr
|
|
getDictionaryConfigurationFromAST(const ASTCreateQuery & query, ContextPtr context, const std::string & database_ = "");
|
|
|
|
struct ClickHouseDictionarySourceInfo
|
|
{
|
|
QualifiedTableName table_name;
|
|
String query;
|
|
bool is_local = false;
|
|
};
|
|
|
|
std::optional<ClickHouseDictionarySourceInfo>
|
|
getInfoIfClickHouseDictionarySource(DictionaryConfigurationPtr & config, ContextPtr global_context);
|
|
|
|
}
|