MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / loadColumnOrder

Method loadColumnOrder

app/src/Sessions/PlayerLoaderWorker.cpp:103–121  ·  view source on GitHub ↗

* @brief Loads the unique-id column order that the live FrameBuilder must mirror. */

Source from the content-addressed store, hash-verified

101 * @brief Loads the unique-id column order that the live FrameBuilder must mirror.
102 */
103bool 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.

Callers

nothing calls this directly

Calls 5

execMethod · 0.80
nextMethod · 0.80
textMethod · 0.45
lastErrorMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected