| 290 | @properties.ColumnProperty.strategy_for(query_expression=True) |
| 291 | class _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, |