1#pragma once
2
3#include <DataStreams/IBlockStream_fwd.h>
4
5#include <atomic>
6#include <functional>
7
8
9namespace DB
10{
11
12class Block;
13
14/** Copies data from the InputStream into the OutputStream
15 * (for example, from the database to the console, etc.)
16 */
17void copyData(IBlockInputStream & from, IBlockOutputStream & to, std::atomic<bool> * is_cancelled = nullptr);
18
19void copyData(IBlockInputStream & from, IBlockOutputStream & to, const std::function<bool()> & is_cancelled);
20
21void copyData(IBlockInputStream & from, IBlockOutputStream & to, const std::function<bool()> & is_cancelled,
22 const std::function<void(const Block & block)> & progress);
23
24}
25