( query: QueryIR, alias: string, )
| 1509 | } |
| 1510 | |
| 1511 | function getRefFromAlias( |
| 1512 | query: QueryIR, |
| 1513 | alias: string, |
| 1514 | ): CollectionRef | QueryRef | void { |
| 1515 | for (const source of getFromSources(query.from)) { |
| 1516 | if (source.alias === alias) { |
| 1517 | return source |
| 1518 | } |
| 1519 | } |
| 1520 | |
| 1521 | for (const join of query.join || []) { |
| 1522 | if (join.from.alias === alias) { |
| 1523 | return join.from |
| 1524 | } |
| 1525 | } |
| 1526 | } |
| 1527 | |
| 1528 | function getFromSources( |
| 1529 | from: QueryIR[`from`], |
no test coverage detected