(self)
| 741 | ) |
| 742 | |
| 743 | def test_use_labels(self): |
| 744 | self.assert_compile( |
| 745 | select(table1.c.myid == 5).set_label_style( |
| 746 | LABEL_STYLE_TABLENAME_PLUS_COL |
| 747 | ), |
| 748 | "SELECT mytable.myid = :myid_1 AS anon_1 FROM mytable", |
| 749 | ) |
| 750 | |
| 751 | self.assert_compile( |
| 752 | select(func.foo()).set_label_style(LABEL_STYLE_TABLENAME_PLUS_COL), |
| 753 | "SELECT foo() AS foo_1", |
| 754 | ) |
| 755 | |
| 756 | # this is native_boolean=False for default dialect |
| 757 | self.assert_compile( |
| 758 | select(not_(True)).set_label_style(LABEL_STYLE_TABLENAME_PLUS_COL), |
| 759 | "SELECT :param_1 = 0 AS anon_1", |
| 760 | ) |
| 761 | |
| 762 | self.assert_compile( |
| 763 | select(cast("data", Integer)).set_label_style( |
| 764 | LABEL_STYLE_TABLENAME_PLUS_COL |
| 765 | ), |
| 766 | "SELECT CAST(:param_1 AS INTEGER) AS anon_1", |
| 767 | ) |
| 768 | |
| 769 | self.assert_compile( |
| 770 | select( |
| 771 | func.sum(func.lala(table1.c.myid).label("foo")).label("bar") |
| 772 | ), |
| 773 | "SELECT sum(lala(mytable.myid)) AS bar FROM mytable", |
| 774 | ) |
| 775 | |
| 776 | def test_use_labels_keyed(self): |
| 777 | self.assert_compile( |
nothing calls this directly
no test coverage detected