MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / visit_tablesample

Method visit_tablesample

lib/sqlalchemy/sql/compiler.py:4570–4581  ·  view source on GitHub ↗
(self, tablesample, asfrom=False, **kw)

Source from the content-addressed store, hash-verified

4568 return "LATERAL %s" % self.visit_alias(lateral_, **kw)
4569
4570 def visit_tablesample(self, tablesample, asfrom=False, **kw):
4571 text = "%s TABLESAMPLE %s" % (
4572 self.visit_alias(tablesample, asfrom=True, **kw),
4573 tablesample._get_method()._compiler_dispatch(self, **kw),
4574 )
4575
4576 if tablesample.seed is not None:
4577 text += " REPEATABLE (%s)" % (
4578 tablesample.seed._compiler_dispatch(self, **kw)
4579 )
4580
4581 return text
4582
4583 def _render_values(self, element, **kw):
4584 kw.setdefault("literal_binds", element.literal_binds)

Callers

nothing calls this directly

Calls 3

visit_aliasMethod · 0.95
_get_methodMethod · 0.80
_compiler_dispatchMethod · 0.45

Tested by

no test coverage detected