blob: 6f880f03e1002c7edc3a34620f07d030c31a6583 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#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>()},
};
}
void StorageSystemLicenses::fillData(MutableColumns & res_columns, ContextPtr, const SelectQueryInfo &) const
{
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]));
}
}
}
|