| 671 | } |
| 672 | |
| 673 | std::function<void(const Progress&)> PostgreSQLHandler::createProgressCallback( |
| 674 | ContextMutablePtr query_context, |
| 675 | std::atomic<UInt64>& result_rows, |
| 676 | std::atomic<UInt64>& written_rows) |
| 677 | { |
| 678 | auto prev_callback = query_context->getProgressCallback(); |
| 679 | return [&, my_prev = prev_callback](const Progress & progress) |
| 680 | { |
| 681 | if (my_prev) |
| 682 | my_prev(progress); |
| 683 | result_rows += progress.result_rows; // For SELECT |
| 684 | written_rows += progress.written_rows; // For INSERT |
| 685 | }; |
| 686 | } |
| 687 | |
| 688 | UInt64 PostgreSQLHandler::executeQueryWithTracking( |
| 689 | String && sql_query, |
nothing calls this directly
no test coverage detected