MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / visit_column

Method visit_column

lib/sqlalchemy/dialects/mssql/base.py:2279–2301  ·  view source on GitHub ↗
(self, column, add_to_result_map=None, **kw)

Source from the content-addressed store, hash-verified

2277
2278 @_with_legacy_schema_aliasing
2279 def visit_column(self, column, add_to_result_map=None, **kw):
2280 if (
2281 column.table is not None
2282 and (not self.isupdate and not self.isdelete)
2283 or self.is_subquery()
2284 ):
2285 # translate for schema-qualified table aliases
2286 t = self._schema_aliased_table(column.table)
2287 if t is not None:
2288 converted = elements._corresponding_column_or_error(t, column)
2289 if add_to_result_map is not None:
2290 add_to_result_map(
2291 column.name,
2292 column.name,
2293 (column, column.name, column.key),
2294 column.type,
2295 )
2296
2297 return super().visit_column(converted, **kw)
2298
2299 return super().visit_column(
2300 column, add_to_result_map=add_to_result_map, **kw
2301 )
2302
2303 def _schema_aliased_table(self, table):
2304 if getattr(table, "schema", None) is not None:

Callers

nothing calls this directly

Calls 2

_schema_aliased_tableMethod · 0.95
is_subqueryMethod · 0.80

Tested by

no test coverage detected