Collect custom aliases from select fields (stored as 'resolved as alias' strings by select()).
()
| 1789 | |
| 1790 | /** Collect custom aliases from select fields (stored as 'resolved as alias' strings by select()). */ |
| 1791 | private getSelectAliases(): Set<string> { |
| 1792 | const aliases = new Set<string>(); |
| 1793 | |
| 1794 | for (const field of this.#state.fields ?? []) { |
| 1795 | if (typeof field === 'string') { |
| 1796 | const m = FIELD_ALIAS_RE.exec(field); |
| 1797 | |
| 1798 | if (m) { |
| 1799 | aliases.add(m[2]); |
| 1800 | } |
| 1801 | } |
| 1802 | } |
| 1803 | |
| 1804 | return aliases; |
| 1805 | } |
| 1806 | |
| 1807 | /** |
| 1808 | * Adds a GROUP BY clause to the query. |