| 734 | } |
| 735 | |
| 736 | Dictionary::Ptr IdoMysqlConnection::FetchRow(const IdoMysqlResult& result) |
| 737 | { |
| 738 | AssertOnWorkQueue(); |
| 739 | |
| 740 | MYSQL_ROW row; |
| 741 | MYSQL_FIELD *field; |
| 742 | unsigned long *lengths, i; |
| 743 | |
| 744 | row = m_Mysql->fetch_row(result.get()); |
| 745 | |
| 746 | if (!row) |
| 747 | return nullptr; |
| 748 | |
| 749 | lengths = m_Mysql->fetch_lengths(result.get()); |
| 750 | |
| 751 | if (!lengths) |
| 752 | return nullptr; |
| 753 | |
| 754 | Dictionary::Ptr dict = new Dictionary(); |
| 755 | |
| 756 | m_Mysql->field_seek(result.get(), 0); |
| 757 | for (field = m_Mysql->fetch_field(result.get()), i = 0; field; field = m_Mysql->fetch_field(result.get()), i++) |
| 758 | dict->Set(field->name, String(row[i], row[i] + lengths[i])); |
| 759 | |
| 760 | return dict; |
| 761 | } |
| 762 | |
| 763 | void IdoMysqlConnection::DiscardRows(const IdoMysqlResult& result) |
| 764 | { |
nothing calls this directly
no test coverage detected