MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _factory

Method _factory

lib/sqlalchemy/sql/selectable.py:2137–2146  ·  view source on GitHub ↗
(
        cls,
        selectable: _FromClauseArgument,
        sampling: Union[float, Function[Any]],
        name: Optional[str] = None,
        seed: Optional[roles.ExpressionElementRole[Any]] = None,
    )

Source from the content-addressed store, hash-verified

2135
2136 @classmethod
2137 def _factory(
2138 cls,
2139 selectable: _FromClauseArgument,
2140 sampling: Union[float, Function[Any]],
2141 name: Optional[str] = None,
2142 seed: Optional[roles.ExpressionElementRole[Any]] = None,
2143 ) -> TableSample:
2144 return coercions.expect(roles.FromClauseRole, selectable).tablesample(
2145 sampling, name=name, seed=seed
2146 )
2147
2148 @util.preload_module("sqlalchemy.sql.functions")
2149 def _init( # type: ignore[override]

Callers

nothing calls this directly

Calls 1

tablesampleMethod · 0.80

Tested by

no test coverage detected