MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / test_within_group_desc

Method test_within_group_desc

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

Source from the content-addressed store, hash-verified

925 )
926
927 def test_within_group_desc(self):
928 stmt = select(
929 table1.c.myid,
930 func.percentile_cont(0.5).within_group(table1.c.name.desc()),
931 )
932 self.assert_compile(
933 stmt,
934 "SELECT mytable.myid, percentile_cont(:percentile_cont_1) "
935 "WITHIN GROUP (ORDER BY mytable.name DESC) "
936 "AS anon_1 "
937 "FROM mytable",
938 {"percentile_cont_1": 0.5},
939 )
940
941 def test_within_group_w_over(self):
942 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