modules/console: Add arg to check specific file in db check cmd.

This commit is contained in:
Jason Volk 2023-03-16 10:21:10 -07:00
parent 9558637c20
commit d01e937f3e
1 changed files with 18 additions and 2 deletions

View File

@ -5343,7 +5343,7 @@ try
{
const params param{line, " ",
{
"dbname", "column"
"dbname", "column|file"
}};
const auto &dbname
@ -5353,7 +5353,14 @@ try
const auto &colname
{
param["column"]
param["column|file"]
};
const auto &fname
{
!startswith(colname, '/')?
string_view{}:
lstrip(colname, '/')
};
auto &database
@ -5361,6 +5368,15 @@ try
db::database::get(dbname)
};
if(fname)
{
check(database, fname);
out << "Check of file " << fname << " in " << dbname << " completed without error."
<< std::endl;
return true;
}
if(colname)
{
db::column column