MCPcopy Create free account
hub / github.com/bloomberg/comdb2 / cdb2_column_size

Function cdb2_column_size

cdb2api/cdb2api.c:5278–5294  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5276}
5277
5278int cdb2_column_size(cdb2_hndl_tp *hndl, int col)
5279{
5280 if (hndl->fdb_hndl)
5281 hndl = hndl->fdb_hndl;
5282 CDB2SQLRESPONSE *lastresponse = hndl->lastresponse;
5283 /* sanity check. just in case. */
5284 if (lastresponse == NULL)
5285 return -1;
5286 /* data came back in the child column structure */
5287 if (lastresponse->value != NULL)
5288 return lastresponse->value[col]->value.len;
5289 /* sqlite row */
5290 if (hndl->lastresponse->has_sqlite_row)
5291 return lastresponse->sqlite_row.len;
5292 /* data came back in the parent CDB2SQLRESPONSE structure */
5293 return (col_values_flattened(lastresponse)) ? lastresponse->values[col].len : -1;
5294}
5295
5296void *cdb2_column_value(cdb2_hndl_tp *hndl, int col)
5297{

Callers 15

print_columnFunction · 0.85
append_columnMethod · 0.85
printColFunction · 0.85
find_match_lsnFunction · 0.85
apply_seqnoFunction · 0.85
mainFunction · 0.85
populateFunction · 0.85
test_02Function · 0.85
test_04Function · 0.85
test_bind_blob_arrayFunction · 0.85
test_pass_array_to_spFunction · 0.85
run_ins_spFunction · 0.85

Calls 1

col_values_flattenedFunction · 0.85

Tested by 5

test_02Function · 0.68
test_04Function · 0.68
test_bind_blob_arrayFunction · 0.68
test_pass_array_to_spFunction · 0.68
printColFunction · 0.68