code cleanup

This commit is contained in:
Martin Brodbeck 2018-10-09 12:01:58 +02:00
parent 0b4041c13a
commit ad68fb8bf7

View file

@ -45,7 +45,8 @@ void Database::newDb()
fs::path sourcePath = dbname_;
fs::path destPath = sourcePath.parent_path() / sourcePath.stem();
destPath += std::string("_") += boost::posix_time::to_iso_string(boost::posix_time::second_clock::local_time()) += ".db";
destPath += std::string("_") +=
boost::posix_time::to_iso_string(boost::posix_time::second_clock::local_time()) += ".db";
fs::copy_file(sourcePath, destPath, fs::copy_options::overwrite_existing);
@ -113,9 +114,10 @@ void Database::createNew()
");"};
sqlStrings.push_back(sqlCreateSalesItems);
std::string sqlInitialEntries{"INSERT OR IGNORE INTO sellers (id, seller_no, first_name, last_name, "
"num_offered_articles) VALUES "
"('11111111-1111-1111-1111-111111111111', 0, 'Sonderkonto', 'Sonderkonto', 0)"};
std::string sqlInitialEntries{
"INSERT OR IGNORE INTO sellers (id, seller_no, first_name, last_name, "
"num_offered_articles) VALUES "
"('11111111-1111-1111-1111-111111111111', 0, 'Sonderkonto', 'Sonderkonto', 0)"};
sqlStrings.push_back(sqlInitialEntries);
beginTransaction();