MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_within_group_desc

Method test_within_group_desc

test/sql/test_functions.py:1008–1020  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1006 )
1007
1008 def test_within_group_desc(self):
1009 stmt = select(
1010 table1.c.myid,
1011 func.percentile_cont(0.5).within_group(table1.c.name.desc()),
1012 )
1013 self.assert_compile(
1014 stmt,
1015 "SELECT mytable.myid, percentile_cont(:percentile_cont_2) "
1016 "WITHIN GROUP (ORDER BY mytable.name DESC) "
1017 "AS percentile_cont_1 "
1018 "FROM mytable",
1019 {"percentile_cont_2": 0.5},
1020 )
1021
1022 def test_within_group_w_over(self):
1023 stmt = select(

Callers

nothing calls this directly

Calls 5

selectFunction · 0.90
percentile_contMethod · 0.80
assert_compileMethod · 0.80
within_groupMethod · 0.45
descMethod · 0.45

Tested by

no test coverage detected