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

Method __init__

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

__init__Method · 0.45
labelMethod · 0.45
compareMethod · 0.45

Tested by

no test coverage detected