mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 09:32:06 +00:00
30 lines
716 B
C++
30 lines
716 B
C++
#pragma once
|
|
|
|
#include <Core/Block.h>
|
|
#include <DataStreams/IBlockOutputStream.h>
|
|
#include <Poco/Data/Session.h>
|
|
#include <Core/ExternalResultDescription.h>
|
|
|
|
namespace DB
|
|
{
|
|
class ODBCBlockOutputStream : public IBlockOutputStream
|
|
{
|
|
public:
|
|
ODBCBlockOutputStream(Poco::Data::Session && session_, const std::string & remote_database_name_,
|
|
const std::string & remote_table_name_, const Block & sample_block_);
|
|
|
|
Block getHeader() const override;
|
|
void write(const Block & block) override;
|
|
|
|
private:
|
|
Poco::Data::Session session;
|
|
std::string db_name;
|
|
std::string table_name;
|
|
Block sample_block;
|
|
|
|
ExternalResultDescription description;
|
|
Poco::Logger * log;
|
|
};
|
|
|
|
}
|