MCPcopy Create free account
hub / github.com/OpenSIPS/opensips / dbt_convert_result

Function dbt_convert_result

modules/db_text/dbt_api.c:235–252  ·  view source on GitHub ↗

* Fill the structure with data from database */

Source from the content-addressed store, hash-verified

233 * Fill the structure with data from database
234 */
235static int dbt_convert_result(db_con_t* _h, db_res_t* _r)
236{
237 if (!_h || !_r) {
238 LM_ERR("invalid parameter\n");
239 return -1;
240 }
241 if (dbt_get_columns(_h, _r) < 0) {
242 LM_ERR("failed to get column names\n");
243 return -2;
244 }
245
246 if (dbt_convert_rows(_h, _r) < 0) {
247 LM_ERR("failed to convert rows\n");
248 db_free_columns(_r);
249 return -3;
250 }
251 return 0;
252}
253
254/*
255 * Retrieve result set

Callers 1

dbt_get_resultFunction · 0.85

Calls 3

dbt_get_columnsFunction · 0.85
dbt_convert_rowsFunction · 0.85
db_free_columnsFunction · 0.85

Tested by

no test coverage detected