2019-07-29 13:50:13 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <ext/shared_ptr_helper.h>
|
|
|
|
#include <Storages/IStorage.h>
|
|
|
|
|
2019-07-30 12:15:02 +00:00
|
|
|
|
2019-07-29 13:50:13 +00:00
|
|
|
namespace DB
|
|
|
|
{
|
2019-07-31 14:12:05 +00:00
|
|
|
/* One block storage used for values table function
|
|
|
|
* It's structure is similar to IStorageSystemOneBlock
|
2019-07-31 14:06:22 +00:00
|
|
|
*/
|
2019-07-29 13:50:13 +00:00
|
|
|
class StorageValues : public ext::shared_ptr_helper<StorageValues>, public IStorage
|
|
|
|
{
|
2019-08-26 19:07:29 +00:00
|
|
|
friend struct ext::shared_ptr_helper<StorageValues>;
|
2019-07-29 13:50:13 +00:00
|
|
|
public:
|
|
|
|
std::string getName() const override { return "Values"; }
|
|
|
|
|
2019-07-29 16:20:17 +00:00
|
|
|
BlockInputStreams read(
|
|
|
|
const Names & column_names,
|
|
|
|
const SelectQueryInfo & query_info,
|
|
|
|
const Context & context,
|
|
|
|
QueryProcessingStage::Enum processed_stage,
|
|
|
|
size_t max_block_size,
|
|
|
|
unsigned num_streams) override;
|
2019-07-29 13:50:13 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
Block res_block;
|
|
|
|
|
|
|
|
protected:
|
2019-08-03 11:02:40 +00:00
|
|
|
StorageValues(const std::string & database_name_, const std::string & table_name_, const ColumnsDescription & columns_, const Block & res_block_);
|
2019-07-29 13:50:13 +00:00
|
|
|
};
|
2019-07-30 12:15:02 +00:00
|
|
|
|
2019-07-29 13:50:13 +00:00
|
|
|
}
|