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

39 lines
1.0 KiB
C++
Raw Normal View History

2017-02-14 14:24:30 +00:00
#pragma once
#include <DataTypes/DataTypeArray.h>
#include <DataTypes/DataTypeString.h>
#include <DataTypes/DataTypesNumber.h>
#include <Storages/System/IStorageSystemOneBlock.h>
#include <Storages/MergeTree/MergeTreeData.h>
2017-06-06 17:18:32 +00:00
#include <ext/shared_ptr_helper.h>
2017-02-14 14:24:30 +00:00
namespace DB
{
/// Provides information about Graphite configuration.
class StorageSystemGraphite : public ext::shared_ptr_helper<StorageSystemGraphite>, public IStorageSystemOneBlock<StorageSystemGraphite>
2017-02-14 14:24:30 +00:00
{
public:
std::string getName() const override { return "SystemGraphite"; }
2017-02-14 14:24:30 +00:00
static NamesAndTypesList getNamesAndTypes();
2017-02-14 14:24:30 +00:00
struct Config
{
2019-03-07 20:17:06 +00:00
Graphite::Params graphite_params;
Array databases;
Array tables;
};
using Configs = std::map<const String, Config>;
protected:
using IStorageSystemOneBlock::IStorageSystemOneBlock;
void fillData(MutableColumns & res_columns, const Context & context, const SelectQueryInfo & query_info) const override;
StorageSystemGraphite::Configs getConfigs(const Context & context) const;
2017-02-14 14:24:30 +00:00
};
}