MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / __init__

Method __init__

lib/sqlalchemy/orm/strategies.py:292–301  ·  view source on GitHub ↗
(self, parent, strategy_key)

Source from the content-addressed store, hash-verified

290@properties.ColumnProperty.strategy_for(query_expression=True)
291class _ExpressionColumnLoader(_ColumnLoader):
292 def __init__(self, parent, strategy_key):
293 super().__init__(parent, strategy_key)
294
295 # compare to the "default" expression that is mapped in
296 # the column. If it's sql.null, we don't need to render
297 # unless an expr is passed in the options.
298 null = sql.null().label(None)
299 self._have_default_expression = any(
300 not c.compare(null) for c in self.parent_property.columns
301 )
302
303 def setup_query(
304 self,

Callers

nothing calls this directly

Calls 3

__init__Method · 0.45
labelMethod · 0.45
compareMethod · 0.45

Tested by

no test coverage detected