| 1524 | // |
| 1525 | |
| 1526 | static void create_index( gpre_req* request, const gpre_index* index) |
| 1527 | { |
| 1528 | if (index->ind_symbol) |
| 1529 | put_symbol(request, isc_dyn_def_idx, index->ind_symbol); |
| 1530 | else |
| 1531 | { |
| 1532 | // An index created because of the UNIQUE constraint on this field. |
| 1533 | put_cstring(request, isc_dyn_def_idx, ""); |
| 1534 | } |
| 1535 | |
| 1536 | put_symbol(request, isc_dyn_rel_name, index->ind_relation->rel_symbol); |
| 1537 | |
| 1538 | if (index->ind_flags & IND_dup_flag) |
| 1539 | put_numeric(request, isc_dyn_idx_unique, 1); |
| 1540 | |
| 1541 | if (index->ind_flags & IND_descend) |
| 1542 | put_numeric(request, isc_dyn_idx_type, 1); |
| 1543 | |
| 1544 | if (index->ind_symbol) |
| 1545 | { |
| 1546 | for (const gpre_fld* field = index->ind_fields; field; field = field->fld_next) |
| 1547 | { |
| 1548 | put_symbol(request, isc_dyn_fld_name, field->fld_symbol); |
| 1549 | } |
| 1550 | } |
| 1551 | else |
| 1552 | { |
| 1553 | // An index created on this one field because of the UNIQUE constraint on this field. |
| 1554 | put_symbol(request, isc_dyn_fld_name, index->ind_fields->fld_symbol); |
| 1555 | } |
| 1556 | |
| 1557 | request->add_end(); |
| 1558 | } |
| 1559 | |
| 1560 | |
| 1561 | //____________________________________________________________ |
no test coverage detected