| 588 | }; |
| 589 | |
| 590 | void SQLiteQueryExecutor::replaceThread(const Thread &thread, bool backupItem) |
| 591 | const { |
| 592 | std::string tableName = backupItem ? "backup_threads" : "threads"; |
| 593 | std::string replaceThreadSQL = "REPLACE INTO " + tableName + |
| 594 | "(" |
| 595 | " id, type, name, description, color, creation_time, parent_thread_id," |
| 596 | " containing_thread_id, community, members, roles, current_user," |
| 597 | " source_message_id, replies_count, avatar, pinned_count, timestamps," |
| 598 | " pinned_message_ids) " |
| 599 | "VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);"; |
| 600 | |
| 601 | replaceEntity<Thread>(this->getConnection(), replaceThreadSQL, thread); |
| 602 | }; |
| 603 | |
| 604 | void SQLiteQueryExecutor::removeAllThreads() const { |
| 605 | constexpr std::string_view tables[] = {"threads", "backup_threads"}; |
no test coverage detected