MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / createProgressCallback

Method createProgressCallback

src/Server/PostgreSQLHandler.cpp:673–686  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

671}
672
673std::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
688UInt64 PostgreSQLHandler::executeQueryWithTracking(
689 String && sql_query,

Callers

nothing calls this directly

Calls 1

getProgressCallbackMethod · 0.80

Tested by

no test coverage detected