Add 'all' flag to dumpsecurity

This commit is contained in:
Eric Harding committed 2018-03-28 13:49:58 -04:00
1 parent a2dce0febb
commit 01293cfb8c
1 file changed
+5 -1
+5 -1
View File
@@ -173,7 +173,11 @@ void run_rectool(const vector<string> args) {
void dump_db(const vector<string> args) {
set<security_key> keys;
bool all = false;
for (const auto& arg : args) {
if (arg == "all") {
all = true; break;
}
auto key = std::stoi(arg);
if (key > 0) {
keys.insert(key);
@@ -182,7 +186,7 @@ void dump_db(const vector<string> args) {
std::set<md::UserSymbol> symbols;
md::get_system_md_symbols(symbols);
md::db::load_securities(symbols, [&](const api::Security& security) {
if (keys.find(security.id()) != keys.end()) {
if (all || keys.find(security.id()) != keys.end()) {
security.PrintDebugString();
}
});