From 5963786ebf1204769fae3496456a8289760d1a2f Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Tue, 4 Sep 2018 23:21:26 -0700 Subject: [PATCH] modules/console: Checkpoint the db column drop cmd (incomplete). --- modules/console.cc | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/modules/console.cc b/modules/console.cc index bbdb9e06b..c625e919f 100644 --- a/modules/console.cc +++ b/modules/console.cc @@ -1999,6 +1999,43 @@ catch(const std::out_of_range &e) return true; } +bool +console_cmd__db__DROP__DROP__DROP(opt &out, const string_view &line) +try +{ + const params param{line, " ", + { + "dbname", "column" + }}; + + const auto dbname + { + param.at(0) + }; + + const auto colname + { + param.at(0) + }; + + auto &database + { + db::database::get(dbname) + }; + + throw error + { + "TODO: please implement." + }; + + 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) {