MCPcopy Create free account
hub / github.com/Apress/beginning-cpp20 / db_fetch_row

Function db_fetch_row

Exercises/Modules/Chapter 16/Soln16_06/DB.cpp:97–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

95}
96
97DB_ROW db_fetch_row(DB_QUERY_RESULT* result)
98{
99 auto* theResult{ reinterpret_cast<QueryResult*>(result) };
100 if (!theResult || theResult->index >= theResult->data.size())
101 {
102 return nullptr;
103 }
104 else
105 {
106 return theResult->data[theResult->index++].data();
107 }
108}
109
110void db_free_result(DB_QUERY_RESULT* result)
111{

Callers 1

readCustomersFunction · 0.70

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected