2012-06-18 07:49:19 +00:00
|
|
|
#pragma once
|
|
|
|
|
2017-06-06 17:18:32 +00:00
|
|
|
#include <ext/shared_ptr_helper.h>
|
2018-07-24 14:42:52 +00:00
|
|
|
#include <Storages/System/IStorageSystemOneBlock.h>
|
2012-06-18 07:49:19 +00:00
|
|
|
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
2016-12-08 02:49:04 +00:00
|
|
|
class Context;
|
|
|
|
|
|
|
|
|
2017-04-16 15:00:33 +00:00
|
|
|
/** Implements `databases` system table, which allows you to get information about all databases.
|
2012-06-18 07:49:19 +00:00
|
|
|
*/
|
2020-03-19 23:48:53 +00:00
|
|
|
class StorageSystemDatabases final : public ext::shared_ptr_helper<StorageSystemDatabases>, public IStorageSystemOneBlock<StorageSystemDatabases>
|
2012-06-18 07:49:19 +00:00
|
|
|
{
|
2019-08-26 19:07:29 +00:00
|
|
|
friend struct ext::shared_ptr_helper<StorageSystemDatabases>;
|
2012-06-18 07:49:19 +00:00
|
|
|
public:
|
2018-07-24 14:28:56 +00:00
|
|
|
std::string getName() const override
|
|
|
|
{
|
|
|
|
return "SystemDatabases";
|
|
|
|
}
|
2012-06-18 07:49:19 +00:00
|
|
|
|
2018-07-24 14:28:56 +00:00
|
|
|
static NamesAndTypesList getNamesAndTypes();
|
2014-10-06 05:18:17 +00:00
|
|
|
|
2017-11-04 03:20:18 +00:00
|
|
|
protected:
|
2018-07-24 14:28:56 +00:00
|
|
|
using IStorageSystemOneBlock::IStorageSystemOneBlock;
|
|
|
|
|
2021-04-10 23:33:54 +00:00
|
|
|
void fillData(MutableColumns & res_columns, ContextPtr context, const SelectQueryInfo &) const override;
|
2012-06-18 07:49:19 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|