| 240 | } |
| 241 | |
| 242 | void StateHistTable::FetchRows(const AddRowFunction& addRowFn) |
| 243 | { |
| 244 | Log(LogDebug, "StateHistTable") |
| 245 | << "Pre-selecting log file from " << m_TimeFrom << " until " << m_TimeUntil; |
| 246 | |
| 247 | /* create log file index */ |
| 248 | LivestatusLogUtility::CreateLogIndex(m_CompatLogPath, m_LogFileIndex); |
| 249 | |
| 250 | /* generate log cache */ |
| 251 | LivestatusLogUtility::CreateLogCache(m_LogFileIndex, this, m_TimeFrom, m_TimeUntil, addRowFn); |
| 252 | |
| 253 | Checkable::Ptr checkable; |
| 254 | |
| 255 | for (const auto& kv : m_CheckablesCache) { |
| 256 | for (Dictionary::Ptr state_hist_bag : kv.second) { |
| 257 | /* pass a dictionary from state history array */ |
| 258 | if (!addRowFn(state_hist_bag, LivestatusGroupByNone, Empty)) |
| 259 | return; |
| 260 | } |
| 261 | } |
| 262 | } |
| 263 | |
| 264 | Object::Ptr StateHistTable::HostAccessor(const Value& row, const Column::ObjectAccessor&) |
| 265 | { |