(self)
| 1245 | ) |
| 1246 | |
| 1247 | def test_aggregate_order_by_adapt(self): |
| 1248 | table = Table( |
| 1249 | "table1", MetaData(), Column("a", Integer), Column("b", Integer) |
| 1250 | ) |
| 1251 | expr = aggregate_order_by(func.array_agg(table.c.a), table.c.b.desc()) |
| 1252 | stmt = select(expr) |
| 1253 | |
| 1254 | a1 = table.alias("foo") |
| 1255 | stmt2 = util.ClauseAdapter(a1).traverse(stmt) |
| 1256 | self.assert_compile( |
| 1257 | stmt2, |
| 1258 | "SELECT array_agg(foo.a ORDER BY foo.b DESC) AS array_agg_1 " |
| 1259 | "FROM table1 AS foo", |
| 1260 | ) |
| 1261 | |
| 1262 | |
| 1263 | class CollectionAggregateFunctionTest(fixtures.TestBase, AssertsCompiledSQL): |
nothing calls this directly
no test coverage detected