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

Method detectFinalValueColumns

app/src/Sessions/Player.cpp:485–501  ·  view source on GitHub ↗

* @brief Probes the readings schema for the final-value columns (absent in old session files). */

Source from the content-addressed store, hash-verified

483 * @brief Probes the readings schema for the final-value columns (absent in old session files).
484 */
485void Sessions::Player::detectFinalValueColumns()
486{
487 Q_ASSERT(m_db && m_db->isOpen());
488
489 m_hasFinalValues = false;
490
491 QSqlQuery probe(*m_db);
492 if (!probe.exec("PRAGMA table_info(readings)"))
493 return;
494
495 while (probe.next()) {
496 if (probe.value(1).toString() == QLatin1String("final_numeric_value")) {
497 m_hasFinalValues = true;
498 return;
499 }
500 }
501}
502
503/**
504 * @brief Closes the per-frame DB connection and removes the named connection.

Callers

nothing calls this directly

Calls 4

execMethod · 0.80
nextMethod · 0.80
isOpenMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected