ClickHouse/dbms/src/Storages/System/StorageSystemGraphite.h

39 lines
999 B
C++
Raw Normal View History

2017-02-14 14:24:30 +00:00
#pragma once
#include <Storages/IStorage.h>
2017-02-14 14:24:30 +00:00
#include <ext/shared_ptr_helper.hpp>
namespace DB
{
/// Provides information about graphite configuration.
2017-02-14 14:24:30 +00:00
class StorageSystemGraphite
: private ext::shared_ptr_helper<StorageSystemGraphite>
, public IStorage
2017-02-14 14:24:30 +00:00
{
friend class ext::shared_ptr_helper<StorageSystemGraphite>;
2017-02-14 14:24:30 +00:00
public:
static StoragePtr create(const std::string & name_);
2017-02-14 14:24:30 +00:00
std::string getName() const override { return "SystemGraphite"; }
std::string getTableName() const override { return name; }
const NamesAndTypesList & getColumnsListImpl() const override { return columns; }
2017-02-14 14:24:30 +00:00
BlockInputStreams read(
const Names & column_names,
const ASTPtr & query,
const Context & context,
QueryProcessingStage::Enum & processed_stage,
2017-06-02 15:54:39 +00:00
size_t max_block_size,
unsigned num_streams) override;
2017-02-14 14:24:30 +00:00
private:
const std::string name;
NamesAndTypesList columns;
2017-02-14 14:24:30 +00:00
StorageSystemGraphite(const std::string & name_);
2017-02-14 14:24:30 +00:00
};
}