Resolve the alias or compute a default name for a WITH/RETURN item */
| 3466 | |
| 3467 | /* Resolve the alias or compute a default name for a WITH/RETURN item */ |
| 3468 | static const char *resolve_item_alias(const cbm_return_item_t *item, char *name_buf, |
| 3469 | size_t buf_sz) { |
| 3470 | if (item->alias) { |
| 3471 | return item->alias; |
| 3472 | } |
| 3473 | if (item->property) { |
| 3474 | snprintf(name_buf, buf_sz, "%s.%s", item->variable, item->property); |
| 3475 | } else { |
| 3476 | snprintf(name_buf, buf_sz, "%s", item->variable); |
| 3477 | } |
| 3478 | return name_buf; |
| 3479 | } |
| 3480 | |
| 3481 | /* ── WITH clause: project bindings through aggregation or rename ── */ |
| 3482 |
no outgoing calls
no test coverage detected