init: Database is initialized

This commit is contained in:
Paul Beckingham 2016-03-04 16:48:45 -05:00
parent 3fa5eb4bf8
commit d8befa209e
2 changed files with 8 additions and 6 deletions

View file

@ -101,16 +101,18 @@ void initializeData (Configuration& configuration, Database& database)
configuration.set ("db", dbLocation._data);
std::cout << "# rc.db=" << configuration.get ("db") << "\n";
// Perhaps some later code would like to know this is a new db.
configuration.set ("shiny", 1);
// Perhaps some subsequent code would like to know this is a new db and
// possibly a first run.
configuration.set ("shiny", (shinyNewDatabase ? 1 : 0));
// TODO Init database (no data read).
// Initialize the database (no data read), but files are enumerated.
database.initialize (dbLocation._data);
std::cout << "# Configuration\n";
for (const auto& name : configuration.all ())
std::cout << "# " << name << "=" << configuration[name] << "\n";
std::cout << "# " << database.dump ();
std::cout << database.dump ();
}
////////////////////////////////////////////////////////////////////////////////