ClickHouse/src/Storages/RocksDB/EmbeddedRocksDBBlockOutputStream.h
Alexey Milovidov 2d9f07e601 Better code
2020-11-08 19:24:58 +03:00

31 lines
639 B
C++

#pragma once
#include <DataStreams/IBlockOutputStream.h>
#include <Storages/StorageInMemoryMetadata.h>
namespace DB
{
class StorageEmbeddedRocksDB;
class EmbeddedRocksDBBlockOutputStream : public IBlockOutputStream
{
public:
explicit EmbeddedRocksDBBlockOutputStream(
StorageEmbeddedRocksDB & storage_,
const StorageMetadataPtr & metadata_snapshot_)
: storage(storage_)
, metadata_snapshot(metadata_snapshot_)
{}
Block getHeader() const override;
void write(const Block & block) override;
private:
StorageEmbeddedRocksDB & storage;
StorageMetadataPtr metadata_snapshot;
};
}