(parameter, add_criteria=False)
| 438 | tab = table("foo", column("id"), column("col")) |
| 439 | |
| 440 | def run_my_statement(parameter, add_criteria=False): |
| 441 | stmt = lambda_stmt(lambda: select(tab)) |
| 442 | |
| 443 | stmt = stmt.add_criteria( |
| 444 | lambda s: ( |
| 445 | s.where(tab.c.col > parameter) |
| 446 | if add_criteria |
| 447 | else s.where(tab.c.col == parameter) |
| 448 | ), |
| 449 | ) |
| 450 | |
| 451 | stmt += lambda s: s.order_by(tab.c.id) |
| 452 | |
| 453 | return stmt |
| 454 | |
| 455 | assert_raises_message( |
| 456 | exc.InvalidRequestError, |
nothing calls this directly
no test coverage detected