ClickHouse/dbms/DataStreams/copyData.h

27 lines
733 B
C++
Raw Normal View History

2011-11-06 06:22:52 +00:00
#pragma once
2010-03-04 19:20:28 +00:00
#include <DataStreams/IBlockStream_fwd.h>
#include <atomic>
#include <functional>
2010-03-04 19:20:28 +00:00
2010-03-04 19:20:28 +00:00
namespace DB
{
class Block;
2017-05-13 22:19:04 +00:00
/** Copies data from the InputStream into the OutputStream
* (for example, from the database to the console, etc.)
2010-03-04 19:20:28 +00:00
*/
void copyData(IBlockInputStream & from, IBlockOutputStream & to, std::atomic<bool> * is_cancelled = nullptr);
2010-03-04 19:20:28 +00:00
2019-12-19 16:27:35 +00:00
void copyData(BlockInputStreams & inputs, BlockOutputStreams & outputs);
2019-12-12 10:49:15 +00:00
void copyData(IBlockInputStream & from, IBlockOutputStream & to, const std::function<bool()> & is_cancelled);
void copyData(IBlockInputStream & from, IBlockOutputStream & to, const std::function<bool()> & is_cancelled,
const std::function<void(const Block & block)> & progress);
2010-03-04 19:20:28 +00:00
}