(self)
| 2183 | ) |
| 2184 | |
| 2185 | def test_custom_order_by_clause(self): |
| 2186 | class CustomCompiler(PGCompiler): |
| 2187 | def order_by_clause(self, select, **kw): |
| 2188 | return super().order_by_clause(select, **kw) + " CUSTOMIZED" |
| 2189 | |
| 2190 | class CustomDialect(PGDialect): |
| 2191 | name = "custom" |
| 2192 | statement_compiler = CustomCompiler |
| 2193 | |
| 2194 | stmt = select(table1.c.myid).order_by(table1.c.myid) |
| 2195 | self.assert_compile( |
| 2196 | stmt, |
| 2197 | "SELECT mytable.myid FROM mytable ORDER BY " |
| 2198 | "mytable.myid CUSTOMIZED", |
| 2199 | dialect=CustomDialect(), |
| 2200 | ) |
| 2201 | |
| 2202 | def test_custom_group_by_clause(self): |
| 2203 | class CustomCompiler(PGCompiler): |
nothing calls this directly
no test coverage detected