Given a target clause and a second to search within, return True if the target is plainly present in the search without any subqueries or aliases involved. Basically descends through Joins.
(clause, search)
| 444 | |
| 445 | |
| 446 | def clause_is_present(clause, search): |
| 447 | """Given a target clause and a second to search within, return True |
| 448 | if the target is plainly present in the search without any |
| 449 | subqueries or aliases involved. |
| 450 | |
| 451 | Basically descends through Joins. |
| 452 | |
| 453 | """ |
| 454 | |
| 455 | for elem in surface_selectables(search): |
| 456 | if clause == elem: # use == here so that Annotated's compare |
| 457 | return True |
| 458 | else: |
| 459 | return False |
| 460 | |
| 461 | |
| 462 | def tables_from_leftmost(clause: FromClause) -> Iterator[FromClause]: |
nothing calls this directly
no test coverage detected