ClickHouse/dbms/src/Storages/StorageLogSettings.cpp
2020-02-19 17:50:39 +03:00

22 lines
473 B
C++

#include "StorageLogSettings.h"
#include <Parsers/ASTCreateQuery.h>
#include <Parsers/ASTSetQuery.h>
namespace DB
{
String getDiskName(ASTStorage & storage_def)
{
if (storage_def.settings)
{
SettingsChanges changes = storage_def.settings->changes;
for (auto it = changes.begin(); it != changes.end(); ++it)
{
if (it->name == "disk")
return it->value.safeGet<String>();
}
}
return "default";
}
}