| 464 | } |
| 465 | |
| 466 | void readStringUntilNextLine(std::string & s, ReadBuffer & buf) |
| 467 | { |
| 468 | s.clear(); |
| 469 | while (!buf.eof()) |
| 470 | { |
| 471 | char * next_pos = find_first_symbols<'\n'>(buf.position(), buf.buffer().end()); |
| 472 | s.append(buf.position(), next_pos - buf.position()); |
| 473 | buf.position() = next_pos; |
| 474 | |
| 475 | if (!buf.hasPendingData()) |
| 476 | continue; |
| 477 | |
| 478 | if (*buf.position() == '\n') |
| 479 | { |
| 480 | ++buf.position(); |
| 481 | return; |
| 482 | } |
| 483 | } |
| 484 | } |
| 485 | |
| 486 | |
| 487 | /** Writes the resulting tables to files that can be imported to ClickHouse. |
no test coverage detected