MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_function

Method test_function

test/dialect/mssql/test_compiler.py:998–1009  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

996 )
997
998 def test_function(self):
999 self.assert_compile(func.foo(1, 2), "foo(:foo_1, :foo_2)")
1000 self.assert_compile(func.current_time(), "CURRENT_TIME")
1001 self.assert_compile(func.foo(), "foo()")
1002 m = MetaData()
1003 t = Table(
1004 "sometable", m, Column("col1", Integer), Column("col2", Integer)
1005 )
1006 self.assert_compile(
1007 select(func.max(t.c.col1)),
1008 "SELECT max(sometable.col1) AS max_1 FROM sometable",
1009 )
1010
1011 def test_function_overrides(self):
1012 self.assert_compile(func.current_date(), "GETDATE()")

Callers

nothing calls this directly

Calls 8

MetaDataClass · 0.90
TableClass · 0.90
ColumnClass · 0.90
selectFunction · 0.90
assert_compileMethod · 0.80
current_timeMethod · 0.80
maxMethod · 0.80
fooMethod · 0.45

Tested by

no test coverage detected