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