* @brief Loads the unique-id column order that the live FrameBuilder must mirror. */
| 101 | * @brief Loads the unique-id column order that the live FrameBuilder must mirror. |
| 102 | */ |
| 103 | bool Sessions::PlayerLoaderWorker::loadColumnOrder(QSqlDatabase& db, |
| 104 | int sessionId, |
| 105 | PlayerSessionPayload& payload, |
| 106 | QString& errorOut) |
| 107 | { |
| 108 | QSqlQuery q(db); |
| 109 | q.setForwardOnly(true); |
| 110 | q.prepare("SELECT unique_id FROM columns WHERE session_id = ? ORDER BY column_id ASC"); |
| 111 | q.bindValue(0, sessionId); |
| 112 | if (!q.exec()) { |
| 113 | errorOut = q.lastError().text(); |
| 114 | return false; |
| 115 | } |
| 116 | |
| 117 | while (q.next()) |
| 118 | payload.columnUniqueIds.push_back(q.value(0).toInt()); |
| 119 | |
| 120 | return true; |
| 121 | } |
| 122 | |
| 123 | /** |
| 124 | * @brief Loads the distinct frame timestamps for the session, with periodic cancel checks. |