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

Method case_greatest

test/ext/test_compiler.py:370–377  ·  view source on GitHub ↗
(element, compiler, **kw)

Source from the content-addressed store, hash-verified

368
369 @compiles(greatest, "mssql")
370 def case_greatest(element, compiler, **kw):
371 arg1, arg2 = list(element.clauses)
372 return "CASE WHEN %s > %s THEN %s ELSE %s END" % (
373 compiler.process(arg1),
374 compiler.process(arg2),
375 compiler.process(arg1),
376 compiler.process(arg2),
377 )
378
379 self.assert_compile(
380 greatest("a", "b"),

Callers

nothing calls this directly

Calls 1

processMethod · 0.45

Tested by

no test coverage detected