2020-05-11 02:39:01 +00:00
|
|
|
#include "StorageSystemLicenses.h"
|
|
|
|
|
|
|
|
#include <algorithm>
|
|
|
|
#include <DataTypes/DataTypeString.h>
|
|
|
|
|
|
|
|
|
|
|
|
extern const char * library_licenses[];
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
NamesAndTypesList StorageSystemLicenses::getNamesAndTypes()
|
|
|
|
{
|
|
|
|
return {
|
|
|
|
{"library_name", std::make_shared<DataTypeString>()},
|
|
|
|
{"license_type", std::make_shared<DataTypeString>()},
|
|
|
|
{"license_path", std::make_shared<DataTypeString>()},
|
|
|
|
{"license_text", std::make_shared<DataTypeString>()},
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2021-04-10 23:33:54 +00:00
|
|
|
void StorageSystemLicenses::fillData(MutableColumns & res_columns, ContextPtr, const SelectQueryInfo &) const
|
2020-05-11 02:39:01 +00:00
|
|
|
{
|
|
|
|
for (const auto * it = library_licenses; *it; it += 4)
|
|
|
|
{
|
|
|
|
res_columns[0]->insert(String(it[0]));
|
|
|
|
res_columns[1]->insert(String(it[1]));
|
|
|
|
res_columns[2]->insert(String(it[2]));
|
|
|
|
res_columns[3]->insert(String(it[3]));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|