| 571 | } |
| 572 | |
| 573 | Dictionary::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 | |
| 596 | void IdoPgsqlConnection::ActivateObject(const DbObject::Ptr& dbobj) |
| 597 | { |