( statementPath: QueryNodePath<QueryParser.Query> )
| 62 | ["larg", "rarg", "selectStmt"].indexOf(path.parentPropKey) > -1 |
| 63 | |
| 64 | function getSubqueries( |
| 65 | statementPath: QueryNodePath<QueryParser.Query> |
| 66 | ): Array<QueryNodePath<QueryParser.Query>> { |
| 67 | const subqueries: Array<QueryNodePath<QueryParser.Query>> = [] |
| 68 | |
| 69 | traverseSubTree(statementPath, (path, $cancelRecursion) => { |
| 70 | if (path.node === statementPath.node) return |
| 71 | |
| 72 | if (isSubquery(path.node)) { |
| 73 | subqueries.push(path) |
| 74 | return $cancelRecursion |
| 75 | } |
| 76 | }) |
| 77 | |
| 78 | return subqueries |
| 79 | } |
| 80 | |
| 81 | function getTableReferences( |
| 82 | statementPath: QueryNodePath<any>, |
no test coverage detected