MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / execute

Method execute

test/sql/test_functions.py:1661–1662  ·  view source on GitHub ↗
(field)

Source from the content-addressed store, hash-verified

1659 date = datetime.date(2010, 5, 1)
1660
1661 def execute(field):
1662 return connection.execute(select(extract(field, date))).scalar()
1663
1664 assert execute("year") == 2010
1665 assert execute("month") == 5

Calls 3

selectFunction · 0.90
extractFunction · 0.90
scalarMethod · 0.45

Tested by

no test coverage detected