0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-26 00:32:35 +01:00

modules/console: Add db base cmd w/ delegation to db list for empty arguments.

This commit is contained in:
Jason Volk 2018-04-18 14:27:18 -07:00
parent d64adf8916
commit 7b514deb80

View file

@ -1054,6 +1054,29 @@ console_cmd__db__list(opt &out, const string_view &line)
return true; return true;
} }
bool
console_cmd__db(opt &out, const string_view &line)
try
{
if(empty(line))
return console_cmd__db__list(out, line);
const params param{line, " ",
{
"dbname", "column"
}};
auto &database
{
*db::database::dbs.at(param.at(0))
};
}
catch(const std::out_of_range &e)
{
out << "No open database by that name" << std::endl;
return true;
}
// //
// peer // peer
// //