* @brief Probes the readings schema for the final-value columns (absent in old session files). */
| 483 | * @brief Probes the readings schema for the final-value columns (absent in old session files). |
| 484 | */ |
| 485 | void 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. |