| 1 | #pragma once |
| 2 | #include <iostream> |
| 3 | |
| 4 | namespace DB |
| 5 | { |
| 6 | |
| 7 | // Use template to disable implicit casting for certain overloaded types such as Field, which leads |
| 8 | // to overload resolution ambiguity. |
| 9 | class Field; |
| 10 | template <typename T, typename U = std::enable_if_t<std::is_same_v<T, Field>>> |
| 11 | std::ostream & operator<<(std::ostream & stream, const T & what); |
| 12 | |
| 13 | class IBlockInputStream; |
| 14 | std::ostream & operator<<(std::ostream & stream, const IBlockInputStream & what); |
| 15 | |
| 16 | struct NameAndTypePair; |
| 17 | std::ostream & operator<<(std::ostream & stream, const NameAndTypePair & what); |
| 18 | |
| 19 | class IDataType; |
| 20 | std::ostream & operator<<(std::ostream & stream, const IDataType & what); |
| 21 | |
| 22 | class IStorage; |
| 23 | std::ostream & operator<<(std::ostream & stream, const IStorage & what); |
| 24 | |
| 25 | class TableStructureReadLock; |
| 26 | std::ostream & operator<<(std::ostream & stream, const TableStructureReadLock & what); |
| 27 | |
| 28 | class IFunctionOverloadResolver; |
| 29 | std::ostream & operator<<(std::ostream & stream, const IFunctionOverloadResolver & what); |
| 30 | |
| 31 | class IFunctionBase; |
| 32 | std::ostream & operator<<(std::ostream & stream, const IFunctionBase & what); |
| 33 | |
| 34 | class Block; |
| 35 | std::ostream & operator<<(std::ostream & stream, const Block & what); |
| 36 | |
| 37 | struct ColumnWithTypeAndName; |
| 38 | std::ostream & operator<<(std::ostream & stream, const ColumnWithTypeAndName & what); |
| 39 | |
| 40 | class IColumn; |
| 41 | std::ostream & operator<<(std::ostream & stream, const IColumn & what); |
| 42 | |
| 43 | struct Packet; |
| 44 | std::ostream & operator<<(std::ostream & stream, const Packet & what); |
| 45 | |
| 46 | struct ExpressionAction; |
| 47 | std::ostream & operator<<(std::ostream & stream, const ExpressionAction & what); |
| 48 | |
| 49 | class ExpressionActions; |
| 50 | std::ostream & operator<<(std::ostream & stream, const ExpressionActions & what); |
| 51 | |
| 52 | struct SyntaxAnalyzerResult; |
| 53 | std::ostream & operator<<(std::ostream & stream, const SyntaxAnalyzerResult & what); |
| 54 | } |
| 55 | |
| 56 | /// some operator<< should be declared before operator<<(... std::shared_ptr<>) |
| 57 | #include <common/iostream_debug_helpers.h> |
| 58 | |