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