MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_collate

Method test_collate

test/sql/test_compiler.py:2356–2373  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2354 )
2355
2356 def test_collate(self):
2357 # columns clause
2358 self.assert_compile(
2359 select(column("x").collate("bar")),
2360 "SELECT x COLLATE bar AS anon_1",
2361 )
2362
2363 # WHERE clause
2364 self.assert_compile(
2365 select(column("x")).where(column("x").collate("bar") == "foo"),
2366 "SELECT x WHERE (x COLLATE bar) = :param_1",
2367 )
2368
2369 # ORDER BY clause
2370 self.assert_compile(
2371 select(column("x")).order_by(column("x").collate("bar")),
2372 "SELECT x ORDER BY x COLLATE bar",
2373 )
2374
2375 def test_literal(self):
2376 self.assert_compile(

Callers

nothing calls this directly

Calls 6

selectFunction · 0.90
columnFunction · 0.90
assert_compileMethod · 0.80
collateMethod · 0.45
whereMethod · 0.45
order_byMethod · 0.45

Tested by

no test coverage detected