(q: any)
| 41 | |
| 42 | // Helper function to recursively extract collections from a query |
| 43 | function extractFromQuery(q: any) { |
| 44 | // Extract from FROM clause |
| 45 | if (q.from) { |
| 46 | extractFromSource(q.from) |
| 47 | } |
| 48 | |
| 49 | // Extract from JOIN clauses |
| 50 | if (q.join && Array.isArray(q.join)) { |
| 51 | for (const joinClause of q.join) { |
| 52 | if (joinClause.from) { |
| 53 | extractFromSource(joinClause.from) |
| 54 | } |
| 55 | } |
| 56 | } |
| 57 | |
| 58 | // Extract from SELECT (for IncludesSubquery) |
| 59 | if (q.select) { |
| 60 | extractFromSelect(q.select) |
| 61 | } |
| 62 | } |
| 63 | |
| 64 | function extractFromSelect(select: any) { |
| 65 | for (const [key, value] of Object.entries(select)) { |
no test coverage detected