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

Method __str__

lib/sqlalchemy/orm/query.py:2882–2894  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2880 return result
2881
2882 def __str__(self) -> str:
2883 statement = self._statement_20()
2884
2885 try:
2886 bind = (
2887 self._get_bind_args(statement, self.session.get_bind)
2888 if self.session
2889 else None
2890 )
2891 except sa_exc.UnboundExecutionError:
2892 bind = None
2893
2894 return str(statement.compile(bind))
2895
2896 def _get_bind_args(self, statement: Any, fn: Any, **kw: Any) -> Any:
2897 return fn(clause=statement, **kw)

Callers

nothing calls this directly

Calls 3

_statement_20Method · 0.95
_get_bind_argsMethod · 0.95
compileMethod · 0.45

Tested by

no test coverage detected