MCPcopy Create free account
hub / github.com/OpenArkStudio/ARK / TableToDBData

Method TableToDBData

src/plugin/kernel/src/AFCKernelModule.cpp:1786–1810  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1784}
1785
1786bool AFCKernelModule::TableToDBData(AFITable* pTable, AFMsg::pb_db_table& pb_data)
1787{
1788 ARK_ASSERT_RET_VAL(pTable != nullptr, false);
1789
1790 for (auto pRow = pTable->First(); pRow != nullptr; pRow = pTable->Next())
1791 {
1792 auto pNodeManager = GetNodeManager(pRow);
1793 if (!pNodeManager)
1794 {
1795 continue;
1796 }
1797
1798 AFMsg::pb_db_entity_data row_data;
1799
1800 auto& data_list = pNodeManager->GetDataList();
1801 for (auto& iter : data_list)
1802 {
1803 NodeToDBData(iter.second, row_data);
1804 }
1805
1806 pb_data.mutable_datas_value()->insert({pRow->GetRow(), row_data});
1807 }
1808
1809 return true;
1810}
1811
1812//----------entity to pb client data---------------
1813bool AFCKernelModule::NodeToPBData(AFINode* pNode, AFMsg::pb_entity_data* pb_data)

Callers

nothing calls this directly

Calls 4

GetRowMethod · 0.80
FirstMethod · 0.45
NextMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected