MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / __init__

Method __init__

lib/sqlalchemy/sql/selectable.py:1271–1315  ·  view source on GitHub ↗

Construct a new :class:`_expression.Join`. The usual entrypoint here is the :func:`_expression.join` function or the :meth:`_expression.FromClause.join` method of any :class:`_expression.FromClause` object.

(
        self,
        left: _FromClauseArgument,
        right: _FromClauseArgument,
        onclause: Optional[_OnClauseArgument] = None,
        isouter: bool = False,
        full: bool = False,
    )

Source from the content-addressed store, hash-verified

1269 full: bool
1270
1271 def __init__(
1272 self,
1273 left: _FromClauseArgument,
1274 right: _FromClauseArgument,
1275 onclause: Optional[_OnClauseArgument] = None,
1276 isouter: bool = False,
1277 full: bool = False,
1278 ):
1279 """Construct a new :class:`_expression.Join`.
1280
1281 The usual entrypoint here is the :func:`_expression.join`
1282 function or the :meth:`_expression.FromClause.join` method of any
1283 :class:`_expression.FromClause` object.
1284
1285 """
1286
1287 # when deannotate was removed here, callcounts went up for ORM
1288 # compilation of eager joins, since there were more comparisons of
1289 # annotated objects. test_orm.py -> test_fetch_results
1290 # was therefore changed to show a more real-world use case, where the
1291 # compilation is cached; there's no change in post-cache callcounts.
1292 # callcounts for a single compilation in that particular test
1293 # that includes about eight joins about 1100 extra fn calls, from
1294 # 29200 -> 30373
1295
1296 self.left = coercions.expect(
1297 roles.FromClauseRole,
1298 left,
1299 )
1300 self.right = coercions.expect(
1301 roles.FromClauseRole,
1302 right,
1303 ).self_group()
1304
1305 if onclause is None:
1306 self.onclause = self._match_primaries(self.left, self.right)
1307 else:
1308 # note: taken from If91f61527236fd4d7ae3cad1f24c38be921c90ba
1309 # not merged yet
1310 self.onclause = coercions.expect(
1311 roles.OnClauseRole, onclause
1312 ).self_group(against=operators._asbool)
1313
1314 self.isouter = isouter
1315 self.full = full
1316
1317 @util.ro_non_memoized_property
1318 def description(self) -> str:

Callers 6

__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45

Calls 2

_match_primariesMethod · 0.95
self_groupMethod · 0.45

Tested by

no test coverage detected