ClickHouse/src/Storages/StorageDictionary.h

42 lines
1.1 KiB
C++
Raw Normal View History

2017-04-25 09:10:27 +00:00
#pragma once
#include <Storages/IStorage.h>
#include <ext/shared_ptr_helper.h>
2017-04-25 09:10:27 +00:00
namespace DB
{
struct DictionaryStructure;
2017-04-25 09:10:27 +00:00
class StorageDictionary final : public ext::shared_ptr_helper<StorageDictionary>, public IStorage
2017-04-25 09:10:27 +00:00
{
2019-08-26 19:07:29 +00:00
friend struct ext::shared_ptr_helper<StorageDictionary>;
2017-04-25 09:10:27 +00:00
public:
std::string getName() const override { return "Dictionary"; }
void checkTableCanBeDropped() const override;
Pipes read(const Names & column_names,
const SelectQueryInfo & query_info,
2017-04-25 09:10:27 +00:00
const Context & context,
QueryProcessingStage::Enum processed_stage,
2020-02-20 14:40:58 +00:00
size_t max_block_size,
unsigned threads) override;
static NamesAndTypesList getNamesAndTypes(const DictionaryStructure & dictionary_structure);
static String generateNamesAndTypesDescription(const NamesAndTypesList & list);
2020-04-08 18:59:52 +00:00
const String & dictionaryName() const { return dictionary_name; }
2017-04-25 09:10:27 +00:00
private:
String dictionary_name;
2017-04-28 18:33:31 +00:00
protected:
StorageDictionary(
2019-12-04 16:06:55 +00:00
const StorageID & table_id_,
const String & dictionary_name_,
const DictionaryStructure & dictionary_structure);
2017-04-25 09:10:27 +00:00
};
}