I don't think I need transactions for those

This commit is contained in:
King_DuckZ 2020-08-10 10:18:15 +01:00
parent 5bc151a3ec
commit ab8f8b1533

View file

@ -29,7 +29,6 @@ void OriginsDB::overwrite (const Items& items) {
Database db(m_db_mutex);
db.exec("DROP TABLE IF EXISTS items");
SQLite::Transaction transaction(db);
//example:
//{
@ -60,8 +59,6 @@ void OriginsDB::overwrite (const Items& items) {
query.exec();
query.reset();
}
transaction.commit();
}
void OriginsDB::update (const Icons& icons) {
@ -72,7 +69,6 @@ void OriginsDB::update (const Icons& icons) {
//}
Database db(m_db_mutex);
SQLite::Transaction transaction(db);
SQLite::Statement query(db, "UPDATE items SET icon = ? WHERE item_id = ?");
for (const auto& ico : icons.icons) {
@ -83,8 +79,6 @@ void OriginsDB::update (const Icons& icons) {
//base64_decode(std::string_view(ico.icon).substr(std::string_view("data:image/png;base64,").size()));
}
transaction.commit();
}
} //namespace oro