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

Function db_num_fields

Exercises/NoModules/Chapter 16/Exer16_06/DB.cpp:84–95  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82}
83
84int db_num_fields(DB_QUERY_RESULT* result)
85{
86 auto* theResult{ reinterpret_cast<QueryResult*>(result) };
87 if (!theResult || theResult->data.empty())
88 {
89 return -1;
90 }
91 else
92 {
93 return static_cast<int>(theResult->data.front().size());
94 }
95}
96
97DB_ROW db_fetch_row(DB_QUERY_RESULT* result)
98{

Callers 1

verifyCustomerFieldsFunction · 0.70

Calls 2

emptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected