ClickHouse/src/DataStreams/copyData.h

25 lines
659 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
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
}