MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_extract

Method test_extract

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

Source from the content-addressed store, hash-verified

1013 self.assert_compile(func.length(3), "LEN(:length_1)")
1014
1015 def test_extract(self):
1016 t = table("t", column("col1"))
1017
1018 for field in "day", "month", "year":
1019 self.assert_compile(
1020 select(extract(field, t.c.col1)),
1021 "SELECT DATEPART(%s, t.col1) AS anon_1 FROM t" % field,
1022 )
1023
1024 def test_update_returning(self):
1025 table1 = table(

Callers

nothing calls this directly

Calls 5

tableFunction · 0.90
columnFunction · 0.90
selectFunction · 0.90
extractFunction · 0.90
assert_compileMethod · 0.80

Tested by

no test coverage detected