ClickHouse/src/Storages/System/StorageSystemDDLWorkerQueue.h
Ivan 495c6e03aa
Replace all Context references with std::weak_ptr (#22297)
* Replace all Context references with std::weak_ptr

* Fix shared context captured by value

* Fix build

* Fix Context with named sessions

* Fix copy context

* Fix gcc build

* Merge with master and fix build

* Fix gcc-9 build
2021-04-11 02:33:54 +03:00

35 lines
1.0 KiB
C++

#pragma once
#include <Poco/Util/Application.h>
#include <Poco/Util/LayeredConfiguration.h>
#include <Interpreters/DDLWorker.h>
#include <Storages/System/IStorageSystemOneBlock.h>
#include <ext/shared_ptr_helper.h>
namespace DB
{
class Context;
/** System table "distributed_ddl_queue" with list of queries that are currently in the DDL worker queue.
*/
class StorageSystemDDLWorkerQueue final : public ext::shared_ptr_helper<StorageSystemDDLWorkerQueue>,
public IStorageSystemOneBlock<StorageSystemDDLWorkerQueue>
{
friend struct ext::shared_ptr_helper<StorageSystemDDLWorkerQueue>;
Poco::Util::LayeredConfiguration & config = Poco::Util::Application::instance().config();
protected:
void fillData(MutableColumns & res_columns, ContextPtr context, const SelectQueryInfo & query_info) const override;
using IStorageSystemOneBlock::IStorageSystemOneBlock;
public:
std::string getName() const override { return "SystemDDLWorkerQueue"; }
static NamesAndTypesList getNamesAndTypes();
};
}