MCPcopy Create free account
hub / github.com/Icinga/icinga2 / FetchRow

Method FetchRow

lib/db_ido_pgsql/idopgsqlconnection.cpp:573–594  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

571}
572
573Dictionary::Ptr IdoPgsqlConnection::FetchRow(const IdoPgsqlResult& result, int row)
574{
575 AssertOnWorkQueue();
576
577 if (row >= m_Pgsql->ntuples(result.get()))
578 return nullptr;
579
580 int columns = m_Pgsql->nfields(result.get());
581
582 DictionaryData dict;
583
584 for (int column = 0; column < columns; column++) {
585 Value value;
586
587 if (!m_Pgsql->getisnull(result.get(), row, column))
588 value = m_Pgsql->getvalue(result.get(), row, column);
589
590 dict.emplace_back(m_Pgsql->fname(result.get(), column), value);
591 }
592
593 return new Dictionary(std::move(dict));
594}
595
596void IdoPgsqlConnection::ActivateObject(const DbObject::Ptr& dbobj)
597{

Callers

nothing calls this directly

Calls 6

ntuplesMethod · 0.80
nfieldsMethod · 0.80
getisnullMethod · 0.80
getvalueMethod · 0.80
fnameMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected