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

Method test_within_group

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

Source from the content-addressed store, hash-verified

895 )
896
897 def test_within_group(self):
898 stmt = select(
899 table1.c.myid,
900 func.percentile_cont(0.5).within_group(table1.c.name),
901 )
902 self.assert_compile(
903 stmt,
904 "SELECT mytable.myid, percentile_cont(:percentile_cont_1) "
905 "WITHIN GROUP (ORDER BY mytable.name) "
906 "AS anon_1 "
907 "FROM mytable",
908 {"percentile_cont_1": 0.5},
909 )
910
911 def test_within_group_multi(self):
912 stmt = select(

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected