| 9 | #include <Examples/clickhouse_examples.h> |
| 10 | |
| 11 | static int readAndPrint(DB::ReadBuffer & in) |
| 12 | { |
| 13 | try |
| 14 | { |
| 15 | Int64 a = {}; |
| 16 | Float64 b = {}; |
| 17 | String c; |
| 18 | String d; |
| 19 | |
| 20 | DB::readIntText(a, in); |
| 21 | in.ignore(); |
| 22 | |
| 23 | DB::readFloatText(b, in); |
| 24 | in.ignore(); |
| 25 | |
| 26 | DB::readEscapedString(c, in); |
| 27 | in.ignore(); |
| 28 | |
| 29 | DB::readQuotedString(d, in); |
| 30 | |
| 31 | std::cout << a << ' ' << b << ' ' << c << '\t' << '\'' << d << '\'' << std::endl; |
| 32 | std::cout << in.count() << std::endl; |
| 33 | return 0; |
| 34 | } |
| 35 | catch (const DB::Exception & e) |
| 36 | { |
| 37 | std::cerr << e.what() << ", " << e.displayText() << std::endl; |
| 38 | return 1; |
| 39 | } |
| 40 | } |
| 41 | |
| 42 | int mainEntryExampleReadBuffer(int, char **) |
| 43 | { |
no test coverage detected