mirror of
https://github.com/matrix-construct/construct
synced 2024-12-26 07:23:53 +01:00
modules/console: Add param to filter db files cmd output by level.
This commit is contained in:
parent
3c1d633efd
commit
560bd5edad
1 changed files with 16 additions and 1 deletions
|
@ -4910,7 +4910,7 @@ try
|
||||||
{
|
{
|
||||||
const params param{line, " ",
|
const params param{line, " ",
|
||||||
{
|
{
|
||||||
"dbname", "column"
|
"dbname", "column", "level"
|
||||||
}};
|
}};
|
||||||
|
|
||||||
const auto dbname
|
const auto dbname
|
||||||
|
@ -4923,6 +4923,11 @@ try
|
||||||
param.at("column", "*"_sv)
|
param.at("column", "*"_sv)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const auto level
|
||||||
|
{
|
||||||
|
param.at("level", -1)
|
||||||
|
};
|
||||||
|
|
||||||
auto &database
|
auto &database
|
||||||
{
|
{
|
||||||
db::database::get(dbname)
|
db::database::get(dbname)
|
||||||
|
@ -4969,7 +4974,12 @@ try
|
||||||
|
|
||||||
_print_sst_info_header(out);
|
_print_sst_info_header(out);
|
||||||
for(const auto &fileinfo : vector)
|
for(const auto &fileinfo : vector)
|
||||||
|
{
|
||||||
|
if(level != -1 && fileinfo.level != level)
|
||||||
|
continue;
|
||||||
|
|
||||||
_print_sst_info(out, fileinfo);
|
_print_sst_info(out, fileinfo);
|
||||||
|
}
|
||||||
|
|
||||||
out << std::endl;
|
out << std::endl;
|
||||||
_print_totals(vector);
|
_print_totals(vector);
|
||||||
|
@ -5001,7 +5011,12 @@ try
|
||||||
|
|
||||||
_print_sst_info_header(out);
|
_print_sst_info_header(out);
|
||||||
for(const auto &info : vector)
|
for(const auto &info : vector)
|
||||||
|
{
|
||||||
|
if(level != -1 && info.level != level)
|
||||||
|
continue;
|
||||||
|
|
||||||
_print_sst_info(out, info);
|
_print_sst_info(out, info);
|
||||||
|
}
|
||||||
|
|
||||||
out << std::endl;
|
out << std::endl;
|
||||||
_print_totals(vector);
|
_print_totals(vector);
|
||||||
|
|
Loading…
Reference in a new issue