* Find ModelIterable.__iter__ — the default iterable QuerySet invokes via * `self._iterable_class(self)`. Its __iter__ statically calls the SQL compiler, * so linking the dynamic dispatch here closes the QuerySet→SQL call chain. * (Over-approximates to the default iterable; .values()/.values_list
(context: ResolutionContext)
| 148 | * other BaseIterable subclasses, but ModelIterable is the canonical path.) |
| 149 | */ |
| 150 | function resolveModelIterableIter(context: ResolutionContext): string | null { |
| 151 | const cls = context.getNodesByName('ModelIterable').find((n) => n.kind === 'class'); |
| 152 | if (!cls) return null; |
| 153 | const iter = context.getNodesByName('__iter__').find( |
| 154 | (n) => n.filePath === cls.filePath && n.startLine >= cls.startLine && n.startLine <= cls.endLine |
| 155 | ); |
| 156 | return iter ? iter.id : null; |
| 157 | } |
| 158 | |
| 159 | /** |
| 160 | * Parse a Django URL handler expression and return the symbol/module to link. |
no test coverage detected