0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-26 15:33:54 +01:00

modules/console: Add db check cmd.

This commit is contained in:
Jason Volk 2018-07-05 15:58:58 -07:00
parent 96da6a3486
commit 918815a874

View file

@ -1840,6 +1840,32 @@ catch(const std::out_of_range &e)
return true;
}
bool
console_cmd__db__check(opt &out, const string_view &line)
try
{
const auto dbname
{
token(line, ' ', 0)
};
auto &database
{
db::database::get(dbname)
};
check(database);
out << "Check of " << dbname << " completed without error."
<< std::endl;
return true;
}
catch(const std::out_of_range &e)
{
out << "No open database by that name" << std::endl;
return true;
}
bool
console_cmd__db__list(opt &out, const string_view &line)
{