2017-02-14 14:24:30 +00:00
|
|
|
#pragma once
|
|
|
|
|
2019-03-04 17:40:49 +00:00
|
|
|
#include <DataTypes/DataTypeArray.h>
|
2018-07-24 14:28:56 +00:00
|
|
|
#include <DataTypes/DataTypeString.h>
|
2019-03-04 17:40:49 +00:00
|
|
|
#include <DataTypes/DataTypesNumber.h>
|
2018-07-24 14:28:56 +00:00
|
|
|
#include <Storages/System/IStorageSystemOneBlock.h>
|
2019-03-04 17:40:49 +00:00
|
|
|
#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
|
|
|
|
{
|
|
|
|
|
2017-06-06 18:36:13 +00:00
|
|
|
/// Provides information about Graphite configuration.
|
2018-07-24 14:28:56 +00:00
|
|
|
class StorageSystemGraphite : public ext::shared_ptr_helper<StorageSystemGraphite>, public IStorageSystemOneBlock<StorageSystemGraphite>
|
2017-02-14 14:24:30 +00:00
|
|
|
{
|
|
|
|
public:
|
2017-04-01 07:20:54 +00:00
|
|
|
std::string getName() const override { return "SystemGraphite"; }
|
2017-02-14 14:24:30 +00:00
|
|
|
|
2018-07-24 14:28:56 +00:00
|
|
|
static NamesAndTypesList getNamesAndTypes();
|
2017-02-14 14:24:30 +00:00
|
|
|
|
2019-03-04 17:40:49 +00:00
|
|
|
struct Config
|
|
|
|
{
|
2019-03-07 20:17:06 +00:00
|
|
|
Graphite::Params graphite_params;
|
2019-03-04 17:40:49 +00:00
|
|
|
Array databases;
|
|
|
|
Array tables;
|
|
|
|
};
|
|
|
|
|
|
|
|
using Configs = std::map<const String, Config>;
|
|
|
|
|
|
|
|
|
2017-11-04 03:20:18 +00:00
|
|
|
protected:
|
2018-07-24 14:28:56 +00:00
|
|
|
using IStorageSystemOneBlock::IStorageSystemOneBlock;
|
|
|
|
|
|
|
|
void fillData(MutableColumns & res_columns, const Context & context, const SelectQueryInfo & query_info) const override;
|
2019-03-04 17:40:49 +00:00
|
|
|
StorageSystemGraphite::Configs getConfigs(const Context & context) const;
|
2017-02-14 14:24:30 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|