(self)
| 569 | ) |
| 570 | |
| 571 | def test_basic_toplevel_resultmap(self): |
| 572 | t = text("select id, name from user").columns(id=Integer, name=String) |
| 573 | |
| 574 | col_pos = {col.name: idx for idx, col in enumerate(t.selected_columns)} |
| 575 | |
| 576 | compiled = t.compile() |
| 577 | eq_( |
| 578 | compiled._create_result_map(), |
| 579 | { |
| 580 | "id": ( |
| 581 | "id", |
| 582 | (t.selected_columns.id, "id", "id", "id"), |
| 583 | t.selected_columns.id.type, |
| 584 | col_pos["id"], |
| 585 | ), |
| 586 | "name": ( |
| 587 | "name", |
| 588 | (t.selected_columns.name, "name", "name", "name"), |
| 589 | t.selected_columns.name.type, |
| 590 | col_pos["name"], |
| 591 | ), |
| 592 | }, |
| 593 | ) |
| 594 | |
| 595 | def test_basic_subquery_resultmap(self): |
| 596 | t = ( |
nothing calls this directly
no test coverage detected