2011-11-06 06:22:52 +00:00
|
|
|
#pragma once
|
2010-03-04 19:20:28 +00:00
|
|
|
|
2019-05-17 14:34:25 +00:00
|
|
|
#include <DataStreams/IBlockStream_fwd.h>
|
|
|
|
|
2015-03-20 16:20:47 +00:00
|
|
|
#include <atomic>
|
2017-11-09 18:06:36 +00:00
|
|
|
#include <functional>
|
2010-03-04 19:20:28 +00:00
|
|
|
|
2016-02-16 16:39:39 +00:00
|
|
|
|
2010-03-04 19:20:28 +00:00
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
2018-03-11 18:36:09 +00:00
|
|
|
class Block;
|
2016-02-16 16:39:39 +00:00
|
|
|
|
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
|
|
|
*/
|
2015-03-20 16:20:47 +00:00
|
|
|
void copyData(IBlockInputStream & from, IBlockOutputStream & to, std::atomic<bool> * is_cancelled = nullptr);
|
2010-03-04 19:20:28 +00:00
|
|
|
|
2017-11-09 18:06:36 +00:00
|
|
|
void copyData(IBlockInputStream & from, IBlockOutputStream & to, const std::function<bool()> & is_cancelled);
|
|
|
|
|
2018-03-11 18:36:09 +00:00
|
|
|
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
|
|
|
}
|