I don't think I need transactions for those
This commit is contained in:
parent
5bc151a3ec
commit
ab8f8b1533
1 changed files with 0 additions and 6 deletions
|
@ -29,7 +29,6 @@ void OriginsDB::overwrite (const Items& items) {
|
||||||
Database db(m_db_mutex);
|
Database db(m_db_mutex);
|
||||||
|
|
||||||
db.exec("DROP TABLE IF EXISTS items");
|
db.exec("DROP TABLE IF EXISTS items");
|
||||||
SQLite::Transaction transaction(db);
|
|
||||||
|
|
||||||
//example:
|
//example:
|
||||||
//{
|
//{
|
||||||
|
@ -60,8 +59,6 @@ void OriginsDB::overwrite (const Items& items) {
|
||||||
query.exec();
|
query.exec();
|
||||||
query.reset();
|
query.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
transaction.commit();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void OriginsDB::update (const Icons& icons) {
|
void OriginsDB::update (const Icons& icons) {
|
||||||
|
@ -72,7 +69,6 @@ void OriginsDB::update (const Icons& icons) {
|
||||||
//}
|
//}
|
||||||
|
|
||||||
Database db(m_db_mutex);
|
Database db(m_db_mutex);
|
||||||
SQLite::Transaction transaction(db);
|
|
||||||
SQLite::Statement query(db, "UPDATE items SET icon = ? WHERE item_id = ?");
|
SQLite::Statement query(db, "UPDATE items SET icon = ? WHERE item_id = ?");
|
||||||
|
|
||||||
for (const auto& ico : icons.icons) {
|
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()));
|
//base64_decode(std::string_view(ico.icon).substr(std::string_view("data:image/png;base64,").size()));
|
||||||
}
|
}
|
||||||
|
|
||||||
transaction.commit();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} //namespace oro
|
} //namespace oro
|
||||||
|
|
Loading…
Reference in a new issue