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

40 lines
962 B
C++
Raw Normal View History

2011-08-28 02:22:23 +00:00
#pragma once
2017-06-06 17:18:32 +00:00
#include <ext/shared_ptr_helper.h>
#include <Storages/IStorage.h>
2011-08-28 02:22:23 +00:00
namespace DB
{
2016-12-08 02:49:04 +00:00
class Context;
2011-08-28 02:22:23 +00:00
2017-04-16 15:00:33 +00:00
/** Implements storage for the system table One.
* The table contains a single column of dummy UInt8 and a single row with a value of 0.
* Used when the table is not specified in the query.
* Analog of the DUAL table in Oracle and MySQL.
2011-08-28 02:22:23 +00:00
*/
class StorageSystemOne : public ext::shared_ptr_helper<StorageSystemOne>, public IStorage
2011-08-28 02:22:23 +00:00
{
public:
std::string getName() const override { return "SystemOne"; }
std::string getTableName() const override { return name; }
2011-08-28 02:22:23 +00:00
BlockInputStreams read(
const Names & column_names,
const SelectQueryInfo & query_info,
const Context & context,
2018-04-19 15:18:26 +00:00
QueryProcessingStage::Enum processed_stage,
2019-02-10 16:55:12 +00:00
UInt64 max_block_size,
2017-06-02 15:54:39 +00:00
unsigned num_streams) override;
2011-08-28 02:22:23 +00:00
private:
const std::string name;
protected:
StorageSystemOne(const std::string & name_);
2011-08-28 02:22:23 +00:00
};
}