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

Method visit_extract

lib/sqlalchemy/dialects/sqlite/base.py:1485–1494  ·  view source on GitHub ↗
(self, extract, **kw)

Source from the content-addressed store, hash-verified

1483 return self.process(cast.clause, **kwargs)
1484
1485 def visit_extract(self, extract, **kw):
1486 try:
1487 return "CAST(STRFTIME('%s', %s) AS INTEGER)" % (
1488 self.extract_map[extract.field],
1489 self.process(extract.expr, **kw),
1490 )
1491 except KeyError as err:
1492 raise exc.CompileError(
1493 "%s is not a valid extract argument." % extract.field
1494 ) from err
1495
1496 def returning_clause(
1497 self,

Callers

nothing calls this directly

Calls 1

processMethod · 0.45

Tested by

no test coverage detected