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