| 5276 | } |
| 5277 | |
| 5278 | int 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 | |
| 5296 | void *cdb2_column_value(cdb2_hndl_tp *hndl, int col) |
| 5297 | { |