MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / visit_select

Method visit_select

test/sql/test_compiler.py:8012–8023  ·  view source on GitHub ↗
(self, stmt, *arg, **kw)

Source from the content-addressed store, hash-verified

8010
8011 class MyCompiler(compiler.SQLCompiler):
8012 def visit_select(self, stmt, *arg, **kw):
8013 if stmt is stmt2.element:
8014 with self._nested_result() as nested:
8015 contexts[stmt2.element] = nested
8016 text = super().visit_select(
8017 stmt2.element,
8018 )
8019 self._add_to_result_map("k1", "k1", (1, 2, 3), int_)
8020 else:
8021 text = super().visit_select(stmt, *arg, **kw)
8022 self._add_to_result_map("k2", "k2", (3, 4, 5), int_)
8023 return text
8024
8025 comp = MyCompiler(default.DefaultDialect(), stmt1)
8026 eq_(

Callers

nothing calls this directly

Calls 2

_nested_resultMethod · 0.80
_add_to_result_mapMethod · 0.80

Tested by

no test coverage detected