| 300 | |
| 301 | |
| 302 | ISC_STATUS API_ROUTINE isc_array_set_desc(ISC_STATUS* status, |
| 303 | const SCHAR* relation_name, |
| 304 | const SCHAR* field_name, |
| 305 | const SSHORT* sql_dtype, |
| 306 | const SSHORT* sql_length, |
| 307 | const SSHORT* dimensions, |
| 308 | ISC_ARRAY_DESC* desc) |
| 309 | { |
| 310 | /************************************** |
| 311 | * |
| 312 | * i s c _ a r r a y _ s e t _ d e s c |
| 313 | * |
| 314 | ************************************** |
| 315 | * |
| 316 | * Functional description |
| 317 | * |
| 318 | **************************************/ |
| 319 | copy_exact_name(field_name, desc->array_desc_field_name, sizeof(desc->array_desc_field_name)); |
| 320 | copy_exact_name (relation_name, desc->array_desc_relation_name, sizeof(desc->array_desc_relation_name)); |
| 321 | |
| 322 | desc->array_desc_flags = 0; |
| 323 | desc->array_desc_dimensions = *dimensions; |
| 324 | desc->array_desc_length = *sql_length; |
| 325 | desc->array_desc_scale = 0; |
| 326 | |
| 327 | const SSHORT dtype = *sql_dtype & ~1; |
| 328 | |
| 329 | switch (dtype) |
| 330 | { |
| 331 | case SQL_VARYING: |
| 332 | desc->array_desc_dtype = blr_varying; |
| 333 | break; |
| 334 | case SQL_TEXT: |
| 335 | desc->array_desc_dtype = blr_text; |
| 336 | break; |
| 337 | case SQL_DOUBLE: |
| 338 | desc->array_desc_dtype = blr_double; |
| 339 | break; |
| 340 | case SQL_FLOAT: |
| 341 | desc->array_desc_dtype = blr_float; |
| 342 | break; |
| 343 | case SQL_D_FLOAT: |
| 344 | desc->array_desc_dtype = blr_d_float; |
| 345 | break; |
| 346 | case SQL_TIMESTAMP: |
| 347 | desc->array_desc_dtype = blr_timestamp; |
| 348 | break; |
| 349 | case SQL_TIMESTAMP_TZ: |
| 350 | desc->array_desc_dtype = blr_timestamp_tz; |
| 351 | break; |
| 352 | case SQL_TIMESTAMP_TZ_EX: |
| 353 | desc->array_desc_dtype = blr_ex_timestamp_tz; |
| 354 | break; |
| 355 | case SQL_TYPE_DATE: |
| 356 | desc->array_desc_dtype = blr_sql_date; |
| 357 | break; |
| 358 | case SQL_TYPE_TIME: |
| 359 | desc->array_desc_dtype = blr_sql_time; |
nothing calls this directly
no test coverage detected