* Recursively collects all PropRef nodes from an expression tree.
(expr: BasicExpression)
| 1085 | * Recursively collects all PropRef nodes from an expression tree. |
| 1086 | */ |
| 1087 | function collectRefsFromExpression(expr: BasicExpression): Array<PropRef> { |
| 1088 | const refs: Array<PropRef> = [] |
| 1089 | switch (expr.type) { |
| 1090 | case `ref`: |
| 1091 | refs.push(expr) |
| 1092 | break |
| 1093 | case `func`: |
| 1094 | for (const arg of (expr as any).args ?? []) { |
| 1095 | refs.push(...collectRefsFromExpression(arg)) |
| 1096 | } |
| 1097 | break |
| 1098 | default: |
| 1099 | break |
| 1100 | } |
| 1101 | return refs |
| 1102 | } |
| 1103 | |
| 1104 | /** |
| 1105 | * Checks whether a WHERE clause references any parent alias. |
no outgoing calls
no test coverage detected